LKML Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH 0/4] Get exynos adc driver running on on exynos5250-snow
@ 2013-03-12 23:13 Doug Anderson
  2013-03-12 23:13 ` [PATCH 1/4] iio: adc: Document the regulator/clocks for exynos-adc Doug Anderson
                   ` (4 more replies)
  0 siblings, 5 replies; 24+ 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, Russell King, Rob Landley, Rahul Sharma,
	Grant Likely, linux-iio, Mark Brown, devicetree-discuss,
	linux-doc, linux-kernel, Thomas Abraham, Kukjin Kim, Jingoo Han,
	linux-arm-kernel, Jonathan Cameron, Padmavathi Venna,
	Rob Herring

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] 24+ messages in thread

* [PATCH 1/4] iio: adc: Document the regulator/clocks for exynos-adc
  2013-03-12 23:13 [PATCH 0/4] Get exynos adc driver running on on exynos5250-snow Doug Anderson
@ 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
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 24+ 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,
	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>
---
 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	[flat|nested] 24+ messages in thread

* [PATCH 2/4] iio: adc: Add dt support for turning on the phy in exynos-adc
  2013-03-12 23:13 [PATCH 0/4] Get exynos adc driver running on on exynos5250-snow Doug Anderson
  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-12 23:13 ` [PATCH 3/4] ARM: dts: Add adc to exynos5250 device tree file Doug Anderson
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 24+ 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, linux-doc, linux-kernel,
	linux-iio

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


^ permalink raw reply	[flat|nested] 24+ messages in thread

* [PATCH 3/4] ARM: dts: Add adc to exynos5250 device tree file
  2013-03-12 23:13 [PATCH 0/4] Get exynos adc driver running on on exynos5250-snow Doug Anderson
  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-12 23:13 ` Doug Anderson
  2013-03-12 23:13 ` [PATCH 4/4] ARM: dts: Add adc and thermistors for exynos5250-snow 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
  4 siblings, 0 replies; 24+ 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, Russell King, Kukjin Kim, Thomas Abraham,
	Padmavathi Venna, Jingoo Han, Mark Brown, linux-arm-kernel,
	linux-kernel

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


^ permalink raw reply	[flat|nested] 24+ messages in thread

* [PATCH 4/4] ARM: dts: Add adc and thermistors for exynos5250-snow
  2013-03-12 23:13 [PATCH 0/4] Get exynos adc driver running on on exynos5250-snow Doug Anderson
                   ` (2 preceding siblings ...)
  2013-03-12 23:13 ` [PATCH 3/4] ARM: dts: Add adc to exynos5250 device tree file 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
  4 siblings, 0 replies; 24+ 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, Russell King, Kukjin Kim, Rahul Sharma,
	Thomas Abraham, Jingoo Han, linux-arm-kernel, linux-kernel

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


^ permalink raw reply	[flat|nested] 24+ messages in thread

* [PATCH v2 0/4] This set of patches is based on Naveen Krishna Chatradhi's recent work
  2013-03-12 23:13 [PATCH 0/4] Get exynos adc driver running on on exynos5250-snow Doug Anderson
                   ` (3 preceding siblings ...)
  2013-03-12 23:13 ` [PATCH 4/4] ARM: dts: Add adc and thermistors for exynos5250-snow 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
                     ` (3 more replies)
  4 siblings, 4 replies; 24+ 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, Russell King,
	Rob Landley, Grant Likely, linux-iio, devicetree-discuss,
	linux-doc, linux-kernel, 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] 24+ 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
  2013-03-15  8:05     ` Naveen Krishna Ch
  2013-03-27 18:35     ` Naveen Krishna Ch
  2013-03-13 20:40   ` [PATCH v2 2/4] iio: adc: Add dt support for turning on the phy in exynos-adc Doug Anderson
                     ` (2 subsequent siblings)
  3 siblings, 2 replies; 24+ 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	[flat|nested] 24+ messages in thread

* [PATCH v2 2/4] iio: adc: Add dt support for turning on the phy in 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   ` [PATCH v2 1/4] iio: adc: Document the regulator/clocks for exynos-adc Doug Anderson
@ 2013-03-13 20:40   ` Doug Anderson
  2013-03-15 11:45     ` Naveen Krishna Ch
  2013-03-27 18:37     ` Naveen Krishna Ch
  2013-03-13 20:40   ` [PATCH v2 3/4] ARM: dts: Add adc to exynos5250 device tree file Doug Anderson
  2013-03-13 20:40   ` [PATCH v2 4/4] ARM: dts: Add adc and thermistors for exynos5250-snow Doug Anderson
  3 siblings, 2 replies; 24+ messages in thread
