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-dac:ad5758 [23 May 2018 11:05] – Optional properties Stefan Popa | resources:tools-software:linux-drivers:iio-dac:ad5758 [15 Oct 2018 16:25] (current) – adc->dac Stefan Popa | ||
---|---|---|---|
Line 21: | Line 21: | ||
^ Source ^ Mainlined? ^ | ^ Source ^ Mainlined? ^ | ||
- | | [[https:// | + | | [[git.linux.org>drivers/ |
===== Files ===== | ===== Files ===== | ||
^ Function ^ File ^ | ^ Function ^ File ^ | ||
- | | driver | + | | driver |
===== Devicetree ===== | ===== Devicetree ===== | ||
Line 43: | Line 43: | ||
* adi,slew: Array of slewrate settings should contain 3 fields: | * adi,slew: Array of slewrate settings should contain 3 fields: | ||
* adi,range: The output range | * adi,range: The output range | ||
+ | |||
+ | < | ||
+ | # | ||
+ | # | ||
+ | status = " | ||
+ | |||
+ | ad5758@0 { | ||
+ | compatible = " | ||
+ | reg = <0>; | ||
+ | spi-max-frequency = < | ||
+ | spi-cpha; | ||
+ | |||
+ | reset-gpios = <& | ||
+ | |||
+ | adi, | ||
+ | adi, | ||
+ | adi,slew = <1 200000 12>; | ||
+ | adi,range = <1>; | ||
+ | </ | ||
+ | |||
+ | ====== Driver testing ====== | ||
+ | |||
+ | <WRAP box bggreen>< | ||
+ | < | ||
+ | root:/> **cd / | ||
+ | root:/ | ||
+ | iio:device0 | ||
+ | |||
+ | root:/ | ||
+ | |||
+ | root:/ | ||
+ | -r--r--r-- 1 root root 4096 May 23 09:14 dev | ||
+ | -rw-r--r-- 1 root root 4096 May 23 09:14 out_voltage0_powerdown | ||
+ | -rw-r--r-- 1 root root 4096 May 23 09:14 out_voltage0_raw | ||
+ | -rw-r--r-- 1 root root 4096 May 23 09:14 out_voltage_scale | ||
+ | -r--r--r-- 1 root root 4096 May 23 09:14 name | ||
+ | drwxr-xr-x 2 root root 0 May 23 09:14 power | ||
+ | lrwxrwxrwx 1 root root 0 May 23 09:14 subsystem -> ../ | ||
+ | -rw-r--r-- 1 root root 4096 May 23 09:14 uevent | ||
+ | </ | ||
+ | |||
+ | === Show device name === | ||
+ | |||
+ | <WRAP box bggreen>< | ||
+ | < | ||
+ | root:/ | ||
+ | ad5758 | ||
+ | </ | ||
+ | |||
+ | === 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.152587890 | ||
+ | </ | ||
+ | |||
+ | === Set channel 0 output voltage === | ||
+ | |||
+ | **Description: | ||
+ | / | ||
+ | |||
+ | Raw (unscaled, no bias etc.) output voltage for | ||
+ | channel 0. | ||
+ | |||
+ | |||
+ | <WRAP box bggreen>< | ||
+ | < | ||
+ | root:/ | ||
+ | </ | ||
+ | |||
+ | **U** = // | ||
+ | |||
+ | === Enable power down mode on output 0 === | ||
+ | |||
+ | / | ||
+ | |||
+ | **Description: | ||
+ | Writing 1 causes output 0 to enter the power down mode. Clearing returns to | ||
+ | normal operation. | ||
+ | |||
+ | <WRAP box bggreen>< | ||
+ | < | ||
+ | root:/ | ||
+ | root:/ | ||
+ | 1 | ||
+ | root:/ | ||
+ | root:/ | ||
+ | 0 | ||
+ | </ | ||
+ | |||
+ | ====== More Information ====== | ||
+ | |||
+ | {{page> | ||
+ |