All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] pps: clients: gpio: Propagate return value from pps_gpio_probe
@ 2022-01-12 20:52 Robert Hancock
  2022-01-12 21:07 ` Andy Shevchenko
  0 siblings, 1 reply; 8+ messages in thread
From: Robert Hancock @ 2022-01-12 20:52 UTC (permalink / raw)
  To: linux-kernel
  Cc: giometti, gregkh, andriy.shevchenko, rasm, jamesnuss, akpm,
	Robert Hancock

If the pps-gpio driver was probed prior to the GPIO device it uses, the
devm_gpiod_get call returned an -EPROBE_DEFER error, but pps_gpio_probe
replaced that error code with -EINVAL, causing the pps-gpio probe to
fail and not be retried later. Propagate the error return value so that
deferred probe works properly.

Fixes: 161520451dfa (pps: new client driver using GPIO)
Signed-off-by: Robert Hancock <robert.hancock@calian.com>
---
 drivers/pps/clients/pps-gpio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pps/clients/pps-gpio.c b/drivers/pps/clients/pps-gpio.c
index 35799e6401c9..2f4b11b4dfcd 100644
--- a/drivers/pps/clients/pps-gpio.c
+++ b/drivers/pps/clients/pps-gpio.c
@@ -169,7 +169,7 @@ static int pps_gpio_probe(struct platform_device *pdev)
 	/* GPIO setup */
 	ret = pps_gpio_setup(dev);
 	if (ret)
-		return -EINVAL;
+		return ret;
 
 	/* IRQ setup */
 	ret = gpiod_to_irq(data->gpio_pin);
-- 
2.31.1


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

* Re: [PATCH] pps: clients: gpio: Propagate return value from pps_gpio_probe
  2022-01-12 20:52 [PATCH] pps: clients: gpio: Propagate return value from pps_gpio_probe Robert Hancock
@ 2022-01-12 21:07 ` Andy Shevchenko
  2022-01-13  8:17   ` Rodolfo Giometti
  0 siblings, 1 reply; 8+ messages in thread
From: Andy Shevchenko @ 2022-01-12 21:07 UTC (permalink / raw)
  To: Robert Hancock; +Cc: linux-kernel, giometti, gregkh, rasm, jamesnuss, akpm

On Wed, Jan 12, 2022 at 02:52:14PM -0600, Robert Hancock wrote:
> If the pps-gpio driver was probed prior to the GPIO device it uses, the
> devm_gpiod_get call returned an -EPROBE_DEFER error, but pps_gpio_probe
> replaced that error code with -EINVAL, causing the pps-gpio probe to
> fail and not be retried later. Propagate the error return value so that
> deferred probe works properly.

FWIW,
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

> Fixes: 161520451dfa (pps: new client driver using GPIO)
> Signed-off-by: Robert Hancock <robert.hancock@calian.com>
> ---
>  drivers/pps/clients/pps-gpio.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/pps/clients/pps-gpio.c b/drivers/pps/clients/pps-gpio.c
> index 35799e6401c9..2f4b11b4dfcd 100644
> --- a/drivers/pps/clients/pps-gpio.c
> +++ b/drivers/pps/clients/pps-gpio.c
> @@ -169,7 +169,7 @@ static int pps_gpio_probe(struct platform_device *pdev)
>  	/* GPIO setup */
>  	ret = pps_gpio_setup(dev);
>  	if (ret)
> -		return -EINVAL;
> +		return ret;
>  
>  	/* IRQ setup */
>  	ret = gpiod_to_irq(data->gpio_pin);
> -- 
> 2.31.1
> 

-- 
With Best Regards,
Andy Shevchenko



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

* Re: [PATCH] pps: clients: gpio: Propagate return value from pps_gpio_probe
  2022-01-12 21:07 ` Andy Shevchenko
@ 2022-01-13  8:17   ` Rodolfo Giometti
  2022-01-29 22:02     ` Robert Hancock
  0 siblings, 1 reply; 8+ messages in thread
From: Rodolfo Giometti @ 2022-01-13  8:17 UTC (permalink / raw)
  To: Andy Shevchenko, Robert Hancock
  Cc: linux-kernel, gregkh, rasm, jamesnuss, akpm

On 12/01/22 22:07, Andy Shevchenko wrote:
> On Wed, Jan 12, 2022 at 02:52:14PM -0600, Robert Hancock wrote:
>> If the pps-gpio driver was probed prior to the GPIO device it uses, the
>> devm_gpiod_get call returned an -EPROBE_DEFER error, but pps_gpio_probe
>> replaced that error code with -EINVAL, causing the pps-gpio probe to
>> fail and not be retried later. Propagate the error return value so that
>> deferred probe works properly.
> 
> FWIW,
> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

Acked-by: Rodolfo Giometti <giometti@enneenne.com>
> 
>> Fixes: 161520451dfa (pps: new client driver using GPIO)
>> Signed-off-by: Robert Hancock <robert.hancock@calian.com>
>> ---
>>  drivers/pps/clients/pps-gpio.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/pps/clients/pps-gpio.c b/drivers/pps/clients/pps-gpio.c
>> index 35799e6401c9..2f4b11b4dfcd 100644
>> --- a/drivers/pps/clients/pps-gpio.c
>> +++ b/drivers/pps/clients/pps-gpio.c
>> @@ -169,7 +169,7 @@ static int pps_gpio_probe(struct platform_device *pdev)
>>  	/* GPIO setup */
>>  	ret = pps_gpio_setup(dev);
>>  	if (ret)
>> -		return -EINVAL;
>> +		return ret;
>>  
>>  	/* IRQ setup */
>>  	ret = gpiod_to_irq(data->gpio_pin);
>> -- 
>> 2.31.1
>>
> 


-- 
GNU/Linux Solutions                  e-mail: giometti@enneenne.com
Linux Device Driver                          giometti@linux.it
Embedded Systems                     phone:  +39 349 2432127
UNIX programming                     skype:  rodolfo.giometti

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

* Re: [PATCH] pps: clients: gpio: Propagate return value from pps_gpio_probe
  2022-01-13  8:17   ` Rodolfo Giometti
@ 2022-01-29 22:02     ` Robert Hancock
  2022-01-30  9:35       ` Rodolfo Giometti
  0 siblings, 1 reply; 8+ messages in thread
From: Robert Hancock @ 2022-01-29 22:02 UTC (permalink / raw)
  To: giometti, andriy.shevchenko; +Cc: akpm, linux-kernel, gregkh, rasm, jamesnuss

On Thu, 2022-01-13 at 09:17 +0100, Rodolfo Giometti wrote:
> On 12/01/22 22:07, Andy Shevchenko wrote:
> > On Wed, Jan 12, 2022 at 02:52:14PM -0600, Robert Hancock wrote:
> > > If the pps-gpio driver was probed prior to the GPIO device it uses, the
> > > devm_gpiod_get call returned an -EPROBE_DEFER error, but pps_gpio_probe
> > > replaced that error code with -EINVAL, causing the pps-gpio probe to
> > > fail and not be retried later. Propagate the error return value so that
> > > deferred probe works properly.
> > 
> > FWIW,
> > Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> 
> Acked-by: Rodolfo Giometti <giometti@enneenne.com>

It's not entirely clear to me what tree PPS patches are supposed to go through.
Seems like some recent ones have gone through char-misc? Not sure if someone
has this in their queue?

> > > Fixes: 161520451dfa (pps: new client driver using GPIO)
> > > Signed-off-by: Robert Hancock <robert.hancock@calian.com>
> > > ---
> > >  drivers/pps/clients/pps-gpio.c | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > 
> > > diff --git a/drivers/pps/clients/pps-gpio.c b/drivers/pps/clients/pps-
> > > gpio.c
> > > index 35799e6401c9..2f4b11b4dfcd 100644
> > > --- a/drivers/pps/clients/pps-gpio.c
> > > +++ b/drivers/pps/clients/pps-gpio.c
> > > @@ -169,7 +169,7 @@ static int pps_gpio_probe(struct platform_device
> > > *pdev)
> > >  	/* GPIO setup */
> > >  	ret = pps_gpio_setup(dev);
> > >  	if (ret)
> > > -		return -EINVAL;
> > > +		return ret;
> > >  
> > >  	/* IRQ setup */
> > >  	ret = gpiod_to_irq(data->gpio_pin);
> > > -- 
> > > 2.31.1
> > > 
> 
> 
-- 
Robert Hancock
Senior Hardware Designer, Calian Advanced Technologies
www.calian.com

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

* Re: [PATCH] pps: clients: gpio: Propagate return value from pps_gpio_probe
  2022-01-29 22:02     ` Robert Hancock
