All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/6] Add support for MAX8997 Clock Driver
@ 2016-11-07 10:09 ` Pankaj Dubey
  0 siblings, 0 replies; 44+ messages in thread
From: Pankaj Dubey @ 2016-11-07 10:09 UTC (permalink / raw)
  To: linux-samsung-soc, linux-arm-kernel
  Cc: krzk, javier, kgene, thomas.ab, myungjoo.ham, Pankaj Dubey

During recent test on Exynos4210 based Origen board, I observed
RTC1 probe is failing giving following error message:

[    2.195817] s3c-rtc 10070000.rtc: failed to find rtc source clock
[    2.200475] s3c-rtc: probe of 10070000.rtc failed with error -2
[    2.206597] i2c /dev entries driver

This is mainly because S3C-RTC expects two clocks "rtc" and "rtc_src".
In case of Origen board this second clock is supplied by MAX8997 clock
oscillator.
This patch series modified MAX8997 MFD driver for supporting regmap, and 
adds max8997-clk driver. Also it documentation where-ever required and
extends RTC node in exynos4210-origen.dts for supporting both clocks.

After this patch series, RTC is getting probed properly on Origen board.

This patch series is tested for SMP boot on Origen board.

Pankaj Dubey (6):
  mfd: max8997: Initialize max8997 register map
  dt-bindings: clk: max8997: Add DT binding documentation
  clk: Add driver for Maxim-8997 PMIC clocks
  ARM: dts: Add clock provider specific properties to max8997 node
  mfd: max8997: Add max8997-clk name in mfd_cell
  ARM: dts: Extend the S3C RTC node with rtc_src clock

 .../devicetree/bindings/clock/maxim,max8997.txt    | 44 +++++++++++++
 .../bindings/regulator/max8997-regulator.txt       |  3 +
 arch/arm/boot/dts/exynos4210-origen.dts            |  6 +-
 arch/arm/boot/dts/exynos4210-trats.dts             |  3 +-
 drivers/clk/Kconfig                                | 10 +++
 drivers/clk/Makefile                               |  1 +
 drivers/clk/clk-max8997.c                          | 76 ++++++++++++++++++++++
 drivers/mfd/max8997.c                              | 15 +++++
 include/dt-bindings/clock/maxim,max8997.h          | 23 +++++++
 include/linux/mfd/max8997-private.h                |  3 +
 10 files changed, 182 insertions(+), 2 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/clock/maxim,max8997.txt
 create mode 100644 drivers/clk/clk-max8997.c
 create mode 100644 include/dt-bindings/clock/maxim,max8997.h

-- 
2.7.4

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

* [PATCH 0/6] Add support for MAX8997 Clock Driver
@ 2016-11-07 10:09 ` Pankaj Dubey
  0 siblings, 0 replies; 44+ messages in thread
From: Pankaj Dubey @ 2016-11-07 10:09 UTC (permalink / raw)
  To: linux-arm-kernel

During recent test on Exynos4210 based Origen board, I observed
RTC1 probe is failing giving following error message:

[    2.195817] s3c-rtc 10070000.rtc: failed to find rtc source clock
[    2.200475] s3c-rtc: probe of 10070000.rtc failed with error -2
[    2.206597] i2c /dev entries driver

This is mainly because S3C-RTC expects two clocks "rtc" and "rtc_src".
In case of Origen board this second clock is supplied by MAX8997 clock
oscillator.
This patch series modified MAX8997 MFD driver for supporting regmap, and 
adds max8997-clk driver. Also it documentation where-ever required and
extends RTC node in exynos4210-origen.dts for supporting both clocks.

After this patch series, RTC is getting probed properly on Origen board.

This patch series is tested for SMP boot on Origen board.

Pankaj Dubey (6):
  mfd: max8997: Initialize max8997 register map
  dt-bindings: clk: max8997: Add DT binding documentation
  clk: Add driver for Maxim-8997 PMIC clocks
  ARM: dts: Add clock provider specific properties to max8997 node
  mfd: max8997: Add max8997-clk name in mfd_cell
  ARM: dts: Extend the S3C RTC node with rtc_src clock

 .../devicetree/bindings/clock/maxim,max8997.txt    | 44 +++++++++++++
 .../bindings/regulator/max8997-regulator.txt       |  3 +
 arch/arm/boot/dts/exynos4210-origen.dts            |  6 +-
 arch/arm/boot/dts/exynos4210-trats.dts             |  3 +-
 drivers/clk/Kconfig                                | 10 +++
 drivers/clk/Makefile                               |  1 +
 drivers/clk/clk-max8997.c                          | 76 ++++++++++++++++++++++
 drivers/mfd/max8997.c                              | 15 +++++
 include/dt-bindings/clock/maxim,max8997.h          | 23 +++++++
 include/linux/mfd/max8997-private.h                |  3 +
 10 files changed, 182 insertions(+), 2 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/clock/maxim,max8997.txt
 create mode 100644 drivers/clk/clk-max8997.c
 create mode 100644 include/dt-bindings/clock/maxim,max8997.h

-- 
2.7.4

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

* [PATCH 1/6] mfd: max8997: Initialize max8997 register map
  2016-11-07 10:09 ` Pankaj Dubey
@ 2016-11-07 10:09   ` Pankaj Dubey
  -1 siblings, 0 replies; 44+ messages in thread
From: Pankaj Dubey @ 2016-11-07 10:09 UTC (permalink / raw)
  To: linux-samsung-soc, linux-arm-kernel
  Cc: krzk, javier, kgene, thomas.ab, myungjoo.ham, Pankaj Dubey, Lee Jones

This patch add regmap initialization to use register map
in max8997-clk device driver

CC: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Pankaj Dubey <pankaj.dubey@samsung.com>
---
 drivers/mfd/max8997.c               | 14 ++++++++++++++
 include/linux/mfd/max8997-private.h |  3 +++
 2 files changed, 17 insertions(+)

diff --git a/drivers/mfd/max8997.c b/drivers/mfd/max8997.c
index 2d6e2c3..bda9ec8 100644
--- a/drivers/mfd/max8997.c
+++ b/drivers/mfd/max8997.c
@@ -175,11 +175,17 @@ static inline unsigned long max8997_i2c_get_driver_data(struct i2c_client *i2c,
 	return id->driver_data;
 }
 
