[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20111013041250.GG15829@ponder.secretlab.ca>
Date: Wed, 12 Oct 2011 22:12:50 -0600
From: Grant Likely <grant.likely@...retlab.ca>
To: "G, Manjunath Kondaiah" <manjugk@...com>
Cc: Alan Cox <alan@...rguk.ukuu.org.uk>, Dilan Lee <dilee@...dia.com>,
Arnd Bergmann <arnd@...db.de>,
Greg Kroah-Hartman <greg@...ah.com>,
Mark Brown <broonie@...nsource.wolfsonmicro.com>,
linux-mmc@...r.kernel.org, linux-kernel@...r.kernel.org,
Manjunath GKondaiah <manjunath.gkondaiah@...aro.org>,
linux-omap@...r.kernel.org, linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH 4/5] gpiolib: handle deferral probe error
On Wed, Oct 12, 2011 at 11:44:32AM +0530, G, Manjunath Kondaiah wrote:
> On Fri, Oct 07, 2011 at 04:09:38PM -0600, Grant Likely wrote:
> > On Fri, Oct 7, 2011 at 4:06 AM, Alan Cox <alan@...rguk.ukuu.org.uk> wrote:
> > > On Fri, 07 Oct 2011 10:33:09 +0500
> > > "G, Manjunath Kondaiah" <manjugk@...com> wrote:
> > >
> > >>
> > >> The gpio library should return -EPROBE_DEFER in gpio_request
> > >> if gpio driver is not ready.
> > >
> > > Why not use the perfectly good existing error codes we have for this ?
> > >
> > > We have EAGAIN and EUNATCH both of which look sensible.
> >
> > I want a distinct error code for probe deferral so that a) it doesn't
> > overlap with something a driver is already doing, and b) so that all
> > the users can be found again at a later date.
> >
> > That said, I'm not in agreement with this patch. It is fine for gpio
> > lib to have a code that means the pin doesn't exist (yet), but the
> > device driver needs to be the one to decide whether or not it is
> > appropriate to use probe deferral.
>
> During gpio_request, driver gpio_request is not available. How can we expect
> driver to request deferred probe in this case?
If gpio_request fails, the driver can then explicitly make the
decision to return -EPROBE_DEFER. It isn't forced to pass on the
error code from gpio_request().
g.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists