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:ad5791 [14 Oct 2011 10:55] – [Driver testing] Adjust to new iio naming spec Lars-Peter Clausen | resources: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> |
- | [[adi> | + | |
- | [[adi> | + | |
- | [[adi> | + | * [[adi> |
- | [[adi> | + | * [[adi> |
+ | ===== Reference Circuits ===== | ||
+ | * [[adi> | ||
+ | * [[adi> | ||
+ | * [[adi> | ||
+ | * [[adi> | ||
+ | * [[adi> | ||
+ | * [[adi> | ||
+ | |||
+ | ===== Evaluation Boards ===== | ||
+ | |||
+ | * [[adi> | ||
+ | * [[adi> | ||
+ | * [[adi> | ||
+ | * [[adi> | ||
+ | * [[adi> | ||
===== Description ===== | ===== Description ===== | ||
Line 21: | Line 36: | ||
===== Status ===== | ===== Status ===== | ||
- | ^ Source | + | ^ Source ^ Mainlined? ^ |
- | | [[bfgit>linux-kernel?drivers/staging/ | + | | [[git.linux.org>drivers/ |
===== Files ===== | ===== Files ===== | ||
^ Function ^ File ^ | ^ Function ^ File ^ | ||
- | | driver | + | | driver |
- | | include | [[git.linux.org> | + | | include | [[git.linux.org> |
====== Example platform device initialization ====== | ====== Example platform device initialization ====== | ||
Line 50: | Line 65: | ||
</ | </ | ||
- | <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 105: | Line 120: | ||
static struct fixed_voltage_config stamp_vss_pdata = { | static struct fixed_voltage_config stamp_vss_pdata = { | ||
.supply_name = " | .supply_name = " | ||
- | .microvolts = | + | .microvolts = 10000000, |
.gpio = -EINVAL, | .gpio = -EINVAL, | ||
.enabled_at_boot = 0, | .enabled_at_boot = 0, | ||
Line 153: | Line 168: | ||
static struct spi_board_info board_spi_board_info[] __initdata = { | static struct spi_board_info board_spi_board_info[] __initdata = { | ||
#if defined(CONFIG_AD5791) || \ | #if defined(CONFIG_AD5791) || \ | ||
- | | + | |
+ | _MODULE) | ||
{ | { | ||
/* the modalias must be the same as spi device driver name */ | /* the modalias must be the same as spi device driver name */ | ||
Line 186: | 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> |
< | < | ||
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 216: | Line 228: | ||
{{page> | {{page> | ||
- | < | + | <WRAP box bggreen>< |
< | < | ||
root:/> **cd / | root:/> **cd / | ||
Line 235: | Line 247: | ||
lrwxrwxrwx | lrwxrwxrwx | ||
-rw-r--r-- | -rw-r--r-- | ||
- | </ | + | </ |
=== Show device name === | === Show device name === | ||
- | < | + | <WRAP box bggreen>< |
< | < | ||
root:/ | root:/ | ||
ad5791 | ad5791 | ||
- | </ | + | </ |
=== Show scale === | === Show scale === | ||
Line 251: | 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. | ||
- | < | + | <WRAP box bggreen>< |
< | < | ||
root:/ | root:/ | ||
0.019 | 0.019 | ||
- | </ | + | </ |
=== Set channel Y output voltage === | === Set channel Y output voltage === | ||
Line 265: | Line 277: | ||
channel Y. | channel Y. | ||
- | < | + | <WRAP box bggreen>< |
< | < | ||
root:/ | root:/ | ||
- | </ | + | </ |
**U** = // | **U** = // | ||
- | < | + | <WRAP box bggreen>< |
< | < | ||
root:/ | root:/ | ||
- | </ | + | </ |
**U** = // | **U** = // | ||
Line 286: | Line 298: | ||
Lists all available output power down modes. | Lists all available output power down modes. | ||
- | < | + | <WRAP box bggreen>< |
< | < | ||
root:/ | root:/ | ||
6kohm_to_gnd three_state | 6kohm_to_gnd three_state | ||
- | </ | + | </ |
=== Set power down mode === | === Set power down mode === | ||
Line 307: | Line 319: | ||
- | < | + | <WRAP box bggreen>< |
< | < | ||
root:/ | root:/ | ||
root:/ | root:/ | ||
three_state | three_state | ||
- | </ | + | </ |
=== Enable power down mode on output Y === | === Enable power down mode on output Y === | ||
Line 324: | Line 336: | ||
controlled together. | controlled together. | ||
- | < | + | <WRAP box bggreen>< |
< | < | ||
root:/ | root:/ | ||
Line 332: | Line 344: | ||
root:/ | root:/ | ||
0 | 0 | ||
- | </ | + | </ |
====== More Information ====== | ====== More Information ====== | ||
{{page> | {{page> |