linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 00/11] PM / devfreq: Remove deprecated 'devfreq' and 'devfreq-events' properties
       [not found] <CGME20191220001759epcas1p131a41a619847d80c64470f7c1920121f@epcas1p1.samsung.com>
@ 2019-12-20  0:24 ` Chanwoo Choi
       [not found]   ` <CGME20191220001759epcas1p4bbbcf6a84c09229db0ddae86be294405@epcas1p4.samsung.com>
                     ` (10 more replies)
  0 siblings, 11 replies; 21+ messages in thread
From: Chanwoo Choi @ 2019-12-20  0:24 UTC (permalink / raw)
  To: robh+dt, krzk, heiko, leonard.crestez, lukasz.luba
  Cc: mark.rutland, a.swigon, m.szyprowski, kgene, cw00.choi,
	myungjoo.ham, kyungmin.park, linux-pm, linux-samsung-soc,
	devicetree, linux-arm-kernel, linux-kernel, linux-rockchip,
	Chanwoo Choi

From: Chanwoo Choi <cw00.choi@samsun.com>

The devfreq and devfreq-event subsystem provided the following two properties:
- Provide 'devfreq' property in order to get the parent devfreq device
  by devfreq_get_devfreq_by_phandle() if devfreq device use passive governor.
- Provide 'devfreq-events' property in order to get the devfreq-event device
  by devfreq_event_get_edev_by_phandle().

But, two properties name is not proper expressing the h/w
and 'devfreq' word is name of linux subsystem instead of any h/w name.

Hand over the rights for deciding the property name for getting
the devfreq/devfreq-event device on devicetree, to each devfreq driver.

So, replace 'devfreq' and 'devfreq-events' property with following property
name according to each devfreq driver:
--------------------------------------------------------------------
Old property  | New property       | Device driver name            |
--------------------------------------------------------------------
devfreq       | exynos,parent-bus  | exynos-bus.c                  |
              |                    |                               |
devfreq-events| exynos,ppmu-device | exynos-bus.c, exynos5422-dmc.c|
              | rockchip,dfi-device| rk3399_dmc.c                  |
--------------------------------------------------------------------

Changes from v1:
- Edit function name by removing '_by_node' postfix.
- Split out dt-binding patch to make it the separte patch.j
- Add Lukasz's tag for exynos5422-dmc

Chanwoo Choi (10):
  PM / devfreq: Remove devfreq_get_devfreq_by_phandle function
  PM / devfreq: event: Add devfreq_event_get_edev_by_node function
  dt-bindings: devfreq: exynos-bus: Replace deprecated 'devfreq' and 'devfreq-events' property
  dt-bindings: devfreq: rk3399_dmc:  Replace deprecated 'devfreq-events' property
  dt-bindings: memory: exynos5422-dmc: Replace the deprecated 'devfreq-events' property
  PM / devfreq: exynos-bus: Replace the deprecated 'devfreq' and 'devfreq-events' property
  PM / devfreq: rk3399_dmc: Replace the deprecated 'devfreq-events' property
  memory: samsung: exynos5422-dmc: Replace the deprecated 'devfreq-events' property
  ARM: dts: exynos: Replace deprecated property for Exynos bus and DMC
  arm64: dts: exynos: Replace deprecated property for Exynos bus on TM2

Leonard Crestez (1):
  PM / devfreq: Add devfreq_get_devfreq_by_node function

 .../bindings/devfreq/exynos-bus.txt           | 22 +++----
 .../bindings/devfreq/rk3399_dmc.txt           |  4 +-
 .../memory-controllers/exynos5422-dmc.txt     |  8 +--
 arch/arm/boot/dts/exynos3250-monk.dts         |  2 +-
 arch/arm/boot/dts/exynos3250-rinato.dts       | 18 +++---
 .../boot/dts/exynos4412-itop-scp-core.dtsi    | 16 ++---
 arch/arm/boot/dts/exynos4412-midas.dtsi       | 18 +++---
 .../boot/dts/exynos4412-odroid-common.dtsi    | 18 +++---
 arch/arm/boot/dts/exynos5422-odroid-core.dtsi | 34 +++++------
 .../dts/exynos/exynos5433-tm2-common.dtsi     | 20 +++----
 drivers/devfreq/devfreq-event.c               | 53 +++--------------
 drivers/devfreq/devfreq.c                     | 25 +++-----
 drivers/devfreq/exynos-bus.c                  | 58 ++++++++++++++++---
 drivers/devfreq/rk3399_dmc.c                  | 16 ++++-
 drivers/memory/samsung/exynos5422-dmc.c       | 37 ++++++++++--
 include/linux/devfreq-event.h                 | 14 ++---
 include/linux/devfreq.h                       |  6 +-
 17 files changed, 198 insertions(+), 171 deletions(-)

-- 
2.17.1


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

* [PATCH v2 01/11] PM / devfreq: Add devfreq_get_devfreq_by_node function
       [not found]   ` <CGME20191220001759epcas1p4bbbcf6a84c09229db0ddae86be294405@epcas1p4.samsung.com>
@ 2019-12-20  0:24     ` Chanwoo Choi
  2020-01-09  9:47       ` Lukasz Luba
  0 siblings, 1 reply; 21+ messages in thread
From: Chanwoo Choi @ 2019-12-20  0:24 UTC (permalink / raw)
  To: robh+dt, krzk, heiko, leonard.crestez, lukasz.luba
  Cc: mark.rutland, a.swigon, m.szyprowski, kgene, cw00.choi,
	myungjoo.ham, kyungmin.park, linux-pm, linux-samsung-soc,
	devicetree, linux-arm-kernel, linux-kernel, linux-rockchip

From: Leonard Crestez <leonard.crestez@nxp.com>

Split off part of devfreq_get_devfreq_by_phandle into a separate
function. This allows callers to fetch devfreq instances by enumerating
devicetree instead of explicit phandles.

[lkp: Reported the build error]
Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
[cw00.choi: Export devfreq_get_devfreq_by_node function and
 add function to devfreq.h when CONFIG_PM_DEVFREQ is enabled.]
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
---
 drivers/devfreq/devfreq.c | 46 +++++++++++++++++++++++++++++----------
 include/linux/devfreq.h   |  6 +++++
 2 files changed, 41 insertions(+), 11 deletions(-)

diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c
index 89260b17598f..cb8ca81c8973 100644
--- a/drivers/devfreq/devfreq.c
+++ b/drivers/devfreq/devfreq.c
@@ -966,6 +966,32 @@ struct devfreq *devm_devfreq_add_device(struct device *dev,
 EXPORT_SYMBOL(devm_devfreq_add_device);
 
 #ifdef CONFIG_OF
+/*
+ * devfreq_get_devfreq_by_node - Get the devfreq device from devicetree
+ * @node - pointer to device_node
+ *
+ * return the instance of devfreq device
+ */
+struct devfreq *devfreq_get_devfreq_by_node(struct device_node *node)
+{
+	struct devfreq *devfreq;
+
+	if (!node)
+		return ERR_PTR(-EINVAL);
+
+	mutex_lock(&devfreq_list_lock);
+	list_for_each_entry(devfreq, &devfreq_list, node) {
+		if (devfreq->dev.parent
+			&& devfreq->dev.parent->of_node == node) {
+			mutex_unlock(&devfreq_list_lock);
+			return devfreq;
+		}
+	}
+	mutex_unlock(&devfreq_list_lock);
+
+	return ERR_PTR(-ENODEV);
+}
+
 /*
  * devfreq_get_devfreq_by_phandle - Get the devfreq device from devicetree
  * @dev - instance to the given device
@@ -988,26 +1014,24 @@ struct devfreq *devfreq_get_devfreq_by_phandle(struct device *dev, int index)
 	if (!node)
 		return ERR_PTR(-ENODEV);
 
-	mutex_lock(&devfreq_list_lock);
-	list_for_each_entry(devfreq, &devfreq_list, node) {
-		if (devfreq->dev.parent
-			&& devfreq->dev.parent->of_node == node) {
-			mutex_unlock(&devfreq_list_lock);
-			of_node_put(node);
-			return devfreq;
-		}
-	}
-	mutex_unlock(&devfreq_list_lock);
+	devfreq = devfreq_get_devfreq_by_node(node);
 	of_node_put(node);
 
-	return ERR_PTR(-EPROBE_DEFER);
+	return devfreq;
 }
+
 #else
+struct devfreq *devfreq_get_devfreq_by_node(struct device_node *node)
+{
+	return ERR_PTR(-ENODEV);
+}
+
 struct devfreq *devfreq_get_devfreq_by_phandle(struct device *dev, int index)
 {
 	return ERR_PTR(-ENODEV);
 }
 #endif /* CONFIG_OF */
+EXPORT_SYMBOL_GPL(devfreq_get_devfreq_by_node);
 EXPORT_SYMBOL_GPL(devfreq_get_devfreq_by_phandle);
 
 /**
diff --git a/include/linux/devfreq.h b/include/linux/devfreq.h
index c6f82d4bec9f..1dccc47acbce 100644
--- a/include/linux/devfreq.h
+++ b/include/linux/devfreq.h
@@ -253,6 +253,7 @@ extern void devm_devfreq_unregister_notifier(struct device *dev,
 				struct devfreq *devfreq,
 				struct notifier_block *nb,
 				unsigned int list);
+extern struct devfreq *devfreq_get_devfreq_by_node(struct device_node *node);
 extern struct devfreq *devfreq_get_devfreq_by_phandle(struct device *dev,
 						int index);
 
@@ -407,6 +408,11 @@ static inline void devm_devfreq_unregister_notifier(struct device *dev,
 {
 }
 
+static inline struct devfreq *devfreq_get_devfreq_by_node(struct device_node *node)
+{
+	return ERR_PTR(-ENODEV);
+}
+
 static inline struct devfreq *devfreq_get_devfreq_by_phandle(struct device *dev,
 							int index)
 {
-- 
2.17.1


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

* [PATCH v2 02/11] PM / devfreq: Remove devfreq_get_devfreq_by_phandle function
       [not found]   ` <CGME20191220001759epcas1p4ce1c2017937a35de84eab720b9732df0@epcas1p4.samsung.com>
@ 2019-12-20  0:24     ` Chanwoo Choi
  2019-12-20  0:46       ` Leonard Crestez
  2020-01-09 10:37       ` Lukasz Luba
  0 siblings, 2 replies; 21+ messages in thread
From: Chanwoo Choi @ 2019-12-20  0:24 UTC (permalink / raw)
  To: robh+dt, krzk, heiko, leonard.crestez, lukasz.luba
  Cc: mark.rutland, a.swigon, m.szyprowski, kgene, cw00.choi,
	myungjoo.ham, kyungmin.park, linux-pm, linux-samsung-soc,
	devicetree, linux-arm-kernel, linux-kernel, linux-rockchip

Previously, devfreq core support 'devfreq' property in order to get
the devfreq device by phandle. But, 'devfreq' property name is not proper
on devicetree binding because this name doesn't mean the any h/w attribute.

The devfreq core hand over the right to decide the property name
for getting the devfreq device on devicetree. Each devfreq driver
will decide the property name on devicetree binding and then get
the devfreq device by using devfreq_get_devfreq_by_node().

Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
---
 drivers/devfreq/devfreq.c    | 35 -----------------------------------
 drivers/devfreq/exynos-bus.c | 12 +++++++++++-
 include/linux/devfreq.h      |  8 --------
 3 files changed, 11 insertions(+), 44 deletions(-)

diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c
index cb8ca81c8973..c3d3c7c802a0 100644
--- a/drivers/devfreq/devfreq.c
+++ b/drivers/devfreq/devfreq.c
@@ -991,48 +991,13 @@ struct devfreq *devfreq_get_devfreq_by_node(struct device_node *node)
 
 	return ERR_PTR(-ENODEV);
 }
-
-/*
- * devfreq_get_devfreq_by_phandle - Get the devfreq device from devicetree
- * @dev - instance to the given device
- * @index - index into list of devfreq
- *
- * return the instance of devfreq device
- */
-struct devfreq *devfreq_get_devfreq_by_phandle(struct device *dev, int index)
-{
-	struct device_node *node;
-	struct devfreq *devfreq;
-
-	if (!dev)
-		return ERR_PTR(-EINVAL);
-
-	if (!dev->of_node)
-		return ERR_PTR(-EINVAL);
-
-	node = of_parse_phandle(dev->of_node, "devfreq", index);
-	if (!node)
-		return ERR_PTR(-ENODEV);
-
-	devfreq = devfreq_get_devfreq_by_node(node);
-	of_node_put(node);
-
-	return devfreq;
-}
-
 #else
 struct devfreq *devfreq_get_devfreq_by_node(struct device_node *node)
 {
 	return ERR_PTR(-ENODEV);
 }
-
-struct devfreq *devfreq_get_devfreq_by_phandle(struct device *dev, int index)
-{
-	return ERR_PTR(-ENODEV);
-}
 #endif /* CONFIG_OF */
 EXPORT_SYMBOL_GPL(devfreq_get_devfreq_by_node);
-EXPORT_SYMBOL_GPL(devfreq_get_devfreq_by_phandle);
 
 /**
  * devm_devfreq_remove_device() - Resource-managed devfreq_remove_device()
diff --git a/drivers/devfreq/exynos-bus.c b/drivers/devfreq/exynos-bus.c
index 7f5917d59072..1bc4e3c81115 100644
--- a/drivers/devfreq/exynos-bus.c
+++ b/drivers/devfreq/exynos-bus.c
@@ -86,6 +86,16 @@ static int exynos_bus_get_event(struct exynos_bus *bus,
 	return ret;
 }
 
+static struct devfreq *exynos_bus_get_parent_devfreq(struct device_node *np)
+{
+	struct device_node *node = of_parse_phandle(np, "devfreq", 0);
+
+	if (!node)
+		return ERR_PTR(-ENODEV);
+
+	return devfreq_get_devfreq_by_node(node);
+}
+
 /*
  * devfreq function for both simple-ondemand and passive governor
  */
@@ -353,7 +363,7 @@ static int exynos_bus_profile_init_passive(struct exynos_bus *bus,
 	profile->exit = exynos_bus_passive_exit;
 
 	/* Get the instance of parent devfreq device */
-	parent_devfreq = devfreq_get_devfreq_by_phandle(dev, 0);
+	parent_devfreq = exynos_bus_get_parent_devfreq(dev->of_node);
 	if (IS_ERR(parent_devfreq))
 		return -EPROBE_DEFER;
 
diff --git a/include/linux/devfreq.h b/include/linux/devfreq.h
index 1dccc47acbce..a4351698fb64 100644
--- a/include/linux/devfreq.h
+++ b/include/linux/devfreq.h
@@ -254,8 +254,6 @@ extern void devm_devfreq_unregister_notifier(struct device *dev,
 				struct notifier_block *nb,
 				unsigned int list);
 extern struct devfreq *devfreq_get_devfreq_by_node(struct device_node *node);
-extern struct devfreq *devfreq_get_devfreq_by_phandle(struct device *dev,
-						int index);
 
 #if IS_ENABLED(CONFIG_DEVFREQ_GOV_SIMPLE_ONDEMAND)
 /**
@@ -413,12 +411,6 @@ static inline struct devfreq *devfreq_get_devfreq_by_node(struct device_node *no
 	return ERR_PTR(-ENODEV);
 }
 
-static inline struct devfreq *devfreq_get_devfreq_by_phandle(struct device *dev,
-							int index)
-{
-	return ERR_PTR(-ENODEV);
-}
-
 static inline int devfreq_update_stats(struct devfreq *df)
 {
 	return -EINVAL;
-- 
2.17.1


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

* [PATCH v2 03/11] PM / devfreq: event: Add devfreq_event_get_edev_by_node function
       [not found]   ` <CGME20191220001759epcas1p1fc0e5019514f7c99606347432d66bfd0@epcas1p1.samsung.com>
@ 2019-12-20  0:24     ` Chanwoo Choi
  0 siblings, 0 replies; 21+ messages in thread
From: Chanwoo Choi @ 2019-12-20  0:24 UTC (permalink / raw)
  To: robh+dt, krzk, heiko, leonard.crestez, lukasz.luba
  Cc: mark.rutland, a.swigon, m.szyprowski, kgene, cw00.choi,
	myungjoo.ham, kyungmin.park, linux-pm, linux-samsung-soc,
	devicetree, linux-arm-kernel, linux-kernel, linux-rockchip

Previously, devfreq-event core supports 'devfreq-events' property
in order to get the devfreq_event_dev device by phandle.
But, 'devfreq-events' property name is not proper on devicetree binding
because this name doesn't mean the any h/w attribute.

The devfreq-event core hands over the rights of which decide the property name
for getting the devfreq device on devicetree, to each devfreq device driver.
Each devfreq driver will decide the property name on devicetree binding
and then get the devfreq device by using devfreq_event_get_edev_by_node().

And Remove devfreq_event_get_edev_count() function used 'devfreq-events'.

Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
---
 drivers/devfreq/devfreq-event.c         | 53 ++++---------------------
 drivers/devfreq/exynos-bus.c            | 16 +++++++-
 drivers/devfreq/rk3399_dmc.c            | 13 +++++-
 drivers/memory/samsung/exynos5422-dmc.c | 16 ++++++--
 include/linux/devfreq-event.h           | 14 ++-----
 5 files changed, 50 insertions(+), 62 deletions(-)

diff --git a/drivers/devfreq/devfreq-event.c b/drivers/devfreq/devfreq-event.c
index 8c31b0f2e28f..d0c989acbf93 100644
--- a/drivers/devfreq/devfreq-event.c
+++ b/drivers/devfreq/devfreq-event.c
@@ -210,25 +210,18 @@ int devfreq_event_reset_event(struct devfreq_event_dev *edev)
 EXPORT_SYMBOL_GPL(devfreq_event_reset_event);
 
 /**
- * devfreq_event_get_edev_by_phandle() - Get the devfreq-event dev from
- *					 devicetree.
- * @dev		: the pointer to the given device
- * @index	: the index into list of devfreq-event device
+ * devfreq_event_get_edev_by_node() - Get the devfreq-event dev from devicetree
+ * @node	: the pointer to device_node
  *
  * Note that this function return the pointer of devfreq-event device.
  */
-struct devfreq_event_dev *devfreq_event_get_edev_by_phandle(struct device *dev,
-						      int index)
+struct devfreq_event_dev *devfreq_event_get_edev_by_node(
+					struct device_node *node)
 {
-	struct device_node *node;
 	struct devfreq_event_dev *edev;
 
-	if (!dev->of_node)
-		return ERR_PTR(-EINVAL);
-
-	node = of_parse_phandle(dev->of_node, "devfreq-events", index);
 	if (!node)
-		return ERR_PTR(-ENODEV);
+		return ERR_PTR(-EINVAL);
 
 	mutex_lock(&devfreq_event_list_lock);
 	list_for_each_entry(edev, &devfreq_event_list, node) {
@@ -244,44 +237,12 @@ struct devfreq_event_dev *devfreq_event_get_edev_by_phandle(struct device *dev,
 out:
 	mutex_unlock(&devfreq_event_list_lock);
 
-	if (!edev) {
-		of_node_put(node);
+	if (!edev)
 		return ERR_PTR(-ENODEV);
-	}
-
-	of_node_put(node);
 
 	return edev;
 }
-EXPORT_SYMBOL_GPL(devfreq_event_get_edev_by_phandle);
-
-/**
- * devfreq_event_get_edev_count() - Get the count of devfreq-event dev
- * @dev		: the pointer to the given device
- *
- * Note that this function return the count of devfreq-event devices.
- */
-int devfreq_event_get_edev_count(struct device *dev)
-{
-	int count;
-
-	if (!dev->of_node) {
-		dev_err(dev, "device does not have a device node entry\n");
-		return -EINVAL;
-	}
-
-	count = of_property_count_elems_of_size(dev->of_node, "devfreq-events",
-						sizeof(u32));
-	if (count < 0) {
-		dev_err(dev,
-			"failed to get the count of devfreq-event in %pOF node\n",
-			dev->of_node);
-		return count;
-	}
-
-	return count;
-}
-EXPORT_SYMBOL_GPL(devfreq_event_get_edev_count);
+EXPORT_SYMBOL_GPL(devfreq_event_get_edev_by_node);
 
 static void devfreq_event_release_edev(struct device *dev)
 {
diff --git a/drivers/devfreq/exynos-bus.c b/drivers/devfreq/exynos-bus.c
index 1bc4e3c81115..c4931ef53f15 100644
--- a/drivers/devfreq/exynos-bus.c
+++ b/drivers/devfreq/exynos-bus.c
@@ -96,6 +96,17 @@ static struct devfreq *exynos_bus_get_parent_devfreq(struct device_node *np)
 	return devfreq_get_devfreq_by_node(node);
 }
 
+static struct devfreq_event_dev *exynos_bus_get_edev(struct device_node *np,
+							int index)
+{
+	struct device_node *node = of_parse_phandle(np, "devfreq-events",
+							index);
+
+	if (!node)
+		return ERR_PTR(-ENODEV);
+	return devfreq_event_get_edev_by_node(node);
+}
+
 /*
  * devfreq function for both simple-ondemand and passive governor
  */
@@ -202,7 +213,8 @@ static int exynos_bus_parent_parse_of(struct device_node *np,
 	 * Get the devfreq-event devices to get the current utilization of
 	 * buses. This raw data will be used in devfreq ondemand governor.
 	 */
-	count = devfreq_event_get_edev_count(dev);
+	count = of_property_count_elems_of_size(dev->of_node,
+					"devfreq-events", sizeof(u32));
 	if (count < 0) {
 		dev_err(dev, "failed to get the count of devfreq-event dev\n");
 		ret = count;
@@ -218,7 +230,7 @@ static int exynos_bus_parent_parse_of(struct device_node *np,
 	}
 
 	for (i = 0; i < count; i++) {
-		bus->edev[i] = devfreq_event_get_edev_by_phandle(dev, i);
+		bus->edev[i] = exynos_bus_get_edev(dev->of_node, i);
 		if (IS_ERR(bus->edev[i])) {
 			ret = -EPROBE_DEFER;
 			goto err_regulator;
diff --git a/drivers/devfreq/rk3399_dmc.c b/drivers/devfreq/rk3399_dmc.c
index 2f1027c5b647..e712c8662d2f 100644
--- a/drivers/devfreq/rk3399_dmc.c
+++ b/drivers/devfreq/rk3399_dmc.c
@@ -303,6 +303,17 @@ static int of_get_ddr_timings(struct dram_timing *timing,
 	return ret;
 }
 
+static struct devfreq_event_dev *of_get_edev(struct device_node *np,
+							int index)
+{
+	struct device_node *node = of_parse_phandle(np, "devfreq-events",
+							index);
+
+	if (!node)
+		return ERR_PTR(-ENODEV);
+	return devfreq_event_get_edev_by_node(node);
+}
+
 static int rk3399_dmcfreq_probe(struct platform_device *pdev)
 {
 	struct arm_smccc_res res;
@@ -339,7 +350,7 @@ static int rk3399_dmcfreq_probe(struct platform_device *pdev)
 		return PTR_ERR(data->dmc_clk);
 	}
 
-	data->edev = devfreq_event_get_edev_by_phandle(dev, 0);
+	data->edev = of_get_edev(dev->of_node, 0);
 	if (IS_ERR(data->edev))
 		return -EPROBE_DEFER;
 
diff --git a/drivers/memory/samsung/exynos5422-dmc.c b/drivers/memory/samsung/exynos5422-dmc.c
index 47dbf6d1789f..f11fe29a69fc 100644
--- a/drivers/memory/samsung/exynos5422-dmc.c
+++ b/drivers/memory/samsung/exynos5422-dmc.c
@@ -1267,6 +1267,16 @@ static int exynos5_dmc_init_clks(struct exynos5_dmc *dmc)
 	return 0;
 }
 
+static struct devfreq_event_dev *exynos5_dmc_get_edev(struct device_node *np,
+							int index)
+{
+	struct device_node *node = of_parse_phandle(np, "devfreq-events",
+							index);
+	if (!node)
+		return ERR_PTR(-ENODEV);
+	return devfreq_event_get_edev_by_node(node);
+}
+
 /**
  * exynos5_performance_counters_init() - Initializes performance DMC's counters
  * @dmc:	DMC for which it does the setup
@@ -1281,7 +1291,8 @@ static int exynos5_performance_counters_init(struct exynos5_dmc *dmc)
 	int counters_size;
 	int ret, i;
 
-	dmc->num_counters = devfreq_event_get_edev_count(dmc->dev);
+	dmc->num_counters = of_property_count_elems_of_size(dmc->dev->of_node,
+					"devfreq-events", sizeof(u32));
 	if (dmc->num_counters < 0) {
 		dev_err(dmc->dev, "could not get devfreq-event counters\n");
 		return dmc->num_counters;
@@ -1293,8 +1304,7 @@ static int exynos5_performance_counters_init(struct exynos5_dmc *dmc)
 		return -ENOMEM;
 
 	for (i = 0; i < dmc->num_counters; i++) {
-		dmc->counter[i] =
-			devfreq_event_get_edev_by_phandle(dmc->dev, i);
+		dmc->counter[i] = exynos5_dmc_get_edev(dmc->dev->of_node, i);
 		if (IS_ERR_OR_NULL(dmc->counter[i]))
 			return -EPROBE_DEFER;
 	}
diff --git a/include/linux/devfreq-event.h b/include/linux/devfreq-event.h
index f14f17f8cb7f..967414ac6f7c 100644
--- a/include/linux/devfreq-event.h
+++ b/include/linux/devfreq-event.h
@@ -105,9 +105,8 @@ extern int devfreq_event_set_event(struct devfreq_event_dev *edev);
 extern int devfreq_event_get_event(struct devfreq_event_dev *edev,
 				struct devfreq_event_data *edata);
 extern int devfreq_event_reset_event(struct devfreq_event_dev *edev);
-extern struct devfreq_event_dev *devfreq_event_get_edev_by_phandle(
-				struct device *dev, int index);
-extern int devfreq_event_get_edev_count(struct device *dev);
+extern struct devfreq_event_dev *devfreq_event_get_edev_by_node(
+				struct device_node *node);
 extern struct devfreq_event_dev *devfreq_event_add_edev(struct device *dev,
 				struct devfreq_event_desc *desc);
 extern int devfreq_event_remove_edev(struct devfreq_event_dev *edev);
@@ -151,17 +150,12 @@ static inline int devfreq_event_reset_event(struct devfreq_event_dev *edev)
 	return -EINVAL;
 }
 
-static inline struct devfreq_event_dev *devfreq_event_get_edev_by_phandle(
-					struct device *dev, int index)
+static inline struct devfreq_event_dev *devfreq_event_get_edev_by_node(
+					struct device_node *node)
 {
 	return ERR_PTR(-EINVAL);
 }
 
-static inline int devfreq_event_get_edev_count(struct device *dev)
-{
-	return -EINVAL;
-}
-
 static inline struct devfreq_event_dev *devfreq_event_add_edev(struct device *dev,
 					struct devfreq_event_desc *desc)
 {
-- 
2.17.1


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

* [PATCH v2 04/11] dt-bindings: devfreq: exynos-bus: Replace deprecated 'devfreq' and 'devfreq-events' property
       [not found]   ` <CGME20191220001759epcas1p3051f7916542b7234aac5273e0baab83b@epcas1p3.samsung.com>
@ 2019-12-20  0:24     ` Chanwoo Choi
  2019-12-20  8:43       ` Krzysztof Kozlowski
  0 siblings, 1 reply; 21+ messages in thread
From: Chanwoo Choi @ 2019-12-20  0:24 UTC (permalink / raw)
  To: robh+dt, krzk, heiko, leonard.crestez, lukasz.luba
  Cc: mark.rutland, a.swigon, m.szyprowski, kgene, cw00.choi,
	myungjoo.ham, kyungmin.park, linux-pm, linux-samsung-soc,
	devicetree, linux-arm-kernel, linux-kernel, linux-rockchip

In order to remove the deprecated 'devfreq' and 'devfreq-events' property,
replace with new following properties
- Replace 'devfreq' with 'exynos,parent-bus' property
- Replace 'devfreq-events' with 'exynos,ppmu-device' property

Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
---
 .../bindings/devfreq/exynos-bus.txt           | 22 +++++++++----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/Documentation/devicetree/bindings/devfreq/exynos-bus.txt b/Documentation/devicetree/bindings/devfreq/exynos-bus.txt
index e71f752cc18f..c6c2dd0e77c8 100644
--- a/Documentation/devicetree/bindings/devfreq/exynos-bus.txt
+++ b/Documentation/devicetree/bindings/devfreq/exynos-bus.txt
@@ -41,11 +41,11 @@ Required properties for all bus devices:
 
 Required properties only for parent bus device:
 - vdd-supply: the regulator to provide the buses with the voltage.
-- devfreq-events: the devfreq-event device to monitor the current utilization
+- exynos,ppmu-device: the devfreq-event device to monitor the current utilization
   of buses.
 
 Required properties only for passive bus device:
-- devfreq: the parent bus device.
+- exynos,parent-bus: the parent bus device.
 
 Optional properties only for parent bus device:
 - exynos,saturation-ratio: the percentage value which is used to calibrate
@@ -374,48 +374,48 @@ Example2 :
 	in exynos3250-rinato.dts is listed below:
 
 	&bus_dmc {
-		devfreq-events = <&ppmu_dmc0_3>, <&ppmu_dmc1_3>;
+		exynos,ppmu-device = <&ppmu_dmc0_3>, <&ppmu_dmc1_3>;
 		vdd-supply = <&buck1_reg>;	/* VDD_MIF */
 		status = "okay";
 	};
 
 	&bus_leftbus {
-		devfreq-events = <&ppmu_leftbus_3>, <&ppmu_rightbus_3>;
+		exynos,ppmu-device = <&ppmu_leftbus_3>, <&ppmu_rightbus_3>;
 		vdd-supply = <&buck3_reg>;
 		status = "okay";
 	};
 
 	&bus_rightbus {
-		devfreq = <&bus_leftbus>;
+		exynos,parent-bus = <&bus_leftbus>;
 		status = "okay";
 	};
 
 	&bus_lcd0 {
-		devfreq = <&bus_leftbus>;
+		exynos,parent-bus = <&bus_leftbus>;
 		status = "okay";
 	};
 
 	&bus_fsys {
-		devfreq = <&bus_leftbus>;
+		exynos,parent-bus = <&bus_leftbus>;
 		status = "okay";
 	};
 
 	&bus_mcuisp {
-		devfreq = <&bus_leftbus>;
+		exynos,parent-bus = <&bus_leftbus>;
 		status = "okay";
 	};
 
 	&bus_isp {
-		devfreq = <&bus_leftbus>;
+		exynos,parent-bus = <&bus_leftbus>;
 		status = "okay";
 	};
 
 	&bus_peril {
-		devfreq = <&bus_leftbus>;
+		exynos,parent-bus = <&bus_leftbus>;
 		status = "okay";
 	};
 
 	&bus_mfc {
-		devfreq = <&bus_leftbus>;
+		exynos,parent-bus = <&bus_leftbus>;
 		status = "okay";
 	};
-- 
2.17.1


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

* [PATCH v2 05/11] dt-bindings: devfreq: rk3399_dmc:  Replace deprecated 'devfreq-events' property
       [not found]   ` <CGME20191220001759epcas1p495fc9cdb6f2bd86abf63d16f61e68804@epcas1p4.samsung.com>
@ 2019-12-20  0:24     ` Chanwoo Choi
  0 siblings, 0 replies; 21+ messages in thread
From: Chanwoo Choi @ 2019-12-20  0:24 UTC (permalink / raw)
  To: robh+dt, krzk, heiko, leonard.crestez, lukasz.luba
  Cc: mark.rutland, a.swigon, m.szyprowski, kgene, cw00.choi,
	myungjoo.ham, kyungmin.park, linux-pm, linux-samsung-soc,
	devicetree, linux-arm-kernel, linux-kernel, linux-rockchip

In order to remove the deprecated 'devfreq-events' property,
replace with new 'rockchip,dfi-device' property.

But, to guarantee the backward-compatibility, keep the support
of 'devfreq-events' property.

Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
---
 Documentation/devicetree/bindings/devfreq/rk3399_dmc.txt | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/devfreq/rk3399_dmc.txt b/Documentation/devicetree/bindings/devfreq/rk3399_dmc.txt
index 0ec68141f85a..e484768a4077 100644
--- a/Documentation/devicetree/bindings/devfreq/rk3399_dmc.txt
+++ b/Documentation/devicetree/bindings/devfreq/rk3399_dmc.txt
@@ -2,7 +2,7 @@
 
 Required properties:
 - compatible:		 Must be "rockchip,rk3399-dmc".
-- devfreq-events:	 Node to get DDR loading, Refer to
+- rockchip,dfi-device:	 Node to get DDR loading, Refer to
 			 Documentation/devicetree/bindings/devfreq/event/
 			 rockchip-dfi.txt
 - clocks:		 Phandles for clock specified in "clock-names" property
@@ -173,7 +173,7 @@ Example:
 
 	dmc: dmc {
 		compatible = "rockchip,rk3399-dmc";
-		devfreq-events = <&dfi>;
+		rockchip,dfi-device = <&dfi>;
 		interrupts = <GIC_SPI 1 IRQ_TYPE_LEVEL_HIGH>;
 		clocks = <&cru SCLK_DDRCLK>;
 		clock-names = "dmc_clk";
-- 
2.17.1


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

* [PATCH v2 06/11] dt-bindings: memory: exynos5422-dmc: Replace the deprecated 'devfreq-events' property
       [not found]   ` <CGME20191220001800epcas1p364322170854fdd171c43f6b1de2b61a4@epcas1p3.samsung.com>
@ 2019-12-20  0:24     ` Chanwoo Choi
  0 siblings, 0 replies; 21+ messages in thread
From: Chanwoo Choi @ 2019-12-20  0:24 UTC (permalink / raw)
  To: robh+dt, krzk, heiko, leonard.crestez, lukasz.luba
  Cc: mark.rutland, a.swigon, m.szyprowski, kgene, cw00.choi,
	myungjoo.ham, kyungmin.park, linux-pm, linux-samsung-soc,
	devicetree, linux-arm-kernel, linux-kernel, linux-rockchip

Replace the deprecated 'devfreq-events' property with 'exynos,ppmu-device'
property. But, to guarantee the backward-compatibility, keep the support
of 'devfreq-events' property.

Reviewed-by: Lukasz Luba <lukasz.luba@arm.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
---
 .../bindings/memory-controllers/exynos5422-dmc.txt        | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/Documentation/devicetree/bindings/memory-controllers/exynos5422-dmc.txt b/Documentation/devicetree/bindings/memory-controllers/exynos5422-dmc.txt
index 02e4a1f862f1..fbecbcc00adb 100644
--- a/Documentation/devicetree/bindings/memory-controllers/exynos5422-dmc.txt
+++ b/Documentation/devicetree/bindings/memory-controllers/exynos5422-dmc.txt
@@ -17,14 +17,14 @@ Required properties for DMC device for Exynos5422:
 - clock-names : should include "fout_spll", "mout_sclk_spll", "ff_dout_spll2",
   "fout_bpll", "mout_bpll", "sclk_bpll", "mout_mx_mspll_ccore",
   "mout_mclk_cdrex"  entries
-- devfreq-events : phandles for PPMU devices connected to this DMC.
+- exynos,ppmu-device : phandles for PPMU devices connected to this DMC.
 - vdd-supply : phandle for voltage regulator which is connected.
 - reg : registers of two CDREX controllers.
 - operating-points-v2 : phandle for OPPs described in v2 definition.
 - device-handle : phandle of the connected DRAM memory device. For more
 	information please refer to documentation file:
 	Documentation/devicetree/bindings/ddr/lpddr3.txt
-- devfreq-events : phandles of the PPMU events used by the controller.
+- exynos,ppmu-device : phandles of the PPMU events used by the controller.
 - samsung,syscon-clk : phandle of the clock register set used by the controller,
 	these registers are used for enabling a 'pause' feature and are not
 	exposed by clock framework but they must be used in a safe way.
@@ -73,8 +73,8 @@ Example:
 			      "mout_mx_mspll_ccore",
 			      "mout_mclk_cdrex";
 		operating-points-v2 = <&dmc_opp_table>;
-		devfreq-events = <&ppmu_event3_dmc0_0>,	<&ppmu_event3_dmc0_1>,
-				 <&ppmu_event3_dmc1_0>, <&ppmu_event3_dmc1_1>;
+		exynos,ppmu-device = <&ppmu_event3_dmc0_0>, <&ppmu_event3_dmc0_1>,
+				     <&ppmu_event3_dmc1_0>, <&ppmu_event3_dmc1_1>;
 		device-handle = <&samsung_K3QF2F20DB>;
 		vdd-supply = <&buck1_reg>;
 		samsung,syscon-clk = <&clock>;
-- 
2.17.1


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

* [PATCH v2 07/11] PM / devfreq: exynos-bus: Replace the deprecated 'devfreq' and 'devfreq-events' property
       [not found]   ` <CGME20191220001800epcas1p3accefc4384d9503481311f25f5794cb8@epcas1p3.samsung.com>
@ 2019-12-20  0:24     ` Chanwoo Choi
  0 siblings, 0 replies; 21+ messages in thread
From: Chanwoo Choi @ 2019-12-20  0:24 UTC (permalink / raw)
  To: robh+dt, krzk, heiko, leonard.crestez, lukasz.luba
  Cc: mark.rutland, a.swigon, m.szyprowski, kgene, cw00.choi,
	myungjoo.ham, kyungmin.park, linux-pm, linux-samsung-soc,
	devicetree, linux-arm-kernel, linux-kernel, linux-rockchip

Replace the deprecated 'devfreq' and 'devfreq-events' property
with new following properties.
- 'devfreq' is changed to 'exynos,parent-bus' property
- 'devfreq-events' is changed to 'exynos,ppmu-device' property
But, to guarantee the backward-compatibility, keep the support
both 'devfreq' and 'devfreq-events' property.

Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
---
 drivers/devfreq/exynos-bus.c | 52 +++++++++++++++++++++++++-----------
 1 file changed, 37 insertions(+), 15 deletions(-)

diff --git a/drivers/devfreq/exynos-bus.c b/drivers/devfreq/exynos-bus.c
index c4931ef53f15..9fdb188915e8 100644
--- a/drivers/devfreq/exynos-bus.c
+++ b/drivers/devfreq/exynos-bus.c
@@ -88,22 +88,35 @@ static int exynos_bus_get_event(struct exynos_bus *bus,
 
 static struct devfreq *exynos_bus_get_parent_devfreq(struct device_node *np)
 {
-	struct device_node *node = of_parse_phandle(np, "devfreq", 0);
-
-	if (!node)
-		return ERR_PTR(-ENODEV);
-
+	struct device_node *node = of_parse_phandle(np, "exynos,parent-bus", 0);
+
+	if (!node) {
+		/*
+		 * Check the deprecated 'devfreq' property
+		 * to support backward-compatibility.
+		 */
+		node = of_parse_phandle(np, "devfreq", 0);
+		if (!node)
+			return ERR_PTR(-ENODEV);
+	}
 	return devfreq_get_devfreq_by_node(node);
 }
 
 static struct devfreq_event_dev *exynos_bus_get_edev(struct device_node *np,
 							int index)
 {
-	struct device_node *node = of_parse_phandle(np, "devfreq-events",
-							index);
-
-	if (!node)
-		return ERR_PTR(-ENODEV);
+	struct device_node *node = of_parse_phandle(np,
+					"exynos,ppmu-device", index);
+
+	if (!node) {
+		/*
+		 * Check the deprecated 'devfreq-events' property
+		 * to support backward-compatibility.
+		 */
+		node = of_parse_phandle(np, "devfreq-events", index);
+		if (!node)
+			return ERR_PTR(-ENODEV);
+	}
 	return devfreq_event_get_edev_by_node(node);
 }
 
@@ -214,11 +227,20 @@ static int exynos_bus_parent_parse_of(struct device_node *np,
 	 * buses. This raw data will be used in devfreq ondemand governor.
 	 */
 	count = of_property_count_elems_of_size(dev->of_node,
-					"devfreq-events", sizeof(u32));
+					"exynos,ppmu-device", sizeof(u32));
 	if (count < 0) {
-		dev_err(dev, "failed to get the count of devfreq-event dev\n");
-		ret = count;
-		goto err_regulator;
+		/*
+		 * Check the deprecated 'devfreq-events' property
+		 * to support backward-compatibility.
+		 */
+		count = of_property_count_elems_of_size(dev->of_node,
+					"devfreq-events", sizeof(u32));
+		if (count < 0) {
+			dev_err(dev,
+				"failed to get the count of devfreq-event dev\n");
+			ret = count;
+			goto err_regulator;
+		}
 	}
 	bus->edev_count = count;
 
@@ -423,7 +445,7 @@ static int exynos_bus_probe(struct platform_device *pdev)
 	if (!profile)
 		return -ENOMEM;
 
-	node = of_parse_phandle(dev->of_node, "devfreq", 0);
+	node = of_parse_phandle(dev->of_node, "exynos,parent-bus", 0);
 	if (node) {
 		of_node_put(node);
 		passive = true;
-- 
2.17.1


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

* [PATCH v2 08/11] PM / devfreq: rk3399_dmc: Replace the deprecated 'devfreq-events' property
       [not found]   ` <CGME20191220001800epcas1p383927f73060e0e9aaad2fd9aaf881b6d@epcas1p3.samsung.com>
@ 2019-12-20  0:24     ` Chanwoo Choi
  0 siblings, 0 replies; 21+ messages in thread
From: Chanwoo Choi @ 2019-12-20  0:24 UTC (permalink / raw)
  To: robh+dt, krzk, heiko, leonard.crestez, lukasz.luba
  Cc: mark.rutland, a.swigon, m.szyprowski, kgene, cw00.choi,
	myungjoo.ham, kyungmin.park, linux-pm, linux-samsung-soc,
	devicetree, linux-arm-kernel, linux-kernel, linux-rockchip

Replace the deprecated 'devfreq-events' property with 'rockchip,dfi-device'
property. But, to guarantee the backward-compatibility, keep the support
of 'devfreq-events' property.

Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
---
 drivers/devfreq/rk3399_dmc.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/drivers/devfreq/rk3399_dmc.c b/drivers/devfreq/rk3399_dmc.c
index e712c8662d2f..2294de13a3dc 100644
--- a/drivers/devfreq/rk3399_dmc.c
+++ b/drivers/devfreq/rk3399_dmc.c
@@ -306,11 +306,14 @@ static int of_get_ddr_timings(struct dram_timing *timing,
 static struct devfreq_event_dev *of_get_edev(struct device_node *np,
 							int index)
 {
-	struct device_node *node = of_parse_phandle(np, "devfreq-events",
+	struct device_node *node = of_parse_phandle(np, "rockchip,dfi-device",
 							index);
 
-	if (!node)
-		return ERR_PTR(-ENODEV);
+	if (!node) {
+		node = of_parse_phandle(np, "devfreq-events", index);
+		if (!node)
+			return ERR_PTR(-ENODEV);
+	}
 	return devfreq_event_get_edev_by_node(node);
 }
 
-- 
2.17.1


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

* [PATCH v2 09/11] memory: samsung: exynos5422-dmc: Replace the deprecated 'devfreq-events' property
       [not found]   ` <CGME20191220001800epcas1p41ab059757aeec99060cb4f47b0f48ac0@epcas1p4.samsung.com>
@ 2019-12-20  0:24     ` Chanwoo Choi
  0 siblings, 0 replies; 21+ messages in thread
From: Chanwoo Choi @ 2019-12-20  0:24 UTC (permalink / raw)
  To: robh+dt, krzk, heiko, leonard.crestez, lukasz.luba
  Cc: mark.rutland, a.swigon, m.szyprowski, kgene, cw00.choi,
	myungjoo.ham, kyungmin.park, linux-pm, linux-samsung-soc,
	devicetree, linux-arm-kernel, linux-kernel, linux-rockchip

Replace the deprecated 'devfreq-events' property with 'exynos,ppmu-device'
property. But, to guarantee the backward-compatibility, keep the support
of 'devfreq-events' property.

Reviewed-by: Lukasz Luba <lukasz.luba@arm.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
---
 drivers/memory/samsung/exynos5422-dmc.c | 29 ++++++++++++++++++++-----
 1 file changed, 23 insertions(+), 6 deletions(-)

diff --git a/drivers/memory/samsung/exynos5422-dmc.c b/drivers/memory/samsung/exynos5422-dmc.c
index f11fe29a69fc..6e8aa19e84d3 100644
--- a/drivers/memory/samsung/exynos5422-dmc.c
+++ b/drivers/memory/samsung/exynos5422-dmc.c
@@ -1270,10 +1270,17 @@ static int exynos5_dmc_init_clks(struct exynos5_dmc *dmc)
 static struct devfreq_event_dev *exynos5_dmc_get_edev(struct device_node *np,
 							int index)
 {
-	struct device_node *node = of_parse_phandle(np, "devfreq-events",
+	struct device_node *node = of_parse_phandle(np, "exynos,ppmu-device",
 							index);
-	if (!node)
-		return ERR_PTR(-ENODEV);
+	if (!node) {
+		 /*
+		  * Check the deprecated 'devfreq-events' property
+		  * to support backward-compatibility.
+		 */
+		node = of_parse_phandle(np, "devfreq-events", index);
+		if (!node)
+			return ERR_PTR(-ENODEV);
+	}
 	return devfreq_event_get_edev_by_node(node);
 }
 
@@ -1292,10 +1299,20 @@ static int exynos5_performance_counters_init(struct exynos5_dmc *dmc)
 	int ret, i;
 
 	dmc->num_counters = of_property_count_elems_of_size(dmc->dev->of_node,
-					"devfreq-events", sizeof(u32));
+					"exynos,ppmu-device", sizeof(u32));
 	if (dmc->num_counters < 0) {
-		dev_err(dmc->dev, "could not get devfreq-event counters\n");
-		return dmc->num_counters;
+		 /*
+		  * Check the deprecated 'devfreq-events' property
+		  * to support backward-compatibility.
+		 */
+		dmc->num_counters = of_property_count_elems_of_size(
+					dmc->dev->of_node,
+					"devfreq-events", sizeof(u32));
+		if (dmc->num_counters < 0) {
+			dev_err(dmc->dev,
+				"could not get devfreq-event counters\n");
+			return dmc->num_counters;
+		}
 	}
 
 	counters_size = sizeof(struct devfreq_event_dev) * dmc->num_counters;
-- 
2.17.1


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

* [PATCH v2 10/11] ARM: dts: exynos: Replace deprecated property for Exynos bus and DMC
       [not found]   ` <CGME20191220001800epcas1p2f2dfd9d24e275425b07a06bcdeb4aba9@epcas1p2.samsung.com>
@ 2019-12-20  0:24     ` Chanwoo Choi
  0 siblings, 0 replies; 21+ messages in thread
From: Chanwoo Choi @ 2019-12-20  0:24 UTC (permalink / raw)
  To: robh+dt, krzk, heiko, leonard.crestez, lukasz.luba
  Cc: mark.rutland, a.swigon, m.szyprowski, kgene, cw00.choi,
	myungjoo.ham, kyungmin.park, linux-pm, linux-samsung-soc,
	devicetree, linux-arm-kernel, linux-kernel, linux-rockchip

Replace the property related to devfreq and devfreq-event device
to remove the deprecated property name.
- Replace 'devfreq' with 'exynos,parent-bus' property
  for getting the parent devfreq device of exynos-bus.
- Replace 'devfreq-events' with 'exynos,ppmu-device' property
  for getting the devfreq-event device to monitor bus utilization.

Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
---
 arch/arm/boot/dts/exynos3250-monk.dts         |  2 +-
 arch/arm/boot/dts/exynos3250-rinato.dts       | 18 +++++-----
 .../boot/dts/exynos4412-itop-scp-core.dtsi    | 16 ++++-----
 arch/arm/boot/dts/exynos4412-midas.dtsi       | 18 +++++-----
 .../boot/dts/exynos4412-odroid-common.dtsi    | 18 +++++-----
 arch/arm/boot/dts/exynos5422-odroid-core.dtsi | 34 +++++++++----------
 6 files changed, 53 insertions(+), 53 deletions(-)

diff --git a/arch/arm/boot/dts/exynos3250-monk.dts b/arch/arm/boot/dts/exynos3250-monk.dts
index 248bd372fe70..c6b1fcd4ba97 100644
--- a/arch/arm/boot/dts/exynos3250-monk.dts
+++ b/arch/arm/boot/dts/exynos3250-monk.dts
@@ -158,7 +158,7 @@
 };
 
 &bus_dmc {
-	devfreq-events = <&ppmu_dmc0_3>, <&ppmu_dmc1_3>;
+	exynos,ppmu-device = <&ppmu_dmc0_3>, <&ppmu_dmc1_3>;
 	vdd-supply = <&buck1_reg>;
 	status = "okay";
 };
diff --git a/arch/arm/boot/dts/exynos3250-rinato.dts b/arch/arm/boot/dts/exynos3250-rinato.dts
index 86c26a4edfd7..7ad80354d8df 100644
--- a/arch/arm/boot/dts/exynos3250-rinato.dts
+++ b/arch/arm/boot/dts/exynos3250-rinato.dts
@@ -153,49 +153,49 @@
 };
 
 &bus_dmc {
-	devfreq-events = <&ppmu_dmc0_3>, <&ppmu_dmc1_3>;
+	exynos,ppmu-device = <&ppmu_dmc0_3>, <&ppmu_dmc1_3>;
 	vdd-supply = <&buck1_reg>;
 	status = "okay";
 };
 
 &bus_leftbus {
-	devfreq-events = <&ppmu_leftbus_3>, <&ppmu_rightbus_3>;
+	exynos,ppmu-device = <&ppmu_leftbus_3>, <&ppmu_rightbus_3>;
 	vdd-supply = <&buck3_reg>;
 	status = "okay";
 };
 
 &bus_rightbus {
-	devfreq = <&bus_leftbus>;
+	exynos,parent-bus = <&bus_leftbus>;
 	status = "okay";
 };
 
 &bus_lcd0 {
-	devfreq = <&bus_leftbus>;
+	exynos,parent-bus = <&bus_leftbus>;
 	status = "okay";
 };
 
 &bus_fsys {
-	devfreq = <&bus_leftbus>;
+	exynos,parent-bus = <&bus_leftbus>;
 	status = "okay";
 };
 
 &bus_mcuisp {
-	devfreq = <&bus_leftbus>;
+	exynos,parent-bus = <&bus_leftbus>;
 	status = "okay";
 };
 
 &bus_isp {
-	devfreq = <&bus_leftbus>;
+	exynos,parent-bus = <&bus_leftbus>;
 	status = "okay";
 };
 
 &bus_peril {
-	devfreq = <&bus_leftbus>;
+	exynos,parent-bus = <&bus_leftbus>;
 	status = "okay";
 };
 
 &bus_mfc {
-	devfreq = <&bus_leftbus>;
+	exynos,parent-bus = <&bus_leftbus>;
 	status = "okay";
 };
 
diff --git a/arch/arm/boot/dts/exynos4412-itop-scp-core.dtsi b/arch/arm/boot/dts/exynos4412-itop-scp-core.dtsi
index dfceb155b3a7..e275a52eb0d3 100644
--- a/arch/arm/boot/dts/exynos4412-itop-scp-core.dtsi
+++ b/arch/arm/boot/dts/exynos4412-itop-scp-core.dtsi
@@ -70,44 +70,44 @@
 };
 
 &bus_dmc {
-	devfreq-events = <&ppmu_dmc0_3>, <&ppmu_dmc1_3>;
+	exynos,ppmu-device = <&ppmu_dmc0_3>, <&ppmu_dmc1_3>;
 	vdd-supply = <&buck1_reg>;
 	status = "okay";
 };
 
 &bus_acp {
-	devfreq = <&bus_dmc>;
+	exynos,parent-bus = <&bus_dmc>;
 	status = "okay";
 };
 
 &bus_c2c {
-	devfreq = <&bus_dmc>;
+	exynos,parent-bus = <&bus_dmc>;
 	status = "okay";
 };
 
 &bus_leftbus {
-	devfreq-events = <&ppmu_leftbus_3>, <&ppmu_rightbus_3>;
+	exynos,ppmu-device = <&ppmu_leftbus_3>, <&ppmu_rightbus_3>;
 	vdd-supply = <&buck3_reg>;
 	status = "okay";
 };
 
 &bus_rightbus {
-	devfreq = <&bus_leftbus>;
+	exynos,parent-bus = <&bus_leftbus>;
 	status = "okay";
 };
 
 &bus_fsys {
-	devfreq = <&bus_leftbus>;
+	exynos,parent-bus = <&bus_leftbus>;
 	status = "okay";
 };
 
 &bus_peri {
-	devfreq = <&bus_leftbus>;
+	exynos,parent-bus = <&bus_leftbus>;
 	status = "okay";
 };
 
 &bus_mfc {
-	devfreq = <&bus_leftbus>;
+	exynos,parent-bus = <&bus_leftbus>;
 	status = "okay";
 };
 
diff --git a/arch/arm/boot/dts/exynos4412-midas.dtsi b/arch/arm/boot/dts/exynos4412-midas.dtsi
index 83be3a797411..1869eed05167 100644
--- a/arch/arm/boot/dts/exynos4412-midas.dtsi
+++ b/arch/arm/boot/dts/exynos4412-midas.dtsi
@@ -288,49 +288,49 @@
 };
 
 &bus_dmc {
-	devfreq-events = <&ppmu_dmc0_3>, <&ppmu_dmc1_3>;
+	exynos,ppmu-device = <&ppmu_dmc0_3>, <&ppmu_dmc1_3>;
 	vdd-supply = <&buck1_reg>;
 	status = "okay";
 };
 
 &bus_acp {
-	devfreq = <&bus_dmc>;
+	exynos,parent-bus = <&bus_dmc>;
 	status = "okay";
 };
 
 &bus_c2c {
-	devfreq = <&bus_dmc>;
+	exynos,parent-bus = <&bus_dmc>;
 	status = "okay";
 };
 
 &bus_leftbus {
-	devfreq-events = <&ppmu_leftbus_3>, <&ppmu_rightbus_3>;
+	exynos,ppmu-device = <&ppmu_leftbus_3>, <&ppmu_rightbus_3>;
 	vdd-supply = <&buck3_reg>;
 	status = "okay";
 };
 
 &bus_rightbus {
-	devfreq = <&bus_leftbus>;
+	exynos,parent-bus = <&bus_leftbus>;
 	status = "okay";
 };
 
 &bus_display {
-	devfreq = <&bus_leftbus>;
+	exynos,parent-bus = <&bus_leftbus>;
 	status = "okay";
 };
 
 &bus_fsys {
-	devfreq = <&bus_leftbus>;
+	exynos,parent-bus = <&bus_leftbus>;
 	status = "okay";
 };
 
 &bus_peri {
-	devfreq = <&bus_leftbus>;
+	exynos,parent-bus = <&bus_leftbus>;
 	status = "okay";
 };
 
 &bus_mfc {
-	devfreq = <&bus_leftbus>;
+	exynos,parent-bus = <&bus_leftbus>;
 	status = "okay";
 };
 
diff --git a/arch/arm/boot/dts/exynos4412-odroid-common.dtsi b/arch/arm/boot/dts/exynos4412-odroid-common.dtsi
index ea55f377d17c..bb5a7cbcc308 100644
--- a/arch/arm/boot/dts/exynos4412-odroid-common.dtsi
+++ b/arch/arm/boot/dts/exynos4412-odroid-common.dtsi
@@ -88,49 +88,49 @@
 };
 
 &bus_dmc {
-	devfreq-events = <&ppmu_dmc0_3>, <&ppmu_dmc1_3>;
+	exynos,ppmu-device = <&ppmu_dmc0_3>, <&ppmu_dmc1_3>;
 	vdd-supply = <&buck1_reg>;
 	status = "okay";
 };
 
 &bus_acp {
-	devfreq = <&bus_dmc>;
+	exynos,parent-bus = <&bus_dmc>;
 	status = "okay";
 };
 
 &bus_c2c {
-	devfreq = <&bus_dmc>;
+	exynos,parent-bus = <&bus_dmc>;
 	status = "okay";
 };
 
 &bus_leftbus {
-	devfreq-events = <&ppmu_leftbus_3>, <&ppmu_rightbus_3>;
+	exynos,ppmu-device = <&ppmu_leftbus_3>, <&ppmu_rightbus_3>;
 	vdd-supply = <&buck3_reg>;
 	status = "okay";
 };
 
 &bus_rightbus {
-	devfreq = <&bus_leftbus>;
+	exynos,parent-bus = <&bus_leftbus>;
 	status = "okay";
 };
 
 &bus_display {
-	devfreq = <&bus_leftbus>;
+	exynos,parent-bus = <&bus_leftbus>;
 	status = "okay";
 };
 
 &bus_fsys {
-	devfreq = <&bus_leftbus>;
+	exynos,parent-bus = <&bus_leftbus>;
 	status = "okay";
 };
 
 &bus_peri {
-	devfreq = <&bus_leftbus>;
+	exynos,parent-bus = <&bus_leftbus>;
 	status = "okay";
 };
 
 &bus_mfc {
-	devfreq = <&bus_leftbus>;
+	exynos,parent-bus = <&bus_leftbus>;
 	status = "okay";
 };
 
diff --git a/arch/arm/boot/dts/exynos5422-odroid-core.dtsi b/arch/arm/boot/dts/exynos5422-odroid-core.dtsi
index 059fa32d1a8f..8510e2787a9c 100644
--- a/arch/arm/boot/dts/exynos5422-odroid-core.dtsi
+++ b/arch/arm/boot/dts/exynos5422-odroid-core.dtsi
@@ -134,7 +134,7 @@
 };
 
 &bus_wcore {
-	devfreq-events = <&nocp_mem0_0>, <&nocp_mem0_1>,
+	exynos,ppmu-device = <&nocp_mem0_0>, <&nocp_mem0_1>,
 			<&nocp_mem1_0>, <&nocp_mem1_1>;
 	vdd-supply = <&buck3_reg>;
 	exynos,saturation-ratio = <100>;
@@ -142,77 +142,77 @@
 };
 
 &bus_noc {
-	devfreq = <&bus_wcore>;
+	exynos,parent-bus = <&bus_wcore>;
 	status = "okay";
 };
 
 &bus_fsys_apb {
-	devfreq = <&bus_wcore>;
+	exynos,parent-bus = <&bus_wcore>;
 	status = "okay";
 };
 
 &bus_fsys {
-	devfreq = <&bus_wcore>;
+	exynos,parent-bus = <&bus_wcore>;
 	status = "okay";
 };
 
 &bus_fsys2 {
-	devfreq = <&bus_wcore>;
+	exynos,parent-bus = <&bus_wcore>;
 	status = "okay";
 };
 
 &bus_mfc {
-	devfreq = <&bus_wcore>;
+	exynos,parent-bus = <&bus_wcore>;
 	status = "okay";
 };
 
 &bus_gen {
-	devfreq = <&bus_wcore>;
+	exynos,parent-bus = <&bus_wcore>;
 	status = "okay";
 };
 
 &bus_peri {
-	devfreq = <&bus_wcore>;
+	exynos,parent-bus = <&bus_wcore>;
 	status = "okay";
 };
 
 &bus_g2d {
-	devfreq = <&bus_wcore>;
+	exynos,parent-bus = <&bus_wcore>;
 	status = "okay";
 };
 
 &bus_g2d_acp {
-	devfreq = <&bus_wcore>;
+	exynos,parent-bus = <&bus_wcore>;
 	status = "okay";
 };
 
 &bus_jpeg {
-	devfreq = <&bus_wcore>;
+	exynos,parent-bus = <&bus_wcore>;
 	status = "okay";
 };
 
 &bus_jpeg_apb {
-	devfreq = <&bus_wcore>;
+	exynos,parent-bus = <&bus_wcore>;
 	status = "okay";
 };
 
 &bus_disp1_fimd {
-	devfreq = <&bus_wcore>;
+	exynos,parent-bus = <&bus_wcore>;
 	status = "okay";
 };
 
 &bus_disp1 {
-	devfreq = <&bus_wcore>;
+	exynos,parent-bus = <&bus_wcore>;
 	status = "okay";
 };
 
 &bus_gscl_scaler {
-	devfreq = <&bus_wcore>;
+	exynos,parent-bus = <&bus_wcore>;
 	status = "okay";
 };
 
 &bus_mscl {
-	devfreq = <&bus_wcore>;
+	exynos,parent-bus = <&bus_wcore>;
 	status = "okay";
 };
 
@@ -225,7 +225,7 @@
 };
 
 &dmc {
-	devfreq-events = <&ppmu_event3_dmc0_0>,	<&ppmu_event3_dmc0_1>,
+	exynos,ppmu-device = <&ppmu_event3_dmc0_0>, <&ppmu_event3_dmc0_1>,
 			<&ppmu_event3_dmc1_0>, <&ppmu_event3_dmc1_1>;
 	device-handle = <&samsung_K3QF2F20DB>;
 	operating-points-v2 = <&dmc_opp_table>;
-- 
2.17.1


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

* [PATCH v2 11/11] arm64: dts: exynos: Replace deprecated property for Exynos bus on TM2
       [not found]   ` <CGME20191220001800epcas1p13d5f4ff181c10a118e151a86891a7130@epcas1p1.samsung.com>
@ 2019-12-20  0:24     ` Chanwoo Choi
  0 siblings, 0 replies; 21+ messages in thread
From: Chanwoo Choi @ 2019-12-20  0:24 UTC (permalink / raw)
  To: robh+dt, krzk, heiko, leonard.crestez, lukasz.luba
  Cc: mark.rutland, a.swigon, m.szyprowski, kgene, cw00.choi,
	myungjoo.ham, kyungmin.park, linux-pm, linux-samsung-soc,
	devicetree, linux-arm-kernel, linux-kernel, linux-rockchip

Replace the property related to devfreq and devfreq-event device
to remove the deprecated property name.
- Replace 'devfreq' with 'exynos,parent-bus' property
  for getting the parent devfreq device of exynos-bus.
- Replace 'devfreq-events' with 'exynos,ppmu-device' property
  for getting the devfreq-event device to monitor bus utilization.

Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
---
 .../dts/exynos/exynos5433-tm2-common.dtsi     | 20 +++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/arch/arm64/boot/dts/exynos/exynos5433-tm2-common.dtsi b/arch/arm64/boot/dts/exynos/exynos5433-tm2-common.dtsi
index 6f90b0e62cba..6bdd5b0940a5 100644
--- a/arch/arm64/boot/dts/exynos/exynos5433-tm2-common.dtsi
+++ b/arch/arm64/boot/dts/exynos/exynos5433-tm2-common.dtsi
@@ -166,54 +166,54 @@
 };
 
 &bus_g2d_400 {
-	devfreq-events = <&ppmu_event0_d0_general>, <&ppmu_event0_d1_general>;
+	exynos,ppmu-device = <&ppmu_event0_d0_general>, <&ppmu_event0_d1_general>;
 	vdd-supply = <&buck4_reg>;
 	exynos,saturation-ratio = <10>;
 	status = "okay";
 };
 
 &bus_g2d_266 {
-	devfreq = <&bus_g2d_400>;
+	exynos,parent-bus = <&bus_g2d_400>;
 	status = "okay";
 };
 
 &bus_gscl {
-	devfreq = <&bus_g2d_400>;
+	exynos,parent-bus = <&bus_g2d_400>;
 	status = "okay";
 };
 
 &bus_hevc {
-	devfreq = <&bus_g2d_400>;
+	exynos,parent-bus = <&bus_g2d_400>;
 	status = "okay";
 };
 
 &bus_jpeg {
-	devfreq = <&bus_g2d_400>;
+	exynos,parent-bus = <&bus_g2d_400>;
 	status = "okay";
 };
 
 &bus_mfc {
-	devfreq = <&bus_g2d_400>;
+	exynos,parent-bus = <&bus_g2d_400>;
 	status = "okay";
 };
 
 &bus_mscl {
-	devfreq = <&bus_g2d_400>;
+	exynos,parent-bus = <&bus_g2d_400>;
 	status = "okay";
 };
 
 &bus_noc0 {
-	devfreq = <&bus_g2d_400>;
+	exynos,parent-bus = <&bus_g2d_400>;
 	status = "okay";
 };
 
 &bus_noc1 {
-	devfreq = <&bus_g2d_400>;
+	exynos,parent-bus = <&bus_g2d_400>;
 	status = "okay";
 };
 
 &bus_noc2 {
-	devfreq = <&bus_g2d_400>;
+	exynos,parent-bus = <&bus_g2d_400>;
 	status = "okay";
 };
 
-- 
2.17.1


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

* Re: [PATCH v2 02/11] PM / devfreq: Remove devfreq_get_devfreq_by_phandle function
  2019-12-20  0:24     ` [PATCH v2 02/11] PM / devfreq: Remove devfreq_get_devfreq_by_phandle function Chanwoo Choi
@ 2019-12-20  0:46       ` Leonard Crestez
  2019-12-20  1:00         ` Chanwoo Choi
  2020-01-09 10:37       ` Lukasz Luba
  1 sibling, 1 reply; 21+ messages in thread
From: Leonard Crestez @ 2019-12-20  0:46 UTC (permalink / raw)
  To: Chanwoo Choi, krzk
  Cc: robh+dt, heiko, lukasz.luba, mark.rutland, a.swigon,
	m.szyprowski, kgene, myungjoo.ham, kyungmin.park, linux-pm,
	linux-samsung-soc, devicetree, linux-arm-kernel, linux-kernel,
	linux-rockchip

On 20.12.2019 02:18, Chanwoo Choi wrote:
> Previously, devfreq core support 'devfreq' property in order to get
> the devfreq device by phandle. But, 'devfreq' property name is not proper
> on devicetree binding because this name doesn't mean the any h/w attribute.
> 
> The devfreq core hand over the right to decide the property name
> for getting the devfreq device on devicetree. Each devfreq driver
> will decide the property name on devicetree binding and then get
> the devfreq device by using devfreq_get_devfreq_by_node().
> 
> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
> ---
>   drivers/devfreq/devfreq.c    | 35 -----------------------------------
>   drivers/devfreq/exynos-bus.c | 12 +++++++++++-
>   include/linux/devfreq.h      |  8 --------
>   3 files changed, 11 insertions(+), 44 deletions(-)
> 
> diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c
> index cb8ca81c8973..c3d3c7c802a0 100644
> --- a/drivers/devfreq/devfreq.c
> +++ b/drivers/devfreq/devfreq.c
> @@ -991,48 +991,13 @@ struct devfreq *devfreq_get_devfreq_by_node(struct device_node *node)
>   
>   	return ERR_PTR(-ENODEV);
>   }
> -
> -/*
> - * devfreq_get_devfreq_by_phandle - Get the devfreq device from devicetree
> - * @dev - instance to the given device
> - * @index - index into list of devfreq
> - *
> - * return the instance of devfreq device
> - */
> -struct devfreq *devfreq_get_devfreq_by_phandle(struct device *dev, int index)
> -{
> -	struct device_node *node;
> -	struct devfreq *devfreq;
> -
> -	if (!dev)
> -		return ERR_PTR(-EINVAL);
> -
> -	if (!dev->of_node)
> -		return ERR_PTR(-EINVAL);
> -
> -	node = of_parse_phandle(dev->of_node, "devfreq", index);
> -	if (!node)
> -		return ERR_PTR(-ENODEV);
> -
> -	devfreq = devfreq_get_devfreq_by_node(node);
> -	of_node_put(node);
> -
> -	return devfreq;
> -}
> -
>   #else
>   struct devfreq *devfreq_get_devfreq_by_node(struct device_node *node)
>   {
>   	return ERR_PTR(-ENODEV);
>   }
> -
> -struct devfreq *devfreq_get_devfreq_by_phandle(struct device *dev, int index)
> -{
> -	return ERR_PTR(-ENODEV);
> -}
>   #endif /* CONFIG_OF */
>   EXPORT_SYMBOL_GPL(devfreq_get_devfreq_by_node);
> -EXPORT_SYMBOL_GPL(devfreq_get_devfreq_by_phandle);
>   
>   /**
>    * devm_devfreq_remove_device() - Resource-managed devfreq_remove_device()
> diff --git a/drivers/devfreq/exynos-bus.c b/drivers/devfreq/exynos-bus.c
> index 7f5917d59072..1bc4e3c81115 100644
> --- a/drivers/devfreq/exynos-bus.c
> +++ b/drivers/devfreq/exynos-bus.c
> @@ -86,6 +86,16 @@ static int exynos_bus_get_event(struct exynos_bus *bus,
>   	return ret;
>   }
>   
> +static struct devfreq *exynos_bus_get_parent_devfreq(struct device_node *np)
> +{
> +	struct device_node *node = of_parse_phandle(np, "devfreq", 0);
> +
> +	if (!node)
> +		return ERR_PTR(-ENODEV);
> +
> +	return devfreq_get_devfreq_by_node(node);

You need to call of_node_put(node) here and in several other places.

The old devfreq_get_devfreq_by_phandle API handled this internally but 
devfreq_get_devfreq_by_node doesn't.

Maybe the _by_phandle API could be kept and just take the property name 
instead of always using "devfreq"?

> +}
> +
>   /*
>    * devfreq function for both simple-ondemand and passive governor
>    */
> @@ -353,7 +363,7 @@ static int exynos_bus_profile_init_passive(struct exynos_bus *bus,
>   	profile->exit = exynos_bus_passive_exit;
>   
>   	/* Get the instance of parent devfreq device */
> -	parent_devfreq = devfreq_get_devfreq_by_phandle(dev, 0);
> +	parent_devfreq = exynos_bus_get_parent_devfreq(dev->of_node);
>   	if (IS_ERR(parent_devfreq))
>   		return -EPROBE_DEFER;
>   
> diff --git a/include/linux/devfreq.h b/include/linux/devfreq.h
> index 1dccc47acbce..a4351698fb64 100644
> --- a/include/linux/devfreq.h
> +++ b/include/linux/devfreq.h
> @@ -254,8 +254,6 @@ extern void devm_devfreq_unregister_notifier(struct device *dev,
>   				struct notifier_block *nb,
>   				unsigned int list);
>   extern struct devfreq *devfreq_get_devfreq_by_node(struct device_node *node);
> -extern struct devfreq *devfreq_get_devfreq_by_phandle(struct device *dev,
> -						int index);
>   
>   #if IS_ENABLED(CONFIG_DEVFREQ_GOV_SIMPLE_ONDEMAND)
>   /**
> @@ -413,12 +411,6 @@ static inline struct devfreq *devfreq_get_devfreq_by_node(struct device_node *no
>   	return ERR_PTR(-ENODEV);
>   }
>   
> -static inline struct devfreq *devfreq_get_devfreq_by_phandle(struct device *dev,
> -							int index)
> -{
> -	return ERR_PTR(-ENODEV);
> -}
> -
>   static inline int devfreq_update_stats(struct devfreq *df)
>   {
>   	return -EINVAL;
> 


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

* Re: [PATCH v2 02/11] PM / devfreq: Remove devfreq_get_devfreq_by_phandle function
  2019-12-20  0:46       ` Leonard Crestez
@ 2019-12-20  1:00         ` Chanwoo Choi
  2019-12-20  1:40           ` Leonard Crestez
  0 siblings, 1 reply; 21+ messages in thread
From: Chanwoo Choi @ 2019-12-20  1:00 UTC (permalink / raw)
  To: Leonard Crestez, krzk
  Cc: robh+dt, heiko, lukasz.luba, mark.rutland, a.swigon,
	m.szyprowski, kgene, myungjoo.ham, kyungmin.park, linux-pm,
	linux-samsung-soc, devicetree, linux-arm-kernel, linux-kernel,
	linux-rockchip

On 12/20/19 9:46 AM, Leonard Crestez wrote:
> On 20.12.2019 02:18, Chanwoo Choi wrote:
>> Previously, devfreq core support 'devfreq' property in order to get
>> the devfreq device by phandle. But, 'devfreq' property name is not proper
>> on devicetree binding because this name doesn't mean the any h/w attribute.
>>
>> The devfreq core hand over the right to decide the property name
>> for getting the devfreq device on devicetree. Each devfreq driver
>> will decide the property name on devicetree binding and then get
>> the devfreq device by using devfreq_get_devfreq_by_node().
>>
>> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
>> ---
>>   drivers/devfreq/devfreq.c    | 35 -----------------------------------
>>   drivers/devfreq/exynos-bus.c | 12 +++++++++++-
>>   include/linux/devfreq.h      |  8 --------
>>   3 files changed, 11 insertions(+), 44 deletions(-)
>>
>> diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c
>> index cb8ca81c8973..c3d3c7c802a0 100644
>> --- a/drivers/devfreq/devfreq.c
>> +++ b/drivers/devfreq/devfreq.c
>> @@ -991,48 +991,13 @@ struct devfreq *devfreq_get_devfreq_by_node(struct device_node *node)
>>   
>>   	return ERR_PTR(-ENODEV);
>>   }
>> -
>> -/*
>> - * devfreq_get_devfreq_by_phandle - Get the devfreq device from devicetree
>> - * @dev - instance to the given device
>> - * @index - index into list of devfreq
>> - *
>> - * return the instance of devfreq device
>> - */
>> -struct devfreq *devfreq_get_devfreq_by_phandle(struct device *dev, int index)
>> -{
>> -	struct device_node *node;
>> -	struct devfreq *devfreq;
>> -
>> -	if (!dev)
>> -		return ERR_PTR(-EINVAL);
>> -
>> -	if (!dev->of_node)
>> -		return ERR_PTR(-EINVAL);
>> -
>> -	node = of_parse_phandle(dev->of_node, "devfreq", index);
>> -	if (!node)
>> -		return ERR_PTR(-ENODEV);
>> -
>> -	devfreq = devfreq_get_devfreq_by_node(node);
>> -	of_node_put(node);
>> -
>> -	return devfreq;
>> -}
>> -
>>   #else
>>   struct devfreq *devfreq_get_devfreq_by_node(struct device_node *node)
>>   {
>>   	return ERR_PTR(-ENODEV);
>>   }
>> -
>> -struct devfreq *devfreq_get_devfreq_by_phandle(struct device *dev, int index)
>> -{
>> -	return ERR_PTR(-ENODEV);
>> -}
>>   #endif /* CONFIG_OF */
>>   EXPORT_SYMBOL_GPL(devfreq_get_devfreq_by_node);
>> -EXPORT_SYMBOL_GPL(devfreq_get_devfreq_by_phandle);
>>   
>>   /**
>>    * devm_devfreq_remove_device() - Resource-managed devfreq_remove_device()
>> diff --git a/drivers/devfreq/exynos-bus.c b/drivers/devfreq/exynos-bus.c
>> index 7f5917d59072..1bc4e3c81115 100644
>> --- a/drivers/devfreq/exynos-bus.c
>> +++ b/drivers/devfreq/exynos-bus.c
>> @@ -86,6 +86,16 @@ static int exynos_bus_get_event(struct exynos_bus *bus,
>>   	return ret;
>>   }
>>   
>> +static struct devfreq *exynos_bus_get_parent_devfreq(struct device_node *np)
>> +{
>> +	struct device_node *node = of_parse_phandle(np, "devfreq", 0);
>> +
>> +	if (!node)
>> +		return ERR_PTR(-ENODEV);
>> +
>> +	return devfreq_get_devfreq_by_node(node);
> 
> You need to call of_node_put(node) here and in several other places.
> 
> The old devfreq_get_devfreq_by_phandle API handled this internally but 
> devfreq_get_devfreq_by_node doesn't.

Thanks. I'll fix it.

> 
> Maybe the _by_phandle API could be kept and just take the property name 
> instead of always using "devfreq"?

Do you mean like below?
devfreq_get_devfreq_by_phandle(struct device *dev, int index)
-> devfreq_get_devfreq_by_phandle(struct device *dev, char *property_name, int index)

In case of devfreq-event.c,
struct devfreq_event_dev *devfreq_event_get_edev_by_phandle(
						struct device *dev,
						char property_name,
						int index)
int devfreq_event_get_edev_count(struct device *dev, char *property_name)

> 
>> +}
>> +
>>   /*
>>    * devfreq function for both simple-ondemand and passive governor
>>    */
>> @@ -353,7 +363,7 @@ static int exynos_bus_profile_init_passive(struct exynos_bus *bus,
>>   	profile->exit = exynos_bus_passive_exit;
>>   
>>   	/* Get the instance of parent devfreq device */
>> -	parent_devfreq = devfreq_get_devfreq_by_phandle(dev, 0);
>> +	parent_devfreq = exynos_bus_get_parent_devfreq(dev->of_node);
>>   	if (IS_ERR(parent_devfreq))
>>   		return -EPROBE_DEFER;
>>   
>> diff --git a/include/linux/devfreq.h b/include/linux/devfreq.h
>> index 1dccc47acbce..a4351698fb64 100644
>> --- a/include/linux/devfreq.h
>> +++ b/include/linux/devfreq.h
>> @@ -254,8 +254,6 @@ extern void devm_devfreq_unregister_notifier(struct device *dev,
>>   				struct notifier_block *nb,
>>   				unsigned int list);
>>   extern struct devfreq *devfreq_get_devfreq_by_node(struct device_node *node);
>> -extern struct devfreq *devfreq_get_devfreq_by_phandle(struct device *dev,
>> -						int index);
>>   
>>   #if IS_ENABLED(CONFIG_DEVFREQ_GOV_SIMPLE_ONDEMAND)
>>   /**
>> @@ -413,12 +411,6 @@ static inline struct devfreq *devfreq_get_devfreq_by_node(struct device_node *no
>>   	return ERR_PTR(-ENODEV);
>>   }
>>   
>> -static inline struct devfreq *devfreq_get_devfreq_by_phandle(struct device *dev,
>> -							int index)
>> -{
>> -	return ERR_PTR(-ENODEV);
>> -}
>> -
>>   static inline int devfreq_update_stats(struct devfreq *df)
>>   {
>>   	return -EINVAL;
>>
> 
> 
> 


-- 
Best Regards,
Chanwoo Choi
Samsung Electronics

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

* Re: [PATCH v2 02/11] PM / devfreq: Remove devfreq_get_devfreq_by_phandle function
  2019-12-20  1:00         ` Chanwoo Choi
@ 2019-12-20  1:40           ` Leonard Crestez
  2019-12-20  2:14             ` Chanwoo Choi
  0 siblings, 1 reply; 21+ messages in thread
From: Leonard Crestez @ 2019-12-20  1:40 UTC (permalink / raw)
  To: Chanwoo Choi, krzk
  Cc: robh+dt, heiko, lukasz.luba, mark.rutland, a.swigon,
	m.szyprowski, kgene, myungjoo.ham, kyungmin.park, linux-pm,
	linux-samsung-soc, devicetree, linux-arm-kernel, linux-kernel,
	linux-rockchip

On 2019-12-20 2:54 AM, Chanwoo Choi wrote:
> On 12/20/19 9:46 AM, Leonard Crestez wrote:
>> On 20.12.2019 02:18, Chanwoo Choi wrote:
>>> Previously, devfreq core support 'devfreq' property in order to get
>>> the devfreq device by phandle. But, 'devfreq' property name is not proper
>>> on devicetree binding because this name doesn't mean the any h/w attribute.
>>>
>>> The devfreq core hand over the right to decide the property name
>>> for getting the devfreq device on devicetree. Each devfreq driver
>>> will decide the property name on devicetree binding and then get
>>> the devfreq device by using devfreq_get_devfreq_by_node().
>>>
>>> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
>>> ---
>>>    drivers/devfreq/devfreq.c    | 35 -----------------------------------
>>>    drivers/devfreq/exynos-bus.c | 12 +++++++++++-
>>>    include/linux/devfreq.h      |  8 --------
>>>    3 files changed, 11 insertions(+), 44 deletions(-)
>>>
>>> diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c
>>> index cb8ca81c8973..c3d3c7c802a0 100644
>>> --- a/drivers/devfreq/devfreq.c
>>> +++ b/drivers/devfreq/devfreq.c
>>> @@ -991,48 +991,13 @@ struct devfreq *devfreq_get_devfreq_by_node(struct device_node *node)
>>>    
>>>    	return ERR_PTR(-ENODEV);
>>>    }
>>> -
>>> -/*
>>> - * devfreq_get_devfreq_by_phandle - Get the devfreq device from devicetree
>>> - * @dev - instance to the given device
>>> - * @index - index into list of devfreq
>>> - *
>>> - * return the instance of devfreq device
>>> - */
>>> -struct devfreq *devfreq_get_devfreq_by_phandle(struct device *dev, int index)
>>> -{
>>> -	struct device_node *node;
>>> -	struct devfreq *devfreq;
>>> -
>>> -	if (!dev)
>>> -		return ERR_PTR(-EINVAL);
>>> -
>>> -	if (!dev->of_node)
>>> -		return ERR_PTR(-EINVAL);
>>> -
>>> -	node = of_parse_phandle(dev->of_node, "devfreq", index);
>>> -	if (!node)
>>> -		return ERR_PTR(-ENODEV);
>>> -
>>> -	devfreq = devfreq_get_devfreq_by_node(node);
>>> -	of_node_put(node);
>>> -
>>> -	return devfreq;
>>> -}
>>> -
>>>    #else
>>>    struct devfreq *devfreq_get_devfreq_by_node(struct device_node *node)
>>>    {
>>>    	return ERR_PTR(-ENODEV);
>>>    }
>>> -
>>> -struct devfreq *devfreq_get_devfreq_by_phandle(struct device *dev, int index)
>>> -{
>>> -	return ERR_PTR(-ENODEV);
>>> -}
>>>    #endif /* CONFIG_OF */
>>>    EXPORT_SYMBOL_GPL(devfreq_get_devfreq_by_node);
>>> -EXPORT_SYMBOL_GPL(devfreq_get_devfreq_by_phandle);
>>>    
>>>    /**
>>>     * devm_devfreq_remove_device() - Resource-managed devfreq_remove_device()
>>> diff --git a/drivers/devfreq/exynos-bus.c b/drivers/devfreq/exynos-bus.c
>>> index 7f5917d59072..1bc4e3c81115 100644
>>> --- a/drivers/devfreq/exynos-bus.c
>>> +++ b/drivers/devfreq/exynos-bus.c
>>> @@ -86,6 +86,16 @@ static int exynos_bus_get_event(struct exynos_bus *bus,
>>>    	return ret;
>>>    }
>>>    
>>> +static struct devfreq *exynos_bus_get_parent_devfreq(struct device_node *np)
>>> +{
>>> +	struct device_node *node = of_parse_phandle(np, "devfreq", 0);
>>> +
>>> +	if (!node)
>>> +		return ERR_PTR(-ENODEV);
>>> +
>>> +	return devfreq_get_devfreq_by_node(node);
>>
>> You need to call of_node_put(node) here and in several other places.
>>
>> The old devfreq_get_devfreq_by_phandle API handled this internally but
>> devfreq_get_devfreq_by_node doesn't.
> 
> Thanks. I'll fix it.
> 
>>
>> Maybe the _by_phandle API could be kept and just take the property name
>> instead of always using "devfreq"?
> 
> Do you mean like below?
> devfreq_get_devfreq_by_phandle(struct device *dev, int index)
> -> devfreq_get_devfreq_by_phandle(struct device *dev, char *property_name, int index)
> 
> In case of devfreq-event.c,
> struct devfreq_event_dev *devfreq_event_get_edev_by_phandle(
> 						struct device *dev,
> 						char property_name,
> 						int index)
> int devfreq_event_get_edev_count(struct device *dev, char *property_name)

Yes. These helpers would avoid the need for explicit of_node_put.

> 
>>
>>> +}
>>> +
>>>    /*
>>>     * devfreq function for both simple-ondemand and passive governor
>>>     */
>>> @@ -353,7 +363,7 @@ static int exynos_bus_profile_init_passive(struct exynos_bus *bus,
>>>    	profile->exit = exynos_bus_passive_exit;
>>>    
>>>    	/* Get the instance of parent devfreq device */
>>> -	parent_devfreq = devfreq_get_devfreq_by_phandle(dev, 0);
>>> +	parent_devfreq = exynos_bus_get_parent_devfreq(dev->of_node);
>>>    	if (IS_ERR(parent_devfreq))
>>>    		return -EPROBE_DEFER;
>>>    
>>> diff --git a/include/linux/devfreq.h b/include/linux/devfreq.h
>>> index 1dccc47acbce..a4351698fb64 100644
>>> --- a/include/linux/devfreq.h
>>> +++ b/include/linux/devfreq.h
>>> @@ -254,8 +254,6 @@ extern void devm_devfreq_unregister_notifier(struct device *dev,
>>>    				struct notifier_block *nb,
>>>    				unsigned int list);
>>>    extern struct devfreq *devfreq_get_devfreq_by_node(struct device_node *node);
>>> -extern struct devfreq *devfreq_get_devfreq_by_phandle(struct device *dev,
>>> -						int index);
>>>    
>>>    #if IS_ENABLED(CONFIG_DEVFREQ_GOV_SIMPLE_ONDEMAND)
>>>    /**
>>> @@ -413,12 +411,6 @@ static inline struct devfreq *devfreq_get_devfreq_by_node(struct device_node *no
>>>    	return ERR_PTR(-ENODEV);
>>>    }
>>>    
>>> -static inline struct devfreq *devfreq_get_devfreq_by_phandle(struct device *dev,
>>> -							int index)
>>> -{
>>> -	return ERR_PTR(-ENODEV);
>>> -}
>>> -
>>>    static inline int devfreq_update_stats(struct devfreq *df)
>>>    {
>>>    	return -EINVAL;


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

* Re: [PATCH v2 02/11] PM / devfreq: Remove devfreq_get_devfreq_by_phandle function
  2019-12-20  1:40           ` Leonard Crestez
@ 2019-12-20  2:14             ` Chanwoo Choi
  0 siblings, 0 replies; 21+ messages in thread
From: Chanwoo Choi @ 2019-12-20  2:14 UTC (permalink / raw)
  To: Leonard Crestez, krzk
  Cc: robh+dt, heiko, lukasz.luba, mark.rutland, a.swigon,
	m.szyprowski, kgene, myungjoo.ham, kyungmin.park, linux-pm,
	linux-samsung-soc, devicetree, linux-arm-kernel, linux-kernel,
	linux-rockchip

On 12/20/19 10:40 AM, Leonard Crestez wrote:
> On 2019-12-20 2:54 AM, Chanwoo Choi wrote:
>> On 12/20/19 9:46 AM, Leonard Crestez wrote:
>>> On 20.12.2019 02:18, Chanwoo Choi wrote:
>>>> Previously, devfreq core support 'devfreq' property in order to get
>>>> the devfreq device by phandle. But, 'devfreq' property name is not proper
>>>> on devicetree binding because this name doesn't mean the any h/w attribute.
>>>>
>>>> The devfreq core hand over the right to decide the property name
>>>> for getting the devfreq device on devicetree. Each devfreq driver
>>>> will decide the property name on devicetree binding and then get
>>>> the devfreq device by using devfreq_get_devfreq_by_node().
>>>>
>>>> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
>>>> ---
>>>>    drivers/devfreq/devfreq.c    | 35 -----------------------------------
>>>>    drivers/devfreq/exynos-bus.c | 12 +++++++++++-
>>>>    include/linux/devfreq.h      |  8 --------
>>>>    3 files changed, 11 insertions(+), 44 deletions(-)
>>>>
>>>> diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c
>>>> index cb8ca81c8973..c3d3c7c802a0 100644
>>>> --- a/drivers/devfreq/devfreq.c
>>>> +++ b/drivers/devfreq/devfreq.c
>>>> @@ -991,48 +991,13 @@ struct devfreq *devfreq_get_devfreq_by_node(struct device_node *node)
>>>>    
>>>>    	return ERR_PTR(-ENODEV);
>>>>    }
>>>> -
>>>> -/*
>>>> - * devfreq_get_devfreq_by_phandle - Get the devfreq device from devicetree
>>>> - * @dev - instance to the given device
>>>> - * @index - index into list of devfreq
>>>> - *
>>>> - * return the instance of devfreq device
>>>> - */
>>>> -struct devfreq *devfreq_get_devfreq_by_phandle(struct device *dev, int index)
>>>> -{
>>>> -	struct device_node *node;
>>>> -	struct devfreq *devfreq;
>>>> -
>>>> -	if (!dev)
>>>> -		return ERR_PTR(-EINVAL);
>>>> -
>>>> -	if (!dev->of_node)
>>>> -		return ERR_PTR(-EINVAL);
>>>> -
>>>> -	node = of_parse_phandle(dev->of_node, "devfreq", index);
>>>> -	if (!node)
>>>> -		return ERR_PTR(-ENODEV);
>>>> -
>>>> -	devfreq = devfreq_get_devfreq_by_node(node);
>>>> -	of_node_put(node);
>>>> -
>>>> -	return devfreq;
>>>> -}
>>>> -
>>>>    #else
>>>>    struct devfreq *devfreq_get_devfreq_by_node(struct device_node *node)
>>>>    {
>>>>    	return ERR_PTR(-ENODEV);
>>>>    }
>>>> -
>>>> -struct devfreq *devfreq_get_devfreq_by_phandle(struct device *dev, int index)
>>>> -{
>>>> -	return ERR_PTR(-ENODEV);
>>>> -}
>>>>    #endif /* CONFIG_OF */
>>>>    EXPORT_SYMBOL_GPL(devfreq_get_devfreq_by_node);
>>>> -EXPORT_SYMBOL_GPL(devfreq_get_devfreq_by_phandle);
>>>>    
>>>>    /**
>>>>     * devm_devfreq_remove_device() - Resource-managed devfreq_remove_device()
>>>> diff --git a/drivers/devfreq/exynos-bus.c b/drivers/devfreq/exynos-bus.c
>>>> index 7f5917d59072..1bc4e3c81115 100644
>>>> --- a/drivers/devfreq/exynos-bus.c
>>>> +++ b/drivers/devfreq/exynos-bus.c
>>>> @@ -86,6 +86,16 @@ static int exynos_bus_get_event(struct exynos_bus *bus,
>>>>    	return ret;
>>>>    }
>>>>    
>>>> +static struct devfreq *exynos_bus_get_parent_devfreq(struct device_node *np)
>>>> +{
>>>> +	struct device_node *node = of_parse_phandle(np, "devfreq", 0);
>>>> +
>>>> +	if (!node)
>>>> +		return ERR_PTR(-ENODEV);
>>>> +
>>>> +	return devfreq_get_devfreq_by_node(node);
>>>
>>> You need to call of_node_put(node) here and in several other places.
>>>
>>> The old devfreq_get_devfreq_by_phandle API handled this internally but
>>> devfreq_get_devfreq_by_node doesn't.
>>
>> Thanks. I'll fix it.
>>
>>>
>>> Maybe the _by_phandle API could be kept and just take the property name
>>> instead of always using "devfreq"?
>>
>> Do you mean like below?
>> devfreq_get_devfreq_by_phandle(struct device *dev, int index)
>> -> devfreq_get_devfreq_by_phandle(struct device *dev, char *property_name, int index)
>>
>> In case of devfreq-event.c,
>> struct devfreq_event_dev *devfreq_event_get_edev_by_phandle(
>> 						struct device *dev,
>> 						char property_name,
>> 						int index)
>> int devfreq_event_get_edev_count(struct device *dev, char *property_name)
> 
> Yes. These helpers would avoid the need for explicit of_node_put.

OK. Instead of removing devfreq_event_get_edev_by_phandle,
change the function property of devfreq_event_get_edev_by_phandle on v3.

After getting the review for dt-binding patch, I'll send v3 patches.

> 
>>
>>>
>>>> +}
>>>> +
>>>>    /*
>>>>     * devfreq function for both simple-ondemand and passive governor
>>>>     */
>>>> @@ -353,7 +363,7 @@ static int exynos_bus_profile_init_passive(struct exynos_bus *bus,
>>>>    	profile->exit = exynos_bus_passive_exit;
>>>>    
>>>>    	/* Get the instance of parent devfreq device */
>>>> -	parent_devfreq = devfreq_get_devfreq_by_phandle(dev, 0);
>>>> +	parent_devfreq = exynos_bus_get_parent_devfreq(dev->of_node);
>>>>    	if (IS_ERR(parent_devfreq))
>>>>    		return -EPROBE_DEFER;
>>>>    
>>>> diff --git a/include/linux/devfreq.h b/include/linux/devfreq.h
>>>> index 1dccc47acbce..a4351698fb64 100644
>>>> --- a/include/linux/devfreq.h
>>>> +++ b/include/linux/devfreq.h
>>>> @@ -254,8 +254,6 @@ extern void devm_devfreq_unregister_notifier(struct device *dev,
>>>>    				struct notifier_block *nb,
>>>>    				unsigned int list);
>>>>    extern struct devfreq *devfreq_get_devfreq_by_node(struct device_node *node);
>>>> -extern struct devfreq *devfreq_get_devfreq_by_phandle(struct device *dev,
>>>> -						int index);
>>>>    
>>>>    #if IS_ENABLED(CONFIG_DEVFREQ_GOV_SIMPLE_ONDEMAND)
>>>>    /**
>>>> @@ -413,12 +411,6 @@ static inline struct devfreq *devfreq_get_devfreq_by_node(struct device_node *no
>>>>    	return ERR_PTR(-ENODEV);
>>>>    }
>>>>    
>>>> -static inline struct devfreq *devfreq_get_devfreq_by_phandle(struct device *dev,
>>>> -							int index)
>>>> -{
>>>> -	return ERR_PTR(-ENODEV);
>>>> -}
>>>> -
>>>>    static inline int devfreq_update_stats(struct devfreq *df)
>>>>    {
>>>>    	return -EINVAL;
> 
> 
> 


-- 
Best Regards,
Chanwoo Choi
Samsung Electronics

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

* Re: [PATCH v2 04/11] dt-bindings: devfreq: exynos-bus: Replace deprecated 'devfreq' and 'devfreq-events' property
  2019-12-20  0:24     ` [PATCH v2 04/11] dt-bindings: devfreq: exynos-bus: Replace deprecated 'devfreq' and 'devfreq-events' property Chanwoo Choi
@ 2019-12-20  8:43       ` Krzysztof Kozlowski
  0 siblings, 0 replies; 21+ messages in thread
From: Krzysztof Kozlowski @ 2019-12-20  8:43 UTC (permalink / raw)
  To: Chanwoo Choi
  Cc: robh+dt, heiko, leonard.crestez, lukasz.luba, mark.rutland,
	a.swigon, m.szyprowski, kgene, myungjoo.ham, kyungmin.park,
	linux-pm, linux-samsung-soc, devicetree, linux-arm-kernel,
	linux-kernel, linux-rockchip

On Fri, Dec 20, 2019 at 09:24:23AM +0900, Chanwoo Choi wrote:
> In order to remove the deprecated 'devfreq' and 'devfreq-events' property,
> replace with new following properties
> - Replace 'devfreq' with 'exynos,parent-bus' property
> - Replace 'devfreq-events' with 'exynos,ppmu-device' property
> 
> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
> ---
>  .../bindings/devfreq/exynos-bus.txt           | 22 +++++++++----------
>  1 file changed, 11 insertions(+), 11 deletions(-)

Acked-by: Krzysztof Kozlowski <krzk@kernel.org>

Best regards,
Krzysztof


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

* Re: [PATCH v2 01/11] PM / devfreq: Add devfreq_get_devfreq_by_node function
  2019-12-20  0:24     ` [PATCH v2 01/11] PM / devfreq: Add devfreq_get_devfreq_by_node function Chanwoo Choi
@ 2020-01-09  9:47       ` Lukasz Luba
  0 siblings, 0 replies; 21+ messages in thread
From: Lukasz Luba @ 2020-01-09  9:47 UTC (permalink / raw)
  To: Chanwoo Choi, robh+dt, krzk, heiko, leonard.crestez
  Cc: mark.rutland, a.swigon, m.szyprowski, kgene, myungjoo.ham,
	kyungmin.park, linux-pm, linux-samsung-soc, devicetree,
	linux-arm-kernel, linux-kernel, linux-rockchip

Hi Chanwoo,


On 12/20/19 12:24 AM, Chanwoo Choi wrote:
> From: Leonard Crestez <leonard.crestez@nxp.com>
> 
> Split off part of devfreq_get_devfreq_by_phandle into a separate
> function. This allows callers to fetch devfreq instances by enumerating
> devicetree instead of explicit phandles.
> 
> [lkp: Reported the build error]
> Reported-by: kbuild test robot <lkp@intel.com>
> Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
> [cw00.choi: Export devfreq_get_devfreq_by_node function and
>   add function to devfreq.h when CONFIG_PM_DEVFREQ is enabled.]
> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
> ---
>   drivers/devfreq/devfreq.c | 46 +++++++++++++++++++++++++++++----------
>   include/linux/devfreq.h   |  6 +++++
>   2 files changed, 41 insertions(+), 11 deletions(-)
> 
> diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c
> index 89260b17598f..cb8ca81c8973 100644
> --- a/drivers/devfreq/devfreq.c
> +++ b/drivers/devfreq/devfreq.c
> @@ -966,6 +966,32 @@ struct devfreq *devm_devfreq_add_device(struct device *dev,
>   EXPORT_SYMBOL(devm_devfreq_add_device);
>   
>   #ifdef CONFIG_OF
> +/*
> + * devfreq_get_devfreq_by_node - Get the devfreq device from devicetree
> + * @node - pointer to device_node
> + *
> + * return the instance of devfreq device
> + */
> +struct devfreq *devfreq_get_devfreq_by_node(struct device_node *node)
> +{
> +	struct devfreq *devfreq;
> +
> +	if (!node)
> +		return ERR_PTR(-EINVAL);
> +
> +	mutex_lock(&devfreq_list_lock);
> +	list_for_each_entry(devfreq, &devfreq_list, node) {
> +		if (devfreq->dev.parent
> +			&& devfreq->dev.parent->of_node == node) {
> +			mutex_unlock(&devfreq_list_lock);
> +			return devfreq;
> +		}
> +	}
> +	mutex_unlock(&devfreq_list_lock);
> +
> +	return ERR_PTR(-ENODEV);
> +}
> +
>   /*
>    * devfreq_get_devfreq_by_phandle - Get the devfreq device from devicetree
>    * @dev - instance to the given device
> @@ -988,26 +1014,24 @@ struct devfreq *devfreq_get_devfreq_by_phandle(struct device *dev, int index)
>   	if (!node)
>   		return ERR_PTR(-ENODEV);
>   
> -	mutex_lock(&devfreq_list_lock);
> -	list_for_each_entry(devfreq, &devfreq_list, node) {
> -		if (devfreq->dev.parent
> -			&& devfreq->dev.parent->of_node == node) {
> -			mutex_unlock(&devfreq_list_lock);
> -			of_node_put(node);
> -			return devfreq;
> -		}
> -	}
> -	mutex_unlock(&devfreq_list_lock);
> +	devfreq = devfreq_get_devfreq_by_node(node);
>   	of_node_put(node);
>   
> -	return ERR_PTR(-EPROBE_DEFER);
> +	return devfreq;
>   }
> +
>   #else
> +struct devfreq *devfreq_get_devfreq_by_node(struct device_node *node)
> +{
> +	return ERR_PTR(-ENODEV);
> +}
> +
>   struct devfreq *devfreq_get_devfreq_by_phandle(struct device *dev, int index)
>   {
>   	return ERR_PTR(-ENODEV);
>   }
>   #endif /* CONFIG_OF */
> +EXPORT_SYMBOL_GPL(devfreq_get_devfreq_by_node);
>   EXPORT_SYMBOL_GPL(devfreq_get_devfreq_by_phandle);
>   
>   /**
> diff --git a/include/linux/devfreq.h b/include/linux/devfreq.h
> index c6f82d4bec9f..1dccc47acbce 100644
> --- a/include/linux/devfreq.h
> +++ b/include/linux/devfreq.h
> @@ -253,6 +253,7 @@ extern void devm_devfreq_unregister_notifier(struct device *dev,
>   				struct devfreq *devfreq,
>   				struct notifier_block *nb,
>   				unsigned int list);
> +extern struct devfreq *devfreq_get_devfreq_by_node(struct device_node *node);

It can go without 'extern' in the header.

>   extern struct devfreq *devfreq_get_devfreq_by_phandle(struct device *dev,
>   						int index);
>   
> @@ -407,6 +408,11 @@ static inline void devm_devfreq_unregister_notifier(struct device *dev,
>   {
>   }
>   
> +static inline struct devfreq *devfreq_get_devfreq_by_node(struct device_node *node)
> +{
> +	return ERR_PTR(-ENODEV);
> +}
> +
>   static inline struct devfreq *devfreq_get_devfreq_by_phandle(struct device *dev,
>   							int index)
>   {
> 

Apart from this minor thing, looks good to me.
When you fix it, feel free to add

Reviewed-by: Lukasz Luba <lukasz.luba@arm.com>

Regards,
Lukasz

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

* Re: [PATCH v2 02/11] PM / devfreq: Remove devfreq_get_devfreq_by_phandle function
  2019-12-20  0:24     ` [PATCH v2 02/11] PM / devfreq: Remove devfreq_get_devfreq_by_phandle function Chanwoo Choi
  2019-12-20  0:46       ` Leonard Crestez
@ 2020-01-09 10:37       ` Lukasz Luba
  2020-01-09 10:54         ` Chanwoo Choi
  1 sibling, 1 reply; 21+ messages in thread
From: Lukasz Luba @ 2020-01-09 10:37 UTC (permalink / raw)
  To: Chanwoo Choi, robh+dt, krzk, heiko, leonard.crestez
  Cc: mark.rutland, a.swigon, m.szyprowski, kgene, myungjoo.ham,
	kyungmin.park, linux-pm, linux-samsung-soc, devicetree,
	linux-arm-kernel, linux-kernel, linux-rockchip

Hi Chanwoo,

On 12/20/19 12:24 AM, Chanwoo Choi wrote:
> Previously, devfreq core support 'devfreq' property in order to get
> the devfreq device by phandle. But, 'devfreq' property name is not proper
> on devicetree binding because this name doesn't mean the any h/w attribute.
> 
> The devfreq core hand over the right to decide the property name
> for getting the devfreq device on devicetree. Each devfreq driver
> will decide the property name on devicetree binding and then get
> the devfreq device by using devfreq_get_devfreq_by_node().
> 
> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
> ---
>   drivers/devfreq/devfreq.c    | 35 -----------------------------------
>   drivers/devfreq/exynos-bus.c | 12 +++++++++++-
>   include/linux/devfreq.h      |  8 --------
>   3 files changed, 11 insertions(+), 44 deletions(-)
> 
> diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c
> index cb8ca81c8973..c3d3c7c802a0 100644
> --- a/drivers/devfreq/devfreq.c
> +++ b/drivers/devfreq/devfreq.c
> @@ -991,48 +991,13 @@ struct devfreq *devfreq_get_devfreq_by_node(struct device_node *node)
>   
>   	return ERR_PTR(-ENODEV);
>   }
> -
> -/*
> - * devfreq_get_devfreq_by_phandle - Get the devfreq device from devicetree
> - * @dev - instance to the given device
> - * @index - index into list of devfreq
> - *
> - * return the instance of devfreq device
> - */
> -struct devfreq *devfreq_get_devfreq_by_phandle(struct device *dev, int index)
> -{
> -	struct device_node *node;
> -	struct devfreq *devfreq;
> -
> -	if (!dev)
> -		return ERR_PTR(-EINVAL);
> -
> -	if (!dev->of_node)
> -		return ERR_PTR(-EINVAL);
> -
> -	node = of_parse_phandle(dev->of_node, "devfreq", index);
> -	if (!node)
> -		return ERR_PTR(-ENODEV);
> -
> -	devfreq = devfreq_get_devfreq_by_node(node);
> -	of_node_put(node);
> -
> -	return devfreq;
> -}
> -
>   #else
>   struct devfreq *devfreq_get_devfreq_by_node(struct device_node *node)
>   {
>   	return ERR_PTR(-ENODEV);
>   }
> -
> -struct devfreq *devfreq_get_devfreq_by_phandle(struct device *dev, int index)
> -{
> -	return ERR_PTR(-ENODEV);
> -}
>   #endif /* CONFIG_OF */
>   EXPORT_SYMBOL_GPL(devfreq_get_devfreq_by_node);
> -EXPORT_SYMBOL_GPL(devfreq_get_devfreq_by_phandle);
>   
>   /**
>    * devm_devfreq_remove_device() - Resource-managed devfreq_remove_device()
> diff --git a/drivers/devfreq/exynos-bus.c b/drivers/devfreq/exynos-bus.c
> index 7f5917d59072..1bc4e3c81115 100644
> --- a/drivers/devfreq/exynos-bus.c
> +++ b/drivers/devfreq/exynos-bus.c
> @@ -86,6 +86,16 @@ static int exynos_bus_get_event(struct exynos_bus *bus,
>   	return ret;
>   }
>   
> +static struct devfreq *exynos_bus_get_parent_devfreq(struct device_node *np)
> +{
> +	struct device_node *node = of_parse_phandle(np, "devfreq", 0);
> +
> +	if (!node)
> +		return ERR_PTR(-ENODEV);
> +
> +	return devfreq_get_devfreq_by_node(node);
> +}
> +
>   /*
>    * devfreq function for both simple-ondemand and passive governor
>    */
> @@ -353,7 +363,7 @@ static int exynos_bus_profile_init_passive(struct exynos_bus *bus,
>   	profile->exit = exynos_bus_passive_exit;
>   
>   	/* Get the instance of parent devfreq device */
> -	parent_devfreq = devfreq_get_devfreq_by_phandle(dev, 0);
> +	parent_devfreq = exynos_bus_get_parent_devfreq(dev->of_node);
>   	if (IS_ERR(parent_devfreq))
>   		return -EPROBE_DEFER;
>   

These changes won't apply, probably I need some base for it.

Regards,
Lukasz


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

* Re: [PATCH v2 02/11] PM / devfreq: Remove devfreq_get_devfreq_by_phandle function
  2020-01-09 10:37       ` Lukasz Luba
@ 2020-01-09 10:54         ` Chanwoo Choi
  2020-01-09 10:57           ` Lukasz Luba
  0 siblings, 1 reply; 21+ messages in thread
From: Chanwoo Choi @ 2020-01-09 10:54 UTC (permalink / raw)
  To: Lukasz Luba, robh+dt, krzk, heiko, leonard.crestez
  Cc: mark.rutland, a.swigon, m.szyprowski, kgene, myungjoo.ham,
	kyungmin.park, linux-pm, linux-samsung-soc, devicetree,
	linux-arm-kernel, linux-kernel, linux-rockchip

On 1/9/20 7:37 PM, Lukasz Luba wrote:
> Hi Chanwoo,
> 
> On 12/20/19 12:24 AM, Chanwoo Choi wrote:
>> Previously, devfreq core support 'devfreq' property in order to get
>> the devfreq device by phandle. But, 'devfreq' property name is not proper
>> on devicetree binding because this name doesn't mean the any h/w attribute.
>>
>> The devfreq core hand over the right to decide the property name
>> for getting the devfreq device on devicetree. Each devfreq driver
>> will decide the property name on devicetree binding and then get
>> the devfreq device by using devfreq_get_devfreq_by_node().
>>
>> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
>> ---
>>   drivers/devfreq/devfreq.c    | 35 -----------------------------------
>>   drivers/devfreq/exynos-bus.c | 12 +++++++++++-
>>   include/linux/devfreq.h      |  8 --------
>>   3 files changed, 11 insertions(+), 44 deletions(-)
>>
>> diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c
>> index cb8ca81c8973..c3d3c7c802a0 100644
>> --- a/drivers/devfreq/devfreq.c
>> +++ b/drivers/devfreq/devfreq.c
>> @@ -991,48 +991,13 @@ struct devfreq *devfreq_get_devfreq_by_node(struct device_node *node)
>>         return ERR_PTR(-ENODEV);
>>   }
>> -
>> -/*
>> - * devfreq_get_devfreq_by_phandle - Get the devfreq device from devicetree
>> - * @dev - instance to the given device
>> - * @index - index into list of devfreq
>> - *
>> - * return the instance of devfreq device
>> - */
>> -struct devfreq *devfreq_get_devfreq_by_phandle(struct device *dev, int index)
>> -{
>> -    struct device_node *node;
>> -    struct devfreq *devfreq;
>> -
>> -    if (!dev)
>> -        return ERR_PTR(-EINVAL);
>> -
>> -    if (!dev->of_node)
>> -        return ERR_PTR(-EINVAL);
>> -
>> -    node = of_parse_phandle(dev->of_node, "devfreq", index);
>> -    if (!node)
>> -        return ERR_PTR(-ENODEV);
>> -
>> -    devfreq = devfreq_get_devfreq_by_node(node);
>> -    of_node_put(node);
>> -
>> -    return devfreq;
>> -}
>> -
>>   #else
>>   struct devfreq *devfreq_get_devfreq_by_node(struct device_node *node)
>>   {
>>       return ERR_PTR(-ENODEV);
>>   }
>> -
>> -struct devfreq *devfreq_get_devfreq_by_phandle(struct device *dev, int index)
>> -{
>> -    return ERR_PTR(-ENODEV);
>> -}
>>   #endif /* CONFIG_OF */
>>   EXPORT_SYMBOL_GPL(devfreq_get_devfreq_by_node);
>> -EXPORT_SYMBOL_GPL(devfreq_get_devfreq_by_phandle);
>>     /**
>>    * devm_devfreq_remove_device() - Resource-managed devfreq_remove_device()
>> diff --git a/drivers/devfreq/exynos-bus.c b/drivers/devfreq/exynos-bus.c
>> index 7f5917d59072..1bc4e3c81115 100644
>> --- a/drivers/devfreq/exynos-bus.c
>> +++ b/drivers/devfreq/exynos-bus.c
>> @@ -86,6 +86,16 @@ static int exynos_bus_get_event(struct exynos_bus *bus,
>>       return ret;
>>   }
>>   +static struct devfreq *exynos_bus_get_parent_devfreq(struct device_node *np)
>> +{
>> +    struct device_node *node = of_parse_phandle(np, "devfreq", 0);
>> +
>> +    if (!node)
>> +        return ERR_PTR(-ENODEV);
>> +
>> +    return devfreq_get_devfreq_by_node(node);
>> +}
>> +
>>   /*
>>    * devfreq function for both simple-ondemand and passive governor
>>    */
>> @@ -353,7 +363,7 @@ static int exynos_bus_profile_init_passive(struct exynos_bus *bus,
>>       profile->exit = exynos_bus_passive_exit;
>>         /* Get the instance of parent devfreq device */
>> -    parent_devfreq = devfreq_get_devfreq_by_phandle(dev, 0);
>> +    parent_devfreq = exynos_bus_get_parent_devfreq(dev->of_node);
>>       if (IS_ERR(parent_devfreq))
>>           return -EPROBE_DEFER;
>>   
> 
> These changes won't apply, probably I need some base for it.

I developed it on devfreq-next branch[1]
[1] https://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/linux.git/log/?h=devfreq-next

And I try to apply these patchset to linux-next[2] with tags/next-20200109.
But, patch10/11 of deviceetree has some merge conflict
because patch[3] related to exynos-bus was merged.
[2] https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/log/
[3] https://patchwork.kernel.org/cover/11303235/
    - [v2,0/2] Exynos5422: fix bus related OPPs for Odroid XU3/XU4/HC1

On next version, I'll rebase it on latest patches.

> 
> Regards,
> Lukasz
> 
> 
> 


-- 
Best Regards,
Chanwoo Choi
Samsung Electronics

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

* Re: [PATCH v2 02/11] PM / devfreq: Remove devfreq_get_devfreq_by_phandle function
  2020-01-09 10:54         ` Chanwoo Choi
@ 2020-01-09 10:57           ` Lukasz Luba
  0 siblings, 0 replies; 21+ messages in thread
From: Lukasz Luba @ 2020-01-09 10:57 UTC (permalink / raw)
  To: Chanwoo Choi, robh+dt, krzk, heiko, leonard.crestez
  Cc: mark.rutland, a.swigon, m.szyprowski, kgene, myungjoo.ham,
	kyungmin.park, linux-pm, linux-samsung-soc, devicetree,
	linux-arm-kernel, linux-kernel, linux-rockchip



On 1/9/20 10:54 AM, Chanwoo Choi wrote:
> On 1/9/20 7:37 PM, Lukasz Luba wrote:
>> Hi Chanwoo,
>>
>> On 12/20/19 12:24 AM, Chanwoo Choi wrote:
>>> Previously, devfreq core support 'devfreq' property in order to get
>>> the devfreq device by phandle. But, 'devfreq' property name is not proper
>>> on devicetree binding because this name doesn't mean the any h/w attribute.
>>>
>>> The devfreq core hand over the right to decide the property name
>>> for getting the devfreq device on devicetree. Each devfreq driver
>>> will decide the property name on devicetree binding and then get
>>> the devfreq device by using devfreq_get_devfreq_by_node().
>>>
>>> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
>>> ---
>>>    drivers/devfreq/devfreq.c    | 35 -----------------------------------
>>>    drivers/devfreq/exynos-bus.c | 12 +++++++++++-
>>>    include/linux/devfreq.h      |  8 --------
>>>    3 files changed, 11 insertions(+), 44 deletions(-)
>>>
>>> diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c
>>> index cb8ca81c8973..c3d3c7c802a0 100644
>>> --- a/drivers/devfreq/devfreq.c
>>> +++ b/drivers/devfreq/devfreq.c
>>> @@ -991,48 +991,13 @@ struct devfreq *devfreq_get_devfreq_by_node(struct device_node *node)
>>>          return ERR_PTR(-ENODEV);
>>>    }
>>> -
>>> -/*
>>> - * devfreq_get_devfreq_by_phandle - Get the devfreq device from devicetree
>>> - * @dev - instance to the given device
>>> - * @index - index into list of devfreq
>>> - *
>>> - * return the instance of devfreq device
>>> - */
>>> -struct devfreq *devfreq_get_devfreq_by_phandle(struct device *dev, int index)
>>> -{
>>> -    struct device_node *node;
>>> -    struct devfreq *devfreq;
>>> -
>>> -    if (!dev)
>>> -        return ERR_PTR(-EINVAL);
>>> -
>>> -    if (!dev->of_node)
>>> -        return ERR_PTR(-EINVAL);
>>> -
>>> -    node = of_parse_phandle(dev->of_node, "devfreq", index);
>>> -    if (!node)
>>> -        return ERR_PTR(-ENODEV);
>>> -
>>> -    devfreq = devfreq_get_devfreq_by_node(node);
>>> -    of_node_put(node);
>>> -
>>> -    return devfreq;
>>> -}
>>> -
>>>    #else
>>>    struct devfreq *devfreq_get_devfreq_by_node(struct device_node *node)
>>>    {
>>>        return ERR_PTR(-ENODEV);
>>>    }
>>> -
>>> -struct devfreq *devfreq_get_devfreq_by_phandle(struct device *dev, int index)
>>> -{
>>> -    return ERR_PTR(-ENODEV);
>>> -}
>>>    #endif /* CONFIG_OF */
>>>    EXPORT_SYMBOL_GPL(devfreq_get_devfreq_by_node);
>>> -EXPORT_SYMBOL_GPL(devfreq_get_devfreq_by_phandle);
>>>      /**
>>>     * devm_devfreq_remove_device() - Resource-managed devfreq_remove_device()
>>> diff --git a/drivers/devfreq/exynos-bus.c b/drivers/devfreq/exynos-bus.c
>>> index 7f5917d59072..1bc4e3c81115 100644
>>> --- a/drivers/devfreq/exynos-bus.c
>>> +++ b/drivers/devfreq/exynos-bus.c
>>> @@ -86,6 +86,16 @@ static int exynos_bus_get_event(struct exynos_bus *bus,
>>>        return ret;
>>>    }
>>>    +static struct devfreq *exynos_bus_get_parent_devfreq(struct device_node *np)
>>> +{
>>> +    struct device_node *node = of_parse_phandle(np, "devfreq", 0);
>>> +
>>> +    if (!node)
>>> +        return ERR_PTR(-ENODEV);
>>> +
>>> +    return devfreq_get_devfreq_by_node(node);
>>> +}
>>> +
>>>    /*
>>>     * devfreq function for both simple-ondemand and passive governor
>>>     */
>>> @@ -353,7 +363,7 @@ static int exynos_bus_profile_init_passive(struct exynos_bus *bus,
>>>        profile->exit = exynos_bus_passive_exit;
>>>          /* Get the instance of parent devfreq device */
>>> -    parent_devfreq = devfreq_get_devfreq_by_phandle(dev, 0);
>>> +    parent_devfreq = exynos_bus_get_parent_devfreq(dev->of_node);
>>>        if (IS_ERR(parent_devfreq))
>>>            return -EPROBE_DEFER;
>>>    
>>
>> These changes won't apply, probably I need some base for it.
> 
> I developed it on devfreq-next branch[1]
> [1] https://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/linux.git/log/?h=devfreq-next
> 
> And I try to apply these patchset to linux-next[2] with tags/next-20200109.
> But, patch10/11 of deviceetree has some merge conflict
> because patch[3] related to exynos-bus was merged.
> [2] https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/log/
> [3] https://patchwork.kernel.org/cover/11303235/
>      - [v2,0/2] Exynos5422: fix bus related OPPs for Odroid XU3/XU4/HC1
> 
> On next version, I'll rebase it on latest patches.

Thank you for the information. I will update the base and continue the
review.

Lukasz

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

end of thread, other threads:[~2020-01-09 10:57 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CGME20191220001759epcas1p131a41a619847d80c64470f7c1920121f@epcas1p1.samsung.com>
2019-12-20  0:24 ` [PATCH v2 00/11] PM / devfreq: Remove deprecated 'devfreq' and 'devfreq-events' properties Chanwoo Choi
     [not found]   ` <CGME20191220001759epcas1p4bbbcf6a84c09229db0ddae86be294405@epcas1p4.samsung.com>
2019-12-20  0:24     ` [PATCH v2 01/11] PM / devfreq: Add devfreq_get_devfreq_by_node function Chanwoo Choi
2020-01-09  9:47       ` Lukasz Luba
     [not found]   ` <CGME20191220001759epcas1p4ce1c2017937a35de84eab720b9732df0@epcas1p4.samsung.com>
2019-12-20  0:24     ` [PATCH v2 02/11] PM / devfreq: Remove devfreq_get_devfreq_by_phandle function Chanwoo Choi
2019-12-20  0:46       ` Leonard Crestez
2019-12-20  1:00         ` Chanwoo Choi
2019-12-20  1:40           ` Leonard Crestez
2019-12-20  2:14             ` Chanwoo Choi
2020-01-09 10:37       ` Lukasz Luba
2020-01-09 10:54         ` Chanwoo Choi
2020-01-09 10:57           ` Lukasz Luba
     [not found]   ` <CGME20191220001759epcas1p1fc0e5019514f7c99606347432d66bfd0@epcas1p1.samsung.com>
2019-12-20  0:24     ` [PATCH v2 03/11] PM / devfreq: event: Add devfreq_event_get_edev_by_node function Chanwoo Choi
     [not found]   ` <CGME20191220001759epcas1p3051f7916542b7234aac5273e0baab83b@epcas1p3.samsung.com>
2019-12-20  0:24     ` [PATCH v2 04/11] dt-bindings: devfreq: exynos-bus: Replace deprecated 'devfreq' and 'devfreq-events' property Chanwoo Choi
2019-12-20  8:43       ` Krzysztof Kozlowski
     [not found]   ` <CGME20191220001759epcas1p495fc9cdb6f2bd86abf63d16f61e68804@epcas1p4.samsung.com>
2019-12-20  0:24     ` [PATCH v2 05/11] dt-bindings: devfreq: rk3399_dmc: Replace deprecated " Chanwoo Choi
     [not found]   ` <CGME20191220001800epcas1p364322170854fdd171c43f6b1de2b61a4@epcas1p3.samsung.com>
2019-12-20  0:24     ` [PATCH v2 06/11] dt-bindings: memory: exynos5422-dmc: Replace the " Chanwoo Choi
     [not found]   ` <CGME20191220001800epcas1p3accefc4384d9503481311f25f5794cb8@epcas1p3.samsung.com>
2019-12-20  0:24     ` [PATCH v2 07/11] PM / devfreq: exynos-bus: Replace the deprecated 'devfreq' and " Chanwoo Choi
     [not found]   ` <CGME20191220001800epcas1p383927f73060e0e9aaad2fd9aaf881b6d@epcas1p3.samsung.com>
2019-12-20  0:24     ` [PATCH v2 08/11] PM / devfreq: rk3399_dmc: Replace the deprecated " Chanwoo Choi
     [not found]   ` <CGME20191220001800epcas1p41ab059757aeec99060cb4f47b0f48ac0@epcas1p4.samsung.com>
2019-12-20  0:24     ` [PATCH v2 09/11] memory: samsung: exynos5422-dmc: " Chanwoo Choi
     [not found]   ` <CGME20191220001800epcas1p2f2dfd9d24e275425b07a06bcdeb4aba9@epcas1p2.samsung.com>
2019-12-20  0:24     ` [PATCH v2 10/11] ARM: dts: exynos: Replace deprecated property for Exynos bus and DMC Chanwoo Choi
     [not found]   ` <CGME20191220001800epcas1p13d5f4ff181c10a118e151a86891a7130@epcas1p1.samsung.com>
2019-12-20  0:24     ` [PATCH v2 11/11] arm64: dts: exynos: Replace deprecated property for Exynos bus on TM2 Chanwoo Choi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).