@ 2022-01-30  9:35       ` Rodolfo Giometti
  2022-02-02 17:04         ` Robert Hancock
  0 siblings, 1 reply; 8+ messages in thread
From: Rodolfo Giometti @ 2022-01-30  9:35 UTC (permalink / raw)
  To: Robert Hancock, andriy.shevchenko
  Cc: akpm, linux-kernel, gregkh, rasm, jamesnuss

On 29/01/22 23:02, Robert Hancock wrote:
> On Thu, 2022-01-13 at 09:17 +0100, Rodolfo Giometti wrote:
>> On 12/01/22 22:07, Andy Shevchenko wrote:
>>> On Wed, Jan 12, 2022 at 02:52:14PM -0600, Robert Hancock wrote:
>>>> If the pps-gpio driver was probed prior to the GPIO device it uses, the
>>>> devm_gpiod_get call returned an -EPROBE_DEFER error, but pps_gpio_probe
>>>> replaced that error code with -EINVAL, causing the pps-gpio probe to
>>>> fail and not be retried later. Propagate the error return value so that
>>>> deferred probe works properly.
>>>
>>> FWIW,
>>> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
>>
>> Acked-by: Rodolfo Giometti <giometti@enneenne.com>
> 
> It's not entirely clear to me what tree PPS patches are supposed to go through.
> Seems like some recent ones have gone through char-misc? Not sure if someone
> has this in their queue?

LinuxPPS has no its own tree. All related patches usually are sent to me to be
acked and to Greg Kroah-Hartman for inclusion.

Ciao,

Rodolfo

-- 
GNU/Linux Solutions                  e-mail: giometti@enneenne.com
Linux Device Driver                          giometti@linux.it
Embedded Systems                     phone:  +39 349 2432127
UNIX programming                     skype:  rodolfo.giometti

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

* Re: [PATCH] pps: clients: gpio: Propagate return value from pps_gpio_probe
  2022-01-30  9:35       ` Rodolfo Giometti
@ 2022-02-02 17:04         ` Robert Hancock
  2022-02-02 17:40           ` Rodolfo Giometti
  2022-02-04 14:34           ` gregkh
  0 siblings, 2 replies; 8+ messages in thread
From: Robert Hancock @ 2022-02-02 17:04 UTC (permalink / raw)
  To: gregkh; +Cc: giometti, linux-kernel, andriy.shevchenko, akpm, rasm, jamesnuss

On Sun, 2022-01-30 at 10:35 +0100, Rodolfo Giometti wrote:
> On 29/01/22 23:02, Robert Hancock wrote:
> > On Thu, 2022-01-13 at 09:17 +0100, Rodolfo Giometti wrote:
> > > On 12/01/22 22:07, Andy Shevchenko wrote:
> > > > On Wed, Jan 12, 2022 at 02:52:14PM -0600, Robert Hancock wrote:
> > > > > If the pps-gpio driver was probed prior to the GPIO device it uses,
> > > > > the
> > > > > devm_gpiod_get call returned an -EPROBE_DEFER error, but
> > > > > pps_gpio_probe
> > > > > replaced that error code with -EINVAL, causing the pps-gpio probe to
> > > > > fail and not be retried later. Propagate the error return value so
> > > > > that
> > > > > deferred probe works properly.
> > > > 
> > > > FWIW,
> > > > Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> > > 
> > > Acked-by: Rodolfo Giometti <giometti@enneenne.com>
> > 
> > It's not entirely clear to me what tree PPS patches are supposed to go
> > through.
> > Seems like some recent ones have gone through char-misc? Not sure if
> > someone
> > has this in their queue?
> 
> LinuxPPS has no its own tree. All related patches usually are sent to me to
> be
> acked and to Greg Kroah-Hartman for inclusion.
> 
> Ciao,
> 
> Rodolfo
> 

