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:ad5360 [21 Nov 2011 14:28] – [Driver testing] Fix typo Lars-Peter Clausen | resources:tools-software:linux-drivers:iio-dac:ad5360 [29 Jan 2024 13:00] (current) – [Example device tree] Avoid error message "debugfs: Directory 'fixed-supply' with parent 'regulator' already present!" Ilario Gelmetti | ||
---|---|---|---|
Line 11: | Line 11: | ||
* [[adi> | * [[adi> | ||
* [[adi> | * [[adi> | ||
- | |||
- | |||
- | ===== Reference Circuits ===== | ||
- | |||
- | * [[adi> | ||
- | * [[adi> | ||
- | * [[adi> | ||
===== Evaluation Boards ===== | ===== Evaluation Boards ===== | ||
Line 39: | Line 32: | ||
===== Status ===== | ===== Status ===== | ||
- | ^ Source | + | ^ Source ^ Mainlined? ^ |
- | | [[bfgit>linux-kernel?drivers/staging/ | + | | [[git.linux.org>drivers/ |
===== Files ===== | ===== Files ===== | ||
^ Function ^ File ^ | ^ Function ^ File ^ | ||
- | | driver | + | | driver |
+ | |||
+ | ====== Example device tree ====== | ||
+ | <code c> | ||
+ | fragment@0 { | ||
+ | target-path = "/"; | ||
+ | __overlay__ { | ||
+ | vref0: fixedregulator@0 { | ||
+ | compatible = " | ||
+ | regulator-name = " | ||
+ | regulator-min-microvolt = < | ||
+ | regulator-max-microvolt = < | ||
+ | regulator-boot-on; | ||
+ | }; | ||
+ | vref1: fixedregulator@1 { | ||
+ | compatible = " | ||
+ | regulator-name = " | ||
+ | regulator-min-microvolt = < | ||
+ | regulator-max-microvolt = < | ||
+ | regulator-boot-on; | ||
+ | }; | ||
+ | }; | ||
+ | }; | ||
+ | |||
+ | fragment@1 { | ||
+ | target = <& | ||
+ | __overlay__ { | ||
+ | # | ||
+ | # | ||
+ | status = " | ||
+ | |||
+ | ad5370@0{ | ||
+ | compatible = " | ||
+ | reg = < | ||
+ | spi-max-frequency = < | ||
+ | spi-cpha; | ||
+ | vref0-supply = <& | ||
+ | vref1-supply = <& | ||
+ | }; | ||
+ | }; | ||
+ | }; | ||
+ | }; | ||
+ | </ | ||
====== Example platform device initialization ====== | ====== Example platform device initialization ====== | ||
Line 153: | Line 188: | ||
"make qconfig" | "make qconfig" | ||
- | <note> | + | <WRAP round help> |
The AD5360 Driver depends on **CONFIG_SPI** | The AD5360 Driver depends on **CONFIG_SPI** | ||
- | </note> | + | </WRAP> |
< | < | ||
Linux Kernel Configuration | Linux Kernel Configuration | ||
- | Device Drivers | + | |
- | [*] Staging drivers | + | ... |
- | < | + | < |
- | | + | --- Industrial I/O support |
- | -*- | + | ... |
- | -*- | + | Digital to analog |
- | -*- | + | ... |
- | + | < | |
- | *** Digital to analog | + | ... |
- | [--snip--] | + | ... |
- | + | ... | |
- | | + | |
- | + | ||
- | [--snip--] | + | |
</ | </ | ||
- | |||
====== Hardware configuration ====== | ====== Hardware configuration ====== | ||
Line 183: | Line 213: | ||
{{page> | {{page> | ||
- | < | + | <WRAP box bggreen>< |
< | < | ||
root:/> **cd / | root:/> **cd / | ||
Line 209: | Line 239: | ||
lrwxrwxrwx | lrwxrwxrwx | ||
-rw-r--r-- | -rw-r--r-- | ||
- | </ | + | </ |
=== Show device name === | === Show device name === | ||
- | < | + | <WRAP box bggreen>< |
< | < | ||
root:/ | root:/ | ||
ad5360 | ad5360 | ||
- | </ | + | </ |
=== Show scale === | === Show scale === | ||
Line 225: | Line 255: | ||
scale to be applied to out_voltage0_raw in order to obtain the measured voltage in millivolts. | scale to be applied to out_voltage0_raw in order to obtain the measured voltage in millivolts. | ||
- | < | + | <WRAP box bggreen>< |
< | < | ||
root:/ | root:/ | ||
0.038140 | 0.038140 | ||
- | </ | + | </ |
=== Set channel Y output voltage === | === Set channel Y output voltage === | ||
Line 239: | Line 269: | ||
channel Y. | channel Y. | ||
- | < | + | <WRAP box bggreen>< |
< | < | ||
root:/ | root:/ | ||
- | </ | + | </ |
**U** = // | **U** = // | ||
Line 253: | Line 283: | ||
Each channel has an adjustable gain which can be used to calibrate the channel' | Each channel has an adjustable gain which can be used to calibrate the channel' | ||
- | If scale calibration is used the following formula can be used calculate the output voltage: | + | If scale calibration is used the following formula can be used calculate the output voltage: |
**U** = //( ( out_voltageY_raw * ( out_voltageY_calibscale + 1 ) ) / 2^16 - out_voltageY_calibbias ) * out_voltageY_scale// | **U** = //( ( out_voltageY_raw * ( out_voltageY_calibscale + 1 ) ) / 2^16 - out_voltageY_calibbias ) * out_voltageY_scale// | ||
Line 263: | Line 293: | ||
Each channel has an adjustable offset which can be used to calibrate the channel' | Each channel has an adjustable offset which can be used to calibrate the channel' | ||
- | If offset calibration is used the following formula can be used calculate the output voltage: | + | If offset calibration is used the following formula can be used calculate the output voltage: |
**U** = //( ( out_voltageY_raw * ( out_voltageY_calibscale + 1 ) ) / 2^16 - out_voltageY_calibbias ) * out_voltageY_scale// | **U** = //( ( out_voltageY_raw * ( out_voltageY_calibscale + 1 ) ) / 2^16 - out_voltageY_calibbias ) * out_voltageY_scale// | ||
Line 274: | Line 304: | ||
normal operation. | normal operation. | ||
- | < | + | <WRAP box bggreen>< |
< | < | ||
root:/ | root:/ | ||
Line 282: | Line 312: | ||
root:/ | root:/ | ||
0 | 0 | ||
- | </ | + | </ |
====== More Information ====== | ====== More Information ====== | ||
{{page> | {{page> |