From mboxrd@z Thu Jan 1 00:00:00 1970 From: "G, Manjunath Kondaiah" Subject: Re: [PATCH 4/5] gpiolib: handle deferral probe error Date: Wed, 12 Oct 2011 11:44:32 +0530 Message-ID: <20111012061432.GA2080@manju-desktop> References: <1317963790-29426-1-git-send-email-manjugk@ti.com> <1317963790-29426-5-git-send-email-manjugk@ti.com> <20111007110615.7638e905@lxorguk.ukuu.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=m.gmane.org@lists.infradead.org To: Grant Likely Cc: linux-omap@vger.kernel.org, Arnd Bergmann , Greg Kroah-Hartman , Mark Brown , linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, Manjunath GKondaiah , linux-arm-kernel@lists.infradead.org, Dilan Lee , Alan Cox List-Id: linux-omap@vger.kernel.org On Fri, Oct 07, 2011 at 04:09:38PM -0600, Grant Likely wrote: > On Fri, Oct 7, 2011 at 4:06 AM, Alan Cox wrote: > > On Fri, 07 Oct 2011 10:33:09 +0500 > > "G, Manjunath Kondaiah" 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? -M