Re: [RFCv2] dts: arm: renesas: koelsh: Add MAX11100 device

2016-12-14 Thread Geert Uytterhoeven
On Tue, Dec 13, 2016 at 1:43 PM, Jacopo Mondi  wrote:
>
> diff --git a/arch/arm/boot/dts/r8a7791-koelsch.dts 
> b/arch/arm/boot/dts/r8a7791-koelsch.dts
> index 5405d33..1756b86 100644
> --- a/arch/arm/boot/dts/r8a7791-koelsch.dts
> +++ b/arch/arm/boot/dts/r8a7791-koelsch.dts

> +   spi_gpio: spi-gpio@0 {
> +   compatible = "spi-gpio";
> +   #address-cells = <1>;
> +   #size-cells = <0>;
> +   gpio-sck = < 27 GPIO_ACTIVE_HIGH>;
> +   gpio-miso = < 25 GPIO_ACTIVE_HIGH>;
> +   num-chipselects = <1>;
> +   cs-gpios = < 26 GPIO_ACTIVE_LOW>;
> +   status = "okay";
> +
> +   adc0: max11100@0 {

The node name should be a generic name, the label should be the specific name.
I.e. "max11100: adc@0"

> +   compatible = "maxim,max11100";
> +   reg = <0>;
> +   spi-max-frequency = <250>;
> +   vref-supply = <_adc0>;

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds


[RFCv2] dts: arm: renesas: koelsh: Add MAX11100 device

2016-12-13 Thread Jacopo Mondi
Add node to test MAX11100 ADC with LED28 connected to the chip input
line.
The ADC sits on a gpio-spi master.

Signed-off-by: Jacopo Mondi 
---

Sending as RFC only, not for inclusion.
Used to test MAX11100 ADC driver currently connected to Koelsch GPIO
expander.

v1 -> v2:
- add fixed regulator to supply vref to max11100 ADC

---
 arch/arm/boot/dts/r8a7791-koelsch.dts | 32 
 1 file changed, 32 insertions(+)

diff --git a/arch/arm/boot/dts/r8a7791-koelsch.dts 
b/arch/arm/boot/dts/r8a7791-koelsch.dts
index 5405d33..1756b86 100644
--- a/arch/arm/boot/dts/r8a7791-koelsch.dts
+++ b/arch/arm/boot/dts/r8a7791-koelsch.dts
@@ -170,6 +170,38 @@
gpios = < 21 GPIO_ACTIVE_HIGH>;
label = "LED8";
};
+   led28 {
+   gpios = < 28 GPIO_ACTIVE_HIGH>;
+   label = "LED28";
+   };
+   };
+
+   vref_adc0: regulator-vref-adc0 {
+   compatible = "regulator-fixed";
+
+   regulator-name = "ADC0 Vref";
+   regulator-min-microvolt = <4096000>;
+   regulator-max-microvolt = <4096000>;
+
+   regulator-always-on;
+   };
+
+   spi_gpio: spi-gpio@0 {
+   compatible = "spi-gpio";
+   #address-cells = <1>;
+   #size-cells = <0>;
+   gpio-sck = < 27 GPIO_ACTIVE_HIGH>;
+   gpio-miso = < 25 GPIO_ACTIVE_HIGH>;
+   num-chipselects = <1>;
+   cs-gpios = < 26 GPIO_ACTIVE_LOW>;
+   status = "okay";
+
+   adc0: max11100@0 {
+   compatible = "maxim,max11100";
+   reg = <0>;
+   spi-max-frequency = <250>;
+   vref-supply = <_adc0>;
+   };
};
 
vcc_sdhi0: regulator-vcc-sdhi0 {
-- 
2.7.4