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:ad7606 [27 Apr 2016 17:10] – fix typo Lars-Peter Clausen | resources:tools-software:linux-drivers:iio-adc:ad7606 [30 Sep 2019 09:03] (current) – Add 7616 to the list Beniamin Bia | ||
---|---|---|---|
Line 3: | Line 3: | ||
===== Supported Devices ===== | ===== Supported Devices ===== | ||
+ | * [[adi> | ||
* [[adi> | * [[adi> | ||
* [[adi> | * [[adi> | ||
* [[adi> | * [[adi> | ||
+ | * [[adi> | ||
+ | * [[adi> | ||
===== Reference Circuits ===== | ===== Reference Circuits ===== | ||
Line 13: | Line 16: | ||
===== Evaluation Boards ===== | ===== Evaluation Boards ===== | ||
+ | * [[adi> | ||
* [[adi> | * [[adi> | ||
* [[adi> | * [[adi> | ||
* [[adi> | * [[adi> | ||
+ | * [[adi> | ||
+ | * [[adi> | ||
===== Description ===== | ===== Description ===== | ||
Line 27: | Line 33: | ||
^ Source ^ Mainlined? ^ | ^ Source ^ Mainlined? ^ | ||
- | | [[git.linux.org> | + | | [[git.linux.org> |
===== Files ===== | ===== Files ===== | ||
^ Function ^ File ^ | ^ Function ^ File ^ | ||
- | | driver | + | | driver |
- | | driver | + | | driver |
- | | driver | + | | driver |
- | | driver | + | | include |
- | | include | + | | documentation| [[git.linux.org> |
====== Example platform device initialization ====== | ====== Example platform device initialization ====== | ||
{{page> | {{page> | ||
- | |||
- | The reference voltage may vary between boards and models. The platform_data for the device' | ||
- | |||
- | <code c> | ||
- | /** | ||
- | * struct ad7606_platform_data - platform/ | ||
- | * @default_os: | ||
- | * @default_range: | ||
- | * @gpio_convst: | ||
- | * @gpio_reset: | ||
- | * @gpio_range: | ||
- | * @gpio_os0: | ||
- | * @gpio_os1: | ||
- | * @gpio_os2: | ||
- | * @gpio_frstdata: | ||
- | * @gpio_stby: | ||
- | */ | ||
- | </ | ||
- | |||
- | <source trunk/ | ||
- | |||
- | <code c> | ||
- | static struct ad7606_platform_data ad7606_pdata = { | ||
- | .default_os = 0, | ||
- | .default_range = 10000, | ||
- | .gpio_convst = GPIO_PF9, | ||
- | .gpio_reset = GPIO_PF10, | ||
- | .gpio_range = GPIO_PH0, | ||
- | .gpio_os0 = GPIO_PH1, | ||
- | .gpio_os1 = GPIO_PH2, | ||
- | .gpio_os2 = GPIO_PH3, | ||
- | .gpio_frstdata = -1, | ||
- | .gpio_stby = GPIO_PF12, | ||
- | }; | ||
- | </ | ||
- | |||
====== Example platform_device initialization / parallel interface ====== | ====== Example platform_device initialization / parallel interface ====== | ||
Line 81: | Line 51: | ||
^ ADI part number ^ platform_device name ^ | ^ ADI part number ^ platform_device name ^ | ||
+ | | AD7605-4 | ad7605-4 | | ||
| AD7606 | ad7606-8 | | | AD7606 | ad7606-8 | | ||
| AD7606-6 | ad7606-6 | | | AD7606-6 | ad7606-6 | | ||
| AD7606-4 | ad7606-4 | | | AD7606-4 | ad7606-4 | | ||
+ | | AD7606B | ad7606b | | ||
+ | | AD7616 | ad7616 | | ||
<code c> | <code c> | ||
Line 143: | Line 116: | ||
^ ADI part number ^ spi_board_info modalias ^ | ^ ADI part number ^ spi_board_info modalias ^ | ||
+ | | AD7605-4 | ad7605-4 | | ||
| AD7606 | ad7606-8 | | | AD7606 | ad7606-8 | | ||
| AD7606-6 | ad7606-6 | | | AD7606-6 | ad7606-6 | | ||
Line 157: | Line 131: | ||
.bus_num = 0, /* Framework bus number */ | .bus_num = 0, /* Framework bus number */ | ||
.chip_select = 3, /* Framework chip select */ | .chip_select = 3, /* Framework chip select */ | ||
- | .platform_data = & | ||
.controller_data = & | .controller_data = & | ||
.irq = IRQ_PH6, | .irq = IRQ_PH6, | ||
Line 188: | Line 161: | ||
Linux Kernel Configuration | Linux Kernel Configuration | ||
Device Drivers | Device Drivers | ||
- | [*] Staging drivers | + | < |
- | < | + | --- Industrial I/O support |
- | | + | |
- | -*- | + | |
- | -*- | + | |
- | -*- | + | |
*** Analog to digital converters *** | *** Analog to digital converters *** | ||
[--snip--] | [--snip--] | ||
- | < | + | < |
- | < | + | < |
- | < | + | |
[--snip--] | [--snip--] | ||
</ | </ | ||
+ | |||
+ | ===== Devicetree ===== | ||
+ | |||
+ | Analog Devices AD7606 Simultaneous Sampling ADC | ||
+ | |||
+ | Required properties for the AD7606: | ||
+ | |||
+ | - compatible: Must be one of | ||
+ | * " | ||
+ | * " | ||
+ | * " | ||
+ | * " | ||
+ | * " | ||
+ | * " | ||
+ | - reg: SPI chip select number for the device | ||
+ | - spi-max-frequency: | ||
+ | see: Documentation/ | ||
+ | - spi-cpha: See Documentation/ | ||
+ | - avcc-supply: | ||
+ | - interrupts: IRQ line for the ADC | ||
+ | see: Documentation/ | ||
+ | - adi, | ||
+ | |||
+ | Optional properties: | ||
+ | |||
+ | - reset-gpios: | ||
+ | |||
+ | - standby-gpios: | ||
+ | |||
+ | - adi, | ||
+ | |||
+ | - adi, | ||
+ | |||
+ | - adi, | ||
+ | |||
+ | - adi, | ||
+ | |||
+ | Example: | ||
+ | |||
+ | adc@0 { | ||
+ | compatible = " | ||
+ | reg = <0>; | ||
+ | spi-max-frequency = < | ||
+ | spi-cpol; | ||
+ | avcc-supply = <& | ||
+ | interrupts = <25 IRQ_TYPE_EDGE_FALLING>; | ||
+ | interrupt-parent = <& | ||
+ | adi, | ||
+ | reset-gpios = <& | ||
+ | adi, | ||
+ | adi, | ||
+ | & | ||
+ | & | ||
+ | standby-gpios = <& | ||
+ | adi, | ||
+ | }; | ||
====== Hardware configuration ====== | ====== Hardware configuration ====== |