* [PATCH] usb: phy-generic: Don't fail on missing gpio reset
@ 2015-01-27 1:45 ` Soren Brinkmann
0 siblings, 0 replies; 11+ messages in thread
From: Soren Brinkmann @ 2015-01-27 1:45 UTC (permalink / raw)
To: Andreas Färber
Cc: Michal Simek, devicetree, Peter Crosthwaite, Arnd Bergmann,
linux-kernel, linux-arm-kernel, Ola Jeppson, linux-gpio,
linux-usb, Felipe Balbi, Soren Brinkmann
A reset through a GPIO is optional. Don't fail probing when it is
missing.
Reported-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
---
Hi Andreas,
does this do the trick?
Thanks,
Sören
drivers/usb/phy/phy-generic.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/usb/phy/phy-generic.c b/drivers/usb/phy/phy-generic.c
index dd05254241fb..a73d4c738f0b 100644
--- a/drivers/usb/phy/phy-generic.c
+++ b/drivers/usb/phy/phy-generic.c
@@ -241,10 +241,8 @@ int usb_phy_gen_create_phy(struct device *dev, struct usb_phy_generic *nop,
if (err == -EPROBE_DEFER)
return -EPROBE_DEFER;
- if (err) {
- dev_err(dev, "Error requesting RESET GPIO\n");
- return err;
- }
+ if (err)
+ nop->gpiod_reset = NULL;
nop->phy.otg = devm_kzalloc(dev, sizeof(*nop->phy.otg),
GFP_KERNEL);
--
2.2.2.1.g63c5777
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH] usb: phy-generic: Don't fail on missing gpio reset
@ 2015-01-27 1:45 ` Soren Brinkmann
0 siblings, 0 replies; 11+ messages in thread
From: Soren Brinkmann @ 2015-01-27 1:45 UTC (permalink / raw)
To: linux-arm-kernel
A reset through a GPIO is optional. Don't fail probing when it is
missing.
Reported-by: Andreas F?rber <afaerber@suse.de>
Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
---
Hi Andreas,
does this do the trick?
Thanks,
S?ren
drivers/usb/phy/phy-generic.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/usb/phy/phy-generic.c b/drivers/usb/phy/phy-generic.c
index dd05254241fb..a73d4c738f0b 100644
--- a/drivers/usb/phy/phy-generic.c
+++ b/drivers/usb/phy/phy-generic.c
@@ -241,10 +241,8 @@ int usb_phy_gen_create_phy(struct device *dev, struct usb_phy_generic *nop,
if (err == -EPROBE_DEFER)
return -EPROBE_DEFER;
- if (err) {
- dev_err(dev, "Error requesting RESET GPIO\n");
- return err;
- }
+ if (err)
+ nop->gpiod_reset = NULL;
nop->phy.otg = devm_kzalloc(dev, sizeof(*nop->phy.otg),
GFP_KERNEL);
--
2.2.2.1.g63c5777
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH] usb: phy-generic: Don't fail on missing gpio reset
2015-01-27 1:45 ` Soren Brinkmann
@ 2015-01-27 15:20 ` Felipe Balbi
-1 siblings, 0 replies; 11+ messages in thread
From: Felipe Balbi @ 2015-01-27 15:20 UTC (permalink / raw)
To: Soren Brinkmann
Cc: Andreas Färber, Michal Simek, devicetree, Peter Crosthwaite,
Arnd Bergmann, linux-kernel, linux-arm-kernel, Ola Jeppson,
linux-gpio, linux-usb, Felipe Balbi
[-- Attachment #1: Type: text/plain, Size: 1028 bytes --]
On Mon, Jan 26, 2015 at 05:45:29PM -0800, Soren Brinkmann wrote:
> A reset through a GPIO is optional. Don't fail probing when it is
> missing.
>
> Reported-by: Andreas Färber <afaerber@suse.de>
> Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
> ---
> Hi Andreas,
>
> does this do the trick?
>
> Thanks,
> Sören
>
> drivers/usb/phy/phy-generic.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/usb/phy/phy-generic.c b/drivers/usb/phy/phy-generic.c
> index dd05254241fb..a73d4c738f0b 100644
> --- a/drivers/usb/phy/phy-generic.c
> +++ b/drivers/usb/phy/phy-generic.c
> @@ -241,10 +241,8 @@ int usb_phy_gen_create_phy(struct device *dev, struct usb_phy_generic *nop,
>
> if (err == -EPROBE_DEFER)
> return -EPROBE_DEFER;
> - if (err) {
> - dev_err(dev, "Error requesting RESET GPIO\n");
> - return err;
> - }
> + if (err)
> + nop->gpiod_reset = NULL;
there's a better patch to use gpiod_get_optional(), instead.
--
balbi
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH] usb: phy-generic: Don't fail on missing gpio reset
@ 2015-01-27 15:20 ` Felipe Balbi
0 siblings, 0 replies; 11+ messages in thread
From: Felipe Balbi @ 2015-01-27 15:20 UTC (permalink / raw)
To: linux-arm-kernel
On Mon, Jan 26, 2015 at 05:45:29PM -0800, Soren Brinkmann wrote:
> A reset through a GPIO is optional. Don't fail probing when it is
> missing.
>
> Reported-by: Andreas F?rber <afaerber@suse.de>
> Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
> ---
> Hi Andreas,
>
> does this do the trick?
>
> Thanks,
> S?ren
>
> drivers/usb/phy/phy-generic.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/usb/phy/phy-generic.c b/drivers/usb/phy/phy-generic.c
> index dd05254241fb..a73d4c738f0b 100644
> --- a/drivers/usb/phy/phy-generic.c
> +++ b/drivers/usb/phy/phy-generic.c
> @@ -241,10 +241,8 @@ int usb_phy_gen_create_phy(struct device *dev, struct usb_phy_generic *nop,
>
> if (err == -EPROBE_DEFER)
> return -EPROBE_DEFER;
> - if (err) {
> - dev_err(dev, "Error requesting RESET GPIO\n");
> - return err;
> - }
> + if (err)
> + nop->gpiod_reset = NULL;
there's a better patch to use gpiod_get_optional(), instead.
--
balbi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20150127/c603b8f5/attachment-0001.sig>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] usb: phy-generic: Don't fail on missing gpio reset
2015-01-27 1:45 ` Soren Brinkmann
@ 2015-01-27 15:24 ` Arnd Bergmann
-1 siblings, 0 replies; 11+ messages in thread
From: Arnd Bergmann @ 2015-01-27 15:24 UTC (permalink / raw)
To: linux-arm-kernel
Cc: Soren Brinkmann, Andreas Färber, devicetree,
Peter Crosthwaite, Ola Jeppson, linux-usb, Michal Simek,
Felipe Balbi, linux-kernel, linux-gpio
On Monday 26 January 2015 17:45:29 Soren Brinkmann wrote:
> diff --git a/drivers/usb/phy/phy-generic.c b/drivers/usb/phy/phy-generic.c
> index dd05254241fb..a73d4c738f0b 100644
> --- a/drivers/usb/phy/phy-generic.c
> +++ b/drivers/usb/phy/phy-generic.c
> @@ -241,10 +241,8 @@ int usb_phy_gen_create_phy(struct device *dev, struct usb_phy_generic *nop,
>
> if (err == -EPROBE_DEFER)
> return -EPROBE_DEFER;
> - if (err) {
> - dev_err(dev, "Error requesting RESET GPIO\n");
> - return err;
> - }
> + if (err)
> + nop->gpiod_reset = NULL;
You might want to distinguish between a missing property and a
reset gpio that was specified but for some reason cannot be used.
Arnd
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH] usb: phy-generic: Don't fail on missing gpio reset
@ 2015-01-27 15:24 ` Arnd Bergmann
0 siblings, 0 replies; 11+ messages in thread
From: Arnd Bergmann @ 2015-01-27 15:24 UTC (permalink / raw)
To: linux-arm-kernel
On Monday 26 January 2015 17:45:29 Soren Brinkmann wrote:
> diff --git a/drivers/usb/phy/phy-generic.c b/drivers/usb/phy/phy-generic.c
> index dd05254241fb..a73d4c738f0b 100644
> --- a/drivers/usb/phy/phy-generic.c
> +++ b/drivers/usb/phy/phy-generic.c
> @@ -241,10 +241,8 @@ int usb_phy_gen_create_phy(struct device *dev, struct usb_phy_generic *nop,
>
> if (err == -EPROBE_DEFER)
> return -EPROBE_DEFER;
> - if (err) {
> - dev_err(dev, "Error requesting RESET GPIO\n");
> - return err;
> - }
> + if (err)
> + nop->gpiod_reset = NULL;
You might want to distinguish between a missing property and a
reset gpio that was specified but for some reason cannot be used.
Arnd
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] usb: phy-generic: Don't fail on missing gpio reset
2015-01-27 15:20 ` Felipe Balbi
(?)
@ 2015-01-27 19:13 ` Sören Brinkmann
-1 siblings, 0 replies; 11+ messages in thread
From: Sören Brinkmann @ 2015-01-27 19:13 UTC (permalink / raw)
To: Felipe Balbi
Cc: Andreas Färber, Michal Simek, devicetree, Peter Crosthwaite,
Arnd Bergmann, linux-kernel, linux-arm-kernel, Ola Jeppson,
linux-gpio, linux-usb
On Tue, 2015-01-27 at 09:20AM -0600, Felipe Balbi wrote:
> On Mon, Jan 26, 2015 at 05:45:29PM -0800, Soren Brinkmann wrote:
> > A reset through a GPIO is optional. Don't fail probing when it is
> > missing.
> >
> > Reported-by: Andreas Färber <afaerber@suse.de>
> > Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
> > ---
> > Hi Andreas,
> >
> > does this do the trick?
> >
> > Thanks,
> > Sören
> >
> > drivers/usb/phy/phy-generic.c | 6 ++----
> > 1 file changed, 2 insertions(+), 4 deletions(-)
> >
> > diff --git a/drivers/usb/phy/phy-generic.c b/drivers/usb/phy/phy-generic.c
> > index dd05254241fb..a73d4c738f0b 100644
> > --- a/drivers/usb/phy/phy-generic.c
> > +++ b/drivers/usb/phy/phy-generic.c
> > @@ -241,10 +241,8 @@ int usb_phy_gen_create_phy(struct device *dev, struct usb_phy_generic *nop,
> >
> > if (err == -EPROBE_DEFER)
> > return -EPROBE_DEFER;
> > - if (err) {
> > - dev_err(dev, "Error requesting RESET GPIO\n");
> > - return err;
> > - }
> > + if (err)
> > + nop->gpiod_reset = NULL;
>
> there's a better patch to use gpiod_get_optional(), instead.
Great, apparently that wasn't in linux-next yesterday. I'll give it a
shot once it arrives there.
Sören
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] usb: phy-generic: Don't fail on missing gpio reset
@ 2015-01-27 19:13 ` Sören Brinkmann
0 siblings, 0 replies; 11+ messages in thread
From: Sören Brinkmann @ 2015-01-27 19:13 UTC (permalink / raw)
To: Felipe Balbi
Cc: Andreas Färber, Michal Simek, devicetree, Peter Crosthwaite,
Arnd Bergmann, linux-kernel, linux-arm-kernel, Ola Jeppson,
linux-gpio, linux-usb
On Tue, 2015-01-27 at 09:20AM -0600, Felipe Balbi wrote:
> On Mon, Jan 26, 2015 at 05:45:29PM -0800, Soren Brinkmann wrote:
> > A reset through a GPIO is optional. Don't fail probing when it is
> > missing.
> >
> > Reported-by: Andreas Färber <afaerber@suse.de>
> > Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
> > ---
> > Hi Andreas,
> >
> > does this do the trick?
> >
> > Thanks,
> > Sören
> >
> > drivers/usb/phy/phy-generic.c | 6 ++----
> > 1 file changed, 2 insertions(+), 4 deletions(-)
> >
> > diff --git a/drivers/usb/phy/phy-generic.c b/drivers/usb/phy/phy-generic.c
> > index dd05254241fb..a73d4c738f0b 100644
> > --- a/drivers/usb/phy/phy-generic.c
> > +++ b/drivers/usb/phy/phy-generic.c
> > @@ -241,10 +241,8 @@ int usb_phy_gen_create_phy(struct device *dev, struct usb_phy_generic *nop,
> >
> > if (err == -EPROBE_DEFER)
> > return -EPROBE_DEFER;
> > - if (err) {
> > - dev_err(dev, "Error requesting RESET GPIO\n");
> > - return err;
> > - }
> > + if (err)
> > + nop->gpiod_reset = NULL;
>
> there's a better patch to use gpiod_get_optional(), instead.
Great, apparently that wasn't in linux-next yesterday. I'll give it a
shot once it arrives there.
Sören
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH] usb: phy-generic: Don't fail on missing gpio reset
@ 2015-01-27 19:13 ` Sören Brinkmann
0 siblings, 0 replies; 11+ messages in thread
From: Sören Brinkmann @ 2015-01-27 19:13 UTC (permalink / raw)
To: linux-arm-kernel
On Tue, 2015-01-27 at 09:20AM -0600, Felipe Balbi wrote:
> On Mon, Jan 26, 2015 at 05:45:29PM -0800, Soren Brinkmann wrote:
> > A reset through a GPIO is optional. Don't fail probing when it is
> > missing.
> >
> > Reported-by: Andreas F?rber <afaerber@suse.de>
> > Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
> > ---
> > Hi Andreas,
> >
> > does this do the trick?
> >
> > Thanks,
> > S?ren
> >
> > drivers/usb/phy/phy-generic.c | 6 ++----
> > 1 file changed, 2 insertions(+), 4 deletions(-)
> >
> > diff --git a/drivers/usb/phy/phy-generic.c b/drivers/usb/phy/phy-generic.c
> > index dd05254241fb..a73d4c738f0b 100644
> > --- a/drivers/usb/phy/phy-generic.c
> > +++ b/drivers/usb/phy/phy-generic.c
> > @@ -241,10 +241,8 @@ int usb_phy_gen_create_phy(struct device *dev, struct usb_phy_generic *nop,
> >
> > if (err == -EPROBE_DEFER)
> > return -EPROBE_DEFER;
> > - if (err) {
> > - dev_err(dev, "Error requesting RESET GPIO\n");
> > - return err;
> > - }
> > + if (err)
> > + nop->gpiod_reset = NULL;
>
> there's a better patch to use gpiod_get_optional(), instead.
Great, apparently that wasn't in linux-next yesterday. I'll give it a
shot once it arrives there.
S?ren
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] usb: phy-generic: Don't fail on missing gpio reset
2015-01-27 19:13 ` Sören Brinkmann
@ 2015-01-27 19:14 ` Felipe Balbi
-1 siblings, 0 replies; 11+ messages in thread
From: Felipe Balbi @ 2015-01-27 19:14 UTC (permalink / raw)
To: Sören Brinkmann
Cc: Felipe Balbi, Andreas Färber, Michal Simek, devicetree,
Peter Crosthwaite, Arnd Bergmann, linux-kernel, linux-arm-kernel,
Ola Jeppson, linux-gpio, linux-usb
[-- Attachment #1: Type: text/plain, Size: 1429 bytes --]
On Tue, Jan 27, 2015 at 11:13:08AM -0800, Sören Brinkmann wrote:
> On Tue, 2015-01-27 at 09:20AM -0600, Felipe Balbi wrote:
> > On Mon, Jan 26, 2015 at 05:45:29PM -0800, Soren Brinkmann wrote:
> > > A reset through a GPIO is optional. Don't fail probing when it is
> > > missing.
> > >
> > > Reported-by: Andreas Färber <afaerber@suse.de>
> > > Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
> > > ---
> > > Hi Andreas,
> > >
> > > does this do the trick?
> > >
> > > Thanks,
> > > Sören
> > >
> > > drivers/usb/phy/phy-generic.c | 6 ++----
> > > 1 file changed, 2 insertions(+), 4 deletions(-)
> > >
> > > diff --git a/drivers/usb/phy/phy-generic.c b/drivers/usb/phy/phy-generic.c
> > > index dd05254241fb..a73d4c738f0b 100644
> > > --- a/drivers/usb/phy/phy-generic.c
> > > +++ b/drivers/usb/phy/phy-generic.c
> > > @@ -241,10 +241,8 @@ int usb_phy_gen_create_phy(struct device *dev, struct usb_phy_generic *nop,
> > >
> > > if (err == -EPROBE_DEFER)
> > > return -EPROBE_DEFER;
> > > - if (err) {
> > > - dev_err(dev, "Error requesting RESET GPIO\n");
> > > - return err;
> > > - }
> > > + if (err)
> > > + nop->gpiod_reset = NULL;
> >
> > there's a better patch to use gpiod_get_optional(), instead.
>
> Great, apparently that wasn't in linux-next yesterday. I'll give it a
> shot once it arrives there.
It's still under discussion ;-)
--
balbi
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH] usb: phy-generic: Don't fail on missing gpio reset
@ 2015-01-27 19:14 ` Felipe Balbi
0 siblings, 0 replies; 11+ messages in thread
From: Felipe Balbi @ 2015-01-27 19:14 UTC (permalink / raw)
To: linux-arm-kernel
On Tue, Jan 27, 2015 at 11:13:08AM -0800, S?ren Brinkmann wrote:
> On Tue, 2015-01-27 at 09:20AM -0600, Felipe Balbi wrote:
> > On Mon, Jan 26, 2015 at 05:45:29PM -0800, Soren Brinkmann wrote:
> > > A reset through a GPIO is optional. Don't fail probing when it is
> > > missing.
> > >
> > > Reported-by: Andreas F?rber <afaerber@suse.de>
> > > Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
> > > ---
> > > Hi Andreas,
> > >
> > > does this do the trick?
> > >
> > > Thanks,
> > > S?ren
> > >
> > > drivers/usb/phy/phy-generic.c | 6 ++----
> > > 1 file changed, 2 insertions(+), 4 deletions(-)
> > >
> > > diff --git a/drivers/usb/phy/phy-generic.c b/drivers/usb/phy/phy-generic.c
> > > index dd05254241fb..a73d4c738f0b 100644
> > > --- a/drivers/usb/phy/phy-generic.c
> > > +++ b/drivers/usb/phy/phy-generic.c
> > > @@ -241,10 +241,8 @@ int usb_phy_gen_create_phy(struct device *dev, struct usb_phy_generic *nop,
> > >
> > > if (err == -EPROBE_DEFER)
> > > return -EPROBE_DEFER;
> > > - if (err) {
> > > - dev_err(dev, "Error requesting RESET GPIO\n");
> > > - return err;
> > > - }
> > > + if (err)
> > > + nop->gpiod_reset = NULL;
> >
> > there's a better patch to use gpiod_get_optional(), instead.
>
> Great, apparently that wasn't in linux-next yesterday. I'll give it a
> shot once it arrives there.
It's still under discussion ;-)
--
balbi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20150127/caea0929/attachment.sig>
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2015-01-27 19:15 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-27 1:45 [PATCH] usb: phy-generic: Don't fail on missing gpio reset Soren Brinkmann
2015-01-27 1:45 ` Soren Brinkmann
2015-01-27 15:20 ` Felipe Balbi
2015-01-27 15:20 ` Felipe Balbi
2015-01-27 19:13 ` Sören Brinkmann
2015-01-27 19:13 ` Sören Brinkmann
2015-01-27 19:13 ` Sören Brinkmann
2015-01-27 19:14 ` Felipe Balbi
2015-01-27 19:14 ` Felipe Balbi
2015-01-27 15:24 ` Arnd Bergmann
2015-01-27 15:24 ` Arnd Bergmann
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.