It looks like some MAINTAINERS links should maybe be updated for PPS - the
referenced page at http://wiki.enneenne.com/index.php/LinuxPPS_support seems to
be dead. There is http://linuxpps.org/doku.php which points to a new mailing
list location as well, but that seems to have very little activity.

Greg, can you pick this patch ( https://lkml.org/lkml/2022/1/12/879 ) up?

-- 
Robert Hancock
Senior Hardware Designer, Calian Advanced Technologies
www.calian.com

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

* Re: [PATCH] pps: clients: gpio: Propagate return value from pps_gpio_probe
  2022-02-02 17:04         ` Robert Hancock
@ 2022-02-02 17:40           ` Rodolfo Giometti
  2022-02-04 14:34           ` gregkh
  1 sibling, 0 replies; 8+ messages in thread
From: Rodolfo Giometti @ 2022-02-02 17:40 UTC (permalink / raw)
  To: Robert Hancock, gregkh
  Cc: linux-kernel, andriy.shevchenko, akpm, rasm, jamesnuss

[-- Attachment #1: Type: text/plain, Size: 1916 bytes --]

On 02/02/22 18:04, Robert Hancock wrote:
> On Sun, 2022-01-30 at 10:35 +0100, Rodolfo Giometti wrote:
>> On 29/01/22 23:02, Robert Hancock wrote:
>>> On Thu, 2022-01-13 at 09:17 +0100, Rodolfo Giometti wrote:
>>>> On 12/01/22 22:07, Andy Shevchenko wrote:
>>>>> On Wed, Jan 12, 2022 at 02:52:14PM -0600, Robert Hancock wrote:
>>>>>> If the pps-gpio driver was probed prior to the GPIO device it uses,
>>>>>> the
>>>>>> devm_gpiod_get call returned an -EPROBE_DEFER error, but
>>>>>> pps_gpio_probe
>>>>>> replaced that error code with -EINVAL, causing the pps-gpio probe to
>>>>>> fail and not be retried later. Propagate the error return value so
>>>>>> that
>>>>>> deferred probe works properly.
>>>>>
>>>>> FWIW,
>>>>> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
>>>>
>>>> Acked-by: Rodolfo Giometti <giometti@enneenne.com>
>>>
>>> It's not entirely clear to me what tree PPS patches are supposed to go
>>> through.
>>> Seems like some recent ones have gone through char-misc? Not sure if
>>> someone
>>> has this in their queue?
>>
>> LinuxPPS has no its own tree. All related patches usually are sent to me to
>> be
>> acked and to Greg Kroah-Hartman for inclusion.
>>
>> Ciao,
>>
>> Rodolfo
>>
> 
> It looks like some MAINTAINERS links should maybe be updated for PPS - the
> referenced page at http://wiki.enneenne.com/index.php/LinuxPPS_support seems to
> be dead. There is http://linuxpps.org/doku.php which points to a new mailing
> list location as well,

Yeah. Attached is a patch to fix these.

> but that seems to have very little activity.

That's one of reasons why LunuxPPS doesn't have its own tree. :)

Ciao,

Rodolfo

-- 
GNU/Linux Solutions                  e-mail: giometti@enneenne.com
Linux Device Driver                          giometti@linux.it
Embedded Systems                     phone:  +39 349 2432127
UNIX programming                     skype:  rodolfo.giometti

[-- Attachment #2: 0001-MAINTAINERS-update-LinuxPPS-s-resources.patch --]
[-- Type: text/x-patch, Size: 914 bytes --]

From ab95f9b0dcbd538eb43e09eb358c782404ddf024 Mon Sep 17 00:00:00 2001
From: Rodolfo Giometti <giometti@enneenne.com>
Date: Wed, 2 Feb 2022 18:37:20 +0100
Subject: [PATCH] MAINTAINERS: update LinuxPPS's resources

Signed-off-by: Rodolfo Giometti <giometti@enneenne.com>
---
 MAINTAINERS | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/MAINTAINERS b/MAINTAINERS
index f41088418aae..9176ba3093b7 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -15490,9 +15490,9 @@ F:	drivers/net/ppp/ppp_*
 
 PPS SUPPORT
 M:	Rodolfo Giometti <giometti@enneenne.com>
-L:	linuxpps@ml.enneenne.com (subscribers-only)
+L:	discussions@linuxpps.org (subscribers-only)
 S:	Maintained
-W:	http://wiki.enneenne.com/index.php/LinuxPPS_support
+W:	http://linuxpps.org/doku.php
 F:	Documentation/ABI/testing/sysfs-pps
 F:	Documentation/devicetree/bindings/pps/pps-gpio.txt
 F:	Documentation/driver-api/pps.rst
-- 
2.25.1


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

* Re: [PATCH] pps: clients: gpio: Propagate return value from pps_gpio_probe
  2022-02-02 17:04         ` Robert Hancock
  2022-02-02 17:40           ` Rodolfo Giometti
@ 2022-02-04 14:34           ` gregkh
  1 sibling, 0 replies; 8+ messages in thread
From: gregkh @ 2022-02-04 14:34 UTC (permalink / raw)
  To: Robert Hancock
  Cc: giometti, linux-kernel, andriy.shevchenko, akpm, rasm, jamesnuss

On Wed, Feb 02, 2022 at 05:04:13PM +0000, Robert Hancock wrote:
> On Sun, 2022-01-30 at 10:35 +0100, Rodolfo Giometti wrote:
> > On 29/01/22 23:02, Robert Hancock wrote:
> > > On Thu, 2022-01-13 at 09:17 +0100, Rodolfo Giometti wrote:
> > > > On 12/01/22 22:07, Andy Shevchenko wrote:
> > > > > On Wed, Jan 12, 2022 at 02:52:14PM -0600, Robert Hancock wrote:
> > > > > > If the pps-gpio driver was probed prior to the GPIO device it uses,
> > > > > > the
> > > > > > devm_gpiod_get call returned an -EPROBE_DEFER error, but
> > > > > > pps_gpio_probe
> > > > > > replaced that error code with -EINVAL, causing the pps-gpio probe to
> > > > > > fail and not be retried later. Propagate the error return value so
> > > > > > that
> > > > > > deferred probe works properly.
> > > > > 
> > > > > FWIW,
> > > > > Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> > > > 
> > > > Acked-by: Rodolfo Giometti <giometti@enneenne.com>
> > > 
> > > It's not entirely clear to me what tree PPS patches are supposed to go
> > > through.
> > > Seems like some recent ones have gone through char-misc? Not sure if
> > > someone
> > > has this in their queue?
> > 
> > LinuxPPS has no its own tree. All related patches usually are sent to me to
> > be
> > acked and to Greg Kroah-Hartman for inclusion.
> > 
> > Ciao,
> > 
> > Rodolfo
> > 
> 
> It looks like some MAINTAINERS links should maybe be updated for PPS - the
> referenced page at http://wiki.enneenne.com/index.php/LinuxPPS_support seems to
> be dead. There is http://linuxpps.org/doku.php which points to a new mailing
> list location as well, but that seems to have very little activity.
> 
> Greg, can you pick this patch ( https://lkml.org/lkml/2022/1/12/879 ) up?

Please use lore.kernel.org, lkml.org does not work with our tools, nor
do we have any control over it.

thanks,

greg k-h

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

end of thread, other threads:[~2022-02-04 14:34 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-12 20:52 [PATCH] pps: clients: gpio: Propagate return value from pps_gpio_probe Robert Hancock
2022-01-12 21:07 ` Andy Shevchenko
2022-01-13  8:17   ` Rodolfo Giometti
2022-01-29 22:02     ` Robert Hancock
2022-01-30  9:35       ` Rodolfo Giometti
2022-02-02 17:04         ` Robert Hancock
2022-02-02 17:40           ` Rodolfo Giometti
2022-02-04 14:34           ` gregkh

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.