2014-07-11 09:10:48

by Naveen Krishna Chatradhi

[permalink] [raw]
Subject: [PATCH 0/4] iio: exynos-adc: use syscon instead of ioremap

This patch does the following
1. Use the syscon and Regmap API instead of ioremappaing the
ADC_PHY register from PMU.
2. Moves the exynos-adc.txt from bindings/arm/samsung/
to bindings/iio/adc/.
3. Updates the Documentation in exynos-adc.txt with syscon phandle
for the ADC nodes.
4. Updates the Dts files for Exynos3250, Exynos4x12, Exynos5250,
Exynos5420 with the syscon phandle.

Tested on Exynos5420 based Peach PIT and Exynos5800 based Peach PI
by verifying sysfs entries provided by HWMON based NTC thermistors.

Tested-By for Exynos3250, Exynos4x12 would be appreciated.

Naveen Krishna Chatradhi (4):
iio: exyno-adc: use syscon for PMU register access
Documentation: dt-bindings: move exynos-adc.txt to more iio/adc/
Documentation: dt-bindings: update exynos-adc.txt with syscon handle
ARM: dts: exynos: Add sysreg phandle to ADC node

.../devicetree/bindings/arm/samsung/exynos-adc.txt | 82 ------------------
.../devicetree/bindings/iio/adc/exynos-adc.txt | 87 ++++++++++++++++++++
arch/arm/boot/dts/exynos3250.dtsi | 3 +-
arch/arm/boot/dts/exynos4x12.dtsi | 3 +-
arch/arm/boot/dts/exynos5250.dtsi | 3 +-
arch/arm/boot/dts/exynos5420.dtsi | 3 +-
drivers/iio/adc/exynos_adc.c | 29 +++++--
7 files changed, 115 insertions(+), 95 deletions(-)
delete mode 100644 Documentation/devicetree/bindings/arm/samsung/exynos-adc.txt
create mode 100644 Documentation/devicetree/bindings/iio/adc/exynos-adc.txt

--
1.7.9.5


2014-07-11 09:11:07

by Naveen Krishna Chatradhi

[permalink] [raw]
Subject: [PATCH 2/4] Documentation: dt-bindings: move exynos-adc.txt to more iio/adc/

The DT bindings in exynos-adc.txt applies to the ADC
driver (exynos-adc.c) developed based on IIO framework.

The bindings are more appropriate to be under
Documentation/devicetree/bindings/iio/adc/

Signed-off-by: Naveen Krishna Chatradhi <[email protected]>
To: [email protected]
---
.../devicetree/bindings/arm/samsung/exynos-adc.txt | 82 --------------------
.../devicetree/bindings/iio/adc/exynos-adc.txt | 82 ++++++++++++++++++++
2 files changed, 82 insertions(+), 82 deletions(-)
delete mode 100644 Documentation/devicetree/bindings/arm/samsung/exynos-adc.txt
create mode 100644 Documentation/devicetree/bindings/iio/adc/exynos-adc.txt

