SPI driver for Debian

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
2
down vote

favorite












This is the Linux:




PRETTY_NAME="Debian GNU/Linux 8 (jessie)"



NAME="Debian GNU/Linux"



VERSION_ID="8"



VERSION="8 (jessie)"



ID=debian




The Kernel version is:




4.1.15-gcfb25fd




And this is the Hardware platform: http://variwiki.com/index.php?title=DART-6UL



So I am familiar with SPI interface (I have developed SPI drivers for microcotrollers) but I am new in linux .



I found out nodeJs package for SPI but it requires SPIDEV in /dev/ directory, which is missing in the device list.



After some research I found out that I can rebuild the Kernel with new configuration so the SPIDEVx can appear in the device list. But this seems to more laborious approach. I have to install everything again.



Is it possible to write a C program to utilize the SPI interface on the installed OS/ I found out there is spidev.h file in /ust/include/linux/spi/ but it contains only typedefs and macros, no function declarations.



What would you advice me? What would be the least painful approach?










share|improve this question



























    up vote
    2
    down vote

    favorite












    This is the Linux:




    PRETTY_NAME="Debian GNU/Linux 8 (jessie)"



    NAME="Debian GNU/Linux"



    VERSION_ID="8"



    VERSION="8 (jessie)"



    ID=debian




    The Kernel version is:




    4.1.15-gcfb25fd




    And this is the Hardware platform: http://variwiki.com/index.php?title=DART-6UL



    So I am familiar with SPI interface (I have developed SPI drivers for microcotrollers) but I am new in linux .



    I found out nodeJs package for SPI but it requires SPIDEV in /dev/ directory, which is missing in the device list.



    After some research I found out that I can rebuild the Kernel with new configuration so the SPIDEVx can appear in the device list. But this seems to more laborious approach. I have to install everything again.



    Is it possible to write a C program to utilize the SPI interface on the installed OS/ I found out there is spidev.h file in /ust/include/linux/spi/ but it contains only typedefs and macros, no function declarations.



    What would you advice me? What would be the least painful approach?










    share|improve this question

























      up vote
      2
      down vote

      favorite









      up vote
      2
      down vote

      favorite











      This is the Linux:




      PRETTY_NAME="Debian GNU/Linux 8 (jessie)"



      NAME="Debian GNU/Linux"



      VERSION_ID="8"



      VERSION="8 (jessie)"



      ID=debian




      The Kernel version is:




      4.1.15-gcfb25fd




      And this is the Hardware platform: http://variwiki.com/index.php?title=DART-6UL



      So I am familiar with SPI interface (I have developed SPI drivers for microcotrollers) but I am new in linux .



      I found out nodeJs package for SPI but it requires SPIDEV in /dev/ directory, which is missing in the device list.



      After some research I found out that I can rebuild the Kernel with new configuration so the SPIDEVx can appear in the device list. But this seems to more laborious approach. I have to install everything again.



      Is it possible to write a C program to utilize the SPI interface on the installed OS/ I found out there is spidev.h file in /ust/include/linux/spi/ but it contains only typedefs and macros, no function declarations.



      What would you advice me? What would be the least painful approach?










      share|improve this question















      This is the Linux:




      PRETTY_NAME="Debian GNU/Linux 8 (jessie)"



      NAME="Debian GNU/Linux"



      VERSION_ID="8"



      VERSION="8 (jessie)"



      ID=debian




      The Kernel version is:




      4.1.15-gcfb25fd




      And this is the Hardware platform: http://variwiki.com/index.php?title=DART-6UL



      So I am familiar with SPI interface (I have developed SPI drivers for microcotrollers) but I am new in linux .



      I found out nodeJs package for SPI but it requires SPIDEV in /dev/ directory, which is missing in the device list.



      After some research I found out that I can rebuild the Kernel with new configuration so the SPIDEVx can appear in the device list. But this seems to more laborious approach. I have to install everything again.



      Is it possible to write a C program to utilize the SPI interface on the installed OS/ I found out there is spidev.h file in /ust/include/linux/spi/ but it contains only typedefs and macros, no function declarations.



      What would you advice me? What would be the least painful approach?







      debian drivers devices






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Aug 8 at 10:32









      Jeff Schaller

      32.4k849110




      32.4k849110










      asked Aug 8 at 8:59









      Rikotech

      112




      112




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          1
          down vote













          Briefly: You'll need device nodes in /dev to have user application use SPI. It doesn't matter of you use NodeJS or a C program to access those devices. And yes, /usr/include/linux/spi/ will only include the typedefs to use the device node. This will also be used by the NodeJS package, or any other userland package.



          The device nodes in /dev are the kernel drivers that do the hardware access. If your current kernel is not configured for them, you need to configure it. In the best case, you just have to change the device tree. You may have to compile additional modules (which can e.g. be done with DKMS under Debian). You may also have to compile the complete kernel. Which of those applies depends on your current kernel configuration, which you have told us nothing about.



          Any in case, you never have to "install everything again". Even if you need to compile the whole kernel, just install the new kernel and reboot.






          share|improve this answer




















          • I was looking for a device tree configuration file(*.dtb), but didn't find any. Is it possible this file to be missing?
            – Rikotech
            Aug 9 at 16:00










          • I'm not familiar enough with DART-6UL to know how they do this in this platform. You installed the Debian that is available on the page you linked? Have you examined the configuration of the kernel that was included?
            – dirkt
            Aug 9 at 17:14










          • Yes but it is preinstalation configuration. I am trying to avoid kernel rebuild ( if possible) .
            – Rikotech
            Aug 9 at 17:54










          Your Answer







          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "106"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          convertImagesToLinks: false,
          noModals: false,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













           

          draft saved


          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f461233%2fspi-driver-for-debian%23new-answer', 'question_page');

          );

          Post as a guest






























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          1
          down vote













          Briefly: You'll need device nodes in /dev to have user application use SPI. It doesn't matter of you use NodeJS or a C program to access those devices. And yes, /usr/include/linux/spi/ will only include the typedefs to use the device node. This will also be used by the NodeJS package, or any other userland package.



          The device nodes in /dev are the kernel drivers that do the hardware access. If your current kernel is not configured for them, you need to configure it. In the best case, you just have to change the device tree. You may have to compile additional modules (which can e.g. be done with DKMS under Debian). You may also have to compile the complete kernel. Which of those applies depends on your current kernel configuration, which you have told us nothing about.



          Any in case, you never have to "install everything again". Even if you need to compile the whole kernel, just install the new kernel and reboot.






          share|improve this answer




















          • I was looking for a device tree configuration file(*.dtb), but didn't find any. Is it possible this file to be missing?
            – Rikotech
            Aug 9 at 16:00










          • I'm not familiar enough with DART-6UL to know how they do this in this platform. You installed the Debian that is available on the page you linked? Have you examined the configuration of the kernel that was included?
            – dirkt
            Aug 9 at 17:14










          • Yes but it is preinstalation configuration. I am trying to avoid kernel rebuild ( if possible) .
            – Rikotech
            Aug 9 at 17:54














          up vote
          1
          down vote













          Briefly: You'll need device nodes in /dev to have user application use SPI. It doesn't matter of you use NodeJS or a C program to access those devices. And yes, /usr/include/linux/spi/ will only include the typedefs to use the device node. This will also be used by the NodeJS package, or any other userland package.



          The device nodes in /dev are the kernel drivers that do the hardware access. If your current kernel is not configured for them, you need to configure it. In the best case, you just have to change the device tree. You may have to compile additional modules (which can e.g. be done with DKMS under Debian). You may also have to compile the complete kernel. Which of those applies depends on your current kernel configuration, which you have told us nothing about.



          Any in case, you never have to "install everything again". Even if you need to compile the whole kernel, just install the new kernel and reboot.






          share|improve this answer




















          • I was looking for a device tree configuration file(*.dtb), but didn't find any. Is it possible this file to be missing?
            – Rikotech
            Aug 9 at 16:00










          • I'm not familiar enough with DART-6UL to know how they do this in this platform. You installed the Debian that is available on the page you linked? Have you examined the configuration of the kernel that was included?
            – dirkt
            Aug 9 at 17:14










          • Yes but it is preinstalation configuration. I am trying to avoid kernel rebuild ( if possible) .
            – Rikotech
            Aug 9 at 17:54












          up vote
          1
          down vote










          up vote
          1
          down vote









          Briefly: You'll need device nodes in /dev to have user application use SPI. It doesn't matter of you use NodeJS or a C program to access those devices. And yes, /usr/include/linux/spi/ will only include the typedefs to use the device node. This will also be used by the NodeJS package, or any other userland package.



          The device nodes in /dev are the kernel drivers that do the hardware access. If your current kernel is not configured for them, you need to configure it. In the best case, you just have to change the device tree. You may have to compile additional modules (which can e.g. be done with DKMS under Debian). You may also have to compile the complete kernel. Which of those applies depends on your current kernel configuration, which you have told us nothing about.



          Any in case, you never have to "install everything again". Even if you need to compile the whole kernel, just install the new kernel and reboot.






          share|improve this answer












          Briefly: You'll need device nodes in /dev to have user application use SPI. It doesn't matter of you use NodeJS or a C program to access those devices. And yes, /usr/include/linux/spi/ will only include the typedefs to use the device node. This will also be used by the NodeJS package, or any other userland package.



          The device nodes in /dev are the kernel drivers that do the hardware access. If your current kernel is not configured for them, you need to configure it. In the best case, you just have to change the device tree. You may have to compile additional modules (which can e.g. be done with DKMS under Debian). You may also have to compile the complete kernel. Which of those applies depends on your current kernel configuration, which you have told us nothing about.



          Any in case, you never have to "install everything again". Even if you need to compile the whole kernel, just install the new kernel and reboot.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Aug 8 at 9:18









          dirkt

          14.3k2931




          14.3k2931











          • I was looking for a device tree configuration file(*.dtb), but didn't find any. Is it possible this file to be missing?
            – Rikotech
            Aug 9 at 16:00










          • I'm not familiar enough with DART-6UL to know how they do this in this platform. You installed the Debian that is available on the page you linked? Have you examined the configuration of the kernel that was included?
            – dirkt
            Aug 9 at 17:14










          • Yes but it is preinstalation configuration. I am trying to avoid kernel rebuild ( if possible) .
            – Rikotech
            Aug 9 at 17:54
















          • I was looking for a device tree configuration file(*.dtb), but didn't find any. Is it possible this file to be missing?
            – Rikotech
            Aug 9 at 16:00










          • I'm not familiar enough with DART-6UL to know how they do this in this platform. You installed the Debian that is available on the page you linked? Have you examined the configuration of the kernel that was included?
            – dirkt
            Aug 9 at 17:14










          • Yes but it is preinstalation configuration. I am trying to avoid kernel rebuild ( if possible) .
            – Rikotech
            Aug 9 at 17:54















          I was looking for a device tree configuration file(*.dtb), but didn't find any. Is it possible this file to be missing?
          – Rikotech
          Aug 9 at 16:00




          I was looking for a device tree configuration file(*.dtb), but didn't find any. Is it possible this file to be missing?
          – Rikotech
          Aug 9 at 16:00












          I'm not familiar enough with DART-6UL to know how they do this in this platform. You installed the Debian that is available on the page you linked? Have you examined the configuration of the kernel that was included?
          – dirkt
          Aug 9 at 17:14




          I'm not familiar enough with DART-6UL to know how they do this in this platform. You installed the Debian that is available on the page you linked? Have you examined the configuration of the kernel that was included?
          – dirkt
          Aug 9 at 17:14












          Yes but it is preinstalation configuration. I am trying to avoid kernel rebuild ( if possible) .
          – Rikotech
          Aug 9 at 17:54




          Yes but it is preinstalation configuration. I am trying to avoid kernel rebuild ( if possible) .
          – Rikotech
          Aug 9 at 17:54

















           

          draft saved


          draft discarded















































           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f461233%2fspi-driver-for-debian%23new-answer', 'question_page');

          );

          Post as a guest













































































          Popular posts from this blog

          How to check contact read email or not when send email to Individual?

          Displaying single band from multi-band raster using QGIS

          How many registers does an x86_64 CPU actually have?