Message ID | 20171214142138.23008-4-ludovic.desroches@microchip.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 9710F60352 for <patchwork-linux-arm@patchwork.kernel.org>; Thu, 14 Dec 2017 14:24:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 85C3829130 for <patchwork-linux-arm@patchwork.kernel.org>; Thu, 14 Dec 2017 14:24:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 79D182913F; Thu, 14 Dec 2017 14:24:52 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 0CD6F29130 for <patchwork-linux-arm@patchwork.kernel.org>; Thu, 14 Dec 2017 14:24:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=TY+1TKjGn2a0BConWKpFvbAeMOnO//893V1YddI34mQ=; b=sbHkLr6LWgfIju vhxcbe5plrbtQxgkr7NhRdCY+ou0myqzJUVo1ewYNTim13re3Djl4pM6kXWsYkbkcD95ZgSNdXa93 uarpOdIJF3xzyFLILNoJOHYHjdcZ7vGy9S1gDT0HkTlFjrV2iQrurF0Eos2nmcYJQDylueStfvVpt EMI26WbRsVzrFdevCz0rJ1zCHLSf+k/O0k2jMFXcvzi2MdOQq0w+NnRTvHLfjBOBBiNxq5FTYLLvH GgHPvgKkUhfbjOZXbISQiwEq2yzqWYun6SC/dyVvA/yV4eF8Ef2OdUR6WuGZ8eOznbZBTxzGOTGxc w0VXFzOWfszE40aT2nyw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1ePURP-0001rw-4v; Thu, 14 Dec 2017 14:24:51 +0000 Received: from esa1.microchip.iphmx.com ([68.232.147.91]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1ePUQ8-0000YR-R3 for linux-arm-kernel@lists.infradead.org; Thu, 14 Dec 2017 14:23:39 +0000 X-IronPort-AV: E=Sophos;i="5.45,400,1508828400"; d="scan'208";a="10138022" Received: from exsmtp02.microchip.com (HELO email.microchip.com) ([198.175.253.38]) by esa1.microchip.iphmx.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 14 Dec 2017 07:22:59 -0700 Received: from ibiza.corp.atmel.com (10.10.76.4) by chn-sv-exch02.mchp-main.com (10.10.76.38) with Microsoft SMTP Server id 14.3.352.0; Thu, 14 Dec 2017 07:22:58 -0700 From: Ludovic Desroches <ludovic.desroches@microchip.com> To: <linux-gpio@vger.kernel.org>, <linux-arm-kernel@lists.infradead.org> Subject: [RFC PATCH 3/7] gpio: gpiolib: save GPIO flags in of_get_named_gpiod_flags Date: Thu, 14 Dec 2017 15:21:34 +0100 Message-ID: <20171214142138.23008-4-ludovic.desroches@microchip.com> X-Mailer: git-send-email 2.12.2 In-Reply-To: <20171214142138.23008-1-ludovic.desroches@microchip.com> References: <20171214142138.23008-1-ludovic.desroches@microchip.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171214_062333_427528_6E145DAC X-CRM114-Status: UNSURE ( 7.28 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Cc: Ludovic Desroches <ludovic.desroches@microchip.com> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP |
diff --git a/drivers/gpio/gpiolib-of.c b/drivers/gpio/gpiolib-of.c index 4a2b8d3397c7..67b1a7ff1e97 100644 --- a/drivers/gpio/gpiolib-of.c +++ b/drivers/gpio/gpiolib-of.c @@ -97,6 +97,8 @@ struct gpio_desc *of_get_named_gpiod_flags(struct device_node *np, __func__, propname, np, index, PTR_ERR_OR_ZERO(desc)); + gpiod_configure_flags(desc, propname, *flags, 0); + out: of_node_put(gpiospec.np);
When we get a GPIO descriptor from the device device, the flags are updated for the caller to know if the GPIO is active low or high. After calling of_get_named_gpio_flags the next step is usually calling gpiod_request which doesn't take flags as a parameter. Updating the flags of the GPIO descriptor will allow to configure the GPIO when it will be requested. Signed-off-by: Ludovic Desroches <ludovic.desroches@microchip.com> --- drivers/gpio/gpiolib-of.c | 2 ++ 1 file changed, 2 insertions(+)