From: Heiko Schocher Date: Tue, 12 May 2020 15:02:06 +0200 Subject: [PATCH v4 1/3] gpio-uclass.c: save the GPIOD flags also in the gpio descriptor In-Reply-To: <20200512130208.3010303-1-hs@denx.de> References: <20200512130208.3010303-1-hs@denx.de> Message-ID: <20200512130208.3010303-2-hs@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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); -- 2.24.1