From patchwork Tue May 12 13:02:06 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiko Schocher X-Patchwork-Id: 1288424 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=denx.de header.i=@denx.de header.a=rsa-sha256 header.s=phobos-20191101 header.b=pqSXuQlV; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49Lydl2XyNz9sRR for ; Tue, 12 May 2020 23:02:51 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 4103981D86; Tue, 12 May 2020 15:02:48 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1589288568; bh=eDWsPWuM/Bl0TxPodRYR1eY8FfSbUMzB1NUzRPvd0Zs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=pqSXuQlVuI/ZFBD+ncLtH5HBlTxQNdwZih2f3NHzFm0ldby1hDGVhhuZnP43dmtEk Mzerc3fqGTXAOYKZXxm6/F8qzxzyeix4SLkhxF16xQuLnG/J8zB6SvvKGs3qIZe3CY TAtQVWESNvS1nry0r4hcUGH96kWH9sSP4mvNCMLcUVxznuzDWK+soqq4oMo6XlAslV kTR4y8RlZjsUubexDh/D1Vxqqx5QmteeFxXskltH0leE3v30gRF7huOB05R/eFedCf l3zLmpT/nFYf0SUWf5+r+YgZfNmuqf0ALj3pI1EKkTQ4Sx/mqQdZUyerLC38tFUl/G iG8hWS26sv6tw== Received: by phobos.denx.de (Postfix, from userid 109) id 159D981D8A; Tue, 12 May 2020 15:02:47 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-out.m-online.net (mail-out.m-online.net [212.18.0.9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 84CBB81D58 for ; Tue, 12 May 2020 15:02:44 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=hs@denx.de Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 49Lydc2TBlz1qt3m; Tue, 12 May 2020 15:02:44 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 49Lydc21pyz1qv7t; Tue, 12 May 2020 15:02:44 +0200 (CEST) Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id kGc7cigYzGQz; Tue, 12 May 2020 15:02:42 +0200 (CEST) X-Auth-Info: kQUtUWgloDyAfRlE5WVczoFu03cwAe7MDK4h6Jxr+l0= Received: from mail-internal.denx.de (p578adb1c.dip0.t-ipconnect.de [87.138.219.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Tue, 12 May 2020 15:02:42 +0200 (CEST) Received: from pollux.denx.de (pollux [192.168.1.1]) by mail-internal.denx.de (Postfix) with ESMTP id 16DAB183630; Tue, 12 May 2020 15:02:11 +0200 (CEST) Received: by pollux.denx.de (Postfix, from userid 515) id 147D31A9867; Tue, 12 May 2020 15:02:11 +0200 (CEST) From: Heiko Schocher To: U-Boot Mailing List Cc: Heiko Schocher , Bin Meng , Patrick Delaunay , Simon Glass Subject: [PATCH v4 1/3] gpio-uclass.c: save the GPIOD flags also in the gpio descriptor Date: Tue, 12 May 2020 15:02:06 +0200 Message-Id: <20200512130208.3010303-2-hs@denx.de> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200512130208.3010303-1-hs@denx.de> References: <20200512130208.3010303-1-hs@denx.de> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.30rc1 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.2 at phobos.denx.de X-Virus-Status: Clean save the GPIOD_ flags also in the gpio descriptor. Signed-off-by: Heiko Schocher --- Changes in v4: - new in version 4 Changes in v3: None Changes in v2: None drivers/gpio/gpio-uclass.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpio/gpio-uclass.c b/drivers/gpio/gpio-uclass.c index 757ab7106e..fc94334160 100644 --- a/drivers/gpio/gpio-uclass.c +++ b/drivers/gpio/gpio-uclass.c @@ -572,6 +572,9 @@ static int _dm_gpio_set_dir_flags(struct gpio_desc *desc, ulong flags) return ret; } + /* save the flags also in descriptor */ + desc->flags = flags; + /* GPIOD_ are directly managed by driver in set_dir_flags*/ if (ops->set_dir_flags) { ret = ops->set_dir_flags(dev, desc->offset, flags);