linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1 1/1] iio: trigger: stm32-lptimer-trigger: Make use of device properties
@ 2022-04-13 18:56 Andy Shevchenko
  2022-04-28 18:33 ` Jonathan Cameron
  0 siblings, 1 reply; 5+ messages in thread
From: Andy Shevchenko @ 2022-04-13 18:56 UTC (permalink / raw)
  To: Andy Shevchenko, linux-iio, linux-stm32, linux-arm-kernel, linux-kernel
  Cc: Jonathan Cameron, Lars-Peter Clausen, Maxime Coquelin, Alexandre Torgue

Convert the module to be property provider agnostic and allow
it to be used on non-OF platforms.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/iio/trigger/stm32-lptimer-trigger.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/iio/trigger/stm32-lptimer-trigger.c b/drivers/iio/trigger/stm32-lptimer-trigger.c
index 98cdc7e47f3d..af46c10cea92 100644
--- a/drivers/iio/trigger/stm32-lptimer-trigger.c
+++ b/drivers/iio/trigger/stm32-lptimer-trigger.c
@@ -13,6 +13,7 @@
 #include <linux/mfd/stm32-lptimer.h>
 #include <linux/module.h>
 #include <linux/platform_device.h>
+#include <linux/property.h>
 
 /* List Low-Power Timer triggers */
 static const char * const stm32_lptim_triggers[] = {
@@ -77,7 +78,7 @@ static int stm32_lptim_trigger_probe(struct platform_device *pdev)
 	if (!priv)
 		return -ENOMEM;
 
-	if (of_property_read_u32(pdev->dev.of_node, "reg", &index))
+	if (device_property_read_u32(&pdev->dev, "reg", &index))
 		return -EINVAL;
 
 	if (index >= ARRAY_SIZE(stm32_lptim_triggers))
-- 
2.35.1


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

* Re: [PATCH v1 1/1] iio: trigger: stm32-lptimer-trigger: Make use of device properties
  2022-04-13 18:56 [PATCH v1 1/1] iio: trigger: stm32-lptimer-trigger: Make use of device properties Andy Shevchenko
@ 2022-04-28 18:33 ` Jonathan Cameron
  2022-05-03 10:20   ` Andy Shevchenko
  0 siblings, 1 reply; 5+ messages in thread
From: Jonathan Cameron @ 2022-04-28 18:33 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: linux-iio, linux-stm32, linux-arm-kernel, linux-kernel,
	Lars-Peter Clausen, Maxime Coquelin, Alexandre Torgue,
	Fabrice Gasnier

On Wed, 13 Apr 2022 21:56:56 +0300
Andy Shevchenko <andriy.shevchenko@linux.intel.com> wrote:

> Convert the module to be property provider agnostic and allow
> it to be used on non-OF platforms.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

MAINTAINERS entry for this one uses extensive wild cards so may
escape scripts...

+CC Fabrice.

> ---
>  drivers/iio/trigger/stm32-lptimer-trigger.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/iio/trigger/stm32-lptimer-trigger.c b/drivers/iio/trigger/stm32-lptimer-trigger.c
> index 98cdc7e47f3d..af46c10cea92 100644
> --- a/drivers/iio/trigger/stm32-lptimer-trigger.c
> +++ b/drivers/iio/trigger/stm32-lptimer-trigger.c
> @@ -13,6 +13,7 @@
>  #include <linux/mfd/stm32-lptimer.h>
>  #include <linux/module.h>
>  #include <linux/platform_device.h>
> +#include <linux/property.h>
>  
>  /* List Low-Power Timer triggers */
>  static const char * const stm32_lptim_triggers[] = {
> @@ -77,7 +78,7 @@ static int stm32_lptim_trigger_probe(struct platform_device *pdev)
>  	if (!priv)
>  		return -ENOMEM;
>  
> -	if (of_property_read_u32(pdev->dev.of_node, "reg", &index))
> +	if (device_property_read_u32(&pdev->dev, "reg", &index))
>  		return -EINVAL;
>  
>  	if (index >= ARRAY_SIZE(stm32_lptim_triggers))


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

* Re: [PATCH v1 1/1] iio: trigger: stm32-lptimer-trigger: Make use of device properties
  2022-04-28 18:33 ` Jonathan Cameron
@ 2022-05-03 10:20   ` Andy Shevchenko
  2022-05-03 12:25     ` Fabrice Gasnier
  0 siblings, 1 reply; 5+ messages in thread
From: Andy Shevchenko @ 2022-05-03 10:20 UTC (permalink / raw)
  To: Jonathan Cameron
  Cc: linux-iio, linux-stm32, linux-arm-kernel, linux-kernel,
	Lars-Peter Clausen, Maxime Coquelin, Alexandre Torgue,
	Fabrice Gasnier