+static const struct regmap_config max8997_regmap_config = {
+	.reg_bits = 8,
+	.val_bits = 8,
+};
+
 static int max8997_i2c_probe(struct i2c_client *i2c,
 			    const struct i2c_device_id *id)
 {
 	struct max8997_dev *max8997;
 	struct max8997_platform_data *pdata = dev_get_platdata(&i2c->dev);
+	const struct regmap_config *config = &max8997_regmap_config;
 	int ret = 0;
 
 	max8997 = devm_kzalloc(&i2c->dev, sizeof(struct max8997_dev),
@@ -202,6 +208,14 @@ static int max8997_i2c_probe(struct i2c_client *i2c,
 	if (!pdata)
 		return ret;
 
+	max8997->regmap = devm_regmap_init_i2c(i2c, config);
+	if (IS_ERR(max8997->regmap)) {
+		ret = PTR_ERR(max8997->regmap);
+		dev_err(max8997->dev, "Failed to allocate register map: %d\n",
+				ret);
+		return ret;
+	}
+
 	max8997->pdata = pdata;
 	max8997->ono = pdata->ono;
 
diff --git a/include/linux/mfd/max8997-private.h b/include/linux/mfd/max8997-private.h
index 78c76cd..50c7129 100644
--- a/include/linux/mfd/max8997-private.h
+++ b/include/linux/mfd/max8997-private.h
@@ -25,6 +25,7 @@
 #include <linux/i2c.h>
 #include <linux/export.h>
 #include <linux/irqdomain.h>
+#include <linux/regmap.h>
 
 #define MAX8997_REG_INVALID	(0xff)
 
@@ -388,6 +389,8 @@ struct max8997_dev {
 	struct mutex iolock;
 
 	unsigned long type;
+
+	struct regmap *regmap;
 	struct platform_device *battery; /* battery control (not fuel gauge) */
 
 	int irq;
-- 
2.7.4

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

* [PATCH 1/6] mfd: max8997: Initialize max8997 register map
@ 2016-11-07 10:09   ` Pankaj Dubey
  0 siblings, 0 replies; 44+ messages in thread
From: Pankaj Dubey @ 2016-11-07 10:09 UTC (permalink / raw)
  To: linux-arm-kernel

This patch add regmap initialization to use register map
in max8997-clk device driver

CC: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Pankaj Dubey <pankaj.dubey@samsung.com>
---
 drivers/mfd/max8997.c               | 14 ++++++++++++++
 include/linux/mfd/max8997-private.h |  3 +++
 2 files changed, 17 insertions(+)

diff --git a/drivers/mfd/max8997.c b/drivers/mfd/max8997.c
index 2d6e2c3..bda9ec8 100644
--- a/drivers/mfd/max8997.c
+++ b/drivers/mfd/max8997.c
@@ -175,11 +175,17 @@ static inline unsigned long max8997_i2c_get_driver_data(struct i2c_client *i2c,
 	return id->driver_data;
 }
 
+static const struct regmap_config max8997_regmap_config = {
+	.reg_bits = 8,
+	.val_bits = 8,
+};
+
 static int max8997_i2c_probe(struct i2c_client *i2c,
 			    const struct i2c_device_id *id)
 {
 	struct max8997_dev *max8997;
 	struct max8997_platform_data *pdata = dev_get_platdata(&i2c->dev);
+	const struct regmap_config *config = &max8997_regmap_config;
 	int ret = 0;
 
 	max8997 = devm_kzalloc(&i2c->dev, sizeof(struct max8997_dev),
@@ -202,6 +208,14 @@ static int max8997_i2c_probe(struct i2c_client *i2c,
 	if (!pdata)
 		return ret;
 
+	max8997->regmap = devm_regmap_init_i2c(i2c, config);
+	if (IS_ERR(max8997->regmap)) {
+		ret = PTR_ERR(max8997->regmap);
+		dev_err(max8997->dev, "Failed to allocate register map: %d\n",
+				ret);
+		return ret;
+	}
+
 	max8997->pdata = pdata;
 	max8997->ono = pdata->ono;
 
diff --git a/include/linux/mfd/max8997-private.h b/include/linux/mfd/max8997-private.h
index 78c76cd..50c7129 100644
--- a/include/linux/mfd/max8997-private.h
+++ b/include/linux/mfd/max8997-private.h
@@ -25,6 +25,7 @@
 #include <linux/i2c.h>
 #include <linux/export.h>
 #include <linux/irqdomain.h>
+#include <linux/regmap.h>
 
 #define MAX8997_REG_INVALID	(0xff)
 
@@ -388,6 +389,8 @@ struct max8997_dev {
 	struct mutex iolock;
 
 	unsigned long type;
+
+	struct regmap *regmap;
 	struct platform_device *battery; /* battery control (not fuel gauge) */
 
 	int irq;
-- 
2.7.4

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

* [PATCH 2/6] dt-bindings: clk: max8997: Add DT binding documentation
  2016-11-07 10:09 ` Pankaj Dubey
  (?)
@ 2016-11-07 10:09     ` Pankaj Dubey
  -1 siblings, 0 replies; 44+ messages in thread
From: Pankaj Dubey @ 2016-11-07 10:09 UTC (permalink / raw)
  To: linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r
  Cc: krzk-DgEjT+Ai2ygdnm+yROfE0A, javier-JPH+aEBZ4P+UEJcrhfAQsw,
	kgene-DgEjT+Ai2ygdnm+yROfE0A, thomas.ab-Sze3O3UU22JBDgjK7y7TUQ,
	myungjoo.ham-Sze3O3UU22JBDgjK7y7TUQ, Pankaj Dubey,
	Michael Turquette, Rob Herring,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-clk-u79uwXL29TY76Z2rM5mHXA

Add Device Tree binding documentation for the clocks
outputs in the Maxim-8997 Power Management IC.

CC: Michael Turquette <mturquette-rdvid1DuHRBWk0Htik3J/w@public.gmane.org>
CC: Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
CC: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
CC: linux-clk-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Signed-off-by: Pankaj Dubey <pankaj.dubey-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
---
 .../devicetree/bindings/clock/maxim,max8997.txt    | 44 ++++++++++++++++++++++
 .../bindings/regulator/max8997-regulator.txt       |  3 ++
 2 files changed, 47 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/clock/maxim,max8997.txt

diff --git a/Documentation/devicetree/bindings/clock/maxim,max8997.txt b/Documentation/devicetree/bindings/clock/maxim,max8997.txt
new file mode 100644
index 0000000..d2e2a74
--- /dev/null
+++ b/Documentation/devicetree/bindings/clock/maxim,max8997.txt
@@ -0,0 +1,44 @@
+Binding for Maxim MAX8997 32k clock generator block
+
+This is a part of device tree bindings of MAX8997 multi-function device.
+More information can be found in bindings/regulator/max8997-regulator.txt file.
+
+The MAX8997 contains two 32.768khz clock outputs that can be controlled
+(gated/ungated) over I2C.
+
+Following properties should be presend in main device node of the MFD chip.
+
+Required properties:
+
+- #clock-cells: from common clock binding; shall be set to 1.
+
+Optional properties:
+- clock-output-names: From common clock binding.
+
+Each clock is assigned an identifier and client nodes can use this identifier
+to specify the clock which they consume. Following indices are allowed:
+    - 0: 32khz_ap clock,
+    - 1: 32khz_cp clock,
+
+Clocks are defined as preprocessor macros in dt-bindings/clock/maxim,max8997.h
+header and can be used in device tree sources.
+
+Example: Node of the MFD chip
+
+	max8997: max8997_pmic@66 {
+		compatible = "maxim,max8997-pmic";
+		reg = <0x66>;
+		interrupt-parent = <&gpx0>;
+		interrupts = <4 0>, <3 0>;
+		#clock-cells = <1>;
+		/* ... */
+	};
+
+Example: Clock consumer node
+
+	foo@0 {
+		compatible = "bar,foo";
+		/* ... */
+		clocks = <&max8997 MAX8997_CLK_AP>;
+		clock-names = "my-clock";
+	};
diff --git a/Documentation/devicetree/bindings/regulator/max8997-regulator.txt b/Documentation/devicetree/bindings/regulator/max8997-regulator.txt
index 5c186a7..af1f9c0 100644
--- a/Documentation/devicetree/bindings/regulator/max8997-regulator.txt
+++ b/Documentation/devicetree/bindings/regulator/max8997-regulator.txt
@@ -6,6 +6,9 @@ interfaced to the host controller using a i2c interface. Each sub-block is
 addressed by the host system using different i2c slave address. This document
 describes the bindings for 'pmic' sub-block of max8997.
 
+Binding for the built-in 32k clock generator block is defined separately
+in bindings/clk/maxim,max8997.txt file
+
 Required properties:
 - compatible: Should be "maxim,max8997-pmic".
 - reg: Specifies the i2c slave address of the pmic block. It should be 0x66.
-- 
2.7.4

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH 2/6] dt-bindings: clk: max8997: Add DT binding documentation
@ 2016-11-07 10:09     ` Pankaj Dubey
  0 siblings, 0 replies; 44+ messages in thread
From: Pankaj Dubey @ 2016-11-07 10:09 UTC (permalink / raw)
  To: linux-samsung-soc, linux-arm-kernel
  Cc: krzk, javier, kgene, thomas.ab, myungjoo.ham, Pankaj Dubey,
	Michael Turquette, Rob Herring, devicetree, linux-clk

Add Device Tree binding documentation for the clocks
outputs in the Maxim-8997 Power Management IC.

CC: Michael Turquette <mturquette@baylibre.com>
CC: Rob Herring <robh+dt@kernel.org>
CC: devicetree@vger.kernel.org
CC: linux-clk@vger.kernel.org
Signed-off-by: Pankaj Dubey <pankaj.dubey@samsung.com>
---
 .../devicetree/bindings/clock/maxim,max8997.txt    | 44 ++++++++++++++++++++++
 .../bindings/regulator/max8997-regulator.txt       |  3 ++
 2 files changed, 47 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/clock/maxim,max8997.txt

diff --git a/Documentation/devicetree/bindings/clock/maxim,max8997.txt b/Documentation/devicetree/bindings/clock/maxim,max8997.txt
new file mode 100644
index 0000000..d2e2a74
--- /dev/null
+++ b/Documentation/devicetree/bindings/clock/maxim,max8997.txt
@@ -0,0 +1,44 @@
+Binding for Maxim MAX8997 32k clock generator block
+
+This is a part of device tree bindings of MAX8997 multi-function device.
+More information can be found in bindings/regulator/max8997-regulator.txt file.
+
+The MAX8997 contains two 32.768khz clock outputs that can be controlled
+(gated/ungated) over I2C.
+
+Following properties should be presend in main device node of the MFD chip.
+
+Required properties:
+
+- #clock-cells: from common clock binding; shall be set to 1.
+
+Optional properties:
+- clock-output-names: From common clock binding.
+
+Each clock is assigned an identifier and client nodes can use this identifier
+to specify the clock which they consume. Following indices are allowed:
+    - 0: 32khz_ap clock,
+    - 1: 32khz_cp clock,
+
+Clocks are defined as preprocessor macros in dt-bindings/clock/maxim,max8997.h
+header and can be used in device tree sources.
+
+Example: Node of the MFD chip
+
+	max8997: max8997_pmic@66 {
+		compatible = "maxim,max8997-pmic";
+		reg = <0x66>;
+		interrupt-parent = <&gpx0>;
+		interrupts = <4 0>, <3 0>;
+		#clock-cells = <1>;
+		/* ... */
+	};
+
+Example: Clock consumer node
+
+	foo@0 {
+		compatible = "bar,foo";
+		/* ... */
+		clocks = <&max8997 MAX8997_CLK_AP>;
+		clock-names = "my-clock";
+	};
diff --git a/Documentation/devicetree/bindings/regulator/max8997-regulator.txt b/Documentation/devicetree/bindings/regulator/max8997-regulator.txt
index 5c186a7..af1f9c0 100644
--- a/Documentation/devicetree/bindings/regulator/max8997-regulator.txt
+++ b/Documentation/devicetree/bindings/regulator/max8997-regulator.txt
@@ -6,6 +6,9 @@ interfaced to the host controller using a i2c interface. Each sub-block is
 addressed by the host system using different i2c slave address. This document
 describes the bindings for 'pmic' sub-block of max8997.
 
+Binding for the built-in 32k clock generator block is defined separately
+in bindings/clk/maxim,max8997.txt file
+
 Required properties:
 - compatible: Should be "maxim,max8997-pmic".
 - reg: Specifies the i2c slave address of the pmic block. It should be 0x66.
-- 
2.7.4

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

* [PATCH 2/6] dt-bindings: clk: max8997: Add DT binding documentation
@ 2016-11-07 10:09     ` Pankaj Dubey
  0 siblings, 0 replies; 44+ messages in thread
From: Pankaj Dubey @ 2016-11-07 10:09 UTC (permalink / raw)
  To: linux-arm-kernel

Add Device Tree binding documentation for the clocks
outputs in the Maxim-8997 Power Management IC.

CC: Michael Turquette <mturquette@baylibre.com>
CC: Rob Herring <robh+dt@kernel.org>
CC: devicetree at vger.kernel.org
CC: linux-clk at vger.kernel.org
Signed-off-by: Pankaj Dubey <pankaj.dubey@samsung.com>
---
 .../devicetree/bindings/clock/maxim,max8997.txt    | 44 ++++++++++++++++++++++
 .../bindings/regulator/max8997-regulator.txt       |  3 ++
 2 files changed, 47 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/clock/maxim,max8997.txt

diff --git a/Documentation/devicetree/bindings/clock/maxim,max8997.txt b/Documentation/devicetree/bindings/clock/maxim,max8997.txt
new file mode 100644
index 0000000..d2e2a74
--- /dev/null
+++ b/Documentation/devicetree/bindings/clock/maxim,max8997.txt
@@ -0,0 +1,44 @@
+Binding for Maxim MAX8997 32k clock generator block
+
+This is a part of device tree bindings of MAX8997 multi-function device.
+More information can be found in bindings/regulator/max8997-regulator.txt file.
+
+The MAX8997 contains two 32.768khz clock outputs that can be controlled
+(gated/ungated) over I2C.
+
+Following properties should be presend in main device node of the MFD chip.
+
+Required properties:
+
+- #clock-cells: from common clock binding; shall be set to 1.
+
+Optional properties:
+- clock-output-names: From common clock binding.
+
+Each clock is assigned an identifier and client nodes can use this identifier
+to specify the clock which they consume. Following indices are allowed:
+    - 0: 32khz_ap clock,
+    - 1: 32khz_cp clock,
+
+Clocks are defined as preprocessor macros in dt-bindings/clock/maxim,max8997.h
+header and can be used in device tree sources.
+
+Example: Node of the MFD chip
+
+	max8997: max8997_pmic at 66 {
+		compatible = "maxim,max8997-pmic";
+		reg = <0x66>;
+		interrupt-parent = <&gpx0>;
+		interrupts = <4 0>, <3 0>;
+		#clock-cells = <1>;
+		/* ... */
+	};
+
+Example: Clock consumer node
+
+	foo at 0 {
+		compatible = "bar,foo";
+		/* ... */
+		clocks = <&max8997 MAX8997_CLK_AP>;
+		clock-names = "my-clock";
+	};
diff --git a/Documentation/devicetree/bindings/regulator/max8997-regulator.txt b/Documentation/devicetree/bindings/regulator/max8997-regulator.txt
index 5c186a7..af1f9c0 100644
--- a/Documentation/devicetree/bindings/regulator/max8997-regulator.txt
+++ b/Documentation/devicetree/bindings/regulator/max8997-regulator.txt
@@ -6,6 +6,9 @@ interfaced to the host controller using a i2c interface. Each sub-block is
 addressed by the host system using different i2c slave address. This document
 describes the bindings for 'pmic' sub-block of max8997.
 
+Binding for the built-in 32k clock generator block is defined separately
+in bindings/clk/maxim,max8997.txt file
+
 Required properties:
 - compatible: Should be "maxim,max8997-pmic".
 - reg: Specifies the i2c slave address of the pmic block. It should be 0x66.
-- 
2.7.4

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

* [PATCH 3/6] clk: Add driver for Maxim-8997 PMIC clocks
  2016-11-07 10:09 ` Pankaj Dubey
  (?)
@ 2016-11-07 10:09     ` Pankaj Dubey
  -1 siblings, 0 replies; 44+ messages in thread
From: Pankaj Dubey @ 2016-11-07 10:09 UTC (permalink / raw)
  To: linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r
  Cc: krzk-DgEjT+Ai2ygdnm+yROfE0A, javier-JPH+aEBZ4P+UEJcrhfAQsw,
	kgene-DgEjT+Ai2ygdnm+yROfE0A, thomas.ab-Sze3O3UU22JBDgjK7y7TUQ,
	myungjoo.ham-Sze3O3UU22JBDgjK7y7TUQ, Pankaj Dubey,
	Michael Turquette, Rob Herring,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-clk-u79uwXL29TY76Z2rM5mHXA

The MAX8997 PMIC has 32.786kHz crystal oscillator which provides an
accurate low frequency clock for MAX8997 internal circuit as well as
external circuit. This patch adds support for these two clocks.

CC: Michael Turquette <mturquette-rdvid1DuHRBWk0Htik3J/w@public.gmane.org>
CC: Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
CC: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
CC: linux-clk-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Signed-off-by: Pankaj Dubey <pankaj.dubey-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
---
 drivers/clk/Kconfig                       | 10 ++++
 drivers/clk/Makefile                      |  1 +
 drivers/clk/clk-max8997.c                 | 76 +++++++++++++++++++++++++++++++
 include/dt-bindings/clock/maxim,max8997.h | 23 ++++++++++
 4 files changed, 110 insertions(+)
 create mode 100644 drivers/clk/clk-max8997.c
 create mode 100644 include/dt-bindings/clock/maxim,max8997.h

diff --git a/drivers/clk/Kconfig b/drivers/clk/Kconfig
index e2d9bd7..5339cbe 100644
--- a/drivers/clk/Kconfig
+++ b/drivers/clk/Kconfig
@@ -48,6 +48,16 @@ config COMMON_CLK_MAX77802
 	---help---
 	  This driver supports Maxim 77802 crystal oscillator clock.
 
+config COMMON_CLK_MAX8997
+	tristate "Clock driver for Maxim 8997 MFD"
+	depends on MFD_MAX8997
+	select COMMON_CLK_MAX_GEN
+	---help---
+	  This driver supports Maxim 8997 crystal oscillator clock.
+	  The 32.768kHz crystal oscillator clock provides an accurate
+	  low frequency clock for MAX8997 internal circuit as well as
+	  external circuit.
+
 config COMMON_CLK_RK808
 	tristate "Clock driver for RK808/RK818"
 	depends on MFD_RK808
diff --git a/drivers/clk/Makefile b/drivers/clk/Makefile
index 3b6f9cf..1cfa9ab 100644
--- a/drivers/clk/Makefile
+++ b/drivers/clk/Makefile
@@ -30,6 +30,7 @@ obj-$(CONFIG_MACH_LOONGSON32)		+= clk-ls1x.o
 obj-$(CONFIG_COMMON_CLK_MAX_GEN)	+= clk-max-gen.o
 obj-$(CONFIG_COMMON_CLK_MAX77686)	+= clk-max77686.o
 obj-$(CONFIG_COMMON_CLK_MAX77802)	+= clk-max77802.o
+obj-$(CONFIG_COMMON_CLK_MAX8997)	+= clk-max8997.o
 obj-$(CONFIG_ARCH_MB86S7X)		+= clk-mb86s7x.o
 obj-$(CONFIG_ARCH_MOXART)		+= clk-moxart.o
 obj-$(CONFIG_ARCH_NOMADIK)		+= clk-nomadik.o
diff --git a/drivers/clk/clk-max8997.c b/drivers/clk/clk-max8997.c
new file mode 100644
index 0000000..9158354
--- /dev/null
+++ b/drivers/clk/clk-max8997.c
@@ -0,0 +1,76 @@
+/*
+ * clk-max8997.c - Clock driver for Maxim 8997
+ *
+ * Copyright (C) 2016 Samsung Electornics
+ * Pankaj Dubey <pankaj.dubey-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
+ *
+ * This program is free software; you can redistribute  it and/or modify it
+ * under  the terms of  the GNU General  Public License as published by the
+ * Free Software Foundation;  either version 2 of the  License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ */
+
+#include <linux/kernel.h>
+#include <linux/slab.h>
+#include <linux/err.h>
+#include <linux/module.h>
+#include <linux/platform_device.h>
+#include <linux/mfd/max8997.h>
+#include <linux/mfd/max8997-private.h>
+#include <linux/clk-provider.h>
+#include <linux/mutex.h>
+#include <linux/clkdev.h>
+
+#include <dt-bindings/clock/maxim,max8997.h>
+#include "clk-max-gen.h"
+
+static struct clk_init_data max8997_clks_init[MAX8997_CLKS_NUM] = {
+	[MAX8997_CLK_AP] = {
+		.name = "32khz_ap",
+		.ops = &max_gen_clk_ops,
+	},
+	[MAX8997_CLK_CP] = {
+		.name = "32khz_cp",
+		.ops = &max_gen_clk_ops,
+	},
+};
+
+static int max8997_clk_probe(struct platform_device *pdev)
+{
+	struct max8997_dev *iodev = dev_get_drvdata(pdev->dev.parent);
+
+	return max_gen_clk_probe(pdev, iodev->regmap, MAX8997_REG_MAINCON1,
+				 max8997_clks_init, MAX8997_CLKS_NUM);
+}
+
+static int max8997_clk_remove(struct platform_device *pdev)
+{
+	return max_gen_clk_remove(pdev, MAX8997_CLKS_NUM);
+}
+
+static const struct platform_device_id max8997_clk_id[] = {
+	{ "max8997-clk", 0},
+	{ },
+};
+MODULE_DEVICE_TABLE(platform, max8997_clk_id);
+
+static struct platform_driver max8997_clk_driver = {
+	.driver = {
+		.name  = "max8997-clk",
+	},
+	.probe = max8997_clk_probe,
+	.remove = max8997_clk_remove,
+	.id_table = max8997_clk_id,
+};
+
+module_platform_driver(max8997_clk_driver);
+
+MODULE_DESCRIPTION("MAXIM 8997 Clock Driver");
+MODULE_AUTHOR("Pankaj Dubey <pankaj.dubey-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>");
+MODULE_LICENSE("GPL");
diff --git a/include/dt-bindings/clock/maxim,max8997.h b/include/dt-bindings/clock/maxim,max8997.h
new file mode 100644
index 0000000..f2dd972
--- /dev/null
+++ b/include/dt-bindings/clock/maxim,max8997.h
@@ -0,0 +1,23 @@
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ *	Author: Pankaj Dubey <pankaj.dubey-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * Device Tree binding constants clocks for the Maxim 8997 PMIC.
+ */
+
+#ifndef _DT_BINDINGS_CLOCK_MAXIM_MAX8997_CLOCK_H
+#define _DT_BINDINGS_CLOCK_MAXIM_MAX8997_CLOCK_H
+
+/* Fixed rate clocks. */
+
+#define MAX8997_CLK_AP		0
+#define MAX8997_CLK_CP		1
+
+/* Total number of clocks. */
+#define MAX8997_CLKS_NUM		(MAX8997_CLK_CP + 1)
+
+#endif /* _DT_BINDINGS_CLOCK_MAXIM_MAX8997_CLOCK_H */
-- 
2.7.4

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH 3/6] clk: Add driver for Maxim-8997 PMIC clocks
@ 2016-11-07 10:09     ` Pankaj Dubey
  0 siblings, 0 replies; 44+ messages in thread
From: Pankaj Dubey @ 2016-11-07 10:09 UTC (permalink / raw)
  To: linux-samsung-soc, linux-arm-kernel
  Cc: krzk, javier, kgene, thomas.ab, myungjoo.ham, Pankaj Dubey,
	Michael Turquette, Rob Herring, devicetree, linux-clk

The MAX8997 PMIC has 32.786kHz crystal oscillator which provides an
accurate low frequency clock for MAX8997 internal circuit as well as
external circuit. This patch adds support for these two clocks.

CC: Michael Turquette <mturquette@baylibre.com>
CC: Rob Herring <robh+dt@kernel.org>
CC: devicetree@vger.kernel.org
CC: linux-clk@vger.kernel.org
Signed-off-by: Pankaj Dubey <pankaj.dubey@samsung.com>
---
 drivers/clk/Kconfig                       | 10 ++++
 drivers/clk/Makefile                      |  1 +
 drivers/clk/clk-max8997.c                 | 76 +++++++++++++++++++++++++++++++
 include/dt-bindings/clock/maxim,max8997.h | 23 ++++++++++
 4 files changed, 110 insertions(+)
 create mode 100644 drivers/clk/clk-max8997.c
 create mode 100644 include/dt-bindings/clock/maxim,max8997.h

diff --git a/drivers/clk/Kconfig b/drivers/clk/Kconfig
index e2d9bd7..5339cbe 100644
--- a/drivers/clk/Kconfig
+++ b/drivers/clk/Kconfig
@@ -48,6 +48,16 @@ config COMMON_CLK_MAX77802
 	---help---
 	  This driver supports Maxim 77802 crystal oscillator clock.
 
+config COMMON_CLK_MAX8997
+	tristate "Clock driver for Maxim 8997 MFD"
+	depends on MFD_MAX8997
+	select COMMON_CLK_MAX_GEN
+	---help---
+	  This driver supports Maxim 8997 crystal oscillator clock.
+	  The 32.768kHz crystal oscillator clock provides an accurate
+	  low frequency clock for MAX8997 internal circuit as well as
+	  external circuit.
+
 config COMMON_CLK_RK808
 	tristate "Clock driver for RK808/RK818"
 	depends on MFD_RK808
diff --git a/drivers/clk/Makefile b/drivers/clk/Makefile
index 3b6f9cf..1cfa9ab 100644
--- a/drivers/clk/Makefile
+++ b/drivers/clk/Makefile
@@ -30,6 +30,7 @@ obj-$(CONFIG_MACH_LOONGSON32)		+= clk-ls1x.o
 obj-$(CONFIG_COMMON_CLK_MAX_GEN)	+= clk-max-gen.o
 obj-$(CONFIG_COMMON_CLK_MAX77686)	+= clk-max77686.o
 obj-$(CONFIG_COMMON_CLK_MAX77802)	+= clk-max77802.o
+obj-$(CONFIG_COMMON_CLK_MAX8997)	+= clk-max8997.o
 obj-$(CONFIG_ARCH_MB86S7X)		+= clk-mb86s7x.o
 obj-$(CONFIG_ARCH_MOXART)		+= clk-moxart.o
 obj-$(CONFIG_ARCH_NOMADIK)		+= clk-nomadik.o
diff --git a/drivers/clk/clk-max8997.c b/drivers/clk/clk-max8997.c
new file mode 100644
index 0000000..9158354
--- /dev/null
+++ b/drivers/clk/clk-max8997.c
@@ -0,0 +1,76 @@
+/*
+ * clk-max8997.c - Clock driver for Maxim 8997
+ *
+ * Copyright (C) 2016 Samsung Electornics
+ * Pankaj Dubey <pankaj.dubey@samsung.com>
+ *
+ * This program is free software; you can redistribute  it and/or modify it
+ * under  the terms of  the GNU General  Public License as published by the
+ * Free Software Foundation;  either version 2 of the  License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ */
+
+#include <linux/kernel.h>
+#include <linux/slab.h>
+#include <linux/err.h>
+#include <linux/module.h>
+#include <linux/platform_device.h>
+#include <linux/mfd/max8997.h>
+#include <linux/mfd/max8997-private.h>
+#include <linux/clk-provider.h>
+#include <linux/mutex.h>
+#include <linux/clkdev.h>
+
+#include <dt-bindings/clock/maxim,max8997.h>
+#include "clk-max-gen.h"
+
+static struct clk_init_data max8997_clks_init[MAX8997_CLKS_NUM] = {
+	[MAX8997_CLK_AP] = {
+		.name = "32khz_ap",
+		.ops = &max_gen_clk_ops,
+	},
+	[MAX8997_CLK_CP] = {
+		.name = "32khz_cp",
+		.ops = &max_gen_clk_ops,
+	},
+};
+
+static int max8997_clk_probe(struct platform_device *pdev)
+{
+	struct max8997_dev *iodev = dev_get_drvdata(pdev->dev.parent);
+
+	return max_gen_clk_probe(pdev, iodev->regmap, MAX8997_REG_MAINCON1,
+				 max8997_clks_init, MAX8997_CLKS_NUM);
+}
+
+static int max8997_clk_remove(struct platform_device *pdev)
+{
+	return max_gen_clk_remove(pdev, MAX8997_CLKS_NUM);
+}
+
+static const struct platform_device_id max8997_clk_id[] = {
+	{ "max8997-clk", 0},
+	{ },
+};
+MODULE_DEVICE_TABLE(platform, max8997_clk_id);
+
+static struct platform_driver max8997_clk_driver = {
+	.driver = {
+		.name  = "max8997-clk",
+	},
+	.probe = max8997_clk_probe,
+	.remove = max8997_clk_remove,
+	.id_table = max8997_clk_id,
+};
+
+module_platform_driver(max8997_clk_driver);
+
+MODULE_DESCRIPTION("MAXIM 8997 Clock Driver");
+MODULE_AUTHOR("Pankaj Dubey <pankaj.dubey@samsung.com>");
+MODULE_LICENSE("GPL");
diff --git a/include/dt-bindings/clock/maxim,max8997.h b/include/dt-bindings/clock/maxim,max8997.h
new file mode 100644
index 0000000..f2dd972
--- /dev/null
+++ b/include/dt-bindings/clock/maxim,max8997.h
@@ -0,0 +1,23 @@
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ *	Author: Pankaj Dubey <pankaj.dubey@samsung.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * Device Tree binding constants clocks for the Maxim 8997 PMIC.
+ */
+
+#ifndef _DT_BINDINGS_CLOCK_MAXIM_MAX8997_CLOCK_H
+#define _DT_BINDINGS_CLOCK_MAXIM_MAX8997_CLOCK_H
+
+/* Fixed rate clocks. */
+
+#define MAX8997_CLK_AP		0
+#define MAX8997_CLK_CP		1
+
+/* Total number of clocks. */
+#define MAX8997_CLKS_NUM		(MAX8997_CLK_CP + 1)
+
+#endif /* _DT_BINDINGS_CLOCK_MAXIM_MAX8997_CLOCK_H */
-- 
2.7.4

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

* [PATCH 3/6] clk: Add driver for Maxim-8997 PMIC clocks
@ 2016-11-07 10:09     ` Pankaj Dubey
  0 siblings, 0 replies; 44+ messages in thread
From: Pankaj Dubey @ 2016-11-07 10:09 UTC (permalink / raw)
  To: linux-arm-kernel

The MAX8997 PMIC has 32.786kHz crystal oscillator which provides an
accurate low frequency clock for MAX8997 internal circuit as well as
external circuit. This patch adds support for these two clocks.

CC: Michael Turquette <mturquette@baylibre.com>
CC: Rob Herring <robh+dt@kernel.org>
CC: devicetree at vger.kernel.org
CC: linux-clk at vger.kernel.org
Signed-off-by: Pankaj Dubey <pankaj.dubey@samsung.com>
---
 drivers/clk/Kconfig                       | 10 ++++
 drivers/clk/Makefile                      |  1 +
 drivers/clk/clk-max8997.c                 | 76 +++++++++++++++++++++++++++++++
 include/dt-bindings/clock/maxim,max8997.h | 23 ++++++++++
 4 files changed, 110 insertions(+)
 create mode 100644 drivers/clk/clk-max8997.c
 create mode 100644 include/dt-bindings/clock/maxim,max8997.h

diff --git a/drivers/clk/Kconfig b/drivers/clk/Kconfig
index e2d9bd7..5339cbe 100644
--- a/drivers/clk/Kconfig
+++ b/drivers/clk/Kconfig
@@ -48,6 +48,16 @@ config COMMON_CLK_MAX77802
 	---help---
 	  This driver supports Maxim 77802 crystal oscillator clock.
 
+config COMMON_CLK_MAX8997
+	tristate "Clock driver for Maxim 8997 MFD"
+	depends on MFD_MAX8997
+	select COMMON_CLK_MAX_GEN
+	---help---
+	  This driver supports Maxim 8997 crystal oscillator clock.
+	  The 32.768kHz crystal oscillator clock provides an accurate
+	  low frequency clock for MAX8997 internal circuit as well as
+	  external circuit.
+
 config COMMON_CLK_RK808
 	tristate "Clock driver for RK808/RK818"
 	depends on MFD_RK808
diff --git a/drivers/clk/Makefile b/drivers/clk/Makefile
index 3b6f9cf..1cfa9ab 100644
--- a/drivers/clk/Makefile
+++ b/drivers/clk/Makefile
@@ -30,6 +30,7 @@ obj-$(CONFIG_MACH_LOONGSON32)		+= clk-ls1x.o
 obj-$(CONFIG_COMMON_CLK_MAX_GEN)	+= clk-max-gen.o
 obj-$(CONFIG_COMMON_CLK_MAX77686)	+= clk-max77686.o
 obj-$(CONFIG_COMMON_CLK_MAX77802)	+= clk-max77802.o
+obj-$(CONFIG_COMMON_CLK_MAX8997)	+= clk-max8997.o
 obj-$(CONFIG_ARCH_MB86S7X)		+= clk-mb86s7x.o
 obj-$(CONFIG_ARCH_MOXART)		+= clk-moxart.o
 obj-$(CONFIG_ARCH_NOMADIK)		+= clk-nomadik.o
diff --git a/drivers/clk/clk-max8997.c b/drivers/clk/clk-max8997.c
new file mode 100644
index 0000000..9158354
--- /dev/null
+++ b/drivers/clk/clk-max8997.c
@@ -0,0 +1,76 @@
+/*
+ * clk-max8997.c - Clock driver for Maxim 8997
+ *
+ * Copyright (C) 2016 Samsung Electornics
+ * Pankaj Dubey <pankaj.dubey@samsung.com>
+ *
+ * This program is free software; you can redistribute  it and/or modify it
+ * under  the terms of  the GNU General  Public License as published by the
+ * Free Software Foundation;  either version 2 of the  License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ */
+
+#include <linux/kernel.h>
+#include <linux/slab.h>
+#include <linux/err.h>
+#include <linux/module.h>
+#include <linux/platform_device.h>
+#include <linux/mfd/max8997.h>
+#include <linux/mfd/max8997-private.h>
+#include <linux/clk-provider.h>
+#include <linux/mutex.h>
+#include <linux/clkdev.h>
+
+#include <dt-bindings/clock/maxim,max8997.h>
+#include "clk-max-gen.h"
+
+static struct clk_init_data max8997_clks_init[MAX8997_CLKS_NUM] = {
+	[MAX8997_CLK_AP] = {
+		.name = "32khz_ap",
+		.ops = &max_gen_clk_ops,
+	},
+	[MAX8997_CLK_CP] = {
+		.name = "32khz_cp",
+		.ops = &max_gen_clk_ops,
+	},
+};
+
+static int max8997_clk_probe(struct platform_device *pdev)
+{
+	struct max8997_dev *iodev = dev_get_drvdata(pdev->dev.parent);
+
+	return max_gen_clk_probe(pdev, iodev->regmap, MAX8997_REG_MAINCON1,
+				 max8997_clks_init, MAX8997_CLKS_NUM);
+}
+
+static int max8997_clk_remove(struct platform_device *pdev)
+{
+	return max_gen_clk_remove(pdev, MAX8997_CLKS_NUM);
+}
+
+static const struct platform_device_id max8997_clk_id[] = {
+	{ "max8997-clk", 0},
+	{ },
+};
+MODULE_DEVICE_TABLE(platform, max8997_clk_id);
+
+static struct platform_driver max8997_clk_driver = {
+	.driver = {
+		.name  = "max8997-clk",
+	},
+	.probe = max8997_clk_probe,
+	.remove = max8997_clk_remove,
+	.id_table = max8997_clk_id,
+};
+
+module_platform_driver(max8997_clk_driver);
+
+MODULE_DESCRIPTION("MAXIM 8997 Clock Driver");
+MODULE_AUTHOR("Pankaj Dubey <pankaj.dubey@samsung.com>");
+MODULE_LICENSE("GPL");
diff --git a/include/dt-bindings/clock/maxim,max8997.h b/include/dt-bindings/clock/maxim,max8997.h
new file mode 100644
index 0000000..f2dd972
--- /dev/null
+++ b/include/dt-bindings/clock/maxim,max8997.h
@@ -0,0 +1,23 @@
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ *	Author: Pankaj Dubey <pankaj.dubey@samsung.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * Device Tree binding constants clocks for the Maxim 8997 PMIC.
+ */
+
+#ifndef _DT_BINDINGS_CLOCK_MAXIM_MAX8997_CLOCK_H
+#define _DT_BINDINGS_CLOCK_MAXIM_MAX8997_CLOCK_H
+
+/* Fixed rate clocks. */
+
+#define MAX8997_CLK_AP		0
+#define MAX8997_CLK_CP		1
+
+/* Total number of clocks. */
+#define MAX8997_CLKS_NUM		(MAX8997_CLK_CP + 1)
+
+#endif /* _DT_BINDINGS_CLOCK_MAXIM_MAX8997_CLOCK_H */
-- 
2.7.4

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

* [PATCH 4/6] ARM: dts: Add clock provider specific properties to max8997 node
  2016-11-07 10:09 ` Pankaj Dubey
@ 2016-11-07 10:09     ` Pankaj Dubey
  -1 siblings, 0 replies; 44+ messages in thread
From: Pankaj Dubey @ 2016-11-07 10:09 UTC (permalink / raw)
  To: linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r
  Cc: krzk-DgEjT+Ai2ygdnm+yROfE0A, javier-JPH+aEBZ4P+UEJcrhfAQsw,
	kgene-DgEjT+Ai2ygdnm+yROfE0A, thomas.ab-Sze3O3UU22JBDgjK7y7TUQ,
	myungjoo.ham-Sze3O3UU22JBDgjK7y7TUQ, Pankaj Dubey, Rob Herring,
	devicetree-u79uwXL29TY76Z2rM5mHXA

This patch adds a label and #clock-cells property to device node of
max8997 PMIC to allow using it as a clock provider.

CC: Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
CC: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Signed-off-by: Pankaj Dubey <pankaj.dubey-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
---
 arch/arm/boot/dts/exynos4210-origen.dts | 3 ++-
 arch/arm/boot/dts/exynos4210-trats.dts  | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boot/dts/exynos4210-origen.dts b/arch/arm/boot/dts/exynos4210-origen.dts
index cb3a255..6c7ef4e 100644
--- a/arch/arm/boot/dts/exynos4210-origen.dts
+++ b/arch/arm/boot/dts/exynos4210-origen.dts
@@ -147,11 +147,12 @@
 	pinctrl-0 = <&i2c0_bus>;
 	pinctrl-names = "default";
 
-	max8997_pmic@66 {
+	max8997: max8997_pmic@66 {
 		compatible = "maxim,max8997-pmic";
 		reg = <0x66>;
 		interrupt-parent = <&gpx0>;
 		interrupts = <4 0>, <3 0>;
+		#clock-cells = <1>;
 
 		max8997,pmic-buck1-dvs-voltage = <1350000>;
 		max8997,pmic-buck2-dvs-voltage = <1100000>;
diff --git a/arch/arm/boot/dts/exynos4210-trats.dts b/arch/arm/boot/dts/exynos4210-trats.dts
index 0ca1b4d..74a9d39 100644
--- a/arch/arm/boot/dts/exynos4210-trats.dts
+++ b/arch/arm/boot/dts/exynos4210-trats.dts
@@ -295,12 +295,13 @@
 	pinctrl-names = "default";
 	status = "okay";
 
-	max8997_pmic@66 {
+	max8997: max8997_pmic@66 {
 		compatible = "maxim,max8997-pmic";
 
 		reg = <0x66>;
 		interrupt-parent = <&gpx0>;
 		interrupts = <7 0>;
+		#clock-cells = <1>;
 
 		max8997,pmic-buck1-uses-gpio-dvs;
 		max8997,pmic-buck2-uses-gpio-dvs;
-- 
2.7.4

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH 4/6] ARM: dts: Add clock provider specific properties to max8997 node
@ 2016-11-07 10:09     ` Pankaj Dubey
  0 siblings, 0 replies; 44+ messages in thread
From: Pankaj Dubey @ 2016-11-07 10:09 UTC (permalink / raw)
  To: linux-arm-kernel

This patch adds a label and #clock-cells property to device node of
max8997 PMIC to allow using it as a clock provider.

CC: Rob Herring <robh+dt@kernel.org>
CC: devicetree at vger.kernel.org
Signed-off-by: Pankaj Dubey <pankaj.dubey@samsung.com>
---
 arch/arm/boot/dts/exynos4210-origen.dts | 3 ++-
 arch/arm/boot/dts/exynos4210-trats.dts  | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boot/dts/exynos4210-origen.dts b/arch/arm/boot/dts/exynos4210-origen.dts
index cb3a255..6c7ef4e 100644
--- a/arch/arm/boot/dts/exynos4210-origen.dts
+++ b/arch/arm/boot/dts/exynos4210-origen.dts
@@ -147,11 +147,12 @@
 	pinctrl-0 = <&i2c0_bus>;
 	pinctrl-names = "default";
 
-	max8997_pmic at 66 {
+	max8997: max8997_pmic at 66 {
 		compatible = "maxim,max8997-pmic";
 		reg = <0x66>;
 		interrupt-parent = <&gpx0>;
 		interrupts = <4 0>, <3 0>;
+		#clock-cells = <1>;
 
 		max8997,pmic-buck1-dvs-voltage = <1350000>;
 		max8997,pmic-buck2-dvs-voltage = <1100000>;
diff --git a/arch/arm/boot/dts/exynos4210-trats.dts b/arch/arm/boot/dts/exynos4210-trats.dts
index 0ca1b4d..74a9d39 100644
--- a/arch/arm/boot/dts/exynos4210-trats.dts
+++ b/arch/arm/boot/dts/exynos4210-trats.dts
@@ -295,12 +295,13 @@
 	pinctrl-names = "default";
 	status = "okay";
 
-	max8997_pmic at 66 {
+	max8997: max8997_pmic at 66 {
 		compatible = "maxim,max8997-pmic";
 
 		reg = <0x66>;
 		interrupt-parent = <&gpx0>;
 		interrupts = <7 0>;
+		#clock-cells = <1>;
 
 		max8997,pmic-buck1-uses-gpio-dvs;
 		max8997,pmic-buck2-uses-gpio-dvs;
-- 
2.7.4

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

* [PATCH 5/6] mfd: max8997: Add max8997-clk name in mfd_cell
  2016-11-07 10:09 ` Pankaj Dubey
@ 2016-11-07 10:09   ` Pankaj Dubey
  -1 siblings, 0 replies; 44+ messages in thread
From: Pankaj Dubey @ 2016-11-07 10:09 UTC (permalink / raw)
  To: linux-samsung-soc, linux-arm-kernel
  Cc: krzk, javier, kgene, thomas.ab, myungjoo.ham, Pankaj Dubey, Lee Jones

This patch add max8997-clk in mfd_cell max8997_devs in order to probe
max8997-clk device driver.

CC: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Pankaj Dubey <pankaj.dubey@samsung.com>
---
 drivers/mfd/max8997.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/mfd/max8997.c b/drivers/mfd/max8997.c
index bda9ec8..4b809f8 100644
--- a/drivers/mfd/max8997.c
+++ b/drivers/mfd/max8997.c
@@ -48,6 +48,7 @@ static const struct mfd_cell max8997_devs[] = {
 	{ .name = "max8997-muic", },
 	{ .name = "max8997-led", .id = 1 },
 	{ .name = "max8997-led", .id = 2 },
+	{ .name = "max8997-clk",},
 };
 
 #ifdef CONFIG_OF
-- 
2.7.4

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

* [PATCH 5/6] mfd: max8997: Add max8997-clk name in mfd_cell
@ 2016-11-07 10:09   ` Pankaj Dubey
  0 siblings, 0 replies; 44+ messages in thread
From: Pankaj Dubey @ 2016-11-07 10:09 UTC (permalink / raw)
  To: linux-arm-kernel

This patch add max8997-clk in mfd_cell max8997_devs in order to probe
max8997-clk device driver.

CC: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Pankaj Dubey <pankaj.dubey@samsung.com>
---
 drivers/mfd/max8997.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/mfd/max8997.c b/drivers/mfd/max8997.c
index bda9ec8..4b809f8 100644
--- a/drivers/mfd/max8997.c
+++ b/drivers/mfd/max8997.c
@@ -48,6 +48,7 @@ static const struct mfd_cell max8997_devs[] = {
 	{ .name = "max8997-muic", },
 	{ .name = "max8997-led", .id = 1 },
 	{ .name = "max8997-led", .id = 2 },
+	{ .name = "max8997-clk",},
 };
 
 #ifdef CONFIG_OF
-- 
2.7.4

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

* [PATCH 6/6] ARM: dts: Extend the S3C RTC node with rtc_src clock
  2016-11-07 10:09 ` Pankaj Dubey
@ 2016-11-07 10:09     ` Pankaj Dubey
  -1 siblings, 0 replies; 44+ messages in thread
From: Pankaj Dubey @ 2016-11-07 10:09 UTC (permalink / raw)
  To: linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r
  Cc: krzk-DgEjT+Ai2ygdnm+yROfE0A, javier-JPH+aEBZ4P+UEJcrhfAQsw,
	kgene-DgEjT+Ai2ygdnm+yROfE0A, thomas.ab-Sze3O3UU22JBDgjK7y7TUQ,
	myungjoo.ham-Sze3O3UU22JBDgjK7y7TUQ, Pankaj Dubey, Rob Herring,
	devicetree-u79uwXL29TY76Z2rM5mHXA

Extend the S3C RTC node with rtc_src clock so it could be operational.
The rtc_src clock is provided by MAX8997.

CC: Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
CC: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Signed-off-by: Pankaj Dubey <pankaj.dubey-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
---
 arch/arm/boot/dts/exynos4210-origen.dts | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/arm/boot/dts/exynos4210-origen.dts b/arch/arm/boot/dts/exynos4210-origen.dts
index 6c7ef4e..4cac9b6 100644
--- a/arch/arm/boot/dts/exynos4210-origen.dts
+++ b/arch/arm/boot/dts/exynos4210-origen.dts
@@ -18,6 +18,7 @@
 #include "exynos4210.dtsi"
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/clock/maxim,max8997.h>
 #include "exynos-mfc-reserved-memory.dtsi"
 
 / {
@@ -324,6 +325,8 @@
 
 &rtc {
 	status = "okay";
+	clocks = <&clock CLK_RTC>, <&max8997 MAX8997_CLK_AP>;
+	clock-names = "rtc", "rtc_src";
 };
 
 &tmu {
-- 
2.7.4

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH 6/6] ARM: dts: Extend the S3C RTC node with rtc_src clock
@ 2016-11-07 10:09     ` Pankaj Dubey
  0 siblings, 0 replies; 44+ messages in thread
From: Pankaj Dubey @ 2016-11-07 10:09 UTC (permalink / raw)
  To: linux-arm-kernel

Extend the S3C RTC node with rtc_src clock so it could be operational.
The rtc_src clock is provided by MAX8997.

CC: Rob Herring <robh+dt@kernel.org>
CC: devicetree at vger.kernel.org
Signed-off-by: Pankaj Dubey <pankaj.dubey@samsung.com>
---
 arch/arm/boot/dts/exynos4210-origen.dts | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/arm/boot/dts/exynos4210-origen.dts b/arch/arm/boot/dts/exynos4210-origen.dts
index 6c7ef4e..4cac9b6 100644
--- a/arch/arm/boot/dts/exynos4210-origen.dts
+++ b/arch/arm/boot/dts/exynos4210-origen.dts
@@ -18,6 +18,7 @@
 #include "exynos4210.dtsi"
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/clock/maxim,max8997.h>
 #include "exynos-mfc-reserved-memory.dtsi"
 
 / {
@@ -324,6 +325,8 @@
 
 &rtc {
 	status = "okay";
+	clocks = <&clock CLK_RTC>, <&max8997 MAX8997_CLK_AP>;
+	clock-names = "rtc", "rtc_src";
 };
 
 &tmu {
-- 
2.7.4

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

* Re: [PATCH 1/6] mfd: max8997: Initialize max8997 register map
  2016-11-07 10:09   ` Pankaj Dubey
@ 2016-11-07 14:22     ` Javier Martinez Canillas
  -1 siblings, 0 replies; 44+ messages in thread
From: Javier Martinez Canillas @ 2016-11-07 14:22 UTC (permalink / raw)
  To: Pankaj Dubey, linux-samsung-soc, linux-arm-kernel
  Cc: krzk, kgene, thomas.ab, myungjoo.ham, Lee Jones

Hello Pankaj,

On 11/07/2016 07:09 AM, Pankaj Dubey wrote:
> This patch add regmap initialization to use register map
> in max8997-clk device driver
> 
> CC: Lee Jones <lee.jones@linaro.org>
> Signed-off-by: Pankaj Dubey <pankaj.dubey@samsung.com>
> ---

Patch looks good to me. Now that the driver uses regmap, I think you should
be able to get rid of drivers/mfd/max8997-irq.c and use the regmap IRQ chip
like is done in most Maxim PMIC MFD drivers.

That can be done as a follow-up of this series though.

Reviewed-by: Javier Martinez Canillas <javier@osg.samsung.com>

Best regards,
-- 
Javier Martinez Canillas
Open Source Group
Samsung Research America

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

* [PATCH 1/6] mfd: max8997: Initialize max8997 register map
@ 2016-11-07 14:22     ` Javier Martinez Canillas
  0 siblings, 0 replies; 44+ messages in thread
From: Javier Martinez Canillas @ 2016-11-07 14:22 UTC (permalink / raw)
  To: linux-arm-kernel

Hello Pankaj,

On 11/07/2016 07:09 AM, Pankaj Dubey wrote:
> This patch add regmap initialization to use register map
> in max8997-clk device driver
> 
> CC: Lee Jones <lee.jones@linaro.org>
> Signed-off-by: Pankaj Dubey <pankaj.dubey@samsung.com>
> ---

Patch looks good to me. Now that the driver uses regmap, I think you should
be able to get rid of drivers/mfd/max8997-irq.c and use the regmap IRQ chip
like is done in most Maxim PMIC MFD drivers.

That can be done as a follow-up of this series though.

Reviewed-by: Javier Martinez Canillas <javier@osg.samsung.com>

Best regards,
-- 
Javier Martinez Canillas
Open Source Group
Samsung Research America

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

* Re: [PATCH 2/6] dt-bindings: clk: max8997: Add DT binding documentation
  2016-11-07 10:09     ` Pankaj Dubey
@ 2016-11-07 14:47       ` Javier Martinez Canillas
  -1 siblings, 0 replies; 44+ messages in thread
From: Javier Martinez Canillas @ 2016-11-07 14:47 UTC (permalink / raw)
  To: Pankaj Dubey, linux-samsung-soc, linux-arm-kernel
  Cc: krzk, kgene, thomas.ab, myungjoo.ham, Michael Turquette,
	Rob Herring, devicetree, linux-clk

Hello Pankaj,

On 11/07/2016 07:09 AM, Pankaj Dubey wrote:
> Add Device Tree binding documentation for the clocks
> outputs in the Maxim-8997 Power Management IC.
> 
> CC: Michael Turquette <mturquette@baylibre.com>
> CC: Rob Herring <robh+dt@kernel.org>
> CC: devicetree@vger.kernel.org
> CC: linux-clk@vger.kernel.org
> Signed-off-by: Pankaj Dubey <pankaj.dubey@samsung.com>
> ---

Reviewed-by: Javier Martinez Canillas <javier@osg.samsung.com>

Best regards,
-- 
Javier Martinez Canillas
Open Source Group
Samsung Research America

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

* [PATCH 2/6] dt-bindings: clk: max8997: Add DT binding documentation
@ 2016-11-07 14:47       ` Javier Martinez Canillas
  0 siblings, 0 replies; 44+ messages in thread
From: Javier Martinez Canillas @ 2016-11-07 14:47 UTC (permalink / raw)
  To: linux-arm-kernel

Hello Pankaj,

On 11/07/2016 07:09 AM, Pankaj Dubey wrote:
> Add Device Tree binding documentation for the clocks
> outputs in the Maxim-8997 Power Management IC.
> 
> CC: Michael Turquette <mturquette@baylibre.com>
> CC: Rob Herring <robh+dt@kernel.org>
> CC: devicetree at vger.kernel.org
> CC: linux-clk at vger.kernel.org
> Signed-off-by: Pankaj Dubey <pankaj.dubey@samsung.com>
> ---

Reviewed-by: Javier Martinez Canillas <javier@osg.samsung.com>

Best regards,
-- 
Javier Martinez Canillas
Open Source Group
Samsung Research America

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

* Re: [PATCH 3/6] clk: Add driver for Maxim-8997 PMIC clocks
  2016-11-07 10:09     ` Pankaj Dubey
  (?)
@ 2016-11-07 15:01       ` Javier Martinez Canillas
  -1 siblings, 0 replies; 44+ messages in thread
From: Javier Martinez Canillas @ 2016-11-07 15:01 UTC (permalink / raw)
  To: Pankaj Dubey, linux-samsung-soc, linux-arm-kernel
  Cc: devicetree, thomas.ab, kgene, Michael Turquette, krzk,
	Rob Herring, myungjoo.ham, linux-clk

Hello Pankaj,

On 11/07/2016 07:09 AM, Pankaj Dubey wrote:
> The MAX8997 PMIC has 32.786kHz crystal oscillator which provides an
> accurate low frequency clock for MAX8997 internal circuit as well as
> external circuit. This patch adds support for these two clocks.
> 
> CC: Michael Turquette <mturquette@baylibre.com>
> CC: Rob Herring <robh+dt@kernel.org>
> CC: devicetree@vger.kernel.org
> CC: linux-clk@vger.kernel.org
> Signed-off-by: Pankaj Dubey <pankaj.dubey@samsung.com>
> ---

What kernel version are you basing this on? The Maxim common clock code
is going away for v4.9 and instead the clk-max77686 driver supports both
77686 and 77802 clocks. See commit 8ad313fe4e00 ("clk: max77686: Combine
Maxim max77686 and max77802 driver").

Since the 8997 clock IP looks very similar to 77802 AFAICT, you should
also extend the clk-max77686 driver to have 8997 support.

Best regards,
-- 
Javier Martinez Canillas
Open Source Group
Samsung Research America

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

* Re: [PATCH 3/6] clk: Add driver for Maxim-8997 PMIC clocks
@ 2016-11-07 15:01       ` Javier Martinez Canillas
  0 siblings, 0 replies; 44+ messages in thread
From: Javier Martinez Canillas @ 2016-11-07 15:01 UTC (permalink / raw)
  To: Pankaj Dubey, linux-samsung-soc, linux-arm-kernel
  Cc: krzk, kgene, thomas.ab, myungjoo.ham, Michael Turquette,
	Rob Herring, devicetree, linux-clk

Hello Pankaj,

On 11/07/2016 07:09 AM, Pankaj Dubey wrote:
> The MAX8997 PMIC has 32.786kHz crystal oscillator which provides an
> accurate low frequency clock for MAX8997 internal circuit as well as
> external circuit. This patch adds support for these two clocks.
> 
> CC: Michael Turquette <mturquette@baylibre.com>
> CC: Rob Herring <robh+dt@kernel.org>
> CC: devicetree@vger.kernel.org
> CC: linux-clk@vger.kernel.org
> Signed-off-by: Pankaj Dubey <pankaj.dubey@samsung.com>
> ---

What kernel version are you basing this on? The Maxim common clock code
is going away for v4.9 and instead the clk-max77686 driver supports both
77686 and 77802 clocks. See commit 8ad313fe4e00 ("clk: max77686: Combine
Maxim max77686 and max77802 driver").

Since the 8997 clock IP looks very similar to 77802 AFAICT, you should
also extend the clk-max77686 driver to have 8997 support.

Best regards,
-- 
Javier Martinez Canillas
Open Source Group
Samsung Research America

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

* [PATCH 3/6] clk: Add driver for Maxim-8997 PMIC clocks
@ 2016-11-07 15:01       ` Javier Martinez Canillas
  0 siblings, 0 replies; 44+ messages in thread
From: Javier Martinez Canillas @ 2016-11-07 15:01 UTC (permalink / raw)
  To: linux-arm-kernel

Hello Pankaj,

On 11/07/2016 07:09 AM, Pankaj Dubey wrote:
> The MAX8997 PMIC has 32.786kHz crystal oscillator which provides an
> accurate low frequency clock for MAX8997 internal circuit as well as
> external circuit. This patch adds support for these two clocks.
> 
> CC: Michael Turquette <mturquette@baylibre.com>
> CC: Rob Herring <robh+dt@kernel.org>
> CC: devicetree at vger.kernel.org
> CC: linux-clk at vger.kernel.org
> Signed-off-by: Pankaj Dubey <pankaj.dubey@samsung.com>
> ---

What kernel version are you basing this on? The Maxim common clock code
is going away for v4.9 and instead the clk-max77686 driver supports both
77686 and 77802 clocks. See commit 8ad313fe4e00 ("clk: max77686: Combine
Maxim max77686 and max77802 driver").

Since the 8997 clock IP looks very similar to 77802 AFAICT, you should
also extend the clk-max77686 driver to have 8997 support.

Best regards,
-- 
Javier Martinez Canillas
Open Source Group
Samsung Research America

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

* Re: [PATCH 4/6] ARM: dts: Add clock provider specific properties to max8997 node
  2016-11-07 10:09     ` Pankaj Dubey
@ 2016-11-07 15:07         ` Javier Martinez Canillas
  -1 siblings, 0 replies; 44+ messages in thread
From: Javier Martinez Canillas @ 2016-11-07 15:07 UTC (permalink / raw)
  To: Pankaj Dubey, linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r
  Cc: krzk-DgEjT+Ai2ygdnm+yROfE0A, kgene-DgEjT+Ai2ygdnm+yROfE0A,
	thomas.ab-Sze3O3UU22JBDgjK7y7TUQ,
	myungjoo.ham-Sze3O3UU22JBDgjK7y7TUQ, Rob Herring,
	devicetree-u79uwXL29TY76Z2rM5mHXA

Hello Pankaj,

On 11/07/2016 07:09 AM, Pankaj Dubey wrote:
> This patch adds a label and #clock-cells property to device node of
> max8997 PMIC to allow using it as a clock provider.
> 
> CC: Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
> CC: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> Signed-off-by: Pankaj Dubey <pankaj.dubey-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
> ---
>  arch/arm/boot/dts/exynos4210-origen.dts | 3 ++-
>  arch/arm/boot/dts/exynos4210-trats.dts  | 3 ++-
>  2 files changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/arm/boot/dts/exynos4210-origen.dts b/arch/arm/boot/dts/exynos4210-origen.dts
> index cb3a255..6c7ef4e 100644
> --- a/arch/arm/boot/dts/exynos4210-origen.dts
> +++ b/arch/arm/boot/dts/exynos4210-origen.dts
> @@ -147,11 +147,12 @@
>  	pinctrl-0 = <&i2c0_bus>;
>  	pinctrl-names = "default";
>  
> -	max8997_pmic@66 {
> +	max8997: max8997_pmic@66 {

The ePAPR says that the node name should be "somewhat generic, reflecting
the function of the device and not its precise programming model". So I
think this should be instead:

        max8997: pmic@66 {

[...]
  
> -	max8997_pmic@66 {
> +	max8997: max8997_pmic@66 {

Same here.

The rest looks good to me.

Reviewed-by: Javier Martinez Canillas <javier-JPH+aEBZ4P+UEJcrhfAQsw@public.gmane.org>

Best regards,
-- 
Javier Martinez Canillas
Open Source Group
Samsung Research America
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH 4/6] ARM: dts: Add clock provider specific properties to max8997 node
@ 2016-11-07 15:07         ` Javier Martinez Canillas
  0 siblings, 0 replies; 44+ messages in thread
From: Javier Martinez Canillas @ 2016-11-07 15:07 UTC (permalink / raw)
  To: linux-arm-kernel

Hello Pankaj,

On 11/07/2016 07:09 AM, Pankaj Dubey wrote:
> This patch adds a label and #clock-cells property to device node of
> max8997 PMIC to allow using it as a clock provider.
> 
> CC: Rob Herring <robh+dt@kernel.org>
> CC: devicetree at vger.kernel.org
> Signed-off-by: Pankaj Dubey <pankaj.dubey@samsung.com>
> ---
>  arch/arm/boot/dts/exynos4210-origen.dts | 3 ++-
>  arch/arm/boot/dts/exynos4210-trats.dts  | 3 ++-
>  2 files changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/arm/boot/dts/exynos4210-origen.dts b/arch/arm/boot/dts/exynos4210-origen.dts
> index cb3a255..6c7ef4e 100644
> --- a/arch/arm/boot/dts/exynos4210-origen.dts
> +++ b/arch/arm/boot/dts/exynos4210-origen.dts
> @@ -147,11 +147,12 @@
>  	pinctrl-0 = <&i2c0_bus>;
>  	pinctrl-names = "default";
>  
> -	max8997_pmic at 66 {
> +	max8997: max8997_pmic at 66 {

The ePAPR says that the node name should be "somewhat generic, reflecting
the function of the device and not its precise programming model". So I
think this should be instead:

        max8997: pmic at 66 {

[...]
  
> -	max8997_pmic at 66 {
> +	max8997: max8997_pmic at 66 {

Same here.

The rest looks good to me.

Reviewed-by: Javier Martinez Canillas <javier@osg.samsung.com>

Best regards,
-- 
Javier Martinez Canillas
Open Source Group
Samsung Research America

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

* Re: [PATCH 5/6] mfd: max8997: Add max8997-clk name in mfd_cell
  2016-11-07 10:09   ` Pankaj Dubey
@ 2016-11-07 15:08     ` Javier Martinez Canillas
  -1 siblings, 0 replies; 44+ messages in thread
From: Javier Martinez Canillas @ 2016-11-07 15:08 UTC (permalink / raw)
  To: Pankaj Dubey, linux-samsung-soc, linux-arm-kernel
  Cc: krzk, kgene, thomas.ab, myungjoo.ham, Lee Jones

Hello Pankaj,

On 11/07/2016 07:09 AM, Pankaj Dubey wrote:
> This patch add max8997-clk in mfd_cell max8997_devs in order to probe
> max8997-clk device driver.
> 
> CC: Lee Jones <lee.jones@linaro.org>
> Signed-off-by: Pankaj Dubey <pankaj.dubey@samsung.com>
> ---

Reviewed-by: Javier Martinez Canillas <javier@osg.samsung.com>

Best regards,
-- 
Javier Martinez Canillas
Open Source Group
Samsung Research America

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

* [PATCH 5/6] mfd: max8997: Add max8997-clk name in mfd_cell
@ 2016-11-07 15:08     ` Javier Martinez Canillas
  0 siblings, 0 replies; 44+ messages in thread
From: Javier Martinez Canillas @ 2016-11-07 15:08 UTC (permalink / raw)
  To: linux-arm-kernel

Hello Pankaj,

On 11/07/2016 07:09 AM, Pankaj Dubey wrote:
> This patch add max8997-clk in mfd_cell max8997_devs in order to probe
> max8997-clk device driver.
> 
> CC: Lee Jones <lee.jones@linaro.org>
> Signed-off-by: Pankaj Dubey <pankaj.dubey@samsung.com>
> ---

Reviewed-by: Javier Martinez Canillas <javier@osg.samsung.com>

Best regards,
-- 
Javier Martinez Canillas
Open Source Group
Samsung Research America

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

* Re: [PATCH 6/6] ARM: dts: Extend the S3C RTC node with rtc_src clock
  2016-11-07 10:09     ` Pankaj Dubey
@ 2016-11-07 15:09       ` Javier Martinez Canillas
  -1 siblings, 0 replies; 44+ messages in thread
From: Javier Martinez Canillas @ 2016-11-07 15:09 UTC (permalink / raw)
  To: Pankaj Dubey, linux-samsung-soc, linux-arm-kernel
  Cc: krzk, kgene, thomas.ab, myungjoo.ham, Rob Herring, devicetree

Hello Pankaj,

On 11/07/2016 07:09 AM, Pankaj Dubey wrote:
> Extend the S3C RTC node with rtc_src clock so it could be operational.
> The rtc_src clock is provided by MAX8997.
> 
> CC: Rob Herring <robh+dt@kernel.org>
> CC: devicetree@vger.kernel.org
> Signed-off-by: Pankaj Dubey <pankaj.dubey@samsung.com>
> ---

Reviewed-by: Javier Martinez Canillas <javier@osg.samsung.com>

Best regards,
-- 
Javier Martinez Canillas
Open Source Group
Samsung Research America

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

* [PATCH 6/6] ARM: dts: Extend the S3C RTC node with rtc_src clock
@ 2016-11-07 15:09       ` Javier Martinez Canillas
  0 siblings, 0 replies; 44+ messages in thread
From: Javier Martinez Canillas @ 2016-11-07 15:09 UTC (permalink / raw)
  To: linux-arm-kernel

Hello Pankaj,

On 11/07/2016 07:09 AM, Pankaj Dubey wrote:
> Extend the S3C RTC node with rtc_src clock so it could be operational.
> The rtc_src clock is provided by MAX8997.
> 
> CC: Rob Herring <robh+dt@kernel.org>
> CC: devicetree at vger.kernel.org
> Signed-off-by: Pankaj Dubey <pankaj.dubey@samsung.com>
> ---

Reviewed-by: Javier Martinez Canillas <javier@osg.samsung.com>

Best regards,
-- 
Javier Martinez Canillas
Open Source Group
Samsung Research America

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

* Re: [PATCH 1/6] mfd: max8997: Initialize max8997 register map
  2016-11-07 14:22     ` Javier Martinez Canillas
@ 2016-11-07 17:12       ` Pankaj Dubey
  -1 siblings, 0 replies; 44+ messages in thread
From: Pankaj Dubey @ 2016-11-07 17:12 UTC (permalink / raw)
  To: Javier Martinez Canillas
  Cc: linux-samsung-soc, linux-arm-kernel, krzk, Kukjin Kim, thomas.ab,
	myungjoo.ham, Lee Jones

Hi Javier,

On 7 November 2016 at 19:52, Javier Martinez Canillas
<javier@osg.samsung.com> wrote:
> Hello Pankaj,
>
> On 11/07/2016 07:09 AM, Pankaj Dubey wrote:
>> This patch add regmap initialization to use register map
>> in max8997-clk device driver
>>
>> CC: Lee Jones <lee.jones@linaro.org>
>> Signed-off-by: Pankaj Dubey <pankaj.dubey@samsung.com>
>> ---
>
> Patch looks good to me. Now that the driver uses regmap, I think you should
> be able to get rid of drivers/mfd/max8997-irq.c and use the regmap IRQ chip
> like is done in most Maxim PMIC MFD drivers.
>
> That can be done as a follow-up of this series though.
>
> Reviewed-by: Javier Martinez Canillas <javier@osg.samsung.com>
>

Thanks for review.
You are right, that we can get rid of max8997-irq.c by using regmap
IRQ chip, but I would like to take that as a separate follow-up
series.

Thanks,
Pankaj Dubey

> Best regards,
> --
> Javier Martinez Canillas
> Open Source Group
> Samsung Research America
> --
> To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH 1/6] mfd: max8997: Initialize max8997 register map
@ 2016-11-07 17:12       ` Pankaj Dubey
  0 siblings, 0 replies; 44+ messages in thread
From: Pankaj Dubey @ 2016-11-07 17:12 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Javier,

On 7 November 2016 at 19:52, Javier Martinez Canillas
<javier@osg.samsung.com> wrote:
> Hello Pankaj,
>
> On 11/07/2016 07:09 AM, Pankaj Dubey wrote:
>> This patch add regmap initialization to use register map
>> in max8997-clk device driver
>>
>> CC: Lee Jones <lee.jones@linaro.org>
>> Signed-off-by: Pankaj Dubey <pankaj.dubey@samsung.com>
>> ---
>
> Patch looks good to me. Now that the driver uses regmap, I think you should
> be able to get rid of drivers/mfd/max8997-irq.c and use the regmap IRQ chip
> like is done in most Maxim PMIC MFD drivers.
>
> That can be done as a follow-up of this series though.
>
> Reviewed-by: Javier Martinez Canillas <javier@osg.samsung.com>
>

Thanks for review.
You are right, that we can get rid of max8997-irq.c by using regmap
IRQ chip, but I would like to take that as a separate follow-up
series.

Thanks,
Pankaj Dubey

> Best regards,
> --
> Javier Martinez Canillas
> Open Source Group
> Samsung Research America
> --
> To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH 3/6] clk: Add driver for Maxim-8997 PMIC clocks
  2016-11-07 15:01       ` Javier Martinez Canillas
  (?)
@ 2016-11-07 17:20           ` Pankaj Dubey
  -1 siblings, 0 replies; 44+ messages in thread
From: Pankaj Dubey @ 2016-11-07 17:20 UTC (permalink / raw)
  To: Javier Martinez Canillas
  Cc: linux-samsung-soc,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	thomas.ab-Sze3O3UU22JBDgjK7y7TUQ, Kukjin Kim, Michael Turquette,
	Krzysztof Kozlowski, Rob Herring,
	myungjoo.ham-Sze3O3UU22JBDgjK7y7TUQ,
	linux-clk-u79uwXL29TY76Z2rM5mHXA

Hi Javier,

On 7 November 2016 at 20:31, Javier Martinez Canillas
<javier-JPH+aEBZ4P+UEJcrhfAQsw@public.gmane.org> wrote:
> Hello Pankaj,
>
> On 11/07/2016 07:09 AM, Pankaj Dubey wrote:
>> The MAX8997 PMIC has 32.786kHz crystal oscillator which provides an
>> accurate low frequency clock for MAX8997 internal circuit as well as
>> external circuit. This patch adds support for these two clocks.
>>
>> CC: Michael Turquette <mturquette-rdvid1DuHRBWk0Htik3J/w@public.gmane.org>
>> CC: Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
>> CC: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
>> CC: linux-clk-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
>> Signed-off-by: Pankaj Dubey <pankaj.dubey-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
>> ---
>
> What kernel version are you basing this on? The Maxim common clock code

This patch series, I have prepared on Krzysztof's for-next which is 4.9-rc1,

> is going away for v4.9 and instead the clk-max77686 driver supports both
> 77686 and 77802 clocks. See commit 8ad313fe4e00 ("clk: max77686: Combine
> Maxim max77686 and max77802 driver").
>
> Since the 8997 clock IP looks very similar to 77802 AFAICT, you should
> also extend the clk-max77686 driver to have 8997 support.
>

I was not aware of this change. I will check this and if I can
reuse/extend max77686 for 8997 I will do it.

Thanks,
Pankaj Dubey

> Best regards,
> --
> Javier Martinez Canillas
> Open Source Group
> Samsung Research America
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH 3/6] clk: Add driver for Maxim-8997 PMIC clocks
@ 2016-11-07 17:20           ` Pankaj Dubey
  0 siblings, 0 replies; 44+ messages in thread
From: Pankaj Dubey @ 2016-11-07 17:20 UTC (permalink / raw)
  To: Javier Martinez Canillas
  Cc: linux-samsung-soc, linux-arm-kernel, devicetree, thomas.ab,
	Kukjin Kim, Michael Turquette, Krzysztof Kozlowski, Rob Herring,
	myungjoo.ham, linux-clk

Hi Javier,

On 7 November 2016 at 20:31, Javier Martinez Canillas
<javier@osg.samsung.com> wrote:
> Hello Pankaj,
>
> On 11/07/2016 07:09 AM, Pankaj Dubey wrote:
>> The MAX8997 PMIC has 32.786kHz crystal oscillator which provides an
>> accurate low frequency clock for MAX8997 internal circuit as well as
>> external circuit. This patch adds support for these two clocks.
>>
>> CC: Michael Turquette <mturquette@baylibre.com>
>> CC: Rob Herring <robh+dt@kernel.org>
>> CC: devicetree@vger.kernel.org
>> CC: linux-clk@vger.kernel.org
>> Signed-off-by: Pankaj Dubey <pankaj.dubey@samsung.com>
>> ---
>
> What kernel version are you basing this on? The Maxim common clock code

This patch series, I have prepared on Krzysztof's for-next which is 4.9-rc1,

> is going away for v4.9 and instead the clk-max77686 driver supports both
> 77686 and 77802 clocks. See commit 8ad313fe4e00 ("clk: max77686: Combine
> Maxim max77686 and max77802 driver").
>
> Since the 8997 clock IP looks very similar to 77802 AFAICT, you should
> also extend the clk-max77686 driver to have 8997 support.
>

I was not aware of this change. I will check this and if I can
reuse/extend max77686 for 8997 I will do it.

Thanks,
Pankaj Dubey

> Best regards,
> --
> Javier Martinez Canillas
> Open Source Group
> Samsung Research America
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 3/6] clk: Add driver for Maxim-8997 PMIC clocks
@ 2016-11-07 17:20           ` Pankaj Dubey
  0 siblings, 0 replies; 44+ messages in thread
From: Pankaj Dubey @ 2016-11-07 17:20 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Javier,

On 7 November 2016 at 20:31, Javier Martinez Canillas
<javier@osg.samsung.com> wrote:
> Hello Pankaj,
>
> On 11/07/2016 07:09 AM, Pankaj Dubey wrote:
>> The MAX8997 PMIC has 32.786kHz crystal oscillator which provides an
>> accurate low frequency clock for MAX8997 internal circuit as well as
>> external circuit. This patch adds support for these two clocks.
>>
>> CC: Michael Turquette <mturquette@baylibre.com>
>> CC: Rob Herring <robh+dt@kernel.org>
>> CC: devicetree at vger.kernel.org
>> CC: linux-clk at vger.kernel.org
>> Signed-off-by: Pankaj Dubey <pankaj.dubey@samsung.com>
>> ---
>
> What kernel version are you basing this on? The Maxim common clock code

This patch series, I have prepared on Krzysztof's for-next which is 4.9-rc1,

> is going away for v4.9 and instead the clk-max77686 driver supports both
> 77686 and 77802 clocks. See commit 8ad313fe4e00 ("clk: max77686: Combine
> Maxim max77686 and max77802 driver").
>
> Since the 8997 clock IP looks very similar to 77802 AFAICT, you should
> also extend the clk-max77686 driver to have 8997 support.
>

I was not aware of this change. I will check this and if I can
reuse/extend max77686 for 8997 I will do it.

Thanks,
Pankaj Dubey

> Best regards,
> --
> Javier Martinez Canillas
> Open Source Group
> Samsung Research America
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 0/6] Add support for MAX8997 Clock Driver
  2016-11-07 10:09 ` Pankaj Dubey
@ 2016-11-07 17:27   ` Krzysztof Kozlowski
  -1 siblings, 0 replies; 44+ messages in thread
From: Krzysztof Kozlowski @ 2016-11-07 17:27 UTC (permalink / raw)
  To: Pankaj Dubey
  Cc: linux-samsung-soc, linux-arm-kernel, krzk, javier, kgene,
	thomas.ab, myungjoo.ham, m.szyprowski

On Mon, Nov 07, 2016 at 03:39:30PM +0530, Pankaj Dubey wrote:
> During recent test on Exynos4210 based Origen board, I observed
> RTC1 probe is failing giving following error message:
> 
> [    2.195817] s3c-rtc 10070000.rtc: failed to find rtc source clock
> [    2.200475] s3c-rtc: probe of 10070000.rtc failed with error -2
> [    2.206597] i2c /dev entries driver
> 
> This is mainly because S3C-RTC expects two clocks "rtc" and "rtc_src".
> In case of Origen board this second clock is supplied by MAX8997 clock
> oscillator.
> This patch series modified MAX8997 MFD driver for supporting regmap, and 
> adds max8997-clk driver. Also it documentation where-ever required and
> extends RTC node in exynos4210-origen.dts for supporting both clocks.
> 
> After this patch series, RTC is getting probed properly on Origen board.
> 
> This patch series is tested for SMP boot on Origen board.

No need to re-invent the wheel:
https://lkml.org/lkml/2016/6/17/57
http://lists.infradead.org/pipermail/linux-arm-kernel/2016-June/437113.html

I won't be sending updates for these patches. Feel free to continue the
work.

BR,
Krzysztof

> 
> Pankaj Dubey (6):
>   mfd: max8997: Initialize max8997 register map
>   dt-bindings: clk: max8997: Add DT binding documentation
>   clk: Add driver for Maxim-8997 PMIC clocks
>   ARM: dts: Add clock provider specific properties to max8997 node
>   mfd: max8997: Add max8997-clk name in mfd_cell
>   ARM: dts: Extend the S3C RTC node with rtc_src clock
> 
>  .../devicetree/bindings/clock/maxim,max8997.txt    | 44 +++++++++++++
>  .../bindings/regulator/max8997-regulator.txt       |  3 +
>  arch/arm/boot/dts/exynos4210-origen.dts            |  6 +-
>  arch/arm/boot/dts/exynos4210-trats.dts             |  3 +-
>  drivers/clk/Kconfig                                | 10 +++
>  drivers/clk/Makefile                               |  1 +
>  drivers/clk/clk-max8997.c                          | 76 ++++++++++++++++++++++
>  drivers/mfd/max8997.c                              | 15 +++++
>  include/dt-bindings/clock/maxim,max8997.h          | 23 +++++++
>  include/linux/mfd/max8997-private.h                |  3 +
>  10 files changed, 182 insertions(+), 2 deletions(-)
>  create mode 100644 Documentation/devicetree/bindings/clock/maxim,max8997.txt
>  create mode 100644 drivers/clk/clk-max8997.c
>  create mode 100644 include/dt-bindings/clock/maxim,max8997.h
> 
> -- 
> 2.7.4
> 

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

* [PATCH 0/6] Add support for MAX8997 Clock Driver
@ 2016-11-07 17:27   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 44+ messages in thread
From: Krzysztof Kozlowski @ 2016-11-07 17:27 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Nov 07, 2016 at 03:39:30PM +0530, Pankaj Dubey wrote:
> During recent test on Exynos4210 based Origen board, I observed
> RTC1 probe is failing giving following error message:
> 
> [    2.195817] s3c-rtc 10070000.rtc: failed to find rtc source clock
> [    2.200475] s3c-rtc: probe of 10070000.rtc failed with error -2
> [    2.206597] i2c /dev entries driver
> 
> This is mainly because S3C-RTC expects two clocks "rtc" and "rtc_src".
> In case of Origen board this second clock is supplied by MAX8997 clock
> oscillator.
> This patch series modified MAX8997 MFD driver for supporting regmap, and 
> adds max8997-clk driver. Also it documentation where-ever required and
> extends RTC node in exynos4210-origen.dts for supporting both clocks.
> 
> After this patch series, RTC is getting probed properly on Origen board.
> 
> This patch series is tested for SMP boot on Origen board.

No need to re-invent the wheel:
https://lkml.org/lkml/2016/6/17/57
http://lists.infradead.org/pipermail/linux-arm-kernel/2016-June/437113.html

I won't be sending updates for these patches. Feel free to continue the
work.

BR,
Krzysztof

> 
> Pankaj Dubey (6):
>   mfd: max8997: Initialize max8997 register map
>   dt-bindings: clk: max8997: Add DT binding documentation
>   clk: Add driver for Maxim-8997 PMIC clocks
>   ARM: dts: Add clock provider specific properties to max8997 node
>   mfd: max8997: Add max8997-clk name in mfd_cell
>   ARM: dts: Extend the S3C RTC node with rtc_src clock
> 
>  .../devicetree/bindings/clock/maxim,max8997.txt    | 44 +++++++++++++
>  .../bindings/regulator/max8997-regulator.txt       |  3 +
>  arch/arm/boot/dts/exynos4210-origen.dts            |  6 +-
>  arch/arm/boot/dts/exynos4210-trats.dts             |  3 +-
>  drivers/clk/Kconfig                                | 10 +++
>  drivers/clk/Makefile                               |  1 +
>  drivers/clk/clk-max8997.c                          | 76 ++++++++++++++++++++++
>  drivers/mfd/max8997.c                              | 15 +++++
>  include/dt-bindings/clock/maxim,max8997.h          | 23 +++++++
>  include/linux/mfd/max8997-private.h                |  3 +
>  10 files changed, 182 insertions(+), 2 deletions(-)
>  create mode 100644 Documentation/devicetree/bindings/clock/maxim,max8997.txt
>  create mode 100644 drivers/clk/clk-max8997.c
>  create mode 100644 include/dt-bindings/clock/maxim,max8997.h
> 
> -- 
> 2.7.4
> 

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

* Re: [PATCH 3/6] clk: Add driver for Maxim-8997 PMIC clocks
  2016-11-07 10:09     ` Pankaj Dubey
@ 2016-11-07 17:41       ` Krzysztof Kozlowski
  -1 siblings, 0 replies; 44+ messages in thread
From: Krzysztof Kozlowski @ 2016-11-07 17:41 UTC (permalink / raw)
  To: Pankaj Dubey
  Cc: linux-samsung-soc, linux-arm-kernel, krzk, javier, kgene,
	thomas.ab, myungjoo.ham, Michael Turquette, Rob Herring,
	devicetree, linux-clk

On Mon, Nov 07, 2016 at 03:39:33PM +0530, Pankaj Dubey wrote:
> The MAX8997 PMIC has 32.786kHz crystal oscillator which provides an
> accurate low frequency clock for MAX8997 internal circuit as well as
> external circuit. This patch adds support for these two clocks.
> 
> CC: Michael Turquette <mturquette@baylibre.com>
> CC: Rob Herring <robh+dt@kernel.org>
> CC: devicetree@vger.kernel.org
> CC: linux-clk@vger.kernel.org
> Signed-off-by: Pankaj Dubey <pankaj.dubey@samsung.com>
> ---
>  drivers/clk/Kconfig                       | 10 ++++
>  drivers/clk/Makefile                      |  1 +
>  drivers/clk/clk-max8997.c                 | 76 +++++++++++++++++++++++++++++++
>  include/dt-bindings/clock/maxim,max8997.h | 23 ++++++++++

You need to split the dt-bindings header into separate one so others
could pull it.  Please also mention the dependencies between patches in
cover letter, because it does not look like it could be applied as is.

Best regards,
Krzysztof

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

* [PATCH 3/6] clk: Add driver for Maxim-8997 PMIC clocks
@ 2016-11-07 17:41       ` Krzysztof Kozlowski
  0 siblings, 0 replies; 44+ messages in thread
From: Krzysztof Kozlowski @ 2016-11-07 17:41 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Nov 07, 2016 at 03:39:33PM +0530, Pankaj Dubey wrote:
> The MAX8997 PMIC has 32.786kHz crystal oscillator which provides an
> accurate low frequency clock for MAX8997 internal circuit as well as
> external circuit. This patch adds support for these two clocks.
> 
> CC: Michael Turquette <mturquette@baylibre.com>
> CC: Rob Herring <robh+dt@kernel.org>
> CC: devicetree at vger.kernel.org
> CC: linux-clk at vger.kernel.org
> Signed-off-by: Pankaj Dubey <pankaj.dubey@samsung.com>
> ---
>  drivers/clk/Kconfig                       | 10 ++++
>  drivers/clk/Makefile                      |  1 +
>  drivers/clk/clk-max8997.c                 | 76 +++++++++++++++++++++++++++++++
>  include/dt-bindings/clock/maxim,max8997.h | 23 ++++++++++

You need to split the dt-bindings header into separate one so others
could pull it.  Please also mention the dependencies between patches in
cover letter, because it does not look like it could be applied as is.

Best regards,
Krzysztof

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

* Re: [PATCH 6/6] ARM: dts: Extend the S3C RTC node with rtc_src clock
  2016-11-07 10:09     ` Pankaj Dubey
@ 2016-11-07 17:44       ` Krzysztof Kozlowski
  -1 siblings, 0 replies; 44+ messages in thread
From: Krzysztof Kozlowski @ 2016-11-07 17:44 UTC (permalink / raw)
  To: Pankaj Dubey
  Cc: linux-samsung-soc, linux-arm-kernel, krzk, javier, kgene,
	thomas.ab, myungjoo.ham, Rob Herring, devicetree

On Mon, Nov 07, 2016 at 03:39:36PM +0530, Pankaj Dubey wrote:
> Extend the S3C RTC node with rtc_src clock so it could be operational.
> The rtc_src clock is provided by MAX8997.
> 
> CC: Rob Herring <robh+dt@kernel.org>
> CC: devicetree@vger.kernel.org
> Signed-off-by: Pankaj Dubey <pankaj.dubey@samsung.com>
> ---
>  arch/arm/boot/dts/exynos4210-origen.dts | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/exynos4210-origen.dts b/arch/arm/boot/dts/exynos4210-origen.dts
> index 6c7ef4e..4cac9b6 100644
> --- a/arch/arm/boot/dts/exynos4210-origen.dts
> +++ b/arch/arm/boot/dts/exynos4210-origen.dts
> @@ -18,6 +18,7 @@
>  #include "exynos4210.dtsi"
>  #include <dt-bindings/gpio/gpio.h>
>  #include <dt-bindings/input/input.h>
> +#include <dt-bindings/clock/maxim,max8997.h>

Just a nit: put the system-wide includes in alphabetical order, so
clock, gpio and finally input. It helps reducing conflicting changes
(when more people add includes in the same time).

Beside that, looks good, but it requires a dt-bindings in separate patch
so I could pull it.

Best regards,
Krzysztof

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

* [PATCH 6/6] ARM: dts: Extend the S3C RTC node with rtc_src clock
@ 2016-11-07 17:44       ` Krzysztof Kozlowski
  0 siblings, 0 replies; 44+ messages in thread
From: Krzysztof Kozlowski @ 2016-11-07 17:44 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Nov 07, 2016 at 03:39:36PM +0530, Pankaj Dubey wrote:
> Extend the S3C RTC node with rtc_src clock so it could be operational.
> The rtc_src clock is provided by MAX8997.
> 
> CC: Rob Herring <robh+dt@kernel.org>
> CC: devicetree at vger.kernel.org
> Signed-off-by: Pankaj Dubey <pankaj.dubey@samsung.com>
> ---
>  arch/arm/boot/dts/exynos4210-origen.dts | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/exynos4210-origen.dts b/arch/arm/boot/dts/exynos4210-origen.dts
> index 6c7ef4e..4cac9b6 100644
> --- a/arch/arm/boot/dts/exynos4210-origen.dts
> +++ b/arch/arm/boot/dts/exynos4210-origen.dts
> @@ -18,6 +18,7 @@
>  #include "exynos4210.dtsi"
>  #include <dt-bindings/gpio/gpio.h>
>  #include <dt-bindings/input/input.h>
> +#include <dt-bindings/clock/maxim,max8997.h>

Just a nit: put the system-wide includes in alphabetical order, so
clock, gpio and finally input. It helps reducing conflicting changes
(when more people add includes in the same time).

Beside that, looks good, but it requires a dt-bindings in separate patch
so I could pull it.

Best regards,
Krzysztof

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

* Re: [PATCH 2/6] dt-bindings: clk: max8997: Add DT binding documentation
  2016-11-07 10:09     ` Pankaj Dubey
@ 2016-11-14 16:15       ` Rob Herring
  -1 siblings, 0 replies; 44+ messages in thread
From: Rob Herring @ 2016-11-14 16:15 UTC (permalink / raw)
  To: Pankaj Dubey
  Cc: linux-samsung-soc, linux-arm-kernel, krzk, javier, kgene,
	thomas.ab, myungjoo.ham, Michael Turquette, devicetree,
	linux-clk

On Mon, Nov 07, 2016 at 03:39:32PM +0530, Pankaj Dubey wrote:
> Add Device Tree binding documentation for the clocks
> outputs in the Maxim-8997 Power Management IC.
> 
> CC: Michael Turquette <mturquette@baylibre.com>
> CC: Rob Herring <robh+dt@kernel.org>
> CC: devicetree@vger.kernel.org
> CC: linux-clk@vger.kernel.org
> Signed-off-by: Pankaj Dubey <pankaj.dubey@samsung.com>
> ---
>  .../devicetree/bindings/clock/maxim,max8997.txt    | 44 ++++++++++++++++++++++
>  .../bindings/regulator/max8997-regulator.txt       |  3 ++
>  2 files changed, 47 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/clock/maxim,max8997.txt
> 
> diff --git a/Documentation/devicetree/bindings/clock/maxim,max8997.txt b/Documentation/devicetree/bindings/clock/maxim,max8997.txt
> new file mode 100644
> index 0000000..d2e2a74
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/clock/maxim,max8997.txt
> @@ -0,0 +1,44 @@
> +Binding for Maxim MAX8997 32k clock generator block
> +
> +This is a part of device tree bindings of MAX8997 multi-function device.
> +More information can be found in bindings/regulator/max8997-regulator.txt file.
> +
> +The MAX8997 contains two 32.768khz clock outputs that can be controlled
> +(gated/ungated) over I2C.
> +
> +Following properties should be presend in main device node of the MFD chip.
> +
> +Required properties:
> +
> +- #clock-cells: from common clock binding; shall be set to 1.
> +
> +Optional properties:
> +- clock-output-names: From common clock binding.
> +
> +Each clock is assigned an identifier and client nodes can use this identifier
> +to specify the clock which they consume. Following indices are allowed:
> +    - 0: 32khz_ap clock,
> +    - 1: 32khz_cp clock,
> +
> +Clocks are defined as preprocessor macros in dt-bindings/clock/maxim,max8997.h
> +header and can be used in device tree sources.
> +
> +Example: Node of the MFD chip
> +
> +	max8997: max8997_pmic@66 {

pmic@66 {

With that:

Acked-by: Rob Herring <robh@kernel.org>

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

* [PATCH 2/6] dt-bindings: clk: max8997: Add DT binding documentation
@ 2016-11-14 16:15       ` Rob Herring
  0 siblings, 0 replies; 44+ messages in thread
From: Rob Herring @ 2016-11-14 16:15 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Nov 07, 2016 at 03:39:32PM +0530, Pankaj Dubey wrote:
> Add Device Tree binding documentation for the clocks
> outputs in the Maxim-8997 Power Management IC.
> 
> CC: Michael Turquette <mturquette@baylibre.com>
> CC: Rob Herring <robh+dt@kernel.org>
> CC: devicetree at vger.kernel.org
> CC: linux-clk at vger.kernel.org
> Signed-off-by: Pankaj Dubey <pankaj.dubey@samsung.com>
> ---
>  .../devicetree/bindings/clock/maxim,max8997.txt    | 44 ++++++++++++++++++++++
>  .../bindings/regulator/max8997-regulator.txt       |  3 ++
>  2 files changed, 47 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/clock/maxim,max8997.txt
> 
> diff --git a/Documentation/devicetree/bindings/clock/maxim,max8997.txt b/Documentation/devicetree/bindings/clock/maxim,max8997.txt
> new file mode 100644
> index 0000000..d2e2a74
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/clock/maxim,max8997.txt
> @@ -0,0 +1,44 @@
> +Binding for Maxim MAX8997 32k clock generator block
> +
> +This is a part of device tree bindings of MAX8997 multi-function device.
> +More information can be found in bindings/regulator/max8997-regulator.txt file.
> +
> +The MAX8997 contains two 32.768khz clock outputs that can be controlled
> +(gated/ungated) over I2C.
> +
> +Following properties should be presend in main device node of the MFD chip.
> +
> +Required properties:
> +
> +- #clock-cells: from common clock binding; shall be set to 1.
> +
> +Optional properties:
> +- clock-output-names: From common clock binding.
> +
> +Each clock is assigned an identifier and client nodes can use this identifier
> +to specify the clock which they consume. Following indices are allowed:
> +    - 0: 32khz_ap clock,
> +    - 1: 32khz_cp clock,
> +
> +Clocks are defined as preprocessor macros in dt-bindings/clock/maxim,max8997.h
> +header and can be used in device tree sources.
> +
> +Example: Node of the MFD chip
> +
> +	max8997: max8997_pmic at 66 {

pmic at 66 {

With that:

Acked-by: Rob Herring <robh@kernel.org>

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

* Re: [PATCH 2/6] dt-bindings: clk: max8997: Add DT binding documentation
  2016-11-14 16:15       ` Rob Herring
@ 2016-11-17  2:17         ` pankaj.dubey
  -1 siblings, 0 replies; 44+ messages in thread
From: pankaj.dubey @ 2016-11-17  2:17 UTC (permalink / raw)
  To: Rob Herring
  Cc: linux-samsung-soc, linux-arm-kernel, krzk, javier, kgene,
	thomas.ab, myungjoo.ham, Michael Turquette, devicetree,
	linux-clk

Hi Rob,

On Monday 14 November 2016 09:45 PM, Rob Herring wrote:
> On Mon, Nov 07, 2016 at 03:39:32PM +0530, Pankaj Dubey wrote:
>> Add Device Tree binding documentation for the clocks
>> outputs in the Maxim-8997 Power Management IC.
>>
>> CC: Michael Turquette <mturquette@baylibre.com>
>> CC: Rob Herring <robh+dt@kernel.org>
>> CC: devicetree@vger.kernel.org
>> CC: linux-clk@vger.kernel.org
>> Signed-off-by: Pankaj Dubey <pankaj.dubey@samsung.com>
>> ---
>>  .../devicetree/bindings/clock/maxim,max8997.txt    | 44 ++++++++++++++++++++++
>>  .../bindings/regulator/max8997-regulator.txt       |  3 ++
>>  2 files changed, 47 insertions(+)
>>  create mode 100644 Documentation/devicetree/bindings/clock/maxim,max8997.txt
>>
>> diff --git a/Documentation/devicetree/bindings/clock/maxim,max8997.txt b/Documentation/devicetree/bindings/clock/maxim,max8997.txt
>> new file mode 100644
>> index 0000000..d2e2a74
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/clock/maxim,max8997.txt
>> @@ -0,0 +1,44 @@
>> +Binding for Maxim MAX8997 32k clock generator block
>> +
>> +This is a part of device tree bindings of MAX8997 multi-function device.
>> +More information can be found in bindings/regulator/max8997-regulator.txt file.
>> +
>> +The MAX8997 contains two 32.768khz clock outputs that can be controlled
>> +(gated/ungated) over I2C.
>> +
>> +Following properties should be presend in main device node of the MFD chip.
>> +
>> +Required properties:
>> +
>> +- #clock-cells: from common clock binding; shall be set to 1.
>> +
>> +Optional properties:
>> +- clock-output-names: From common clock binding.
>> +
>> +Each clock is assigned an identifier and client nodes can use this identifier
>> +to specify the clock which they consume. Following indices are allowed:
>> +    - 0: 32khz_ap clock,
>> +    - 1: 32khz_cp clock,
>> +
>> +Clocks are defined as preprocessor macros in dt-bindings/clock/maxim,max8997.h
>> +header and can be used in device tree sources.
>> +
>> +Example: Node of the MFD chip
>> +
>> +	max8997: max8997_pmic@66 {
> 
> pmic@66 {
> 
> With that:
> 
> Acked-by: Rob Herring <robh@kernel.org>
> 
> 

Thanks for review and ack.
With above mentioned change I will post v2 soon.

Thanks,
Pankaj Dubey

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

* [PATCH 2/6] dt-bindings: clk: max8997: Add DT binding documentation
@ 2016-11-17  2:17         ` pankaj.dubey
  0 siblings, 0 replies; 44+ messages in thread
From: pankaj.dubey @ 2016-11-17  2:17 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Rob,

On Monday 14 November 2016 09:45 PM, Rob Herring wrote:
> On Mon, Nov 07, 2016 at 03:39:32PM +0530, Pankaj Dubey wrote:
>> Add Device Tree binding documentation for the clocks
>> outputs in the Maxim-8997 Power Management IC.
>>
>> CC: Michael Turquette <mturquette@baylibre.com>
>> CC: Rob Herring <robh+dt@kernel.org>
>> CC: devicetree at vger.kernel.org
>> CC: linux-clk at vger.kernel.org
>> Signed-off-by: Pankaj Dubey <pankaj.dubey@samsung.com>
>> ---
>>  .../devicetree/bindings/clock/maxim,max8997.txt    | 44 ++++++++++++++++++++++
>>  .../bindings/regulator/max8997-regulator.txt       |  3 ++
>>  2 files changed, 47 insertions(+)
>>  create mode 100644 Documentation/devicetree/bindings/clock/maxim,max8997.txt
>>
>> diff --git a/Documentation/devicetree/bindings/clock/maxim,max8997.txt b/Documentation/devicetree/bindings/clock/maxim,max8997.txt
>> new file mode 100644
>> index 0000000..d2e2a74
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/clock/maxim,max8997.txt
>> @@ -0,0 +1,44 @@
>> +Binding for Maxim MAX8997 32k clock generator block
>> +
>> +This is a part of device tree bindings of MAX8997 multi-function device.
>> +More information can be found in bindings/regulator/max8997-regulator.txt file.
>> +
>> +The MAX8997 contains two 32.768khz clock outputs that can be controlled
>> +(gated/ungated) over I2C.
>> +
>> +Following properties should be presend in main device node of the MFD chip.
>> +
>> +Required properties:
>> +
>> +- #clock-cells: from common clock binding; shall be set to 1.
>> +
>> +Optional properties:
>> +- clock-output-names: From common clock binding.
>> +
>> +Each clock is assigned an identifier and client nodes can use this identifier
>> +to specify the clock which they consume. Following indices are allowed:
>> +    - 0: 32khz_ap clock,
>> +    - 1: 32khz_cp clock,
>> +
>> +Clocks are defined as preprocessor macros in dt-bindings/clock/maxim,max8997.h
>> +header and can be used in device tree sources.
>> +
>> +Example: Node of the MFD chip
>> +
>> +	max8997: max8997_pmic at 66 {
> 
> pmic at 66 {
> 
> With that:
> 
> Acked-by: Rob Herring <robh@kernel.org>
> 
> 

Thanks for review and ack.
With above mentioned change I will post v2 soon.

Thanks,
Pankaj Dubey

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

end of thread, other threads:[~2016-11-17  2:17 UTC | newest]

Thread overview: 44+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-07 10:09 [PATCH 0/6] Add support for MAX8997 Clock Driver Pankaj Dubey
2016-11-07 10:09 ` Pankaj Dubey
2016-11-07 10:09 ` [PATCH 1/6] mfd: max8997: Initialize max8997 register map Pankaj Dubey
2016-11-07 10:09   ` Pankaj Dubey
2016-11-07 14:22   ` Javier Martinez Canillas
2016-11-07 14:22     ` Javier Martinez Canillas
2016-11-07 17:12     ` Pankaj Dubey
2016-11-07 17:12       ` Pankaj Dubey
2016-11-07 10:09 ` [PATCH 5/6] mfd: max8997: Add max8997-clk name in mfd_cell Pankaj Dubey
2016-11-07 10:09   ` Pankaj Dubey
2016-11-07 15:08   ` Javier Martinez Canillas
2016-11-07 15:08     ` Javier Martinez Canillas
     [not found] ` <1478513376-14307-1-git-send-email-pankaj.dubey-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2016-11-07 10:09   ` [PATCH 2/6] dt-bindings: clk: max8997: Add DT binding documentation Pankaj Dubey
2016-11-07 10:09     ` Pankaj Dubey
2016-11-07 10:09     ` Pankaj Dubey
2016-11-07 14:47     ` Javier Martinez Canillas
2016-11-07 14:47       ` Javier Martinez Canillas
2016-11-14 16:15     ` Rob Herring
2016-11-14 16:15       ` Rob Herring
2016-11-17  2:17       ` pankaj.dubey
2016-11-17  2:17         ` pankaj.dubey
2016-11-07 10:09   ` [PATCH 3/6] clk: Add driver for Maxim-8997 PMIC clocks Pankaj Dubey
2016-11-07 10:09     ` Pankaj Dubey
2016-11-07 10:09     ` Pankaj Dubey
2016-11-07 15:01     ` Javier Martinez Canillas
2016-11-07 15:01       ` Javier Martinez Canillas
2016-11-07 15:01       ` Javier Martinez Canillas
     [not found]       ` <63750c2f-35cb-91ab-276b-c788f51081cb-JPH+aEBZ4P+UEJcrhfAQsw@public.gmane.org>
2016-11-07 17:20         ` Pankaj Dubey
2016-11-07 17:20           ` Pankaj Dubey
2016-11-07 17:20           ` Pankaj Dubey
2016-11-07 17:41     ` Krzysztof Kozlowski
2016-11-07 17:41       ` Krzysztof Kozlowski
2016-11-07 10:09   ` [PATCH 4/6] ARM: dts: Add clock provider specific properties to max8997 node Pankaj Dubey
2016-11-07 10:09     ` Pankaj Dubey
     [not found]     ` <1478513376-14307-5-git-send-email-pankaj.dubey-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2016-11-07 15:07       ` Javier Martinez Canillas
2016-11-07 15:07         ` Javier Martinez Canillas
2016-11-07 10:09   ` [PATCH 6/6] ARM: dts: Extend the S3C RTC node with rtc_src clock Pankaj Dubey
2016-11-07 10:09     ` Pankaj Dubey
2016-11-07 15:09     ` Javier Martinez Canillas
2016-11-07 15:09       ` Javier Martinez Canillas
2016-11-07 17:44     ` Krzysztof Kozlowski
2016-11-07 17:44       ` Krzysztof Kozlowski
2016-11-07 17:27 ` [PATCH 0/6] Add support for MAX8997 Clock Driver Krzysztof Kozlowski
2016-11-07 17:27   ` Krzysztof Kozlowski

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.