All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] clocksource: ti: Use of_property_read_bool() for boolean properties
@ 2023-03-10 14:47 Rob Herring
  2023-04-18 16:24 ` Rob Herring
  2023-04-26  9:12 ` [tip: timers/core] clocksource/drivers/ti: " tip-bot2 for Rob Herring
  0 siblings, 2 replies; 4+ messages in thread
From: Rob Herring @ 2023-03-10 14:47 UTC (permalink / raw)
  To: Daniel Lezcano, Thomas Gleixner; +Cc: devicetree, linux-kernel

It is preferred to use typed property access functions (i.e.
of_property_read_<type> functions) rather than low-level
of_get_property/of_find_property functions for reading properties.
Convert reading boolean properties to to of_property_read_bool().

Signed-off-by: Rob Herring <robh@kernel.org>
---
 drivers/clocksource/timer-ti-dm-systimer.c | 4 ++--
 drivers/clocksource/timer-ti-dm.c          | 8 ++++----
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/clocksource/timer-ti-dm-systimer.c b/drivers/clocksource/timer-ti-dm-systimer.c
index 632523c1232f..efa5f55a65f8 100644
--- a/drivers/clocksource/timer-ti-dm-systimer.c
+++ b/drivers/clocksource/timer-ti-dm-systimer.c
@@ -586,7 +586,7 @@ static int __init dmtimer_clkevt_init_common(struct dmtimer_clockevent *clkevt,
 	writel_relaxed(OMAP_TIMER_INT_OVERFLOW, t->base + t->wakeup);
 
 	pr_info("TI gptimer %s: %s%lu Hz at %pOF\n",
-		name, of_find_property(np, "ti,timer-alwon", NULL) ?
+		name, of_property_read_bool(np, "ti,timer-alwon") ?
 		"always-on " : "", t->rate, np->parent);
 
 	return 0;
@@ -787,7 +787,7 @@ static int __init dmtimer_clocksource_init(struct device_node *np)
 		       t->base + t->ctrl);
 
 	pr_info("TI gptimer clocksource: %s%pOF\n",
-		of_find_property(np, "ti,timer-alwon", NULL) ?
+		of_property_read_bool(np, "ti,timer-alwon") ?
 		"always-on " : "", np->parent);
 
 	if (!dmtimer_sched_clock_counter) {
diff --git a/drivers/clocksource/timer-ti-dm.c b/drivers/clocksource/timer-ti-dm.c
index b24b903a8822..7031aa1bfdcb 100644
--- a/drivers/clocksource/timer-ti-dm.c
+++ b/drivers/clocksource/timer-ti-dm.c
@@ -1104,13 +1104,13 @@ static int omap_dm_timer_probe(struct platform_device *pdev)
 	platform_set_drvdata(pdev, timer);
 
 	if (dev->of_node) {
-		if (of_find_property(dev->of_node, "ti,timer-alwon", NULL))
+		if (of_property_read_bool(dev->of_node, "ti,timer-alwon"))
 			timer->capability |= OMAP_TIMER_ALWON;
-		if (of_find_property(dev->of_node, "ti,timer-dsp", NULL))
+		if (of_property_read_bool(dev->of_node, "ti,timer-dsp"))
 			timer->capability |= OMAP_TIMER_HAS_DSP_IRQ;
-		if (of_find_property(dev->of_node, "ti,timer-pwm", NULL))
+		if (of_property_read_bool(dev->of_node, "ti,timer-pwm"))
 			timer->capability |= OMAP_TIMER_HAS_PWM;
-		if (of_find_property(dev->of_node, "ti,timer-secure", NULL))
+		if (of_property_read_bool(dev->of_node, "ti,timer-secure"))
 			timer->capability |= OMAP_TIMER_SECURE;
 	} else {
 		timer->id = pdev->id;
-- 
2.39.2


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

* Re: [PATCH] clocksource: ti: Use of_property_read_bool() for boolean properties
  2023-03-10 14:47 [PATCH] clocksource: ti: Use of_property_read_bool() for boolean properties Rob Herring
@ 2023-04-18 16:24 ` Rob Herring
  2023-04-19  7:43   ` Daniel Lezcano
  2023-04-26  9:12 ` [tip: timers/core] clocksource/drivers/ti: " tip-bot2 for Rob Herring
  1 sibling, 1 reply; 4+ messages in thread
From: Rob Herring @ 2023-04-18 16:24 UTC (permalink / raw)
  To: Daniel Lezcano, Thomas Gleixner; +Cc: devicetree, linux-kernel

On Fri, Mar 10, 2023 at 08:47:01AM -0600, Rob Herring wrote:
> It is preferred to use typed property access functions (i.e.
> of_property_read_<type> functions) rather than low-level
> of_get_property/of_find_property functions for reading properties.
> Convert reading boolean properties to to of_property_read_bool().
> 
> Signed-off-by: Rob Herring <robh@kernel.org>
> ---
>  drivers/clocksource/timer-ti-dm-systimer.c | 4 ++--
>  drivers/clocksource/timer-ti-dm.c          | 8 ++++----
>  2 files changed, 6 insertions(+), 6 deletions(-)

Ping!

> 
> diff --git a/drivers/clocksource/timer-ti-dm-systimer.c b/drivers/clocksource/timer-ti-dm-systimer.c
> index 632523c1232f..efa5f55a65f8 100644
> --- a/drivers/clocksource/timer-ti-dm-systimer.c
> +++ b/drivers/clocksource/timer-ti-dm-systimer.c
> @@ -586,7 +586,7 @@ static int __init dmtimer_clkevt_init_common(struct dmtimer_clockevent *clkevt,
>  	writel_relaxed(OMAP_TIMER_INT_OVERFLOW, t->base + t->wakeup);
>  
>  	pr_info("TI gptimer %s: %s%lu Hz at %pOF\n",
> -		name, of_find_property(np, "ti,timer-alwon", NULL) ?
> +		name, of_property_read_bool(np, "ti,timer-alwon") ?
>  		"always-on " : "", t->rate, np->parent);
>  
>  	return 0;
> @@ -787,7 +787,7 @@ static int __init dmtimer_clocksource_init(struct device_node *np)
>  		       t->base + t->ctrl);
>  
>  	pr_info("TI gptimer clocksource: %s%pOF\n",
> -		of_find_property(np, "ti,timer-alwon", NULL) ?
> +		of_property_read_bool(np, "ti,timer-alwon") ?
>  		"always-on " : "", np->parent);
>  
>  	if (!dmtimer_sched_clock_counter) {
> diff --git a/drivers/clocksource/timer-ti-dm.c b/drivers/clocksource/timer-ti-dm.c
> index b24b903a8822..7031aa1bfdcb 100644
> --- a/drivers/clocksource/timer-ti-dm.c
> +++ b/drivers/clocksource/timer-ti-dm.c
> @@ -1104,13 +1104,13 @@ static int omap_dm_timer_probe(struct platform_device *pdev)
>  	platform_set_drvdata(pdev, timer);
>  
>  	if (dev->of_node) {
> -		if (of_find_property(dev->of_node, "ti,timer-alwon", NULL))
> +		if (of_property_read_bool(dev->of_node, "ti,timer-alwon"))
>  			timer->capability |= OMAP_TIMER_ALWON;
> -		if (of_find_property(dev->of_node, "ti,timer-dsp", NULL))
> +		if (of_property_read_bool(dev->of_node, "ti,timer-dsp"))
>  			timer->capability |= OMAP_TIMER_HAS_DSP_IRQ;
> -		if (of_find_property(dev->of_node, "ti,timer-pwm", NULL))
> +		if (of_property_read_bool(dev->of_node, "ti,timer-pwm"))
>  			timer->capability |= OMAP_TIMER_HAS_PWM;
> -		if (of_find_property(dev->of_node, "ti,timer-secure", NULL))
> +		if (of_property_read_bool(dev->of_node, "ti,timer-secure"))
>  			timer->capability |= OMAP_TIMER_SECURE;
>  	} else {
>  		timer->id = pdev->id;
> -- 
> 2.39.2
> 

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

* Re: [PATCH] clocksource: ti: Use of_property_read_bool() for boolean properties
  2023-04-18 16:24 ` Rob Herring
@ 2023-04-19  7:43   ` Daniel Lezcano
  0 siblings, 0 replies; 4+ messages in thread
From: Daniel Lezcano @ 2023-04-19  7:43 UTC (permalink / raw)
  To: Rob Herring, Thomas Gleixner; +Cc: devicetree, linux-kernel

On 18/04/2023 18:24, Rob Herring wrote:
> On Fri, Mar 10, 2023 at 08:47:01AM -0600, Rob Herring wrote:
>> It is preferred to use typed property access functions (i.e.
>> of_property_read_<type> functions) rather than low-level
>> of_get_property/of_find_property functions for reading properties.
>> Convert reading boolean properties to to of_property_read_bool().
>>
>> Signed-off-by: Rob Herring <robh@kernel.org>
>> ---
>>   drivers/clocksource/timer-ti-dm-systimer.c | 4 ++--
>>   drivers/clocksource/timer-ti-dm.c          | 8 ++++----
>>   2 files changed, 6 insertions(+), 6 deletions(-)
> 
> Ping!

Applied, thanks for heads up


-- 
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog


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

* [tip: timers/core] clocksource/drivers/ti: Use of_property_read_bool() for boolean properties
  2023-03-10 14:47 [PATCH] clocksource: ti: Use of_property_read_bool() for boolean properties Rob Herring
  2023-04-18 16:24 ` Rob Herring
@ 2023-04-26  9:12 ` tip-bot2 for Rob Herring
  1 sibling, 0 replies; 4+ messages in thread
From: tip-bot2 for Rob Herring @ 2023-04-26  9:12 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: Rob Herring, Daniel Lezcano, x86, linux-kernel

The following commit has been merged into the timers/core branch of tip:

Commit-ID:     87dd04f9b1a37a92ebbea5eb46e4941551d3547e
Gitweb:        https://git.kernel.org/tip/87dd04f9b1a37a92ebbea5eb46e4941551d3547e
Author:        Rob Herring <robh@kernel.org>
AuthorDate:    Fri, 10 Mar 2023 08:47:01 -06:00
Committer:     Daniel Lezcano <daniel.lezcano@linaro.org>
CommitterDate: Mon, 24 Apr 2023 16:56:14 +02:00

clocksource/drivers/ti: Use of_property_read_bool() for boolean properties

It is preferred to use typed property access functions (i.e.
of_property_read_<type> functions) rather than low-level
of_get_property/of_find_property functions for reading properties.
Convert reading boolean properties to to of_property_read_bool().

Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Link: https://lore.kernel.org/r/20230310144702.1541660-1-robh@kernel.org
---
 drivers/clocksource/timer-ti-dm-systimer.c | 4 ++--
 drivers/clocksource/timer-ti-dm.c          | 8 ++++----
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/clocksource/timer-ti-dm-systimer.c b/drivers/clocksource/timer-ti-dm-systimer.c
index 4fa68f6..c2dcd8d 100644
--- a/drivers/clocksource/timer-ti-dm-systimer.c
+++ b/drivers/clocksource/timer-ti-dm-systimer.c
@@ -584,7 +584,7 @@ static int __init dmtimer_clkevt_init_common(struct dmtimer_clockevent *clkevt,
 	writel_relaxed(OMAP_TIMER_INT_OVERFLOW, t->base + t->wakeup);
 
 	pr_info("TI gptimer %s: %s%lu Hz at %pOF\n",
-		name, of_find_property(np, "ti,timer-alwon", NULL) ?
+		name, of_property_read_bool(np, "ti,timer-alwon") ?
 		"always-on " : "", t->rate, np->parent);
 
 	return 0;
@@ -785,7 +785,7 @@ static int __init dmtimer_clocksource_init(struct device_node *np)
 		       t->base + t->ctrl);
 
 	pr_info("TI gptimer clocksource: %s%pOF\n",
-		of_find_property(np, "ti,timer-alwon", NULL) ?
+		of_property_read_bool(np, "ti,timer-alwon") ?
 		"always-on " : "", np->parent);
 
 	if (!dmtimer_sched_clock_counter) {
diff --git a/drivers/clocksource/timer-ti-dm.c b/drivers/clocksource/timer-ti-dm.c
index ab7a6ca..1d3ad51 100644
--- a/drivers/clocksource/timer-ti-dm.c
+++ b/drivers/clocksource/timer-ti-dm.c
@@ -1104,13 +1104,13 @@ static int omap_dm_timer_probe(struct platform_device *pdev)
 	platform_set_drvdata(pdev, timer);
 
 	if (dev->of_node) {
-		if (of_find_property(dev->of_node, "ti,timer-alwon", NULL))
+		if (of_property_read_bool(dev->of_node, "ti,timer-alwon"))
 			timer->capability |= OMAP_TIMER_ALWON;
-		if (of_find_property(dev->of_node, "ti,timer-dsp", NULL))
+		if (of_property_read_bool(dev->of_node, "ti,timer-dsp"))
 			timer->capability |= OMAP_TIMER_HAS_DSP_IRQ;
-		if (of_find_property(dev->of_node, "ti,timer-pwm", NULL))
+		if (of_property_read_bool(dev->of_node, "ti,timer-pwm"))
 			timer->capability |= OMAP_TIMER_HAS_PWM;
-		if (of_find_property(dev->of_node, "ti,timer-secure", NULL))
+		if (of_property_read_bool(dev->of_node, "ti,timer-secure"))
 			timer->capability |= OMAP_TIMER_SECURE;
 	} else {
 		timer->id = pdev->id;

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

end of thread, other threads:[~2023-04-26  9:12 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-10 14:47 [PATCH] clocksource: ti: Use of_property_read_bool() for boolean properties Rob Herring
2023-04-18 16:24 ` Rob Herring
2023-04-19  7:43   ` Daniel Lezcano
2023-04-26  9:12 ` [tip: timers/core] clocksource/drivers/ti: " tip-bot2 for Rob Herring

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