On Thu, Apr 28, 2022 at 07:33:04PM +0100, Jonathan Cameron wrote:
> On Wed, 13 Apr 2022 21:56:56 +0300
> Andy Shevchenko <andriy.shevchenko@linux.intel.com> wrote:
> 
> > Convert the module to be property provider agnostic and allow
> > it to be used on non-OF platforms.
> > 
> > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> 
> MAINTAINERS entry for this one uses extensive wild cards so may
> escape scripts...
> 
> +CC Fabrice.

Thanks!

Not sure it might break anything, it's quite straightforward conversion.

-- 
With Best Regards,
Andy Shevchenko



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

* Re: [PATCH v1 1/1] iio: trigger: stm32-lptimer-trigger: Make use of device properties
  2022-05-03 10:20   ` Andy Shevchenko
@ 2022-05-03 12:25     ` Fabrice Gasnier
  2022-05-04 20:45       ` Jonathan Cameron
  0 siblings, 1 reply; 5+ messages in thread
From: Fabrice Gasnier @ 2022-05-03 12:25 UTC (permalink / raw)
  To: Andy Shevchenko, Jonathan Cameron
  Cc: linux-iio, linux-stm32, linux-arm-kernel, linux-kernel,
	Lars-Peter Clausen, Maxime Coquelin, Alexandre Torgue



On 5/3/22 12:20, Andy Shevchenko wrote:
> On Thu, Apr 28, 2022 at 07:33:04PM +0100, Jonathan Cameron wrote:
>> On Wed, 13 Apr 2022 21:56:56 +0300
>> Andy Shevchenko <andriy.shevchenko@linux.intel.com> wrote:
>>
>>> Convert the module to be property provider agnostic and allow
>>> it to be used on non-OF platforms.
>>>
>>> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
>>
>> MAINTAINERS entry for this one uses extensive wild cards so may
>> escape scripts...
>>
>> +CC Fabrice.
> 
> Thanks!
> 
> Not sure it might break anything, it's quite straightforward conversion.

Hi Andy, Jonathan,

You can add my:
Reviewed-by: Fabrice Gasnier <fabrice.gasnier@foss.st.com>

Thanks,
Best Regards,
Fabrice

> 

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

* Re: [PATCH v1 1/1] iio: trigger: stm32-lptimer-trigger: Make use of device properties
  2022-05-03 12:25     ` Fabrice Gasnier
@ 2022-05-04 20:45       ` Jonathan Cameron
  0 siblings, 0 replies; 5+ messages in thread
From: Jonathan Cameron @ 2022-05-04 20:45 UTC (permalink / raw)
  To: Fabrice Gasnier
  Cc: Andy Shevchenko, linux-iio, linux-stm32, linux-arm-kernel,
	linux-kernel, Lars-Peter Clausen, Maxime Coquelin,
	Alexandre Torgue

On Tue, 3 May 2022 14:25:37 +0200
Fabrice Gasnier <fabrice.gasnier@foss.st.com> wrote:

> On 5/3/22 12:20, Andy Shevchenko wrote:
> > On Thu, Apr 28, 2022 at 07:33:04PM +0100, Jonathan Cameron wrote:  
> >> On Wed, 13 Apr 2022 21:56:56 +0300
> >> Andy Shevchenko <andriy.shevchenko@linux.intel.com> wrote:
> >>  
> >>> Convert the module to be property provider agnostic and allow
> >>> it to be used on non-OF platforms.
> >>>
> >>> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>  
> >>
> >> MAINTAINERS entry for this one uses extensive wild cards so may
> >> escape scripts...
> >>
> >> +CC Fabrice.  
> > 
> > Thanks!
> > 
> > Not sure it might break anything, it's quite straightforward conversion.  
> 
> Hi Andy, Jonathan,
> 
> You can add my:
> Reviewed-by: Fabrice Gasnier <fabrice.gasnier@foss.st.com>

Applied to the togreg branch of iio.git and pushed out as testing to
let 0-day see if it can find anything we missed.

Thanks,

Jonathan


> 
> Thanks,
> Best Regards,
> Fabrice
> 
> >   


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

end of thread, other threads:[~2022-05-04 20:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-13 18:56 [PATCH v1 1/1] iio: trigger: stm32-lptimer-trigger: Make use of device properties Andy Shevchenko
2022-04-28 18:33 ` Jonathan Cameron
2022-05-03 10:20   ` Andy Shevchenko
2022-05-03 12:25     ` Fabrice Gasnier
2022-05-04 20:45       ` Jonathan Cameron

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).