This set of patches is based on Naveen Krishna Chatradhi's recent work (some of which is still in-flight) and does the final touches to get things working on exynos5250-snow (the ARM Chromebook). These patches were tested on next-20130312 (which includes support for the common clock framework on exynos) plus the current linux-iio/togreg: 95783f2 iio: adc: add exynos adc driver under iio framwork 298489f iio:common: Use spi_sync_transfer() in STMicroelectronics ... 1d9a4cb IIO ADC support for AD7923 9a282b0 iio: Add OF support 3d277fc3 staging:iio: Remove adt7410 driver ...plus Naveen's recent ADC cleanup and NTC thermistor patch. Doug Anderson (4): iio: adc: Document the regulator/clocks for exynos-adc iio: adc: Add dt support for turning on the phy in exynos-adc ARM: dts: Add adc to exynos5250 device tree file ARM: dts: Add adc and thermistors for exynos5250-snow .../devicetree/bindings/arm/samsung/exynos-adc.txt | 12 +++++++-- arch/arm/boot/dts/cros5250-common.dtsi | 4 +++ arch/arm/boot/dts/exynos5250-snow.dts | 31 ++++++++++++++++++++++ arch/arm/boot/dts/exynos5250.dtsi | 11 ++++++++ drivers/iio/adc/exynos_adc.c | 14 +++++++++- 5 files changed, 69 insertions(+), 3 deletions(-) -- 1.8.1.3
The exynos ADC won't work without a regulator called "vdd" and a clock called "adc". Document this fact in the device tree bindings. Signed-off-by: Doug Anderson <dianders@chromium.org> --- Documentation/devicetree/bindings/arm/samsung/exynos-adc.txt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Documentation/devicetree/bindings/arm/samsung/exynos-adc.txt b/Documentation/devicetree/bindings/arm/samsung/exynos-adc.txt index f686378..96db940 100644 --- a/Documentation/devicetree/bindings/arm/samsung/exynos-adc.txt +++ b/Documentation/devicetree/bindings/arm/samsung/exynos-adc.txt @@ -20,6 +20,9 @@ Required properties: format is being dependent on which interrupt controller the Samsung device uses. - #io-channel-cells = <1>; As ADC has multiple outputs +- clocks From common clock binding: handle to adc clock. +- clock-names From common clock binding: Shall be "adc". +- vdd-supply VDD input supply. Note: child nodes can be added for auto probing from device tree. @@ -31,6 +34,11 @@ adc: adc@12D10000 { interrupts = <0 106 0>; #io-channel-cells = <1>; io-channel-ranges; + + clocks = <&clock 303>; + clock-names = "adc"; + + vdd-supply = <&buck5_reg>; }; -- 1.8.1.3
Without this change the exynos adc controller needed to have its phy enabled in some out-of-driver C code. Add support for specifying the phy enable register by listing it in the reg list. Signed-off-by: Doug Anderson <dianders@chromium.org> --- .../devicetree/bindings/arm/samsung/exynos-adc.txt | 4 ++-- drivers/iio/adc/exynos_adc.c | 14 +++++++++++++- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/Documentation/devicetree/bindings/arm/samsung/exynos-adc.txt b/Documentation/devicetree/bindings/arm/samsung/exynos-adc.txt index 96db940..05be151 100644 --- a/Documentation/devicetree/bindings/arm/samsung/exynos-adc.txt +++ b/Documentation/devicetree/bindings/arm/samsung/exynos-adc.txt @@ -15,7 +15,7 @@ Required properties: Must be "samsung,exynos-adc-v2" for future controllers. - reg: Contains ADC register address range (base address and - length). + length) and the address of the phy enable register. - interrupts: Contains the interrupt information for the timer. The format is being dependent on which interrupt controller the Samsung device uses. @@ -30,7 +30,7 @@ Example: adding device info in dtsi file adc: adc@12D10000 { compatible = "samsung,exynos-adc-v1"; - reg = <0x12D10000 0x100>; + reg = <0x12D10000 0x100>, <0x10040718 0x4>; interrupts = <0 106 0>; #io-channel-cells = <1>; io-channel-ranges; diff --git a/drivers/iio/adc/exynos_adc.c b/drivers/iio/adc/exynos_adc.c index ed6fdd7..5ab0dfd 100644 --- a/drivers/iio/adc/exynos_adc.c +++ b/drivers/iio/adc/exynos_adc.c @@ -85,6 +85,7 @@ enum adc_version { struct exynos_adc { void __iomem *regs; + void __iomem *enable_reg; struct clk *clk; unsigned int irq; struct regulator *vdd; @@ -269,13 +270,19 @@ static int exynos_adc_probe(struct platform_device *pdev) info = iio_priv(indio_dev); mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); - info->regs = devm_request_and_ioremap(&pdev->dev, mem); if (!info->regs) { ret = -ENOMEM; goto err_iio; } + mem = platform_get_resource(pdev, IORESOURCE_MEM, 1); + info->enable_reg = devm_request_and_ioremap(&pdev->dev, mem); + if (!info->enable_reg) { + ret = -ENOMEM; + goto err_iio; + } + irq = platform_get_irq(pdev, 0); if (irq < 0) { dev_err(&pdev->dev, "no irq resource?\n"); @@ -295,6 +302,8 @@ static int exynos_adc_probe(struct platform_device *pdev) goto err_iio; } + writel(1, info->enable_reg); + info->clk = devm_clk_get(&pdev->dev, "adc"); if (IS_ERR(info->clk)) { dev_err(&pdev->dev, "failed getting clock, err = %ld\n", @@ -370,6 +379,7 @@ static int exynos_adc_remove(struct platform_device *pdev) exynos_adc_remove_devices); regulator_disable(info->vdd); clk_disable_unprepare(info->clk); + writel(0, info->enable_reg); iio_device_unregister(indio_dev); free_irq(info->irq, info); iio_device_free(indio_dev); @@ -395,6 +405,7 @@ static int exynos_adc_suspend(struct device *dev) } clk_disable_unprepare(info->clk); + writel(0, info->enable_reg); regulator_disable(info->vdd); return 0; @@ -410,6 +421,7 @@ static int exynos_adc_resume(struct device *dev) if (ret) return ret; + writel(1, info->enable_reg); clk_prepare_enable(info->clk); exynos_adc_hw_init(info); -- 1.8.1.3
Add the device tree entry for the device-tree enabled ADC driver that recently landed in the iio tree. Signed-off-by: Doug Anderson <dianders@chromium.org> --- arch/arm/boot/dts/exynos5250.dtsi | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/arch/arm/boot/dts/exynos5250.dtsi b/arch/arm/boot/dts/exynos5250.dtsi index 24c52e6..3773feb 100644 --- a/arch/arm/boot/dts/exynos5250.dtsi +++ b/arch/arm/boot/dts/exynos5250.dtsi @@ -115,6 +115,17 @@ interrupts = <1 2>, <22 4>; }; + adc: adc@12D10000 { + compatible = "samsung,exynos-adc-v1"; + reg = <0x12D10000 0x100>, <0x10040718 0x4>; + interrupts = <0 106 0>; + #io-channel-cells = <1>; + io-channel-ranges; + + clocks = <&clock 303>; + clock-names = "adc"; + }; + watchdog { compatible = "samsung,s3c2410-wdt"; reg = <0x101D0000 0x100>; -- 1.8.1.3
Hook up the exynos5250-snow thermistors via the device tree now that there's a driver available to use them. Signed-off-by: Doug Anderson <dianders@chromium.org> --- arch/arm/boot/dts/cros5250-common.dtsi | 4 ++++ arch/arm/boot/dts/exynos5250-snow.dts | 31 +++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+) diff --git a/arch/arm/boot/dts/cros5250-common.dtsi b/arch/arm/boot/dts/cros5250-common.dtsi index 62eceb4..cb48981 100644 --- a/arch/arm/boot/dts/cros5250-common.dtsi +++ b/arch/arm/boot/dts/cros5250-common.dtsi @@ -305,6 +305,10 @@ status = "disabled"; }; + adc@12D10000 { + vdd-supply = <&buck5_reg>; + }; + hdmi { hpd-gpio = <&gpx3 7 0xf 1 3>; }; diff --git a/arch/arm/boot/dts/exynos5250-snow.dts b/arch/arm/boot/dts/exynos5250-snow.dts index babd9f9..1cab5fd 100644 --- a/arch/arm/boot/dts/exynos5250-snow.dts +++ b/arch/arm/boot/dts/exynos5250-snow.dts @@ -51,4 +51,35 @@ clock-frequency = <24000000>; }; }; + + adc@12D10000 { + ncp15wb473@3 { + compatible = "ntc,ncp15wb473"; + pullup-uV = <1800000>; + pullup-ohm = <47000>; + pulldown-ohm = <0>; + io-channels = <&adc 3>; + }; + ncp15wb473@4 { + compatible = "ntc,ncp15wb473"; + pullup-uV = <1800000>; + pullup-ohm = <47000>; + pulldown-ohm = <0>; + io-channels = <&adc 4>; + }; + ncp15wb473@5 { + compatible = "ntc,ncp15wb473"; + pullup-uV = <1800000>; + pullup-ohm = <47000>; + pulldown-ohm = <0>; + io-channels = <&adc 5>; + }; + ncp15wb473@6 { + compatible = "ntc,ncp15wb473"; + pullup-uV = <1800000>; + pullup-ohm = <47000>; + pulldown-ohm = <0>; + io-channels = <&adc 6>; + }; + }; }; -- 1.8.1.3
(some of which is still in-flight) and does the final touches to get things working on exynos5250-snow (the ARM Chromebook). These patches were tested on next-20130312 (which includes support for the common clock framework on exynos) plus the current linux-iio/togreg: 95783f2 iio: adc: add exynos adc driver under iio framwork 298489f iio:common: Use spi_sync_transfer() in STMicroelectronics ... 1d9a4cb IIO ADC support for AD7923 9a282b0 iio: Add OF support 3d277fc3 staging:iio: Remove adt7410 driver Changes in v2: - Match 'uV' -> 'uv' change in Naveen's bindings. Doug Anderson (4): iio: adc: Document the regulator/clocks for exynos-adc iio: adc: Add dt support for turning on the phy in exynos-adc ARM: dts: Add adc to exynos5250 device tree file ARM: dts: Add adc and thermistors for exynos5250-snow .../devicetree/bindings/arm/samsung/exynos-adc.txt | 12 +++++++-- arch/arm/boot/dts/cros5250-common.dtsi | 4 +++ arch/arm/boot/dts/exynos5250-snow.dts | 31 ++++++++++++++++++++++ arch/arm/boot/dts/exynos5250.dtsi | 11 ++++++++ drivers/iio/adc/exynos_adc.c | 14 +++++++++- 5 files changed, 69 insertions(+), 3 deletions(-) -- 1.8.1.3
The exynos ADC won't work without a regulator called "vdd" and a clock called "adc". Document this fact in the device tree bindings. Signed-off-by: Doug Anderson <dianders@chromium.org> --- Changes in v2: None Documentation/devicetree/bindings/arm/samsung/exynos-adc.txt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Documentation/devicetree/bindings/arm/samsung/exynos-adc.txt b/Documentation/devicetree/bindings/arm/samsung/exynos-adc.txt index f686378..96db940 100644 --- a/Documentation/devicetree/bindings/arm/samsung/exynos-adc.txt +++ b/Documentation/devicetree/bindings/arm/samsung/exynos-adc.txt @@ -20,6 +20,9 @@ Required properties: format is being dependent on which interrupt controller the Samsung device uses. - #io-channel-cells = <1>; As ADC has multiple outputs +- clocks From common clock binding: handle to adc clock. +- clock-names From common clock binding: Shall be "adc". +- vdd-supply VDD input supply. Note: child nodes can be added for auto probing from device tree. @@ -31,6 +34,11 @@ adc: adc@12D10000 { interrupts = <0 106 0>; #io-channel-cells = <1>; io-channel-ranges; + + clocks = <&clock 303>; + clock-names = "adc"; + + vdd-supply = <&buck5_reg>; }; -- 1.8.1.3
Without this change the exynos adc controller needed to have its phy enabled in some out-of-driver C code. Add support for specifying the phy enable register by listing it in the reg list. Signed-off-by: Doug Anderson <dianders@chromium.org> --- Changes in v2: None .../devicetree/bindings/arm/samsung/exynos-adc.txt | 4 ++-- drivers/iio/adc/exynos_adc.c | 14 +++++++++++++- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/Documentation/devicetree/bindings/arm/samsung/exynos-adc.txt b/Documentation/devicetree/bindings/arm/samsung/exynos-adc.txt index 96db940..05be151 100644 --- a/Documentation/devicetree/bindings/arm/samsung/exynos-adc.txt +++ b/Documentation/devicetree/bindings/arm/samsung/exynos-adc.txt @@ -15,7 +15,7 @@ Required properties: Must be "samsung,exynos-adc-v2" for future controllers. - reg: Contains ADC register address range (base address and - length). + length) and the address of the phy enable register. - interrupts: Contains the interrupt information for the timer. The format is being dependent on which interrupt controller the Samsung device uses. @@ -30,7 +30,7 @@ Example: adding device info in dtsi file adc: adc@12D10000 { compatible = "samsung,exynos-adc-v1"; - reg = <0x12D10000 0x100>; + reg = <0x12D10000 0x100>, <0x10040718 0x4>; interrupts = <0 106 0>; #io-channel-cells = <1>; io-channel-ranges; diff --git a/drivers/iio/adc/exynos_adc.c b/drivers/iio/adc/exynos_adc.c index ed6fdd7..5ab0dfd 100644 --- a/drivers/iio/adc/exynos_adc.c +++ b/drivers/iio/adc/exynos_adc.c @@ -85,6 +85,7 @@ enum adc_version { struct exynos_adc { void __iomem *regs; + void __iomem *enable_reg; struct clk *clk; unsigned int irq; struct regulator *vdd; @@ -269,13 +270,19 @@ static int exynos_adc_probe(struct platform_device *pdev) info = iio_priv(indio_dev); mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); - info->regs = devm_request_and_ioremap(&pdev->dev, mem); if (!info->regs) { ret = -ENOMEM; goto err_iio; } + mem = platform_get_resource(pdev, IORESOURCE_MEM, 1); + info->enable_reg = devm_request_and_ioremap(&pdev->dev, mem); + if (!info->enable_reg) { + ret = -ENOMEM; + goto err_iio; + } + irq = platform_get_irq(pdev, 0); if (irq < 0) { dev_err(&pdev->dev, "no irq resource?\n"); @@ -295,6 +302,8 @@ static int exynos_adc_probe(struct platform_device *pdev) goto err_iio; } + writel(1, info->enable_reg); + info->clk = devm_clk_get(&pdev->dev, "adc"); if (IS_ERR(info->clk)) { dev_err(&pdev->dev, "failed getting clock, err = %ld\n", @@ -370,6 +379,7 @@ static int exynos_adc_remove(struct platform_device *pdev) exynos_adc_remove_devices); regulator_disable(info->vdd); clk_disable_unprepare(info->clk); + writel(0, info->enable_reg); iio_device_unregister(indio_dev); free_irq(info->irq, info); iio_device_free(indio_dev); @@ -395,6 +405,7 @@ static int exynos_adc_suspend(struct device *dev) } clk_disable_unprepare(info->clk); + writel(0, info->enable_reg); regulator_disable(info->vdd); return 0; @@ -410,6 +421,7 @@ static int exynos_adc_resume(struct device *dev) if (ret) return ret; + writel(1, info->enable_reg); clk_prepare_enable(info->clk); exynos_adc_hw_init(info); -- 1.8.1.3
Add the device tree entry for the device-tree enabled ADC driver that recently landed in the iio tree. Signed-off-by: Doug Anderson <dianders@chromium.org> --- Changes in v2: None arch/arm/boot/dts/exynos5250.dtsi | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/arch/arm/boot/dts/exynos5250.dtsi b/arch/arm/boot/dts/exynos5250.dtsi index 3acf594..1642062 100644 --- a/arch/arm/boot/dts/exynos5250.dtsi +++ b/arch/arm/boot/dts/exynos5250.dtsi @@ -69,6 +69,17 @@ <0 28 0>, <0 29 0>, <0 30 0>, <0 31 0>; }; + adc: adc@12D10000 { + compatible = "samsung,exynos-adc-v1"; + reg = <0x12D10000 0x100>, <0x10040718 0x4>; + interrupts = <0 106 0>; + #io-channel-cells = <1>; + io-channel-ranges; + + clocks = <&clock 303>; + clock-names = "adc"; + }; + watchdog { compatible = "samsung,s3c2410-wdt"; reg = <0x101D0000 0x100>; -- 1.8.1.3
Hook up the exynos5250-snow thermistors via the device tree now that there's a driver available to use them. Signed-off-by: Doug Anderson <dianders@chromium.org> --- Changes in v2: - Match 'uV' -> 'uv' change in Naveen's bindings. arch/arm/boot/dts/cros5250-common.dtsi | 4 ++++ arch/arm/boot/dts/exynos5250-snow.dts | 31 +++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+) diff --git a/arch/arm/boot/dts/cros5250-common.dtsi b/arch/arm/boot/dts/cros5250-common.dtsi index 46c0980..f7cc835 100644 --- a/arch/arm/boot/dts/cros5250-common.dtsi +++ b/arch/arm/boot/dts/cros5250-common.dtsi @@ -167,6 +167,10 @@ status = "disabled"; }; + adc@12D10000 { + vdd-supply = <&buck5_reg>; + }; + hdmi { hpd-gpio = <&gpx3 7 0xf 1 3>; }; diff --git a/arch/arm/boot/dts/exynos5250-snow.dts b/arch/arm/boot/dts/exynos5250-snow.dts index 17dd951..b78da7c 100644 --- a/arch/arm/boot/dts/exynos5250-snow.dts +++ b/arch/arm/boot/dts/exynos5250-snow.dts @@ -40,4 +40,35 @@ <&gpc4 5 2 3 0>, <&gpc4 6 2 3 0>; }; }; + + adc@12D10000 { + ncp15wb473@3 { + compatible = "ntc,ncp15wb473"; + pullup-uv = <1800000>; + pullup-ohm = <47000>; + pulldown-ohm = <0>; + io-channels = <&adc 3>; + }; + ncp15wb473@4 { + compatible = "ntc,ncp15wb473"; + pullup-uv = <1800000>; + pullup-ohm = <47000>; + pulldown-ohm = <0>; + io-channels = <&adc 4>; + }; + ncp15wb473@5 { + compatible = "ntc,ncp15wb473"; + pullup-uv = <1800000>; + pullup-ohm = <47000>; + pulldown-ohm = <0>; + io-channels = <&adc 5>; + }; + ncp15wb473@6 { + compatible = "ntc,ncp15wb473"; + pullup-uv = <1800000>; + pullup-ohm = <47000>; + pulldown-ohm = <0>; + io-channels = <&adc 6>; + }; + }; }; -- 1.8.1.3
Doug, On 14 March 2013 02:09, Doug Anderson <dianders@chromium.org> wrote: > The exynos ADC won't work without a regulator called "vdd" and a clock > called "adc". Document this fact in the device tree bindings. > > Signed-off-by: Doug Anderson <dianders@chromium.org> Thanks for the correction. Clocks and regulator is needed. I missed it out, as i did not submit the arch side changes > --- > Changes in v2: None > > Documentation/devicetree/bindings/arm/samsung/exynos-adc.txt | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/Documentation/devicetree/bindings/arm/samsung/exynos-adc.txt b/Documentation/devicetree/bindings/arm/samsung/exynos-adc.txt > index f686378..96db940 100644 > --- a/Documentation/devicetree/bindings/arm/samsung/exynos-adc.txt > +++ b/Documentation/devicetree/bindings/arm/samsung/exynos-adc.txt > @@ -20,6 +20,9 @@ Required properties: > format is being dependent on which interrupt controller > the Samsung device uses. > - #io-channel-cells = <1>; As ADC has multiple outputs > +- clocks From common clock binding: handle to adc clock. > +- clock-names From common clock binding: Shall be "adc". > +- vdd-supply VDD input supply. > > Note: child nodes can be added for auto probing from device tree. > > @@ -31,6 +34,11 @@ adc: adc@12D10000 { > interrupts = <0 106 0>; > #io-channel-cells = <1>; > io-channel-ranges; > + > + clocks = <&clock 303>; > + clock-names = "adc"; > + > + vdd-supply = <&buck5_reg>; > }; > > > -- > 1.8.1.3 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > Please read the FAQ at http://www.tux.org/lkml/ -- Shine bright, (: Nav :)
Doug, On 14 March 2013 02:10, Doug Anderson <dianders@chromium.org> wrote: > Hook up the exynos5250-snow thermistors via the device tree now that > there's a driver available to use them. > > Signed-off-by: Doug Anderson <dianders@chromium.org> > --- > Changes in v2: > - Match 'uV' -> 'uv' change in Naveen's bindings. > > arch/arm/boot/dts/cros5250-common.dtsi | 4 ++++ > arch/arm/boot/dts/exynos5250-snow.dts | 31 +++++++++++++++++++++++++++++++ > 2 files changed, 35 insertions(+) > > diff --git a/arch/arm/boot/dts/cros5250-common.dtsi b/arch/arm/boot/dts/cros5250-common.dtsi > index 46c0980..f7cc835 100644 > --- a/arch/arm/boot/dts/cros5250-common.dtsi > +++ b/arch/arm/boot/dts/cros5250-common.dtsi > @@ -167,6 +167,10 @@ > status = "disabled"; > }; > > + adc@12D10000 { > + vdd-supply = <&buck5_reg>; > + }; > + > hdmi { > hpd-gpio = <&gpx3 7 0xf 1 3>; > }; > diff --git a/arch/arm/boot/dts/exynos5250-snow.dts b/arch/arm/boot/dts/exynos5250-snow.dts > index 17dd951..b78da7c 100644 > --- a/arch/arm/boot/dts/exynos5250-snow.dts > +++ b/arch/arm/boot/dts/exynos5250-snow.dts > @@ -40,4 +40,35 @@ > <&gpc4 5 2 3 0>, <&gpc4 6 2 3 0>; > }; > }; > + > + adc@12D10000 { > + ncp15wb473@3 { > + compatible = "ntc,ncp15wb473"; > + pullup-uv = <1800000>; > + pullup-ohm = <47000>; > + pulldown-ohm = <0>; > + io-channels = <&adc 3>; > + }; > + ncp15wb473@4 { > + compatible = "ntc,ncp15wb473"; > + pullup-uv = <1800000>; > + pullup-ohm = <47000>; > + pulldown-ohm = <0>; > + io-channels = <&adc 4>; > + }; > + ncp15wb473@5 { > + compatible = "ntc,ncp15wb473"; > + pullup-uv = <1800000>; > + pullup-ohm = <47000>; > + pulldown-ohm = <0>; > + io-channels = <&adc 5>; > + }; > + ncp15wb473@6 { > + compatible = "ntc,ncp15wb473"; > + pullup-uv = <1800000>; > + pullup-ohm = <47000>; > + pulldown-ohm = <0>; > + io-channels = <&adc 6>; > + }; > + }; > }; Thanks for the upload, i've tested with a similar changes. > -- > 1.8.1.3 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > Please read the FAQ at http://www.tux.org/lkml/ -- Shine bright, (: Nav :)
On 14 March 2013 02:10, Doug Anderson <dianders@chromium.org> wrote: > Without this change the exynos adc controller needed to have its phy > enabled in some out-of-driver C code. Add support for specifying the > phy enable register by listing it in the reg list. > > Signed-off-by: Doug Anderson <dianders@chromium.org> Worked for me, Its needed for Exynos5250 and future versions too. Tested on SMDK5250. > --- > Changes in v2: None > > .../devicetree/bindings/arm/samsung/exynos-adc.txt | 4 ++-- > drivers/iio/adc/exynos_adc.c | 14 +++++++++++++- > 2 files changed, 15 insertions(+), 3 deletions(-) > > diff --git a/Documentation/devicetree/bindings/arm/samsung/exynos-adc.txt b/Documentation/devicetree/bindings/arm/samsung/exynos-adc.txt > index 96db940..05be151 100644 > --- a/Documentation/devicetree/bindings/arm/samsung/exynos-adc.txt > +++ b/Documentation/devicetree/bindings/arm/samsung/exynos-adc.txt > @@ -15,7 +15,7 @@ Required properties: > Must be "samsung,exynos-adc-v2" for > future controllers. > - reg: Contains ADC register address range (base address and > - length). > + length) and the address of the phy enable register. > - interrupts: Contains the interrupt information for the timer. The > format is being dependent on which interrupt controller > the Samsung device uses. > @@ -30,7 +30,7 @@ Example: adding device info in dtsi file > > adc: adc@12D10000 { > compatible = "samsung,exynos-adc-v1"; > - reg = <0x12D10000 0x100>; > + reg = <0x12D10000 0x100>, <0x10040718 0x4>; > interrupts = <0 106 0>; > #io-channel-cells = <1>; > io-channel-ranges; > diff --git a/drivers/iio/adc/exynos_adc.c b/drivers/iio/adc/exynos_adc.c > index ed6fdd7..5ab0dfd 100644 > --- a/drivers/iio/adc/exynos_adc.c > +++ b/drivers/iio/adc/exynos_adc.c > @@ -85,6 +85,7 @@ enum adc_version { > > struct exynos_adc { > void __iomem *regs; > + void __iomem *enable_reg; > struct clk *clk; > unsigned int irq; > struct regulator *vdd; > @@ -269,13 +270,19 @@ static int exynos_adc_probe(struct platform_device *pdev) > info = iio_priv(indio_dev); > > mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); > - > info->regs = devm_request_and_ioremap(&pdev->dev, mem); > if (!info->regs) { > ret = -ENOMEM; > goto err_iio; > } > > + mem = platform_get_resource(pdev, IORESOURCE_MEM, 1); > + info->enable_reg = devm_request_and_ioremap(&pdev->dev, mem); > + if (!info->enable_reg) { > + ret = -ENOMEM; > + goto err_iio; > + } > + > irq = platform_get_irq(pdev, 0); > if (irq < 0) { > dev_err(&pdev->dev, "no irq resource?\n"); > @@ -295,6 +302,8 @@ static int exynos_adc_probe(struct platform_device *pdev) > goto err_iio; > } > > + writel(1, info->enable_reg); > + > info->clk = devm_clk_get(&pdev->dev, "adc"); > if (IS_ERR(info->clk)) { > dev_err(&pdev->dev, "failed getting clock, err = %ld\n", > @@ -370,6 +379,7 @@ static int exynos_adc_remove(struct platform_device *pdev) > exynos_adc_remove_devices); > regulator_disable(info->vdd); > clk_disable_unprepare(info->clk); > + writel(0, info->enable_reg); > iio_device_unregister(indio_dev); > free_irq(info->irq, info); > iio_device_free(indio_dev); > @@ -395,6 +405,7 @@ static int exynos_adc_suspend(struct device *dev) > } > > clk_disable_unprepare(info->clk); > + writel(0, info->enable_reg); > regulator_disable(info->vdd); > > return 0; > @@ -410,6 +421,7 @@ static int exynos_adc_resume(struct device *dev) > if (ret) > return ret; > > + writel(1, info->enable_reg); > clk_prepare_enable(info->clk); > > exynos_adc_hw_init(info); > -- > 1.8.1.3 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > Please read the FAQ at http://www.tux.org/lkml/ -- Shine bright, (: Nav :)
On 15 March 2013 15:54, Naveen Krishna Ch <naveenkrishna.ch@gmail.com> wrote: > Doug, > > On 14 March 2013 02:10, Doug Anderson <dianders@chromium.org> wrote: >> Hook up the exynos5250-snow thermistors via the device tree now that >> there's a driver available to use them. >> >> Signed-off-by: Doug Anderson <dianders@chromium.org> Tested-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com> used these changes to test on snow before submitting the ADC and NTC driver changes. >> --- >> Changes in v2: >> - Match 'uV' -> 'uv' change in Naveen's bindings. >> >> arch/arm/boot/dts/cros5250-common.dtsi | 4 ++++ >> arch/arm/boot/dts/exynos5250-snow.dts | 31 +++++++++++++++++++++++++++++++ >> 2 files changed, 35 insertions(+) >> >> diff --git a/arch/arm/boot/dts/cros5250-common.dtsi b/arch/arm/boot/dts/cros5250-common.dtsi >> index 46c0980..f7cc835 100644 >> --- a/arch/arm/boot/dts/cros5250-common.dtsi >> +++ b/arch/arm/boot/dts/cros5250-common.dtsi >> @@ -167,6 +167,10 @@ >> status = "disabled"; >> }; >> >> + adc@12D10000 { >> + vdd-supply = <&buck5_reg>; >> + }; >> + >> hdmi { >> hpd-gpio = <&gpx3 7 0xf 1 3>; >> }; >> diff --git a/arch/arm/boot/dts/exynos5250-snow.dts b/arch/arm/boot/dts/exynos5250-snow.dts >> index 17dd951..b78da7c 100644 >> --- a/arch/arm/boot/dts/exynos5250-snow.dts >> +++ b/arch/arm/boot/dts/exynos5250-snow.dts >> @@ -40,4 +40,35 @@ >> <&gpc4 5 2 3 0>, <&gpc4 6 2 3 0>; >> }; >> }; >> + >> + adc@12D10000 { >> + ncp15wb473@3 { >> + compatible = "ntc,ncp15wb473"; >> + pullup-uv = <1800000>; >> + pullup-ohm = <47000>; >> + pulldown-ohm = <0>; >> + io-channels = <&adc 3>; >> + }; >> + ncp15wb473@4 { >> + compatible = "ntc,ncp15wb473"; >> + pullup-uv = <1800000>; >> + pullup-ohm = <47000>; >> + pulldown-ohm = <0>; >> + io-channels = <&adc 4>; >> + }; >> + ncp15wb473@5 { >> + compatible = "ntc,ncp15wb473"; >> + pullup-uv = <1800000>; >> + pullup-ohm = <47000>; >> + pulldown-ohm = <0>; >> + io-channels = <&adc 5>; >> + }; >> + ncp15wb473@6 { >> + compatible = "ntc,ncp15wb473"; >> + pullup-uv = <1800000>; >> + pullup-ohm = <47000>; >> + pulldown-ohm = <0>; >> + io-channels = <&adc 6>; >> + }; >> + }; >> }; > Thanks for the upload, i've tested with a similar changes. >> -- >> 1.8.1.3 >> >> -- >> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in >> the body of a message to majordomo@vger.kernel.org >> More majordomo info at http://vger.kernel.org/majordomo-info.html >> Please read the FAQ at http://www.tux.org/lkml/ > > > > -- > Shine bright, > (: Nav :) -- Shine bright, (: Nav :)
On 15 March 2013 17:15, Naveen Krishna Ch <naveenkrishna.ch@gmail.com> wrote: > On 14 March 2013 02:10, Doug Anderson <dianders@chromium.org> wrote: >> Without this change the exynos adc controller needed to have its phy >> enabled in some out-of-driver C code. Add support for specifying the >> phy enable register by listing it in the reg list. >> >> Signed-off-by: Doug Anderson <dianders@chromium.org> Tested-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com> I used this in mach file for testing. But this one worked aswell. > > Worked for me, Its needed for Exynos5250 and future versions too. > Tested on SMDK5250. >> --- >> Changes in v2: None >> >> .../devicetree/bindings/arm/samsung/exynos-adc.txt | 4 ++-- >> drivers/iio/adc/exynos_adc.c | 14 +++++++++++++- >> 2 files changed, 15 insertions(+), 3 deletions(-) >> >> diff --git a/Documentation/devicetree/bindings/arm/samsung/exynos-adc.txt b/Documentation/devicetree/bindings/arm/samsung/exynos-adc.txt >> index 96db940..05be151 100644 >> --- a/Documentation/devicetree/bindings/arm/samsung/exynos-adc.txt >> +++ b/Documentation/devicetree/bindings/arm/samsung/exynos-adc.txt >> @@ -15,7 +15,7 @@ Required properties: >> Must be "samsung,exynos-adc-v2" for >> future controllers. >> - reg: Contains ADC register address range (base address and >> - length). >> + length) and the address of the phy enable register. >> - interrupts: Contains the interrupt information for the timer. The >> format is being dependent on which interrupt controller >> the Samsung device uses. >> @@ -30,7 +30,7 @@ Example: adding device info in dtsi file >> >> adc: adc@12D10000 { >> compatible = "samsung,exynos-adc-v1"; >> - reg = <0x12D10000 0x100>; >> + reg = <0x12D10000 0x100>, <0x10040718 0x4>; >> interrupts = <0 106 0>; >> #io-channel-cells = <1>; >> io-channel-ranges; >> diff --git a/drivers/iio/adc/exynos_adc.c b/drivers/iio/adc/exynos_adc.c >> index ed6fdd7..5ab0dfd 100644 >> --- a/drivers/iio/adc/exynos_adc.c >> +++ b/drivers/iio/adc/exynos_adc.c >> @@ -85,6 +85,7 @@ enum adc_version { >> >> struct exynos_adc { >> void __iomem *regs; >> + void __iomem *enable_reg; >> struct clk *clk; >> unsigned int irq; >> struct regulator *vdd; >> @@ -269,13 +270,19 @@ static int exynos_adc_probe(struct platform_device *pdev) >> info = iio_priv(indio_dev); >> >> mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); >> - >> info->regs = devm_request_and_ioremap(&pdev->dev, mem); >> if (!info->regs) { >> ret = -ENOMEM; >> goto err_iio; >> } >> >> + mem = platform_get_resource(pdev, IORESOURCE_MEM, 1); >> + info->enable_reg = devm_request_and_ioremap(&pdev->dev, mem); >> + if (!info->enable_reg) { >> + ret = -ENOMEM; >> + goto err_iio; >> + } >> + >> irq = platform_get_irq(pdev, 0); >> if (irq < 0) { >> dev_err(&pdev->dev, "no irq resource?\n"); >> @@ -295,6 +302,8 @@ static int exynos_adc_probe(struct platform_device *pdev) >> goto err_iio; >> } >> >> + writel(1, info->enable_reg); >> + >> info->clk = devm_clk_get(&pdev->dev, "adc"); >> if (IS_ERR(info->clk)) { >> dev_err(&pdev->dev, "failed getting clock, err = %ld\n", >> @@ -370,6 +379,7 @@ static int exynos_adc_remove(struct platform_device *pdev) >> exynos_adc_remove_devices); >> regulator_disable(info->vdd); >> clk_disable_unprepare(info->clk); >> + writel(0, info->enable_reg); >> iio_device_unregister(indio_dev); >> free_irq(info->irq, info); >> iio_device_free(indio_dev); >> @@ -395,6 +405,7 @@ static int exynos_adc_suspend(struct device *dev) >> } >> >> clk_disable_unprepare(info->clk); >> + writel(0, info->enable_reg); >> regulator_disable(info->vdd); >> >> return 0; >> @@ -410,6 +421,7 @@ static int exynos_adc_resume(struct device *dev) >> if (ret) >> return ret; >> >> + writel(1, info->enable_reg); >> clk_prepare_enable(info->clk); >> >> exynos_adc_hw_init(info); >> -- >> 1.8.1.3 >> >> -- >> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in >> the body of a message to majordomo@vger.kernel.org >> More majordomo info at http://vger.kernel.org/majordomo-info.html >> Please read the FAQ at http://www.tux.org/lkml/ > > > > -- > Shine bright, > (: Nav :) -- Shine bright, (: Nav :)
On 14 March 2013 02:10, Doug Anderson <dianders@chromium.org> wrote: > Add the device tree entry for the device-tree enabled ADC driver that > recently landed in the iio tree. > > Signed-off-by: Doug Anderson <dianders@chromium.org> I've not used the "clock" binding yet, Will test with that and give a tag. > --- > Changes in v2: None > > arch/arm/boot/dts/exynos5250.dtsi | 11 +++++++++++ > 1 file changed, 11 insertions(+) > > diff --git a/arch/arm/boot/dts/exynos5250.dtsi b/arch/arm/boot/dts/exynos5250.dtsi > index 3acf594..1642062 100644 > --- a/arch/arm/boot/dts/exynos5250.dtsi > +++ b/arch/arm/boot/dts/exynos5250.dtsi > @@ -69,6 +69,17 @@ > <0 28 0>, <0 29 0>, <0 30 0>, <0 31 0>; > }; > > + adc: adc@12D10000 { > + compatible = "samsung,exynos-adc-v1"; > + reg = <0x12D10000 0x100>, <0x10040718 0x4>; > + interrupts = <0 106 0>; > + #io-channel-cells = <1>; > + io-channel-ranges; > + > + clocks = <&clock 303>; > + clock-names = "adc"; > + }; > + > watchdog { > compatible = "samsung,s3c2410-wdt"; > reg = <0x101D0000 0x100>; > -- > 1.8.1.3 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > Please read the FAQ at http://www.tux.org/lkml/ -- Shine bright, (: Nav :)
On 13 March 2013 13:39, Doug Anderson <dianders@chromium.org> wrote: > The exynos ADC won't work without a regulator called "vdd" and a clock > called "adc". Document this fact in the device tree bindings. > > Signed-off-by: Doug Anderson <dianders@chromium.org> Reviewed-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com> Lars, any update on this patch set. This change is required. > --- > Changes in v2: None > > Documentation/devicetree/bindings/arm/samsung/exynos-adc.txt | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/Documentation/devicetree/bindings/arm/samsung/exynos-adc.txt b/Documentation/devicetree/bindings/arm/samsung/exynos-adc.txt > index f686378..96db940 100644 > --- a/Documentation/devicetree/bindings/arm/samsung/exynos-adc.txt > +++ b/Documentation/devicetree/bindings/arm/samsung/exynos-adc.txt > @@ -20,6 +20,9 @@ Required properties: > format is being dependent on which interrupt controller > the Samsung device uses. > - #io-channel-cells = <1>; As ADC has multiple outputs > +- clocks From common clock binding: handle to adc clock. > +- clock-names From common clock binding: Shall be "adc". > +- vdd-supply VDD input supply. > > Note: child nodes can be added for auto probing from device tree. > > @@ -31,6 +34,11 @@ adc: adc@12D10000 { > interrupts = <0 106 0>; > #io-channel-cells = <1>; > io-channel-ranges; > + > + clocks = <&clock 303>; > + clock-names = "adc"; > + > + vdd-supply = <&buck5_reg>; > }; > > > -- > 1.8.1.3 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > Please read the FAQ at http://www.tux.org/lkml/ -- Shine bright, (: Nav :)
On 15 March 2013 08:42, Naveen Krishna Ch <naveenkrishna.ch@gmail.com> wrote: > On 15 March 2013 15:54, Naveen Krishna Ch <naveenkrishna.ch@gmail.com> wrote: >> Doug, >> >> On 14 March 2013 02:10, Doug Anderson <dianders@chromium.org> wrote: >>> Hook up the exynos5250-snow thermistors via the device tree now that >>> there's a driver available to use them. >>> >>> Signed-off-by: Doug Anderson <dianders@chromium.org> > Tested-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com> > used these changes to test on snow before submitting the ADC and NTC > driver changes. Kukjin, Any update on this patch. you want us to rebase it ? >>> --- >>> Changes in v2: >>> - Match 'uV' -> 'uv' change in Naveen's bindings. >>> >>> arch/arm/boot/dts/cros5250-common.dtsi | 4 ++++ >>> arch/arm/boot/dts/exynos5250-snow.dts | 31 +++++++++++++++++++++++++++++++ >>> 2 files changed, 35 insertions(+) >>> >>> diff --git a/arch/arm/boot/dts/cros5250-common.dtsi b/arch/arm/boot/dts/cros5250-common.dtsi >>> index 46c0980..f7cc835 100644 >>> --- a/arch/arm/boot/dts/cros5250-common.dtsi >>> +++ b/arch/arm/boot/dts/cros5250-common.dtsi >>> @@ -167,6 +167,10 @@ >>> status = "disabled"; >>> }; >>> >>> + adc@12D10000 { >>> + vdd-supply = <&buck5_reg>; >>> + }; >>> + >>> hdmi { >>> hpd-gpio = <&gpx3 7 0xf 1 3>; >>> }; >>> diff --git a/arch/arm/boot/dts/exynos5250-snow.dts b/arch/arm/boot/dts/exynos5250-snow.dts >>> index 17dd951..b78da7c 100644 >>> --- a/arch/arm/boot/dts/exynos5250-snow.dts >>> +++ b/arch/arm/boot/dts/exynos5250-snow.dts >>> @@ -40,4 +40,35 @@ >>> <&gpc4 5 2 3 0>, <&gpc4 6 2 3 0>; >>> }; >>> }; >>> + >>> + adc@12D10000 { >>> + ncp15wb473@3 { >>> + compatible = "ntc,ncp15wb473"; >>> + pullup-uv = <1800000>; >>> + pullup-ohm = <47000>; >>> + pulldown-ohm = <0>; >>> + io-channels = <&adc 3>; >>> + }; >>> + ncp15wb473@4 { >>> + compatible = "ntc,ncp15wb473"; >>> + pullup-uv = <1800000>; >>> + pullup-ohm = <47000>; >>> + pulldown-ohm = <0>; >>> + io-channels = <&adc 4>; >>> + }; >>> + ncp15wb473@5 { >>> + compatible = "ntc,ncp15wb473"; >>> + pullup-uv = <1800000>; >>> + pullup-ohm = <47000>; >>> + pulldown-ohm = <0>; >>> + io-channels = <&adc 5>; >>> + }; >>> + ncp15wb473@6 { >>> + compatible = "ntc,ncp15wb473"; >>> + pullup-uv = <1800000>; >>> + pullup-ohm = <47000>; >>> + pulldown-ohm = <0>; >>> + io-channels = <&adc 6>; >>> + }; >>> + }; >>> }; >> Thanks for the upload, i've tested with a similar changes. >>> -- >>> 1.8.1.3 >>> >>> -- >>> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in >>> the body of a message to majordomo@vger.kernel.org >>> More majordomo info at http://vger.kernel.org/majordomo-info.html >>> Please read the FAQ at http://www.tux.org/lkml/ >> >> >> >> -- >> Shine bright, >> (: Nav :) > > > > -- > Shine bright, > (: Nav :) -- Shine bright, (: Nav :)
On 13 March 2013 13:40, Doug Anderson <dianders@chromium.org> wrote: > Without this change the exynos adc controller needed to have its phy > enabled in some out-of-driver C code. Add support for specifying the > phy enable register by listing it in the reg list. > > Signed-off-by: Doug Anderson <dianders@chromium.org> > --- > Changes in v2: None Reviewed-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com> Lars, any update on this patch set. This change is required. > > .../devicetree/bindings/arm/samsung/exynos-adc.txt | 4 ++-- > drivers/iio/adc/exynos_adc.c | 14 +++++++++++++- > 2 files changed, 15 insertions(+), 3 deletions(-) > > diff --git a/Documentation/devicetree/bindings/arm/samsung/exynos-adc.txt b/Documentation/devicetree/bindings/arm/samsung/exynos-adc.txt > index 96db940..05be151 100644 > --- a/Documentation/devicetree/bindings/arm/samsung/exynos-adc.txt > +++ b/Documentation/devicetree/bindings/arm/samsung/exynos-adc.txt > @@ -15,7 +15,7 @@ Required properties: > Must be "samsung,exynos-adc-v2" for > future controllers. > - reg: Contains ADC register address range (base address and > - length). > + length) and the address of the phy enable register. > - interrupts: Contains the interrupt information for the timer. The > format is being dependent on which interrupt controller > the Samsung device uses. > @@ -30,7 +30,7 @@ Example: adding device info in dtsi file > > adc: adc@12D10000 { > compatible = "samsung,exynos-adc-v1"; > - reg = <0x12D10000 0x100>; > + reg = <0x12D10000 0x100>, <0x10040718 0x4>; > interrupts = <0 106 0>; > #io-channel-cells = <1>; > io-channel-ranges; > diff --git a/drivers/iio/adc/exynos_adc.c b/drivers/iio/adc/exynos_adc.c > index ed6fdd7..5ab0dfd 100644 > --- a/drivers/iio/adc/exynos_adc.c > +++ b/drivers/iio/adc/exynos_adc.c > @@ -85,6 +85,7 @@ enum adc_version { > > struct exynos_adc { > void __iomem *regs; > + void __iomem *enable_reg; > struct clk *clk; > unsigned int irq; > struct regulator *vdd; > @@ -269,13 +270,19 @@ static int exynos_adc_probe(struct platform_device *pdev) > info = iio_priv(indio_dev); > > mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); > - > info->regs = devm_request_and_ioremap(&pdev->dev, mem); > if (!info->regs) { > ret = -ENOMEM; > goto err_iio; > } > > + mem = platform_get_resource(pdev, IORESOURCE_MEM, 1); > + info->enable_reg = devm_request_and_ioremap(&pdev->dev, mem); > + if (!info->enable_reg) { > + ret = -ENOMEM; > + goto err_iio; > + } > + > irq = platform_get_irq(pdev, 0); > if (irq < 0) { > dev_err(&pdev->dev, "no irq resource?\n"); > @@ -295,6 +302,8 @@ static int exynos_adc_probe(struct platform_device *pdev) > goto err_iio; > } > > + writel(1, info->enable_reg); > + > info->clk = devm_clk_get(&pdev->dev, "adc"); > if (IS_ERR(info->clk)) { > dev_err(&pdev->dev, "failed getting clock, err = %ld\n", > @@ -370,6 +379,7 @@ static int exynos_adc_remove(struct platform_device *pdev) > exynos_adc_remove_devices); > regulator_disable(info->vdd); > clk_disable_unprepare(info->clk); > + writel(0, info->enable_reg); > iio_device_unregister(indio_dev); > free_irq(info->irq, info); > iio_device_free(indio_dev); > @@ -395,6 +405,7 @@ static int exynos_adc_suspend(struct device *dev) > } > > clk_disable_unprepare(info->clk); > + writel(0, info->enable_reg); > regulator_disable(info->vdd); > > return 0; > @@ -410,6 +421,7 @@ static int exynos_adc_resume(struct device *dev) > if (ret) > return ret; > > + writel(1, info->enable_reg); > clk_prepare_enable(info->clk); > > exynos_adc_hw_init(info); > -- > 1.8.1.3 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > Please read the FAQ at http://www.tux.org/lkml/ -- Shine bright, (: Nav :)
On 03/27/2013 07:35 PM, Naveen Krishna Ch wrote: > On 13 March 2013 13:39, Doug Anderson <dianders@chromium.org> wrote: >> The exynos ADC won't work without a regulator called "vdd" and a clock >> called "adc". Document this fact in the device tree bindings. >> >> Signed-off-by: Doug Anderson <dianders@chromium.org> > Reviewed-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com> > > Lars, any update on this patch set. This change is required. Uhm, looks fine to me. I'm sure Jonathan will pick it up :) >> --- >> Changes in v2: None >> >> Documentation/devicetree/bindings/arm/samsung/exynos-adc.txt | 8 ++++++++ >> 1 file changed, 8 insertions(+) >> >> diff --git a/Documentation/devicetree/bindings/arm/samsung/exynos-adc.txt b/Documentation/devicetree/bindings/arm/samsung/exynos-adc.txt >> index f686378..96db940 100644 >> --- a/Documentation/devicetree/bindings/arm/samsung/exynos-adc.txt >> +++ b/Documentation/devicetree/bindings/arm/samsung/exynos-adc.txt >> @@ -20,6 +20,9 @@ Required properties: >> format is being dependent on which interrupt controller >> the Samsung device uses. >> - #io-channel-cells = <1>; As ADC has multiple outputs >> +- clocks From common clock binding: handle to adc clock. >> +- clock-names From common clock binding: Shall be "adc". >> +- vdd-supply VDD input supply. >> >> Note: child nodes can be added for auto probing from device tree. >> >> @@ -31,6 +34,11 @@ adc: adc@12D10000 { >> interrupts = <0 106 0>; >> #io-channel-cells = <1>; >> io-channel-ranges; >> + >> + clocks = <&clock 303>; >> + clock-names = "adc"; >> + >> + vdd-supply = <&buck5_reg>; >> }; >> >> >> -- >> 1.8.1.3 >> >> -- >> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in >> the body of a message to majordomo@vger.kernel.org >> More majordomo info at http://vger.kernel.org/majordomo-info.html >> Please read the FAQ at http://www.tux.org/lkml/ > > > > -- > Shine bright, > (: Nav :)
Naveen, On Wed, Mar 27, 2013 at 11:37 AM, Naveen Krishna Ch <naveenkrishna.ch@gmail.com> wrote: > On 13 March 2013 13:40, Doug Anderson <dianders@chromium.org> wrote: >> Without this change the exynos adc controller needed to have its phy >> enabled in some out-of-driver C code. Add support for specifying the >> phy enable register by listing it in the reg list. >> >> Signed-off-by: Doug Anderson <dianders@chromium.org> >> --- >> Changes in v2: None > Reviewed-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com> > > Lars, any update on this patch set. This change is required. This particular CL is already in linux-next. https://git.kernel.org/cgit/linux/kernel/git/next/linux-next-history.git/commit/?id=bb916ebbeabd18f7dc3c661275d2c9d343f4fa85
Hi,
On Wed, Mar 27, 2013 at 11:40 AM, Lars-Peter Clausen <lars@metafoo.de> wrote:
> On 03/27/2013 07:35 PM, Naveen Krishna Ch wrote:
>> On 13 March 2013 13:39, Doug Anderson <dianders@chromium.org> wrote:
>>> The exynos ADC won't work without a regulator called "vdd" and a clock
>>> called "adc". Document this fact in the device tree bindings.
>>>
>>> Signed-off-by: Doug Anderson <dianders@chromium.org>
>> Reviewed-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com>
>>
>> Lars, any update on this patch set. This change is required.
>
> Uhm, looks fine to me. I'm sure Jonathan will pick it up :)
Part 2 made it in, but not the documentation patch. Now that it has a
Reviewed-by it can probably go in... :)
-Doug
Doug Anderson <dianders@chromium.org> wrote:
>Hi,
>
>On Wed, Mar 27, 2013 at 11:40 AM, Lars-Peter Clausen <lars@metafoo.de>
>wrote:
>> On 03/27/2013 07:35 PM, Naveen Krishna Ch wrote:
>>> On 13 March 2013 13:39, Doug Anderson <dianders@chromium.org> wrote:
>>>> The exynos ADC won't work without a regulator called "vdd" and a
>clock
>>>> called "adc". Document this fact in the device tree bindings.
>>>>
>>>> Signed-off-by: Doug Anderson <dianders@chromium.org>
>>> Reviewed-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com>
>>>
>>> Lars, any update on this patch set. This change is required.
>>
>> Uhm, looks fine to me. I'm sure Jonathan will pick it up :)
>
>Part 2 made it in, but not the documentation patch. Now that it has a
>Reviewed-by it can probably go in... :)
>
>-Doug
I'll take it sometime over the weekend.
Thanks.
Jonathan
--
Sent from my Android phone with K-9 Mail. Please excuse my brevity.
On 03/27/2013 06:46 PM, Doug Anderson wrote: > Hi, > > On Wed, Mar 27, 2013 at 11:40 AM, Lars-Peter Clausen <lars@metafoo.de> wrote: >> On 03/27/2013 07:35 PM, Naveen Krishna Ch wrote: >>> On 13 March 2013 13:39, Doug Anderson <dianders@chromium.org> wrote: >>>> The exynos ADC won't work without a regulator called "vdd" and a clock >>>> called "adc". Document this fact in the device tree bindings. >>>> >>>> Signed-off-by: Doug Anderson <dianders@chromium.org> >>> Reviewed-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com> >>> >>> Lars, any update on this patch set. This change is required. >> >> Uhm, looks fine to me. I'm sure Jonathan will pick it up :) > > Part 2 made it in, but not the documentation patch. Now that it has a > Reviewed-by it can probably go in... :) > And indeed it has now done so. Well into the togreg branch of iio.git Jonathan > -Doug >