This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
resources:tools-software:linux-drivers:iio-adc:ad7768 [05 Jul 2018 14:13] – Files Stefan Popa | resources:tools-software:linux-drivers:iio-adc:ad7768 [06 Nov 2023 11:41] (current) – Add note about adi,datalines property Ana-Maria Cusco | ||
---|---|---|---|
Line 5: | Line 5: | ||
This driver supports the | This driver supports the | ||
* [[adi> | * [[adi> | ||
+ | * [[adi> | ||
===== Evaluation Boards ===== | ===== Evaluation Boards ===== | ||
* [[adi> | * [[adi> | ||
+ | * [[adi> | ||
===== Description ===== | ===== Description ===== | ||
Line 27: | Line 29: | ||
^ Function ^ File ^ | ^ Function ^ File ^ | ||
| driver | | driver | ||
+ | | devicetree bindings | [[linux.github> | ||
+ | | hdl project | [[https:// | ||
+ | |||
+ | ====== Example Linux Device-Tree Initialization ====== | ||
+ | |||
+ | Required properties: | ||
+ | * compatible: Must be one of " | ||
+ | * reg: SPI chip select number for the device. | ||
+ | * clocks: phandle to master clock of the device. | ||
+ | * clock-names: | ||
+ | * spi-max-frequency: | ||
+ | * dmas: DMA specifier, consisting of a phandle to DMA controller node. | ||
+ | * dma-names: Must be " | ||
+ | * vref-supply: | ||
+ | Optional properties: | ||
+ | * reset-gpios: | ||
+ | * adi, | ||
+ | |||
+ | **NOTE:** The // | ||
+ | ^ Function ^ File ^ | ||
+ | | AD7768 Device Tree | [[linux.github> | ||
+ | | zynq-zed-adv7511-ad7768.dts]] | | ||
+ | |||
+ | ====== 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:/> **cd / | ||
+ | root:/ | ||
+ | iio:device0 | ||
+ | |||
+ | root:/ | ||
+ | |||
+ | root:/ | ||
+ | total 0 | ||
+ | drwxr-xr-x 2 root root 0 Apr 2 21:43 buffer | ||
+ | drwxr-xr-x 2 root root 0 Apr 2 21:43 buffer0 | ||
+ | -r--r--r-- 1 root root 4096 Apr 2 21:43 dev | ||
+ | -rw-r--r-- 1 root root 4096 Apr 2 21:43 filter_type | ||
+ | -r--r--r-- 1 root root 4096 Apr 2 21:43 filter_type_available | ||
+ | -rw-r--r-- 1 root root 4096 Apr 2 21:43 in_voltage_scale | ||
+ | -r--r--r-- 1 root root 4096 Apr 2 21:43 name | ||
+ | lrwxrwxrwx 1 root root 0 Apr 2 21:43 of_node -> ../ | ||
+ | drwxr-xr-x 2 root root 0 Apr 2 21:43 power | ||
+ | -rw-r--r-- 1 root root 4096 Apr 2 21:43 power_mode | ||
+ | -r--r--r-- 1 root root 4096 Apr 2 21:43 power_mode_available | ||
+ | -rw-r--r-- 1 root root 4096 Apr 2 21:43 sampling_frequency | ||
+ | -r--r--r-- 1 root root 4096 Apr 2 21:43 sampling_frequency_available | ||
+ | drwxr-xr-x 2 root root 0 Apr 2 21:42 scan_elements | ||
+ | lrwxrwxrwx 1 root root 0 Apr 2 21:42 subsystem -> ../ | ||
+ | -rw-r--r-- 1 root root 4096 Apr 2 21:42 uevent | ||
+ | </ | ||
+ | |||
+ | === Show device name === | ||
+ | |||
+ | <WRAP box bggreen>< | ||
+ | < | ||
+ | root:/ | ||
+ | ad7768 | ||
+ | </ | ||
+ | |||
+ | === Show scale === | ||
+ | |||
+ | **Description: | ||
+ | scale to be applied to in_voltage0_raw in order to obtain the measured voltage in millivolts. | ||
+ | |||
+ | <WRAP box bggreen>< | ||
+ | < | ||
+ | root:/ | ||
+ | 0.000488281 | ||
+ | </ | ||
+ | |||
+ | ====== More Information ====== | ||
+ | |||
+ | {{page> |