This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
resources:tools-software:linux-drivers:iio-adc:ad400x [02 Nov 2018 09:26] – Mircea Caprioru | resources:tools-software:linux-drivers:iio-adc:ad400x [14 Nov 2018 11:25] – [AD4003/AD4007/AD4011/AD4020 Linux Driver] Mircea Caprioru | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== AD4003/ | + | ====== AD4003/ |
===== Supported Devices ===== | ===== Supported Devices ===== | ||
Line 8: | Line 8: | ||
* [[adi> | * [[adi> | ||
* [[adi> | * [[adi> | ||
+ | * [[adi> | ||
===== Evaluation Boards ===== | ===== Evaluation Boards ===== | ||
Line 17: | Line 18: | ||
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. | 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. | ||
+ | ===== Status ===== | ||
+ | |||
+ | ^ Source ^ Mainlined? ^ | ||
+ | | [[linux.github> | ||
+ | |||
+ | ===== Files ===== | ||
+ | |||
+ | ^ Function ^ File ^ | ||
+ | | driver | ||
+ | | devicetree bindings | [[linux.github> | ||
+ | |||
+ | ====== Driver setup ====== | ||
+ | Since AD4003/ | ||
+ | * [[resources: | ||
+ | * [[resources: | ||
+ | |||
+ | The device will interface with these components and follow the device tree bindings. | ||
+ | |||
+ | <WRAP box bggreen>< | ||
+ | < | ||
+ | & | ||
+ | | ||
+ | | ||
+ | reg = < | ||
+ | # | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | # | ||
+ | # | ||
+ | | ||
+ | | ||
+ | reg = < | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | reg = < | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | |||
+ | # | ||
+ | # | ||
+ | | ||
+ | | ||
+ | | ||
+ | reg = < | ||
+ | | ||
+ | | ||
+ | dmas = <& | ||
+ | | ||
+ | | ||
+ | | ||
+ | # | ||
+ | | ||
+ | | ||
+ | | ||
+ | </ | ||
+ | |||
+ | ====== Driver testing ====== | ||
+ | |||
+ | {{page> | ||
+ | |||
+ | <WRAP top tip round box 60%> | ||
+ | An example program which uses the interface can be found here: | ||
+ | * [[resources: | ||
+ | </ | ||
+ | |||
+ | <WRAP box bggreen>< | ||
+ | < | ||
+ | root@analog:/ | ||
+ | total 0 | ||
+ | lrwxrwxrwx 1 root root 0 Jan 1 1970 iio:device0 -> ../ | ||
+ | lrwxrwxrwx 1 root root 0 Jan 1 1970 iio:device1 -> ../ | ||
+ | lrwxrwxrwx 1 root root 0 Jan 1 1970 iio_sysfs_trigger -> ../ | ||
+ | |||
+ | root@analog:/ | ||
+ | root@analog:/ | ||
+ | root@analog:/ | ||
+ | total 0 | ||
+ | drwxrwxrwx 2 root root 0 Jan 1 1970 buffer | ||
+ | -rw-rw-rw- 1 root root 4096 Jan 1 1970 dev | ||
+ | -rw-rw-rw- 1 root root 4096 Jan 1 1970 in_voltage0_raw | ||
+ | -rw-rw-rw- 1 root root 4096 Jan 1 1970 in_voltage0_scale | ||
+ | -rw-rw-rw- 1 root root 4096 Jan 1 1970 name | ||
+ | lrwxrwxrwx 1 root root 0 Nov 2 08:43 of_node -> ../ | ||
+ | drwxrwxrwx 2 root root 0 Jan 1 1970 power | ||
+ | -rw-rw-rw- 1 root root 4096 Jan 1 1970 sampling_frequency | ||
+ | drwxrwxrwx 2 root root 0 Jan 1 1970 scan_elements | ||
+ | lrwxrwxrwx 1 root root 0 Nov 2 08:43 subsystem -> ../ | ||
+ | -rw-rw-rw- 1 root root 4096 Jan 1 1970 uevent | ||
+ | |||
+ | </ | ||
+ | |||
+ | === Show device name === | ||
+ | |||
+ | <WRAP box bggreen>< | ||
+ | < | ||
+ | root@analog:/ | ||
+ | ad4020 | ||
+ | </ | ||
+ | |||
+ | === Show channel scale === | ||
+ | |||
+ | **Description: | ||
+ | Scale to be applied to in_voltagex_raw in order to obdatin the measured voltage in millivolts | ||
+ | |||
+ | <WRAP box bggreen>< | ||
+ | < | ||
+ | root@analog:/ | ||
+ | 0.002384185 | ||
+ | </ | ||
+ | |||
+ | ====== More Information ====== | ||
+ | |||
+ | {{page> |