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:ad7192 [08 Feb 2019 14:24] – [Example platform device initialization] Mircea Caprioru | resources:tools-software:linux-drivers:iio-adc:ad7192 [08 Feb 2019 14:51] (current) – [Device tree support] Mircea Caprioru | ||
---|---|---|---|
Line 131: | Line 131: | ||
} | } | ||
arch_initcall(board_init); | arch_initcall(board_init); | ||
- | </ | ||
- | |||
- | ====== Adding Linux driver support ====== | ||
- | |||
- | Configure kernel with "make menuconfig" | ||
- | "make qconfig" | ||
- | |||
- | <WRAP round help> | ||
- | The AD7192 Driver depends on **CONFIG_SPI** | ||
- | </ | ||
- | |||
- | < | ||
- | Linux Kernel Configuration | ||
- | Device Drivers | ||
- | [*] Staging drivers | ||
- | < | ||
- | --- Industrial I/O support | ||
- | -*- | ||
- | -*- | ||
- | -*- | ||
- | |||
- | *** Analog to digital converters *** | ||
- | [--snip--] | ||
- | |||
- | < | ||
- | |||
- | [--snip--] | ||
- | |||
</ | </ | ||
Line 169: | Line 141: | ||
/ { | / { | ||
- | compatible = " | ||
fragment@0 { | fragment@0 { | ||
target-path = "/"; | target-path = "/"; | ||
- | __overlay__ { | + | dvdd: fixedregulator@0 { |
- | dvdd: fixedregulator@0 { | + | compatible = " |
- | compatible = " | + | regulator-name = " |
- | regulator-name = " | + | regulator-min-microvolt = < |
- | regulator-min-microvolt = < | + | regulator-max-microvolt = < |
- | regulator-max-microvolt = < | + | regulator-boot-on; |
- | regulator-boot-on; | + | |
- | }; | + | |
}; | }; | ||
}; | }; | ||
Line 186: | Line 155: | ||
fragment@1 { | fragment@1 { | ||
target-path = "/"; | target-path = "/"; | ||
- | __overlay__ { | + | avdd: fixedregulator@1 { |
- | avdd: fixedregulator@1 { | + | compatible = " |
- | compatible = " | + | regulator-name = " |
- | regulator-name = " | + | regulator-min-microvolt = < |
- | regulator-min-microvolt = < | + | regulator-max-microvolt = < |
- | regulator-max-microvolt = < | + | regulator-boot-on; |
- | regulator-boot-on; | + | |
- | }; | + | |
}; | }; | ||
}; | }; | ||
Line 199: | Line 166: | ||
fragment@3 { | fragment@3 { | ||
target = <& | target = <& | ||
- | __overlay__ { | ||
# | # | ||
# | # | ||
status = " | status = " | ||
- | ad7190@0 { | + | ad7190@0 { |
- | compatible = " | + | compatible = " |
- | reg = < | + | reg = < |
- | spi-max-frequency = < | + | spi-max-frequency = < |
- | spi-cpol; | + | spi-cpol; |
- | spi-cpha; | + | spi-cpha; |
- | # | + | # |
- | interrupts = <25 0x2>; | + | interrupts = <25 0x2>; |
- | interrupt-parent = <& | + | interrupt-parent = <& |
- | dvdd-supply = <& | + | dvdd-supply = <& |
- | avdd-supply = <& | + | avdd-supply = <& |
- | adi, | + | adi, |
- | adi, | + | adi, |
- | adi, | + | adi, |
- | adi, | + | adi, |
- | adi, | + | adi, |
- | adi, | + | adi, |
- | adi, | + | adi, |
- | adi, | + | adi, |
- | adi, | + | adi, |
- | }; | + | |
}; | }; | ||
}; | }; | ||
}; | }; | ||
</ | </ | ||
+ | |||
+ | <note important> | ||
+ | </ | ||
+ | ====== Adding Linux driver support ====== | ||
+ | |||
+ | Configure kernel with "make menuconfig" | ||
+ | "make qconfig" | ||
+ | |||
+ | <WRAP round help> | ||
+ | The AD7192 Driver depends on **CONFIG_SPI** | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | Linux Kernel Configuration | ||
+ | Device Drivers | ||
+ | [*] Staging drivers | ||
+ | < | ||
+ | --- Industrial I/O support | ||
+ | -*- | ||
+ | -*- | ||
+ | -*- | ||
+ | |||
+ | *** Analog to digital converters *** | ||
+ | [--snip--] | ||
+ | |||
+ | < | ||
+ | |||
+ | [--snip--] | ||
+ | |||
+ | </ | ||
+ | |||
====== Hardware configuration ====== | ====== Hardware configuration ====== |