diff mbox series

[v2,1/3] devfreq: exynos-ppmu: use node names with hyphens

Message ID 20210920071753.38560-1-krzysztof.kozlowski@canonical.com (mailing list archive)
State New
Headers show
Series devfreq: exynos-ppmu: conform to dt naming convention | expand

Commit Message

Krzysztof Kozlowski Sept. 20, 2021, 7:17 a.m. UTC
Devicetree naming convention requires device node names to use hyphens
instead of underscore, so Exynos5422 devfreq event name
"ppmu-event3-dmc0_0" should be "ppmu-event3-dmc0-0".  Newly introduced
dtschema enforces this, however the driver still expects old name with
an underscore.

Add new events for Exynos5422 while still accepting old name for
backwards compatibility.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
---
 drivers/devfreq/event/exynos-ppmu.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

Comments

Chanwoo Choi Sept. 22, 2021, 7:55 a.m. UTC | #1
Hi Krzysztof,

On 21. 9. 20. 오후 4:17, Krzysztof Kozlowski wrote:
> Devicetree naming convention requires device node names to use hyphens
> instead of underscore, so Exynos5422 devfreq event name
> "ppmu-event3-dmc0_0" should be "ppmu-event3-dmc0-0".  Newly introduced
> dtschema enforces this, however the driver still expects old name with
> an underscore.
> 
> Add new events for Exynos5422 while still accepting old name for
> backwards compatibility.
> 
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
> ---
>   drivers/devfreq/event/exynos-ppmu.c | 7 ++++++-
>   1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/devfreq/event/exynos-ppmu.c b/drivers/devfreq/event/exynos-ppmu.c
> index 17ed980d9099..541bd13ab61d 100644
> --- a/drivers/devfreq/event/exynos-ppmu.c
> +++ b/drivers/devfreq/event/exynos-ppmu.c
> @@ -94,11 +94,16 @@ static struct __exynos_ppmu_events {
>   	PPMU_EVENT(d1-general),
>   	PPMU_EVENT(d1-rt),
>   
> -	/* For Exynos5422 SoC */
> +	/* For Exynos5422 SoC, deprecated (backwards compatible) */
>   	PPMU_EVENT(dmc0_0),
>   	PPMU_EVENT(dmc0_1),
>   	PPMU_EVENT(dmc1_0),
>   	PPMU_EVENT(dmc1_1),
> +	/* For Exynos5422 SoC */
> +	PPMU_EVENT(dmc0-0),
> +	PPMU_EVENT(dmc0-1),
> +	PPMU_EVENT(dmc1-0),
> +	PPMU_EVENT(dmc1-1),
>   };
>   
>   static int __exynos_ppmu_find_ppmu_id(const char *edev_name)
> 

Applied it. Thanks.
diff mbox series

Patch

diff --git a/drivers/devfreq/event/exynos-ppmu.c b/drivers/devfreq/event/exynos-ppmu.c
index 17ed980d9099..541bd13ab61d 100644
--- a/drivers/devfreq/event/exynos-ppmu.c
+++ b/drivers/devfreq/event/exynos-ppmu.c
@@ -94,11 +94,16 @@  static struct __exynos_ppmu_events {
 	PPMU_EVENT(d1-general),
 	PPMU_EVENT(d1-rt),
 
-	/* For Exynos5422 SoC */
+	/* For Exynos5422 SoC, deprecated (backwards compatible) */
 	PPMU_EVENT(dmc0_0),
 	PPMU_EVENT(dmc0_1),
 	PPMU_EVENT(dmc1_0),
 	PPMU_EVENT(dmc1_1),
+	/* For Exynos5422 SoC */
+	PPMU_EVENT(dmc0-0),
+	PPMU_EVENT(dmc0-1),
+	PPMU_EVENT(dmc1-0),
+	PPMU_EVENT(dmc1-1),
 };
 
 static int __exynos_ppmu_find_ppmu_id(const char *edev_name)