diff --git a/Documentation/devicetree/bindings/arm/samsung/exynos-adc.txt b/Documentation/devicetree/bindings/arm/samsung/exynos-adc.txt
deleted file mode 100644
index b87749a..0000000
--- a/Documentation/devicetree/bindings/arm/samsung/exynos-adc.txt
+++ /dev/null
@@ -1,82 +0,0 @@
-Samsung Exynos Analog to Digital Converter bindings
-
-The devicetree bindings are for the new ADC driver written for
-Exynos4 and upward SoCs from Samsung.
-
-New driver handles the following
-1. Supports ADC IF found on EXYNOS4412/EXYNOS5250
- and future SoCs from Samsung
-2. Add ADC driver under iio/adc framework
-3. Also adds the Documentation for device tree bindings
-
-Required properties:
-- compatible: Must be "samsung,exynos-adc-v1"
- for exynos4412/5250 controllers.
- Must be "samsung,exynos-adc-v2" for
- future controllers.
- Must be "samsung,exynos3250-adc-v2" for
- for controllers compatible with ADC of
- Exynos3250.
-- reg: Contains ADC register address range (base address and
- 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.
-- #io-channel-cells = <1>; As ADC has multiple outputs
-- clocks From common clock bindings: handles to clocks specified
- in "clock-names" property, in the same order.
-- clock-names From common clock bindings: list of clock input names
- used by ADC block:
- - "adc" : ADC bus clock
- - "sclk_adc" : ADC special clock (only for Exynos3250
- and compatible ADC block)
-- vdd-supply VDD input supply.
-
-Note: child nodes can be added for auto probing from device tree.
-
-Example: adding device info in dtsi file
-
-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";
-
- vdd-supply = <&buck5_reg>;
-};
-
-Example: adding device info in dtsi file for Exynos3250 with additional sclk
-
-adc: adc@126C0000 {
- compatible = "samsung,exynos3250-adc-v2";
- reg = <0x126C0000 0x100>, <0x10020718 0x4>;
- interrupts = <0 137 0>;
- #io-channel-cells = <1>;
- io-channel-ranges;
-
- clocks = <&cmu CLK_TSADC>, <&cmu CLK_SCLK_TSADC>;
- clock-names = "adc", "sclk_adc";
-
- vdd-supply = <&buck5_reg>;
-};
-
-Example: Adding child nodes in dts file
-
-adc@12D10000 {
-
- /* NTC thermistor is a hwmon device */
- ncp15wb473@0 {
- compatible = "ntc,ncp15wb473";
- pullup-uv = <1800000>;
- pullup-ohm = <47000>;
- pulldown-ohm = <0>;
- io-channels = <&adc 4>;
- };
-};
-
-Note: Does not apply to ADC driver under arch/arm/plat-samsung/
-Note: The child node can be added under the adc node or separately.
diff --git a/Documentation/devicetree/bindings/iio/adc/exynos-adc.txt b/Documentation/devicetree/bindings/iio/adc/exynos-adc.txt
new file mode 100644
index 0000000..b87749a
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/adc/exynos-adc.txt
@@ -0,0 +1,82 @@
+Samsung Exynos Analog to Digital Converter bindings
+
+The devicetree bindings are for the new ADC driver written for
+Exynos4 and upward SoCs from Samsung.
+
+New driver handles the following
+1. Supports ADC IF found on EXYNOS4412/EXYNOS5250
+ and future SoCs from Samsung
+2. Add ADC driver under iio/adc framework
+3. Also adds the Documentation for device tree bindings
+
+Required properties:
+- compatible: Must be "samsung,exynos-adc-v1"
+ for exynos4412/5250 controllers.
+ Must be "samsung,exynos-adc-v2" for
+ future controllers.
+ Must be "samsung,exynos3250-adc-v2" for
+ for controllers compatible with ADC of
+ Exynos3250.
+- reg: Contains ADC register address range (base address and
+ 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.
+- #io-channel-cells = <1>; As ADC has multiple outputs
+- clocks From common clock bindings: handles to clocks specified
+ in "clock-names" property, in the same order.
+- clock-names From common clock bindings: list of clock input names
+ used by ADC block:
+ - "adc" : ADC bus clock
+ - "sclk_adc" : ADC special clock (only for Exynos3250
+ and compatible ADC block)
+- vdd-supply VDD input supply.
+
+Note: child nodes can be added for auto probing from device tree.
+
+Example: adding device info in dtsi file
+
+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";
+
+ vdd-supply = <&buck5_reg>;
+};
+
+Example: adding device info in dtsi file for Exynos3250 with additional sclk
+
+adc: adc@126C0000 {
+ compatible = "samsung,exynos3250-adc-v2";
+ reg = <0x126C0000 0x100>, <0x10020718 0x4>;
+ interrupts = <0 137 0>;
+ #io-channel-cells = <1>;
+ io-channel-ranges;
+
+ clocks = <&cmu CLK_TSADC>, <&cmu CLK_SCLK_TSADC>;
+ clock-names = "adc", "sclk_adc";
+
+ vdd-supply = <&buck5_reg>;
+};
+
+Example: Adding child nodes in dts file
+
+adc@12D10000 {
+
+ /* NTC thermistor is a hwmon device */
+ ncp15wb473@0 {
+ compatible = "ntc,ncp15wb473";
+ pullup-uv = <1800000>;
+ pullup-ohm = <47000>;
+ pulldown-ohm = <0>;
+ io-channels = <&adc 4>;
+ };
+};
+
+Note: Does not apply to ADC driver under arch/arm/plat-samsung/
+Note: The child node can be added under the adc node or separately.
--
1.7.9.5

