Wiki

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
resources:tools-software:linux-drivers:iio-dac:ad5791 [18 Oct 2011 17:43] – [Specifying reference voltage via the regulator framework] fix vss voltage Lars-Peter Clausenresources:tools-software:linux-drivers:iio-dac:ad5791 [11 Feb 2016 20:55] (current) – [Status] Lars-Peter Clausen
Line 4: Line 4:
 ===== Supported Devices ===== ===== Supported Devices =====
  
-This driver supports the\\ +  * [[adi>AD5760]] 
-[[adi>AD5760]]\\ +  [[adi>AD5780]] 
-[[adi>AD5780]]\\ +  [[adi>AD5781]] 
-[[adi>AD5781]]\\ +  * [[adi>AD5790]] 
-[[adi>AD5791]]+  * [[adi>AD5791]]
  
 +===== Reference Circuits =====
  
 +  * [[adi>CN0177]]
 +  * [[adi>CN0191]]
 +  * [[adi>CN0200]]
 +  * [[adi>CN0257]]
 +  * [[adi>CN0278]]
 +  * [[adi>CN0318]]
 +
 +===== Evaluation Boards =====
 +
 +  * [[adi>EVAL-AD5760SDZ]]
 +  * [[adi>EVAL-AD5780SDZ]]
 +  * [[adi>EVAL-AD5781SDZ]]
 +  * [[adi>EVAL-AD5790SDZ]]
 +  * [[adi>EVAL-AD5791SDZ]]
 ===== Description ===== ===== Description =====
  
Line 21: Line 36:
 ===== Status ===== ===== Status =====
  
- Source   Mainlined?  +^ Source ^ Mainlined? ^ 
-| [[bfgit>linux-kernel?drivers/staging/iio/dac/ad5791.c|git]] |  [[git.linux.org>drivers/staging/iio/dac/ad5791.c|Yes]]  |+| [[git.linux.org>drivers/iio/dac/ad5791.c|git]] | [[git.linux.org>drivers/iio/dac/ad5791.c|Yes]] |
 ===== Files ===== ===== Files =====
  
 ^ Function ^ File ^ ^ Function ^ File ^
-| driver  | [[git.linux.org>drivers/staging/iio/dac/ad5791.c]] | +| driver  | [[git.linux.org>drivers/iio/dac/ad5791.c]] | 
-| include | [[git.linux.org>drivers/staging/iio/dac/ad5791.h]] |+| include | [[git.linux.org>drivers/iio/dac/ad5791.h]] |
  
 ====== Example platform device initialization ====== ====== Example platform device initialization ======
Line 50: Line 65:
 </code> </code>
  
-<note tip>+<WRAP tip>
 This driver supports also an alternative way of specifying the reference voltage, by using the Linux regulator framework. This driver supports also an alternative way of specifying the reference voltage, by using the Linux regulator framework.
-</note>+</WRAP>
  
 ===== Specifying reference voltage via the regulator framework ===== ===== Specifying reference voltage via the regulator framework =====
Line 187: Line 202:
 "make qconfig") "make qconfig")
  
-<note>+<WRAP round help>
 The AD5791 Driver depends on **CONFIG_SPI** The AD5791 Driver depends on **CONFIG_SPI**
-</note>+</WRAP>
  
 <code> <code>
 Linux Kernel Configuration Linux Kernel Configuration
- Device Drivers  ---> +    Device Drivers  ---> 
- [*] Staging drivers  ---> +        ... 
- <*>     Industrial I/O support ---> +        <*>     Industrial I/O support ---> 
-     --- Industrial I/O support +            --- Industrial I/O support 
-     -*-   Enable ring buffer support within IIO +            ... 
-     -*-     Industrial I/O lock free software ring +            Digital to analog converters  --- 
-     -*-   Enable triggered sampling support +                ... 
- +                <*>   Analog Devices AD5760/AD5780/AD5781/AD5790/AD5791 DAC SPI driver 
-           *** Digital to analog convertors *** +                ... 
-     [--snip--] +            ... 
- +        ...
-     <*>   Analog Devices AD5791/AD5781 DAC spi driver +
- +
-     [--snip--]+
  
 </code> </code>
- 
 ====== Hardware configuration ====== ====== Hardware configuration ======
  
