[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20191217055738.28445-7-cw00.choi@samsung.com>
Date: Tue, 17 Dec 2019 14:57:35 +0900
From: Chanwoo Choi <cw00.choi@...sung.com>
To: krzk@...nel.org, robh+dt@...nel.org, mark.rutland@....com,
heiko@...ech.de, leonard.crestez@....com, lukasz.luba@....com
Cc: a.swigon@...sung.com, m.szyprowski@...sung.com, kgene@...nel.org,
cw00.choi@...sung.com, myungjoo.ham@...sung.com,
kyungmin.park@...sung.com, linux-pm@...r.kernel.org,
linux-samsung-soc@...r.kernel.org, devicetree@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
linux-rockchip@...ts.infradead.org
Subject: [PATCH 6/9] PM / devfreq: rk3399_dmc: Replace deprecated
'devfreq-events' property
In order to remove the deprecated 'devfreq-events' property, replace with
new 'rockchip,dfi-device' property in order to get the devfreq-event device
in devicetree file instead of 'devfreq-events' property. But, to guarantee
the backward-compatibility, keep the support 'devfreq-events' property.
Signed-off-by: Chanwoo Choi <cw00.choi@...sung.com>
---
Documentation/devicetree/bindings/devfreq/rk3399_dmc.txt | 4 ++--
drivers/devfreq/rk3399_dmc.c | 9 ++++++---
2 files changed, 8 insertions(+), 5 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";
diff --git a/drivers/devfreq/rk3399_dmc.c b/drivers/devfreq/rk3399_dmc.c
index 796272a208a8..5d007cb0643b 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 *get_edev_by_node(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
Powered by blists - more mailing lists