2014-07-11 09:11:45

by Naveen Krishna Chatradhi

[permalink] [raw]
Subject: [PATCH 1/4] iio: exyno-adc: use syscon for PMU register access

This patch updates the IIO based ADC driver to use syscon and regmap
APIs to access and use PMU registers instead of remapping the PMU
registers in the driver.

Signed-off-by: Naveen Krishna Chatradhi <[email protected]>
To: [email protected]
---
drivers/iio/adc/exynos_adc.c | 29 ++++++++++++++++++++---------
1 file changed, 20 insertions(+), 9 deletions(-)

diff --git a/drivers/iio/adc/exynos_adc.c b/drivers/iio/adc/exynos_adc.c
index b63e882..60847ef 100644
--- a/drivers/iio/adc/exynos_adc.c
+++ b/drivers/iio/adc/exynos_adc.c
@@ -38,6 +38,8 @@
#include <linux/iio/iio.h>
#include <linux/iio/machine.h>
#include <linux/iio/driver.h>
+#include <linux/mfd/syscon.h>
+#include <linux/regmap.h>

/* EXYNOS4412/5250 ADC_V1 registers definitions */
#define ADC_V1_CON(x) ((x) + 0x00)
@@ -79,11 +81,14 @@

#define EXYNOS_ADC_TIMEOUT (msecs_to_jiffies(100))