From: Doug Anderson @ 2013-03-13 20:40 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, Jonathan Cameron, devicetree-discuss, linux-doc,
	linux-kernel, linux-iio

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


^ permalink raw reply	[flat|nested] 24+ messages in thread

* [PATCH v2 3/4] ARM: dts: Add adc to exynos5250 device tree file
  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
  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-13 20:40   ` Doug Anderson
  2013-03-15 15:45     ` Naveen Krishna Ch
  2013-03-13 20:40   ` [PATCH v2 4/4] ARM: dts: Add adc and thermistors for exynos5250-snow Doug Anderson
  3 siblings, 1 reply; 24+ messages in thread
From: Doug Anderson @ 2013-03-13 20:40 UTC (permalink / raw)
  To: Jonathan Cameron, Kukjin Kim
  Cc: Lars-Peter Clausen, Naveen Krishna Chatradhi, Olof Johansson,
	Guenter Roeck, Doug Anderson, Russell King, Thomas Abraham,
	Rahul Sharma, Abhilash Kesavan, linux-arm-kernel, linux-kernel

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


^ permalink raw reply	[flat|nested] 24+ messages in thread

* [PATCH v2 4/4] ARM: dts: Add adc and thermistors for exynos5250-snow
  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 preceding siblings ...)
  2013-03-13 20:40   ` [PATCH v2 3/4] ARM: dts: Add adc to exynos5250 device tree file Doug Anderson
@ 2013-03-13 20:40   ` Doug Anderson
  2013-03-15 10:24     ` Naveen Krishna Ch
  3 siblings, 1 reply; 24+ messages in thread
From: Doug Anderson @ 2013-03-13 20:40 UTC (permalink / raw)
  To: Jonathan Cameron, Kukjin Kim
  Cc: Lars-Peter Clausen, Naveen Krishna Chatradhi, Olof Johansson,
	Guenter Roeck, Doug Anderson, Russell King, Rahul Sharma,
	Thomas Abraham, linux-arm-kernel, linux-kernel

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


^ permalink raw reply	[flat|nested] 24+ 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
@ 2013-03-15  8:05     ` Naveen Krishna Ch
  2013-03-27 18:35     ` Naveen Krishna Ch
  1 sibling, 0 replies; 24+ messages in thread
From: Naveen Krishna Ch @ 2013-03-15  8:05 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

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 :)

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH v2 4/4] ARM: dts: Add adc and thermistors for exynos5250-snow
  2013-03-13 20:40   ` [PATCH v2 4/4] ARM: dts: Add adc and thermistors for exynos5250-snow Doug Anderson
@ 2013-03-15 10:24     ` Naveen Krishna Ch
  2013-03-15 15:42       ` Naveen Krishna Ch
  0 siblings, 1 reply; 24+ messages in thread
From: Naveen Krishna Ch @ 2013-03-15 10:24 UTC (permalink / raw)
  To: Doug Anderson
  Cc: Jonathan Cameron, Kukjin Kim, Lars-Peter Clausen,
	Naveen Krishna Chatradhi, Olof Johansson, Guenter Roeck,
	Russell King, Rahul Sharma, Thomas Abraham, linux-arm-kernel,
	linux-kernel

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 :)

^ permalink raw reply	[flat|nested] 24+ 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
  2013-03-15 15:43       ` Naveen Krishna Ch
  2013-03-27 18:37     ` Naveen Krishna Ch
  1 sibling, 1 reply; 24+ 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] 24+ messages in thread

* Re: [PATCH v2 4/4] ARM: dts: Add adc and thermistors for exynos5250-snow
  2013-03-15 10:24     ` Naveen Krishna Ch
@ 2013-03-15 15:42       ` Naveen Krishna Ch
  2013-03-27 18:36         ` Naveen Krishna Ch
  0 siblings, 1 reply; 24+ messages in thread
From: Naveen Krishna Ch @ 2013-03-15 15:42 UTC (permalink / raw)
  To: Doug Anderson
  Cc: Jonathan Cameron, Kukjin Kim, Lars-Peter Clausen,
	Naveen Krishna Chatradhi, Olof Johansson, Guenter Roeck,
	Russell King, Rahul Sharma, Thomas Abraham, linux-arm-kernel,
	linux-kernel

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 :)

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH v2 2/4] iio: adc: Add dt support for turning on the phy in exynos-adc
  2013-03-15 11:45     ` Naveen Krishna Ch
@ 2013-03-15 15:43       ` Naveen Krishna Ch
  0 siblings, 0 replies; 24+ messages in thread
