AD7682 interface to Linux processor

Hi there, Running into a few issues while attempting to setup the IIO subsystem.

Using this as a basis -https://wiki.analog.com/resources/tools-software/linux-drivers/iio-adc/ad7476a

1. The first instruction is to specify the reference voltage via the regulator framework. I'm assuming this is in the SPI file system somewhere in linux? Can you help clarify where I can find this file?

2. I have enabled Linux driver support for this driver and rebuilt the kernel. The problem is when I run the command cd /sys/bus/iio/driver. I don't see the IIO folder? How do I get this installed?

Top Replies

Parents
  • Hi,

    In the Linux device driver model there is a differentiation between drivers and devices. A driver provides the implementation of the behavior and a device is a particular instance of a driver. This allows to have multiple devices to be instantiated for the same driver each representing a separate piece of hardware. Kind of like classes and objects from object oriented programming.

    So enabling the driver, while being necessary, is not sufficient. In addition you need to instantiate a device which fills in the details, like the chip-select signal the hardware is connected to. Depending on your system one of two methods can be used. Either instantiation through board file, or instantiation through devicetree. Which method to use depends on your particular platform, but most modern platforms use devicetree. You should be able to find documentation for your particular platform on howto modify its devicetree and add custom devices.

    Same goes for the reference voltage regulator. The documentation has examples for both board files and devicetrees.

    - Lars

Reply
  • Hi,

    In the Linux device driver model there is a differentiation between drivers and devices. A driver provides the implementation of the behavior and a device is a particular instance of a driver. This allows to have multiple devices to be instantiated for the same driver each representing a separate piece of hardware. Kind of like classes and objects from object oriented programming.

    So enabling the driver, while being necessary, is not sufficient. In addition you need to instantiate a device which fills in the details, like the chip-select signal the hardware is connected to. Depending on your system one of two methods can be used. Either instantiation through board file, or instantiation through devicetree. Which method to use depends on your particular platform, but most modern platforms use devicetree. You should be able to find documentation for your particular platform on howto modify its devicetree and add custom devices.

    Same goes for the reference voltage regulator. The documentation has examples for both board files and devicetrees.

    - Lars

Children
No Data