From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752368Ab2GQSYW (ORCPT ); Tue, 17 Jul 2012 14:24:22 -0400 Received: from mail-qc0-f174.google.com ([209.85.216.174]:58786 "EHLO mail-qc0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751014Ab2GQSYT (ORCPT ); Tue, 17 Jul 2012 14:24:19 -0400 MIME-Version: 1.0 In-Reply-To: <1340836334-20427-1-git-send-email-stigge@antcom.de> References: <1340836334-20427-1-git-send-email-stigge@antcom.de> Date: Tue, 17 Jul 2012 20:24:18 +0200 Message-ID: Subject: Re: [PATCH RESEND] gpio: of_get_named_gpio_flags() return -EPROBE_DEFER if GPIO not yet available From: Linus Walleij To: Roland Stigge Cc: cjb@laptop.org, grant.likely@secretlab.ca, rob.herring@calxeda.com, rmk+kernel@arm.linux.org.uk, ulf.hansson@stericsson.com, linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, aletes.xgr@gmail.com, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 28, 2012 at 12:32 AM, Roland Stigge wrote: > of_get_named_gpio_flags() and of_get_named_gpio() return -EPROBE_DEFER if the > respective GPIO is not (yet) available. This is useful if driver's probe() > functions try to get a GPIO whose controller isn't probed yet. Thus, the driver > can be probed again later on. > > The function still returns -EINVAL on other errors (parse error or node doesn't > exist). This way, the case of an optional/intentionally missing GPIO is handled > appropriately. > > Signed-off-by: Roland Stigge Patch applied, if all gpio stuff shall defer properly in v3.6 we need this so let's do some testing in -next! Would be nice to get some ACK besides my own... Yours, Linus Walleij From mboxrd@z Thu Jan 1 00:00:00 1970 From: linus.walleij@linaro.org (Linus Walleij) Date: Tue, 17 Jul 2012 20:24:18 +0200 Subject: [PATCH RESEND] gpio: of_get_named_gpio_flags() return -EPROBE_DEFER if GPIO not yet available In-Reply-To: <1340836334-20427-1-git-send-email-stigge@antcom.de> References: <1340836334-20427-1-git-send-email-stigge@antcom.de> Message-ID: To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Thu, Jun 28, 2012 at 12:32 AM, Roland Stigge wrote: > of_get_named_gpio_flags() and of_get_named_gpio() return -EPROBE_DEFER if the > respective GPIO is not (yet) available. This is useful if driver's probe() > functions try to get a GPIO whose controller isn't probed yet. Thus, the driver > can be probed again later on. > > The function still returns -EINVAL on other errors (parse error or node doesn't > exist). This way, the case of an optional/intentionally missing GPIO is handled > appropriately. > > Signed-off-by: Roland Stigge Patch applied, if all gpio stuff shall defer properly in v3.6 we need this so let's do some testing in -next! Would be nice to get some ACK besides my own... Yours, Linus Walleij