From: Naveen Krishna Ch @ 2013-03-15 15:43 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 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 :)

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH v2 3/4] ARM: dts: Add adc to exynos5250 device tree file
  2013-03-13 20:40   ` [PATCH v2 3/4] ARM: dts: Add adc to exynos5250 device tree file Doug Anderson
@ 2013-03-15 15:45     ` Naveen Krishna Ch
  0 siblings, 0 replies; 24+ messages in thread
From: Naveen Krishna Ch @ 2013-03-15 15:45 UTC (permalink / raw)
  To: Doug Anderson
  Cc: Jonathan Cameron, Kukjin Kim, Lars-Peter Clausen,
	Naveen Krishna Chatradhi, Olof Johansson, Guenter Roeck,
	Russell King, Thomas Abraham, Rahul Sharma, Abhilash Kesavan,
	linux-arm-kernel, linux-kernel

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 :)

^ permalink raw reply	[flat|nested] 24+ 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
  2013-03-15  8:05     ` Naveen Krishna Ch
@ 2013-03-27 18:35     ` Naveen Krishna Ch
  2013-03-27 18:40       ` Lars-Peter Clausen
  1 sibling, 1 reply; 24+ 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] 24+ messages in thread

* Re: [PATCH v2 4/4] ARM: dts: Add adc and thermistors for exynos5250-snow
  2013-03-15 15:42       ` Naveen Krishna Ch
@ 2013-03-27 18:36         ` Naveen Krishna Ch
  0 siblings, 0 replies; 24+ messages in thread
From: Naveen Krishna Ch @ 2013-03-27 18:36 UTC (permalink / raw)
  To: Doug Anderson
  Cc: Jonathan Cameron, Kukjin Kim, Lars-Peter Clausen,
	Naveen Krishna Chatradhi, Olof Johansson, Guenter Roeck,
	Russell King, Rahul Sharma, Thomas Abraham, linux-arm-kernel,
	linux-kernel

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 :)

^ permalink raw reply	[flat|nested] 24+ 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
@ 2013-03-27 18:37     ` Naveen Krishna Ch
  2013-03-27 18:44       ` Doug Anderson
  1 sibling, 1 reply; 24+ 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, linux-doc, linux-kernel, linux-iio

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 :)

^ permalink raw reply	[flat|nested] 24+ 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; 24+ 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] 24+ 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; 24+ 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, 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] 24+ 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; 24+ 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

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] 24+ 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; 24+ 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



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] 24+ 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; 24+ 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

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] 24+ messages in thread

end of thread, back to index

Thread overview: 24+ 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
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-12 23:13 ` [PATCH 3/4] ARM: dts: Add adc to exynos5250 device tree file Doug Anderson
2013-03-12 23:13 ` [PATCH 4/4] ARM: dts: Add adc and thermistors for exynos5250-snow 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
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
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
2013-03-15 15:43       ` Naveen Krishna Ch
2013-03-27 18:37     ` Naveen Krishna Ch
2013-03-27 18:44       ` Doug Anderson
2013-03-13 20:40   ` [PATCH v2 3/4] ARM: dts: Add adc to exynos5250 device tree file Doug Anderson
2013-03-15 15:45     ` Naveen Krishna Ch
2013-03-13 20:40   ` [PATCH v2 4/4] ARM: dts: Add adc and thermistors for exynos5250-snow Doug Anderson
2013-03-15 10:24     ` Naveen Krishna Ch
2013-03-15 15:42       ` Naveen Krishna Ch
2013-03-27 18:36         ` Naveen Krishna Ch

LKML Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/lkml/0 lkml/git/0.git
	git clone --mirror https://lore.kernel.org/lkml/1 lkml/git/1.git
	git clone --mirror https://lore.kernel.org/lkml/2 lkml/git/2.git
	git clone --mirror https://lore.kernel.org/lkml/3 lkml/git/3.git
	git clone --mirror https://lore.kernel.org/lkml/4 lkml/git/4.git
	git clone --mirror https://lore.kernel.org/lkml/5 lkml/git/5.git
	git clone --mirror https://lore.kernel.org/lkml/6 lkml/git/6.git
	git clone --mirror https://lore.kernel.org/lkml/7 lkml/git/7.git
	git clone --mirror https://lore.kernel.org/lkml/8 lkml/git/8.git
	git clone --mirror https://lore.kernel.org/lkml/9 lkml/git/9.git
	git clone --mirror https://lore.kernel.org/lkml/10 lkml/git/10.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 lkml lkml/ https://lore.kernel.org/lkml \
		linux-kernel@vger.kernel.org
	public-inbox-index lkml

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-kernel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git