From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andy Shevchenko Subject: Re: [PATCH] ACPI / gpio: do not fall back to parsing _CRS when we get a deferral Date: Wed, 29 Mar 2017 19:42:26 +0300 Message-ID: <1490805746.708.51.camel@linux.intel.com> References: <20170323202138.GA11912@dtor-ws> <1490713442.708.33.camel@linux.intel.com> <8eb1f4c1-61b2-1670-9ee2-086e2ea15cda@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit Return-path: Received: from mga06.intel.com ([134.134.136.31]:43939 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752805AbdC2QrG (ORCPT ); Wed, 29 Mar 2017 12:47:06 -0400 In-Reply-To: <8eb1f4c1-61b2-1670-9ee2-086e2ea15cda@redhat.com> Sender: linux-gpio-owner@vger.kernel.org List-Id: linux-gpio@vger.kernel.org To: Hans de Goede , Dmitry Torokhov , Linus Walleij Cc: Alexandre Courbot , Mika Westerberg , "Rafael J. Wysocki" , linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org On Wed, 2017-03-29 at 18:33 +0200, Hans de Goede wrote: > HI, > > On 28-03-17 17:04, Andy Shevchenko wrote: > > On Thu, 2017-03-23 at 13:21 -0700, Dmitry Torokhov wrote: > > > If, while locating GPIOs by name, we get probe deferral, we should > > > immediately report it to caller rather than trying to fall back to > > > parsing > > > unnamed GPIOs from _CRS block. > > > > +Cc: Hans. > > > > Hans, do have any objections on this? Would you ideally give your > > Tested-by? > > Looks good to me and also does not seem to break anything on my test > devices, so: > > Acked-and-Tested-by: Hans de Goede Thanks! Linus, I'm fully satisfied :-) > > Regards, > > Hans > > > > > > > > > > Signed-off-by: Dmitry Torokhov > > > --- > > >  drivers/gpio/gpiolib-acpi.c | 4 +++- > > >  1 file changed, 3 insertions(+), 1 deletion(-) > > > > > > diff --git a/drivers/gpio/gpiolib-acpi.c b/drivers/gpio/gpiolib- > > > acpi.c > > > index a3faefa44f68..d3f9f028a37b 100644 > > > --- a/drivers/gpio/gpiolib-acpi.c > > > +++ b/drivers/gpio/gpiolib-acpi.c > > > @@ -572,8 +572,10 @@ struct gpio_desc *acpi_find_gpio(struct > > > device > > > *dev, > > >   } > > > > > >   desc = acpi_get_gpiod_by_index(adev, propname, > > > idx, > > > &info); > > > - if (!IS_ERR(desc) || (PTR_ERR(desc) == > > > -EPROBE_DEFER)) > > > + if (!IS_ERR(desc)) > > >   break; > > > + if (PTR_ERR(desc) == -EPROBE_DEFER) > > > + return ERR_CAST(desc); > > >   } > > > > > >   /* Then from plain _CRS GPIOs */ > > > -- > > > 2.12.1.500.gab5fba24ee-goog > > > > > > -- Andy Shevchenko Intel Finland Oy