* [PATCH 0/4] Get exynos adc driver running on on exynos5250-snow @ 2013-03-12 23:13 Doug Anderson [not found] ` <1363129994-10438-1-git-send-email-dianders-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org> 0 siblings, 1 reply; 16+ messages in thread From: Doug Anderson @ 2013-03-12 23:13 UTC (permalink / raw) To: Jonathan Cameron Cc: Padmavathi Venna, Jingoo Han, Lars-Peter Clausen, Russell King, linux-doc-u79uwXL29TY76Z2rM5mHXA, linux-iio-u79uwXL29TY76Z2rM5mHXA, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ, Mark Brown, Rob Herring, linux-kernel-u79uwXL29TY76Z2rM5mHXA, Kukjin Kim, Jonathan Cameron, Naveen Krishna Chatradhi, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Rahul Sharma 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 ^ permalink raw reply [flat|nested] 16+ messages in thread
[parent not found: <1363129994-10438-1-git-send-email-dianders-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>]
* [PATCH 1/4] iio: adc: Document the regulator/clocks for exynos-adc [not found] ` <1363129994-10438-1-git-send-email-dianders-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org> @ 2013-03-12 23:13 ` Doug Anderson 2013-03-12 23:13 ` [PATCH 2/4] iio: adc: Add dt support for turning on the phy in exynos-adc Doug Anderson 2013-03-13 20:39 ` [PATCH v2 0/4] This set of patches is based on Naveen Krishna Chatradhi's recent work Doug Anderson 2 siblings, 0 replies; 16+ messages in thread From: Doug Anderson @ 2013-03-12 23:13 UTC (permalink / raw) To: Jonathan Cameron Cc: Lars-Peter Clausen, linux-doc-u79uwXL29TY76Z2rM5mHXA, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ, Rob Herring, linux-kernel-u79uwXL29TY76Z2rM5mHXA, Naveen Krishna Chatradhi 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-F7+t8E8rja9g9hUCZPvPmw@public.gmane.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 ^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 2/4] iio: adc: Add dt support for turning on the phy in exynos-adc [not found] ` <1363129994-10438-1-git-send-email-dianders-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org> 2013-03-12 23:13 ` [PATCH 1/4] iio: adc: Document the regulator/clocks for exynos-adc Doug Anderson @ 2013-03-12 23:13 ` Doug Anderson 2013-03-13 20:39 ` [PATCH v2 0/4] This set of patches is based on Naveen Krishna Chatradhi's recent work Doug Anderson 2 siblings, 0 replies; 16+ messages in thread From: Doug Anderson @ 2013-03-12 23:13 UTC (permalink / raw) To: Jonathan Cameron Cc: Lars-Peter Clausen, Naveen Krishna Chatradhi, Olof Johansson, Doug Anderson, Grant Likely, Rob Herring, Rob Landley, Jonathan Cameron, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ, linux-doc-u79uwXL29TY76Z2rM5mHXA, linux-kernel-u79uwXL29TY76Z2rM5mHXA, linux-iio-u79uwXL29TY76Z2rM5mHXA 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-F7+t8E8rja9g9hUCZPvPmw@public.gmane.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 ^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH v2 0/4] This set of patches is based on Naveen Krishna Chatradhi's recent work [not found] ` <1363129994-10438-1-git-send-email-dianders-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org> 2013-03-12 23:13 ` [PATCH 1/4] iio: adc: Document the regulator/clocks for exynos-adc Doug Anderson 2013-03-12 23:13 ` [PATCH 2/4] iio: adc: Add dt support for turning on the phy in exynos-adc Doug Anderson @ 2013-03-13 20:39 ` Doug Anderson 2013-03-13 20:39 ` [PATCH v2 1/4] iio: adc: Document the regulator/clocks for exynos-adc Doug Anderson [not found] ` <1363207202-10858-1-git-send-email-dianders-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org> 2 siblings, 2 replies; 16+ messages in thread From: Doug Anderson @ 2013-03-13 20:39 UTC (permalink / raw) To: Jonathan Cameron, Kukjin Kim Cc: Lars-Peter Clausen, Naveen Krishna Chatradhi, Olof Johansson, Guenter Roeck, Doug Anderson, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Russell King, Rob Landley, Grant Likely, linux-iio-u79uwXL29TY76Z2rM5mHXA, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ, linux-doc-u79uwXL29TY76Z2rM5mHXA, linux-kernel-u79uwXL29TY76Z2rM5mHXA, Thomas Abraham, Rahul Sharma, Abhilash Kesavan, Jonathan Cameron, Rob Herring (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 ^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH v2 1/4] iio: adc: Document the regulator/clocks for exynos-adc 2013-03-13 20:39 ` [PATCH v2 0/4] This set of patches is based on Naveen Krishna Chatradhi's recent work Doug Anderson @ 2013-03-13 20:39 ` Doug Anderson [not found] ` <1363207202-10858-2-git-send-email-dianders-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org> 2013-03-27 18:35 ` Naveen Krishna Ch [not found] ` <1363207202-10858-1-git-send-email-dianders-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org> 1 sibling, 2 replies; 16+ messages in thread From: Doug Anderson @ 2013-03-13 20:39 UTC (permalink / raw) To: Jonathan Cameron, Kukjin Kim Cc: Lars-Peter Clausen, Naveen Krishna Chatradhi, Olof Johansson, Guenter Roeck, Doug Anderson, Grant Likely, Rob Herring, Rob Landley, devicetree-discuss, linux-doc, linux-kernel 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 ^ permalink raw reply related [flat|nested] 16+ messages in thread
[parent not found: <1363207202-10858-2-git-send-email-dianders-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>]
* Re: [PATCH v2 1/4] iio: adc: Document the regulator/clocks for exynos-adc [not found] ` <1363207202-10858-2-git-send-email-dianders-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org> @ 2013-03-15 8:05 ` Naveen Krishna Ch 0 siblings, 0 replies; 16+ messages in thread From: Naveen Krishna Ch @ 2013-03-15 8:05 UTC (permalink / raw) To: Doug Anderson Cc: Kukjin Kim, linux-doc-u79uwXL29TY76Z2rM5mHXA, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ, linux-kernel-u79uwXL29TY76Z2rM5mHXA, Rob Herring, Lars-Peter Clausen, Guenter Roeck, Naveen Krishna Chatradhi, Jonathan Cameron Doug, On 14 March 2013 02:09, Doug Anderson <dianders-F7+t8E8rja9g9hUCZPvPmw@public.gmane.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-F7+t8E8rja9g9hUCZPvPmw@public.gmane.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-u79uwXL29TY76Z2rM5mHXA@public.gmane.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 :) ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH v2 1/4] iio: adc: Document the regulator/clocks for exynos-adc 2013-03-13 20:39 ` [PATCH v2 1/4] iio: adc: Document the regulator/clocks for exynos-adc Doug Anderson [not found] ` <1363207202-10858-2-git-send-email-dianders-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org> @ 2013-03-27 18:35 ` Naveen Krishna Ch 2013-03-27 18:40 ` Lars-Peter Clausen 1 sibling, 1 reply; 16+ messages in thread From: Naveen Krishna Ch @ 2013-03-27 18:35 UTC (permalink / raw) To: Doug Anderson Cc: Jonathan Cameron, Kukjin Kim, Lars-Peter Clausen, Naveen Krishna Chatradhi, Olof Johansson, Guenter Roeck, Grant Likely, Rob Herring, Rob Landley, devicetree-discuss, linux-doc, linux-kernel 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 :) ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH v2 1/4] iio: adc: Document the regulator/clocks for exynos-adc 2013-03-27 18:35 ` Naveen Krishna Ch @ 2013-03-27 18:40 ` Lars-Peter Clausen 2013-03-27 18:46 ` Doug Anderson 0 siblings, 1 reply; 16+ messages in thread From: Lars-Peter Clausen @ 2013-03-27 18:40 UTC (permalink / raw) To: Naveen Krishna Ch Cc: Doug Anderson, Jonathan Cameron, Kukjin Kim, Naveen Krishna Chatradhi, Olof Johansson, Guenter Roeck, Grant Likely, Rob Herring, Rob Landley, devicetree-discuss, linux-doc, linux-kernel 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 :) ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH v2 1/4] iio: adc: Document the regulator/clocks for exynos-adc 2013-03-27 18:40 ` Lars-Peter Clausen @ 2013-03-27 18:46 ` Doug Anderson 2013-03-28 6:31 ` Jonathan Cameron 2013-03-29 9:36 ` Jonathan Cameron 0 siblings, 2 replies; 16+ messages in thread From: Doug Anderson @ 2013-03-27 18:46 UTC (permalink / raw) To: Lars-Peter Clausen, Naveen Krishna Ch Cc: Jonathan Cameron, Kukjin Kim, Naveen Krishna Chatradhi, Olof Johansson, Guenter Roeck, Grant Likely, Rob Herring, Rob Landley, devicetree-discuss, linux-doc, linux-kernel@vger.kernel.org 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 ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH v2 1/4] iio: adc: Document the regulator/clocks for exynos-adc 2013-03-27 18:46 ` Doug Anderson @ 2013-03-28 6:31 ` Jonathan Cameron 2013-03-29 9:36 ` Jonathan Cameron 1 sibling, 0 replies; 16+ messages in thread From: Jonathan Cameron @ 2013-03-28 6:31 UTC (permalink / raw) To: Doug Anderson, Lars-Peter Clausen, Naveen Krishna Ch Cc: Kukjin Kim, Naveen Krishna Chatradhi, Olof Johansson, Guenter Roeck, Grant Likely, Rob Herring, Rob Landley, devicetree-discuss, linux-doc, linux-kernel@vger.kernel.org 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. ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH v2 1/4] iio: adc: Document the regulator/clocks for exynos-adc 2013-03-27 18:46 ` Doug Anderson 2013-03-28 6:31 ` Jonathan Cameron @ 2013-03-29 9:36 ` Jonathan Cameron 1 sibling, 0 replies; 16+ messages in thread From: Jonathan Cameron @ 2013-03-29 9:36 UTC (permalink / raw) To: Doug Anderson Cc: Lars-Peter Clausen, Naveen Krishna Ch, Kukjin Kim, Naveen Krishna Chatradhi, Olof Johansson, Guenter Roeck, Grant Likely, Rob Herring, Rob Landley, devicetree-discuss, linux-doc, linux-kernel@vger.kernel.org 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 > ^ permalink raw reply [flat|nested] 16+ messages in thread
[parent not found: <1363207202-10858-1-git-send-email-dianders-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>]
* [PATCH v2 2/4] iio: adc: Add dt support for turning on the phy in exynos-adc [not found] ` <1363207202-10858-1-git-send-email-dianders-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org> @ 2013-03-13 20:40 ` Doug Anderson 2013-03-15 11:45 ` Naveen Krishna Ch [not found] ` <1363207202-10858-3-git-send-email-dianders-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org> 0 siblings, 2 replies; 16+ messages in thread From: Doug Anderson @ 2013-03-13 20:40 UTC (permalink / raw) To: Jonathan Cameron, Kukjin Kim Cc: Lars-Peter Clausen, linux-doc-u79uwXL29TY76Z2rM5mHXA, linux-iio-u79uwXL29TY76Z2rM5mHXA, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ, Rob Herring, linux-kernel-u79uwXL29TY76Z2rM5mHXA, Jonathan Cameron, Naveen Krishna Chatradhi, Guenter Roeck 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-F7+t8E8rja9g9hUCZPvPmw@public.gmane.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 ^ permalink raw reply related [flat|nested] 16+ messages in thread
* Re: [PATCH v2 2/4] iio: adc: Add dt support for turning on the phy in exynos-adc 2013-03-13 20:40 ` [PATCH v2 2/4] iio: adc: Add dt support for turning on the phy in exynos-adc Doug Anderson @ 2013-03-15 11:45 ` Naveen Krishna Ch [not found] ` <CAHfPSqCJVGsERi+jNTSYOJTCL0H-ytAcLTLb+7fQnFK1KGqkyg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> [not found] ` <1363207202-10858-3-git-send-email-dianders-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org> 1 sibling, 1 reply; 16+ messages in thread From: Naveen Krishna Ch @ 2013-03-15 11:45 UTC (permalink / raw) To: Doug Anderson Cc: Jonathan Cameron, Kukjin Kim, Lars-Peter Clausen, Naveen Krishna Chatradhi, Olof Johansson, Guenter Roeck, Grant Likely, Rob Herring, Rob Landley, Jonathan Cameron, devicetree-discuss, linux-doc, linux-kernel, linux-iio 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 :) ^ permalink raw reply [flat|nested] 16+ messages in thread
[parent not found: <CAHfPSqCJVGsERi+jNTSYOJTCL0H-ytAcLTLb+7fQnFK1KGqkyg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>]
* Re: [PATCH v2 2/4] iio: adc: Add dt support for turning on the phy in exynos-adc [not found] ` <CAHfPSqCJVGsERi+jNTSYOJTCL0H-ytAcLTLb+7fQnFK1KGqkyg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> @ 2013-03-15 15:43 ` Naveen Krishna Ch 0 siblings, 0 replies; 16+ messages in thread From: Naveen Krishna Ch @ 2013-03-15 15:43 UTC (permalink / raw) To: Doug Anderson Cc: Kukjin Kim, linux-doc-u79uwXL29TY76Z2rM5mHXA, linux-iio-u79uwXL29TY76Z2rM5mHXA, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ, linux-kernel-u79uwXL29TY76Z2rM5mHXA, Rob Herring, Lars-Peter Clausen, Guenter Roeck, Naveen Krishna Chatradhi, Jonathan Cameron, Jonathan Cameron On 15 March 2013 17:15, Naveen Krishna Ch <naveenkrishna.ch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > On 14 March 2013 02:10, Doug Anderson <dianders-F7+t8E8rja9g9hUCZPvPmw@public.gmane.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-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org> Tested-by: Naveen Krishna Chatradhi <ch.naveen-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org> 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-u79uwXL29TY76Z2rM5mHXA@public.gmane.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 :) ^ permalink raw reply [flat|nested] 16+ messages in thread
[parent not found: <1363207202-10858-3-git-send-email-dianders-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>]
* Re: [PATCH v2 2/4] iio: adc: Add dt support for turning on the phy in exynos-adc [not found] ` <1363207202-10858-3-git-send-email-dianders-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org> @ 2013-03-27 18:37 ` Naveen Krishna Ch 2013-03-27 18:44 ` Doug Anderson 0 siblings, 1 reply; 16+ messages in thread From: Naveen Krishna Ch @ 2013-03-27 18:37 UTC (permalink / raw) To: Doug Anderson Cc: Jonathan Cameron, Kukjin Kim, Lars-Peter Clausen, Naveen Krishna Chatradhi, Olof Johansson, Guenter Roeck, Grant Likely, Rob Herring, Rob Landley, Jonathan Cameron, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ, linux-doc-u79uwXL29TY76Z2rM5mHXA, linux-kernel-u79uwXL29TY76Z2rM5mHXA, linux-iio-u79uwXL29TY76Z2rM5mHXA On 13 March 2013 13:40, Doug Anderson <dianders-F7+t8E8rja9g9hUCZPvPmw@public.gmane.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-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org> > --- > Changes in v2: None Reviewed-by: Naveen Krishna Chatradhi <ch.naveen-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org> 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-u79uwXL29TY76Z2rM5mHXA@public.gmane.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 :) ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH v2 2/4] iio: adc: Add dt support for turning on the phy in exynos-adc 2013-03-27 18:37 ` Naveen Krishna Ch @ 2013-03-27 18:44 ` Doug Anderson 0 siblings, 0 replies; 16+ messages in thread From: Doug Anderson @ 2013-03-27 18:44 UTC (permalink / raw) To: Naveen Krishna Ch Cc: Jonathan Cameron, Kukjin Kim, Lars-Peter Clausen, Naveen Krishna Chatradhi, Olof Johansson, Guenter Roeck, Grant Likely, Rob Herring, Rob Landley, Jonathan Cameron, devicetree-discuss, linux-doc, linux-kernel@vger.kernel.org, linux-iio 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 ^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2013-03-29 9:36 UTC | newest] Thread overview: 16+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2013-03-12 23:13 [PATCH 0/4] Get exynos adc driver running on on exynos5250-snow Doug Anderson [not found] ` <1363129994-10438-1-git-send-email-dianders-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org> 2013-03-12 23:13 ` [PATCH 1/4] iio: adc: Document the regulator/clocks for exynos-adc Doug Anderson 2013-03-12 23:13 ` [PATCH 2/4] iio: adc: Add dt support for turning on the phy in exynos-adc Doug Anderson 2013-03-13 20:39 ` [PATCH v2 0/4] This set of patches is based on Naveen Krishna Chatradhi's recent work Doug Anderson 2013-03-13 20:39 ` [PATCH v2 1/4] iio: adc: Document the regulator/clocks for exynos-adc Doug Anderson [not found] ` <1363207202-10858-2-git-send-email-dianders-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org> 2013-03-15 8:05 ` Naveen Krishna Ch 2013-03-27 18:35 ` Naveen Krishna Ch 2013-03-27 18:40 ` Lars-Peter Clausen 2013-03-27 18:46 ` Doug Anderson 2013-03-28 6:31 ` Jonathan Cameron 2013-03-29 9:36 ` Jonathan Cameron [not found] ` <1363207202-10858-1-git-send-email-dianders-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org> 2013-03-13 20:40 ` [PATCH v2 2/4] iio: adc: Add dt support for turning on the phy in exynos-adc Doug Anderson 2013-03-15 11:45 ` Naveen Krishna Ch [not found] ` <CAHfPSqCJVGsERi+jNTSYOJTCL0H-ytAcLTLb+7fQnFK1KGqkyg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 2013-03-15 15:43 ` Naveen Krishna Ch [not found] ` <1363207202-10858-3-git-send-email-dianders-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org> 2013-03-27 18:37 ` Naveen Krishna Ch 2013-03-27 18:44 ` Doug Anderson
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).