+#define EXYNOS_ADCV1_PHY_OFFSET 0x0718
+#define EXYNOS_ADCV2_PHY_OFFSET 0x0720
+
struct exynos_adc {
struct exynos_adc_data *data;
struct device *dev;
void __iomem *regs;
- void __iomem *enable_reg;
+ struct regmap *pmu_map;
struct clk *clk;
struct clk *sclk;
unsigned int irq;
@@ -98,6 +103,7 @@ struct exynos_adc {
struct exynos_adc_data {
int num_channels;
bool needs_sclk;
+ int phy_offset;

void (*init_hw)(struct exynos_adc *info);
void (*exit_hw)(struct exynos_adc *info);
@@ -169,7 +175,7 @@ static void exynos_adc_v1_init_hw(struct exynos_adc *info)
{
u32 con1;

- writel(1, info->enable_reg);
+ regmap_write(info->pmu_map, info->data->phy_offset, 1);

/* set default prescaler values and Enable prescaler */
con1 = ADC_V1_CON_PRSCLV(49) | ADC_V1_CON_PRSCEN;
@@ -183,7 +189,7 @@ static void exynos_adc_v1_exit_hw(struct exynos_adc *info)
{
u32 con;

- writel(0, info->enable_reg);
+ regmap_write(info->pmu_map, info->data->phy_offset, 0);

con = readl(ADC_V1_CON(info->regs));
con |= ADC_V1_CON_STANDBY;
@@ -208,6 +214,7 @@ static void exynos_adc_v1_start_conv(struct exynos_adc *info,

static struct exynos_adc_data const exynos_adc_v1_data = {
.num_channels = MAX_ADC_V1_CHANNELS,
+ .phy_offset = EXYNOS_ADCV1_PHY_OFFSET,

.init_hw = exynos_adc_v1_init_hw,
.exit_hw = exynos_adc_v1_exit_hw,
@@ -219,7 +226,7 @@ static void exynos_adc_v2_init_hw(struct exynos_adc *info)
{
u32 con1, con2;

- writel(1, info->enable_reg);
+ regmap_write(info->pmu_map, info->data->phy_offset, 1);

con1 = ADC_V2_CON1_SOFT_RESET;
writel(con1, ADC_V2_CON1(info->regs));
@@ -236,7 +243,7 @@ static void exynos_adc_v2_exit_hw(struct exynos_adc *info)
{
u32 con;

- writel(0, info->enable_reg);
+ regmap_write(info->pmu_map, info->data->phy_offset, 0);

con = readl(ADC_V2_CON1(info->regs));
con &= ~ADC_CON_EN_START;
@@ -271,10 +278,12 @@ static void exynos_adc_v2_start_conv(struct exynos_adc *info,

static struct exynos_adc_data const exynos_adc_v2_data = {
__EXYNOS_ADC_V2_DATA
+ .phy_offset = EXYNOS_ADCV2_PHY_OFFSET,
};

static struct exynos_adc_data const exynos3250_adc_v2_data = {
__EXYNOS_ADC_V2_DATA
+ .phy_offset = EXYNOS_ADCV1_PHY_OFFSET,
.needs_sclk = true,
};

@@ -437,10 +446,12 @@ static int exynos_adc_probe(struct platform_device *pdev)
if (IS_ERR(info->regs))
return PTR_ERR(info->regs);

- mem = platform_get_resource(pdev, IORESOURCE_MEM, 1);
- info->enable_reg = devm_ioremap_resource(&pdev->dev, mem);
- if (IS_ERR(info->enable_reg))
- return PTR_ERR(info->enable_reg);
+ info->pmu_map = syscon_regmap_lookup_by_phandle(pdev->dev.of_node,
+ "samsung,syscon-phandle");
+ if (IS_ERR(info->pmu_map)) {
+ dev_err(&pdev->dev, "syscon regmap lookup failed.\n");
+ return PTR_ERR(info->pmu_map);
+ }

irq = platform_get_irq(pdev, 0);
if (irq < 0) {
--
1.7.9.5

2014-07-11 09:11:43

by Naveen Krishna Chatradhi

[permalink] [raw]
Subject: [PATCH 3/4] Documentation: dt-bindings: update exynos-adc.txt with syscon handle

This patch updates the DT bindings in exynos-adc.txt with the
syscon phandle to the ADC nodes.

Also removes the 2nd "reg" property, which used to carry the
ADC_PHY regiser base from PMU.

Signed-off-by: Naveen Krishna Chatradhi <[email protected]>
To: [email protected]
---
.../devicetree/bindings/iio/adc/exynos-adc.txt | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/Documentation/devicetree/bindings/iio/adc/exynos-adc.txt b/Documentation/devicetree/bindings/iio/adc/exynos-adc.txt
index b87749a..808bbfa 100644
--- a/Documentation/devicetree/bindings/iio/adc/exynos-adc.txt
+++ b/Documentation/devicetree/bindings/iio/adc/exynos-adc.txt
@@ -1,10 +1,11 @@
Samsung Exynos Analog to Digital Converter bindings

The devicetree bindings are for the new ADC driver written for
-Exynos4 and upward SoCs from Samsung.
+Exynos4 and Exynos5 series SoCs from Samsung.
+Now supports Exynos3250 too.

New driver handles the following
-1. Supports ADC IF found on EXYNOS4412/EXYNOS5250
+1. Supports ADC IF found on Exynos3250/EXYNOS4412/EXYNOS5 series
and future SoCs from Samsung
2. Add ADC driver under iio/adc framework
3. Also adds the Documentation for device tree bindings
@@ -18,7 +19,7 @@ Required properties:
for controllers compatible with ADC of
Exynos3250.
- reg: Contains ADC register address range (base address and
- length) and the address of the phy enable register.
+ length)
- interrupts: Contains the interrupt information for the timer. The
format is being dependent on which interrupt controller
the Samsung device uses.
@@ -31,6 +32,8 @@ Required properties:
- "sclk_adc" : ADC special clock (only for Exynos3250
and compatible ADC block)
- vdd-supply VDD input supply.
+- samsung,syscon-phandle Contains the PMU system controller node
+ (To access the ADC_PHY register)

Note: child nodes can be added for auto probing from device tree.

@@ -38,7 +41,7 @@ Example: adding device info in dtsi file

adc: adc@12D10000 {
compatible = "samsung,exynos-adc-v1";
- reg = <0x12D10000 0x100>, <0x10040718 0x4>;
+ reg = <0x12D10000 0x100>;
interrupts = <0 106 0>;
#io-channel-cells = <1>;
io-channel-ranges;
@@ -47,13 +50,14 @@ adc: adc@12D10000 {
clock-names = "adc";

vdd-supply = <&buck5_reg>;
+ samsung,syscon-phandle = <&pmu_system_controller>;
};

Example: adding device info in dtsi file for Exynos3250 with additional sclk

adc: adc@126C0000 {
compatible = "samsung,exynos3250-adc-v2";
- reg = <0x126C0000 0x100>, <0x10020718 0x4>;
+ reg = <0x126C0000 0x100>;
interrupts = <0 137 0>;
#io-channel-cells = <1>;
io-channel-ranges;
@@ -62,6 +66,7 @@ adc: adc@126C0000 {
clock-names = "adc", "sclk_adc";

vdd-supply = <&buck5_reg>;
+ samsung,syscon-phandle = <&pmu_system_controller>;
};

Example: Adding child nodes in dts file
--
1.7.9.5

2014-07-11 09:11:39

by Naveen Krishna Chatradhi

[permalink] [raw]
Subject: [PATCH 4/4] ARM: dts: exynos: Add sysreg phandle to ADC node

Instead of using the ADC_PHY register base address, use sysreg phandle
in ADC node to control ADC_PHY configuration register.

This patch adds syscon node for Exynos3250, Exynos4x12, Exynos5250,
and Exynos5420, Exynos5800.

Signed-off-by: Naveen Krishna Chatradhi <[email protected]>
To: [email protected]
---
arch/arm/boot/dts/exynos3250.dtsi | 3 ++-
arch/arm/boot/dts/exynos4x12.dtsi | 3 ++-
arch/arm/boot/dts/exynos5250.dtsi | 3 ++-
arch/arm/boot/dts/exynos5420.dtsi | 3 ++-
4 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/arch/arm/boot/dts/exynos3250.dtsi b/arch/arm/boot/dts/exynos3250.dtsi
index c5e15db..51c9b0d 100644
--- a/arch/arm/boot/dts/exynos3250.dtsi
+++ b/arch/arm/boot/dts/exynos3250.dtsi
@@ -262,12 +262,13 @@

adc: adc@126C0000 {
compatible = "samsung,exynos3250-adc-v2";
- reg = <0x126C0000 0x100>, <0x10020718 0x4>;
+ reg = <0x126C0000 0x100>;
interrupts = <0 137 0>;
clock-names = "adc", "sclk_adc";
clocks = <&cmu CLK_TSADC>, <&cmu CLK_SCLK_TSADC>;
#io-channel-cells = <1>;
io-channel-ranges;
+ samsung,syscon-phandle = <&pmu_system_controller>;
status = "disabled";
};

diff --git a/arch/arm/boot/dts/exynos4x12.dtsi b/arch/arm/boot/dts/exynos4x12.dtsi
index c5a943d..9a18d9b 100644
--- a/arch/arm/boot/dts/exynos4x12.dtsi
+++ b/arch/arm/boot/dts/exynos4x12.dtsi
@@ -114,13 +114,14 @@

adc: adc@126C0000 {
compatible = "samsung,exynos-adc-v1";
- reg = <0x126C0000 0x100>, <0x10020718 0x4>;
+ reg = <0x126C0000 0x100>;
interrupt-parent = <&combiner>;
interrupts = <10 3>;
clocks = <&clock CLK_TSADC>;
clock-names = "adc";
#io-channel-cells = <1>;
io-channel-ranges;
+ samsung,syscon-phandle = <&pmu_system_controller>;
status = "disabled";
};

diff --git a/arch/arm/boot/dts/exynos5250.dtsi b/arch/arm/boot/dts/exynos5250.dtsi
index 834fb5a..6003777 100644
--- a/arch/arm/boot/dts/exynos5250.dtsi
+++ b/arch/arm/boot/dts/exynos5250.dtsi
@@ -762,12 +762,13 @@

adc: adc@12D10000 {
compatible = "samsung,exynos-adc-v1";
- reg = <0x12D10000 0x100>, <0x10040718 0x4>;
+ reg = <0x12D10000 0x100>
interrupts = <0 106 0>;
clocks = <&clock CLK_ADC>;
clock-names = "adc";
#io-channel-cells = <1>;
io-channel-ranges;
+ samsung,syscon-phandle = <&pmu_system_controller>;
status = "disabled";
};

diff --git a/arch/arm/boot/dts/exynos5420.dtsi b/arch/arm/boot/dts/exynos5420.dtsi
index e385322..6979da8 100644
--- a/arch/arm/boot/dts/exynos5420.dtsi
+++ b/arch/arm/boot/dts/exynos5420.dtsi
@@ -525,12 +525,13 @@

adc: adc@12D10000 {
compatible = "samsung,exynos-adc-v2";
- reg = <0x12D10000 0x100>, <0x10040720 0x4>;
+ reg = <0x12D10000 0x100>;
interrupts = <0 106 0>;
clocks = <&clock CLK_TSADC>;
clock-names = "adc";
#io-channel-cells = <1>;
io-channel-ranges;
+ samsung,syscon-phandle = <&pmu_system_controller>;
status = "disabled";
};

--
1.7.9.5

2014-07-11 09:17:26

by Sachin Kamat

[permalink] [raw]
Subject: Re: [PATCH 2/4] Documentation: dt-bindings: move exynos-adc.txt to more iio/adc/

Hi Naveen,

On Fri, Jul 11, 2014 at 2:36 PM, Naveen Krishna Chatradhi
<[email protected]> wrote:
> The DT bindings in exynos-adc.txt applies to the ADC
> driver (exynos-adc.c) developed based on IIO framework.
>
> The bindings are more appropriate to be under
> Documentation/devicetree/bindings/iio/adc/
>
> Signed-off-by: Naveen Krishna Chatradhi <[email protected]>
> To: [email protected]
> ---
> .../devicetree/bindings/arm/samsung/exynos-adc.txt | 82 --------------------
> .../devicetree/bindings/iio/adc/exynos-adc.txt | 82 ++++++++++++++++++++
> 2 files changed, 82 insertions(+), 82 deletions(-)
> delete mode 100644 Documentation/devicetree/bindings/arm/samsung/exynos-adc.txt
> create mode 100644 Documentation/devicetree/bindings/iio/adc/exynos-adc.txt
>

Tip: For only a file move or rename please use "-M" with git
format-patch. That will make the
patch concise.

--
Regards,
Sachin.

2014-07-11 09:22:30

by Naveen Krishna Ch

[permalink] [raw]
Subject: Re: [PATCH 2/4] Documentation: dt-bindings: move exynos-adc.txt to more iio/adc/

Hello Sachin,

On 11 July 2014 14:47, Sachin Kamat <[email protected]> wrote:
> Hi Naveen,
>
> On Fri, Jul 11, 2014 at 2:36 PM, Naveen Krishna Chatradhi
> <[email protected]> wrote:
>> The DT bindings in exynos-adc.txt applies to the ADC
>> driver (exynos-adc.c) developed based on IIO framework.
>>
>> The bindings are more appropriate to be under
>> Documentation/devicetree/bindings/iio/adc/
>>
>> Signed-off-by: Naveen Krishna Chatradhi <[email protected]>
>> To: [email protected]
>> ---
>> .../devicetree/bindings/arm/samsung/exynos-adc.txt | 82 --------------------
>> .../devicetree/bindings/iio/adc/exynos-adc.txt | 82 ++++++++++++++++++++
>> 2 files changed, 82 insertions(+), 82 deletions(-)
>> delete mode 100644 Documentation/devicetree/bindings/arm/samsung/exynos-adc.txt
>> create mode 100644 Documentation/devicetree/bindings/iio/adc/exynos-adc.txt
>>
>
> Tip: For only a file move or rename please use "-M" with git
> format-patch. That will make the
> patch concise.

Sure, Thanks.
>
> --
> Regards,
> Sachin.



--
Shine bright,
(: Nav :)

2014-07-15 18:11:09

by Jonathan Cameron

[permalink] [raw]
Subject: Re: [PATCH 0/4] iio: exynos-adc: use syscon instead of ioremap

On 11/07/14 10:06, Naveen Krishna Chatradhi wrote:
> This patch does the following
> 1. Use the syscon and Regmap API instead of ioremappaing the
> ADC_PHY register from PMU.
> 2. Moves the exynos-adc.txt from bindings/arm/samsung/
> to bindings/iio/adc/.
> 3. Updates the Documentation in exynos-adc.txt with syscon phandle
> for the ADC nodes.
> 4. Updates the Dts files for Exynos3250, Exynos4x12, Exynos5250,
> Exynos5420 with the syscon phandle.
>
> Tested on Exynos5420 based Peach PIT and Exynos5800 based Peach PI
> by verifying sysfs entries provided by HWMON based NTC thermistors.
>
> Tested-By for Exynos3250, Exynos4x12 would be appreciated.
>
This series all looks fine to me. Took me a minute to work out what the point
of the syscon change was (perhaps a little description in the cover letter
would have been nice ;)

Anyhow, with the device tree changes in here we'll have to let it sit for
a while. I'll also definitely want an ack from
Kukjin Kim <[email protected]> for the device tree changes.

Jonathan
> Naveen Krishna Chatradhi (4):
> iio: exyno-adc: use syscon for PMU register access
> Documentation: dt-bindings: move exynos-adc.txt to more iio/adc/
> Documentation: dt-bindings: update exynos-adc.txt with syscon handle
> ARM: dts: exynos: Add sysreg phandle to ADC node
>
> .../devicetree/bindings/arm/samsung/exynos-adc.txt | 82 ------------------
> .../devicetree/bindings/iio/adc/exynos-adc.txt | 87 ++++++++++++++++++++
> arch/arm/boot/dts/exynos3250.dtsi | 3 +-
> arch/arm/boot/dts/exynos4x12.dtsi | 3 +-
> arch/arm/boot/dts/exynos5250.dtsi | 3 +-
> arch/arm/boot/dts/exynos5420.dtsi | 3 +-
> drivers/iio/adc/exynos_adc.c | 29 +++++--
> 7 files changed, 115 insertions(+), 95 deletions(-)
> delete mode 100644 Documentation/devicetree/bindings/arm/samsung/exynos-adc.txt
> create mode 100644 Documentation/devicetree/bindings/iio/adc/exynos-adc.txt
>

2014-07-15 18:13:03

by Jonathan Cameron

[permalink] [raw]
Subject: Re: [PATCH 0/4] iio: exynos-adc: use syscon instead of ioremap

On 15/07/14 19:13, Jonathan Cameron wrote:
> On 11/07/14 10:06, Naveen Krishna Chatradhi wrote:
>> This patch does the following
>> 1. Use the syscon and Regmap API instead of ioremappaing the
>> ADC_PHY register from PMU.
>> 2. Moves the exynos-adc.txt from bindings/arm/samsung/
>> to bindings/iio/adc/.
>> 3. Updates the Documentation in exynos-adc.txt with syscon phandle
>> for the ADC nodes.
>> 4. Updates the Dts files for Exynos3250, Exynos4x12, Exynos5250,
>> Exynos5420 with the syscon phandle.
>>
>> Tested on Exynos5420 based Peach PIT and Exynos5800 based Peach PI
>> by verifying sysfs entries provided by HWMON based NTC thermistors.
>>
>> Tested-By for Exynos3250, Exynos4x12 would be appreciated.
>>
> This series all looks fine to me. Took me a minute to work out what the point
> of the syscon change was (perhaps a little description in the cover letter
> would have been nice ;)
>
> Anyhow, with the device tree changes in here we'll have to let it sit for
> a while. I'll also definitely want an ack from
> Kukjin Kim <[email protected]> for the device tree changes.
Although I haven't tried it, I'd imagine this might cause a little bit
of merging fun with the other exynos series waiting for Kukjin to
ack...
[PATCHv5 0/4] iio: adc: exynos_adc: Support Exynos3250 ADC and code clean
>
> Jonathan
>> Naveen Krishna Chatradhi (4):
>> iio: exyno-adc: use syscon for PMU register access
>> Documentation: dt-bindings: move exynos-adc.txt to more iio/adc/
>> Documentation: dt-bindings: update exynos-adc.txt with syscon handle
>> ARM: dts: exynos: Add sysreg phandle to ADC node
>>
>> .../devicetree/bindings/arm/samsung/exynos-adc.txt | 82 ------------------
>> .../devicetree/bindings/iio/adc/exynos-adc.txt | 87 ++++++++++++++++++++
>> arch/arm/boot/dts/exynos3250.dtsi | 3 +-
>> arch/arm/boot/dts/exynos4x12.dtsi | 3 +-
>> arch/arm/boot/dts/exynos5250.dtsi | 3 +-
>> arch/arm/boot/dts/exynos5420.dtsi | 3 +-
>> drivers/iio/adc/exynos_adc.c | 29 +++++--
>> 7 files changed, 115 insertions(+), 95 deletions(-)
>> delete mode 100644 Documentation/devicetree/bindings/arm/samsung/exynos-adc.txt
>> create mode 100644 Documentation/devicetree/bindings/iio/adc/exynos-adc.txt
>>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-iio" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html

2014-07-17 11:47:43

by Naveen Krishna Ch

[permalink] [raw]
Subject: Re: [PATCH 0/4] iio: exynos-adc: use syscon instead of ioremap

Hello Jonathan,

On 15 July 2014 23:45, Jonathan Cameron <[email protected]> wrote:
> On 15/07/14 19:13, Jonathan Cameron wrote:
>>
>> On 11/07/14 10:06, Naveen Krishna Chatradhi wrote:
>>>
>>> This patch does the following
>>> 1. Use the syscon and Regmap API instead of ioremappaing the
>>> ADC_PHY register from PMU.
>>> 2. Moves the exynos-adc.txt from bindings/arm/samsung/
>>> to bindings/iio/adc/.
>>> 3. Updates the Documentation in exynos-adc.txt with syscon phandle
>>> for the ADC nodes.
>>> 4. Updates the Dts files for Exynos3250, Exynos4x12, Exynos5250,
>>> Exynos5420 with the syscon phandle.
>>>
>>> Tested on Exynos5420 based Peach PIT and Exynos5800 based Peach PI
>>> by verifying sysfs entries provided by HWMON based NTC thermistors.
>>>
>>> Tested-By for Exynos3250, Exynos4x12 would be appreciated.
>>>
>> This series all looks fine to me. Took me a minute to work out what the
>> point
>> of the syscon change was (perhaps a little description in the cover letter
>> would have been nice ;)
>>
>> Anyhow, with the device tree changes in here we'll have to let it sit for
>> a while. I'll also definitely want an ack from
>> Kukjin Kim <[email protected]> for the device tree changes.
>
> Although I haven't tried it, I'd imagine this might cause a little bit
> of merging fun with the other exynos series waiting for Kukjin to
> ack...

I've tried to rebase on top of Chongwoo's v5 version changes for Exynos5320.
there is one conflict with Documentation. I've submitted the v2 version.

> [PATCHv5 0/4] iio: adc: exynos_adc: Support Exynos3250 ADC and code clean
>>
>>
>> Jonathan
>>>
>>> Naveen Krishna Chatradhi (4):
>>> iio: exyno-adc: use syscon for PMU register access
>>> Documentation: dt-bindings: move exynos-adc.txt to more iio/adc/
>>> Documentation: dt-bindings: update exynos-adc.txt with syscon handle
>>> ARM: dts: exynos: Add sysreg phandle to ADC node
>>>
>>> .../devicetree/bindings/arm/samsung/exynos-adc.txt | 82
>>> ------------------
>>> .../devicetree/bindings/iio/adc/exynos-adc.txt | 87
>>> ++++++++++++++++++++
>>> arch/arm/boot/dts/exynos3250.dtsi | 3 +-
>>> arch/arm/boot/dts/exynos4x12.dtsi | 3 +-
>>> arch/arm/boot/dts/exynos5250.dtsi | 3 +-
>>> arch/arm/boot/dts/exynos5420.dtsi | 3 +-
>>> drivers/iio/adc/exynos_adc.c | 29 +++++--
>>> 7 files changed, 115 insertions(+), 95 deletions(-)
>>> delete mode 100644
>>> Documentation/devicetree/bindings/arm/samsung/exynos-adc.txt
>>> create mode 100644
>>> Documentation/devicetree/bindings/iio/adc/exynos-adc.txt
>>>
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-iio" in
>> the body of a message to [email protected]
>> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
>



--
Regards,
(: Naveen :)