Line 217: Line 228:
 {{page>software:linux:docs:iio:iio_snippets#iio device files&noheader&firstseconly&noeditbtn}} {{page>software:linux:docs:iio:iio_snippets#iio device files&noheader&firstseconly&noeditbtn}}
  
-<box 100% green|shell prompt running on the target>+<WRAP box bggreen><wrap info>This specifies any shell prompt running on the target</wrap>
 <xterm> <xterm>
 root:/> **cd /sys/bus/iio/devices/** root:/> **cd /sys/bus/iio/devices/**
Line 236: Line 247:
 lrwxrwxrwx    1 root     root             0 Jan  4 12:28 subsystem -> ../../../../../bus/iio lrwxrwxrwx    1 root     root             0 Jan  4 12:28 subsystem -> ../../../../../bus/iio
 -rw-r--r--    1 root     root          4096 Jan  4 12:28 uevent -rw-r--r--    1 root     root          4096 Jan  4 12:28 uevent
-</xterm></box>+</xterm></WRAP>
  
  
 === Show device name === === Show device name ===
  
-<box 100% green|shell prompt running on the target>+<WRAP box bggreen><wrap info>This specifies any shell prompt running on the target</wrap>
 <xterm> <xterm>
 root:/sys/devices/platform/bfin-spi.0/spi0.3/iio:device0> **cat name** root:/sys/devices/platform/bfin-spi.0/spi0.3/iio:device0> **cat name**
 ad5791 ad5791
-</xterm></box>+</xterm></WRAP>
  
 === Show scale === === Show scale ===
Line 252: Line 263:
 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.
  
-<box 100% green|shell prompt running on the target>+<WRAP box bggreen><wrap info>This specifies any shell prompt running on the target</wrap>
 <xterm> <xterm>
 root:/sys/devices/platform/bfin-spi.0/spi0.3/iio:device0> **cat out_voltage_scale** root:/sys/devices/platform/bfin-spi.0/spi0.3/iio:device0> **cat out_voltage_scale**
 0.019 0.019
-</xterm></box>+</xterm></WRAP>
  
 === Set channel Y output voltage === === Set channel Y output voltage ===
Line 266: Line 277:
 channel Y. channel Y.
  
-<box 100% green|shell prompt running on the target>+<WRAP box bggreen><wrap info>This specifies any shell prompt running on the target</wrap>
 <xterm> <xterm>
 root:/sys/devices/platform/bfin-spi.0/spi0.3/iio:device0> echo 131579 > out_voltage0_raw root:/sys/devices/platform/bfin-spi.0/spi0.3/iio:device0> echo 131579 > out_voltage0_raw
-</xterm></box>+</xterm></WRAP>
  
 **U** = //out_voltage0_raw * out_voltage_scale// = 131579 * 0.019 = **2500.001 //mV//** **U** = //out_voltage0_raw * out_voltage_scale// = 131579 * 0.019 = **2500.001 //mV//**
  
-<box 100% green|shell prompt running on the target>+<WRAP box bggreen><wrap info>This specifies any shell prompt running on the target</wrap>
 <xterm> <xterm>
 root:/sys/devices/platform/bfin-spi.0/spi0.3/iio:device0> echo -131579 > out_voltage0_raw root:/sys/devices/platform/bfin-spi.0/spi0.3/iio:device0> echo -131579 > out_voltage0_raw
-</xterm></box>+</xterm></WRAP>
  
 **U** = //out_voltage0_raw * out_voltage_scale// = -131579 * 0.019 = **-2500.001 //mV//** **U** = //out_voltage0_raw * out_voltage_scale// = -131579 * 0.019 = **-2500.001 //mV//**
Line 287: Line 298:
 Lists all available output power down modes. Lists all available output power down modes.
  
-<box 100% green|shell prompt running on the target>+<WRAP box bggreen><wrap info>This specifies any shell prompt running on the target</wrap>
 <xterm> <xterm>
 root:/sys/devices/platform/bfin-spi.0/spi0.3/iio:device0> **cat out_voltage_powerdown_mode_available** root:/sys/devices/platform/bfin-spi.0/spi0.3/iio:device0> **cat out_voltage_powerdown_mode_available**
 6kohm_to_gnd three_state 6kohm_to_gnd three_state
-</xterm></box>+</xterm></WRAP>
  
 === Set power down mode === === Set power down mode ===
Line 308: Line 319:
  
  
-<box 100% green|shell prompt running on the target>+<WRAP box bggreen><wrap info>This specifies any shell prompt running on the target</wrap>
 <xterm> <xterm>
 root:/sys/devices/platform/bfin-spi.0/spi0.3/iio:device0> **echo three_state > out_voltage_powerdown_mode** root:/sys/devices/platform/bfin-spi.0/spi0.3/iio:device0> **echo three_state > out_voltage_powerdown_mode**
 root:/sys/devices/platform/bfin-spi.0/spi0.3/iio:device0> **cat out_voltage_powerdown_mode** root:/sys/devices/platform/bfin-spi.0/spi0.3/iio:device0> **cat out_voltage_powerdown_mode**
 three_state three_state
-</xterm></box>+</xterm></WRAP>
  
 === Enable power down mode on output Y === === Enable power down mode on output Y ===
Line 325: Line 336:
 controlled together. controlled together.
  
-<box 100% green|shell prompt running on the target>+<WRAP box bggreen><wrap info>This specifies any shell prompt running on the target</wrap>
 <xterm> <xterm>
 root:/sys/devices/platform/bfin-spi.0/spi0.3/iio:device0> **echo 1 > out_voltage0_powerdown** root:/sys/devices/platform/bfin-spi.0/spi0.3/iio:device0> **echo 1 > out_voltage0_powerdown**
Line 333: Line 344:
 root:/sys/devices/platform/bfin-spi.0/spi0.3/iio:device0> **cat out_voltage0_powerdown** root:/sys/devices/platform/bfin-spi.0/spi0.3/iio:device0> **cat out_voltage0_powerdown**
 0 0
-</xterm></box>+</xterm></WRAP>
  
 ====== More Information ====== ====== More Information ======
  
 {{page>software:linux:docs:iio:iio_snippets#iio pointers&noheader&firstseconly&noeditbtn}} {{page>software:linux:docs:iio:iio_snippets#iio pointers&noheader&firstseconly&noeditbtn}}
resources/tools-software/linux-drivers/iio-dac/ad5791.txt · Last modified: 11 Feb 2016 20:55 by Lars-Peter Clausen