This driver supports the
This is a Linux industrial I/O (IIO) subsystem driver, targeting single channel serial interface ADCs. The industrial I/O subsystem provides a unified framework for drivers for many different types of converters and sensors using a number of different physical interfaces (i2c, spi, etc). See IIO for more information.
Source | Mainlined? |
---|---|
git | [In progress…] |
Function | File |
---|---|
driver | master/drivers/iio/adc/ad7768.c |
devicetree bindings | Documentation/devicetree/bindings/iio/adc/adi,ad7768.txt |
hdl project | hdl |
Required properties:
Function | File |
---|---|
AD7768 Device Tree | zynq-zed-adv7511-ad7768.dts |
Each and every IIO device, typically a hardware chip, has a device folder under /sys/bus/iio/devices/iio:deviceX. Where X is the IIO index of the device. Under every of these directory folders reside a set of files, depending on the characteristics and features of the hardware device in question. These files are consistently generalized and documented in the IIO ABI documentation. In order to determine which IIO deviceX corresponds to which hardware device, the user can read the name file /sys/bus/iio/devices/iio:deviceX/name. In case the sequence in which the iio device drivers are loaded/registered is constant, the numbering is constant and may be known in advance.
TIP: An example program which uses the interface can be found here:
This specifies any shell prompt running on the target
root:/> cd /sys/bus/iio/devices/ root:/sys/bus/iio/devices> ls iio:device0 root:/sys/bus/iio/devices> cd iio\:device0 root:/sys/bus/iio/devices/iio:device0> ls -l drwxrwxrwx 2 root root 0 Jan 1 00:02 buffer -rw-rw-rw- 1 root root 4096 Jan 1 00:02 dev -rw-rw-rw- 1 root root 4096 Jan 1 00:02 in_voltage_scale -rw-rw-rw- 1 root root 4096 Jan 1 00:02 name lrwxrwxrwx 1 root root 0 Jan 1 00:02 of_node -> ../../../../../../../../firmware/devicetree/base/amba/spi@e0006000/adc@0 drwxrwxrwx 2 root root 0 Jan 1 00:02 power drwxrwxrwx 2 root root 0 Jan 1 00:02 scan_elements lrwxrwxrwx 1 root root 0 Jan 1 00:02 subsystem -> ../../../../../../../../bus/iio -rw-rw-rw- 1 root root 4096 Jan 1 00:02 uevent
This specifies any shell prompt running on the target
root:/sys/bus/iio/devices/iio:device0> cat name ad7768
Description:
scale to be applied to in_voltage0_raw in order to obtain the measured voltage in millivolts.
This specifies any shell prompt running on the target
root:/sys/bus/iio/devices/iio:device0> cat in_voltage_scale 0.000488281