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:ad7476a [08 Sep 2012 12:43] – [Specifying reference voltage via the regulator framework] Lars-Peter Clausen | resources:tools-software:linux-drivers:iio-adc:ad7476a [11 Sep 2021 20:17] (current) – [Supported Devices] Robin Getz | ||
---|---|---|---|
Line 3: | Line 3: | ||
===== Supported Devices ===== | ===== Supported Devices ===== | ||
+ | |||
+ | * [[adi> | ||
* [[adi> | * [[adi> | ||
* [[adi> | * [[adi> | ||
Line 19: | Line 21: | ||
* [[adi> | * [[adi> | ||
* [[adi> | * [[adi> | ||
+ | * [[adi> | ||
+ | * [[adi> | ||
+ | * [[adi> | ||
+ | * [[adi> | ||
+ | * [[adi> | ||
+ | * [[adi> | ||
+ | * [[adi> | ||
+ | * [[adi> | ||
+ | * [[adi> | ||
+ | * [[adi> | ||
+ | * [[adi> | ||
* [[adi> | * [[adi> | ||
* [[adi> | * [[adi> | ||
* [[adi> | * [[adi> | ||
+ | * [[adi> | ||
+ | * [[adi> | ||
+ | * [[adi> | ||
+ | * [[adi> | ||
+ | * [[adi> | ||
+ | * [[adi> | ||
+ | * [[adi> | ||
+ | * [[adi> | ||
+ | * [[adi> | ||
- | ===== Reference | + | ===== Reference |
- | * [[adi>CN0008]] | + | * [[adi>CN0104]] |
+ | * [[adi> | ||
* [[adi> | * [[adi> | ||
- | * [[adi>CN0165]] | + | * [[adi>CN0180]] |
+ | * [[adi> | ||
+ | * [[adi> | ||
+ | * [[adi> | ||
+ | * [[adi> | ||
+ | * [[adi> | ||
+ | * [[adi> | ||
+ | * [[adi> | ||
+ | * [[adi> | ||
+ | * [[adi> | ||
+ | * [[adi> | ||
+ | * [[adi> | ||
+ | * [[adi> | ||
+ | * [[adi> | ||
+ | * [[adi> | ||
+ | * [[adi> | ||
+ | * [[adi> | ||
+ | * [[adi> | ||
===== Evaluation Boards ===== | ===== Evaluation Boards ===== | ||
- | * [[adi> | + | * [[adi> |
- | * [[adi> | + | * [[adi> |
- | * [[adi> | + | * [[adi> |
- | * [[adi> | + | * [[adi> |
- | * [[adi> | + | * [[adi> |
+ | * [[adi> | ||
+ | * [[adi> | ||
* [[adi> | * [[adi> | ||
- | * [[adi> | + | * [[adi> |
+ | * [[adi> | ||
+ | * [[adi> | ||
+ | * [[adi> | ||
+ | * [[adi> | ||
+ | * [[adi> | ||
+ | * [[adi> | ||
+ | * [[adi> | ||
+ | * [[adi> | ||
+ | * [[adi> | ||
+ | * [[adi> | ||
+ | * [[adi> | ||
+ | * [[adi> | ||
+ | * [[adi> | ||
+ | * [[adi> | ||
+ | * [[adi> | ||
+ | * [[adi> | ||
===== Description ===== | ===== Description ===== | ||
Line 49: | Line 105: | ||
===== Status ===== | ===== Status ===== | ||
- | ^ Source | + | ^ Source ^ Mainlined? ^ |
- | | [[git.linux.org> | + | | [[git.linux.org> |
===== Files ===== | ===== Files ===== | ||
^ Function ^ File ^ | ^ Function ^ File ^ | ||
- | | driver | + | | driver |
- | | driver | + | |
- | | include | [[git.linux.org> | + | |
====== Example platform device initialization ====== | ====== Example platform device initialization ====== | ||
Line 155: | Line 210: | ||
</ | </ | ||
+ | ===== Devicetree ===== | ||
+ | |||
+ | Required devicetree properties: | ||
+ | * compatible: Needs to be " | ||
+ | * reg: The chipselect number used for the device | ||
+ | * spi-max-frequency: | ||
+ | * spi-cpha: Needs to be set for the correct SPI mode | ||
+ | * spi-cpol: Needs to be set for the correct SPI mode | ||
+ | * vcc-supply: Phandle to the supply regulator | ||
+ | |||
+ | < | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | }; | ||
+ | |||
+ | spi: spi@e0007000 { | ||
+ | # | ||
+ | # | ||
+ | | ||
+ | ... | ||
+ | |||
+ | | ||
+ | | ||
+ | reg = <0>; | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | }; | ||
+ | }; | ||
+ | </ | ||
====== Adding Linux driver support ====== | ====== Adding Linux driver support ====== | ||
Line 160: | Line 249: | ||
"make qconfig" | "make qconfig" | ||
- | <note> | + | <WRAP round help> |
The AD7476 Driver depends on **CONFIG_SPI** | The AD7476 Driver depends on **CONFIG_SPI** | ||
- | </note> | + | </WRAP> |
< | < | ||
Linux Kernel Configuration | Linux Kernel Configuration | ||
- | Device Drivers | + | |
- | [*] Staging drivers | + | ... |
- | < | + | < |
- | | + | --- Industrial I/O support |
- | -*- | + | ... |
- | -*- | + | Analog to digital converters |
- | -*- | + | ... |
- | + | < | |
- | *** Analog to digital converters | + | ... |
- | [--snip--] | + | ... |
- | + | ... | |
- | | + | |
- | + | ||
- | [--snip--] | + | |
</ | </ | ||
Line 190: | Line 275: | ||
{{page> | {{page> | ||
- | < | + | <WRAP box bggreen>< |
< | < | ||
root:/> **cd / | root:/> **cd / | ||
Line 200: | Line 285: | ||
root:/ | root:/ | ||
- | drwxr-xr-x | + | drwxr-xr-x |
- | -r--r--r-- | + | -r--r--r-- |
- | -r--r--r-- | + | -r--r--r-- |
-r--r--r-- | -r--r--r-- | ||
lrwxrwxrwx | lrwxrwxrwx | ||
drwxr-xr-x | drwxr-xr-x | ||
-rw-r--r-- | -rw-r--r-- | ||
- | </ | + | </ |
=== Show device name === | === Show device name === | ||
- | < | + | <WRAP box bggreen>< |
< | < | ||
root:/ | root:/ | ||
ad7476 | ad7476 | ||
- | </ | + | </ |
Line 223: | Line 307: | ||
**Description: | **Description: | ||
- | scale to be applied to in0_raw | + | scale to be applied to in_voltage0_raw |
- | < | + | <WRAP box bggreen>< |
< | < | ||
- | root:/ | + | root:/ |
0.805 | 0.805 | ||
- | </ | + | </ |
=== Show channel 0 measurement === | === Show channel 0 measurement === | ||
Line 236: | Line 320: | ||
Raw unscaled voltage measurement on channel 0 | Raw unscaled voltage measurement on channel 0 | ||
- | < | + | <WRAP box bggreen>< |
< | < | ||
- | root:/ | + | root:/ |
2001 | 2001 | ||
- | </ | + | </ |
- | **U** = //in0_raw | + | **U** = //in_voltage0_raw |
===== Trigger management ===== | ===== Trigger management ===== | ||
Line 254: | Line 338: | ||
===== Buffer management ===== | ===== Buffer management ===== | ||
- | < | + | <WRAP box bggreen>< |
< | < | ||
root:/ | root:/ | ||
Line 261: | Line 345: | ||
device0: | device0: | ||
root:/ | root:/ | ||
- | </ | + | </ |
{{page> | {{page> | ||
- | < | + | <WRAP box bggreen>< |
< | < | ||
root:/ | root:/ | ||
Line 271: | Line 355: | ||
in0_index | in0_index | ||
root:/ | root:/ | ||
- | </ | + | </ |
{{page> | {{page> |