From mboxrd@z Thu Jan 1 00:00:00 1970 From: Baruch Siach Date: Thu, 02 Jul 2020 22:05:30 +0300 Subject: [PATCH v5 1/3] gpio-uclass.c: save the GPIOD flags also in the gpio descriptor In-Reply-To: <20200515140100.3306517-2-hs@denx.de> References: <20200515140100.3306517-1-hs@denx.de> <20200515140100.3306517-2-hs@denx.de> Message-ID: <87pn9d7n5x.fsf@tarshish> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Heiko, On Fri, May 15 2020, Heiko Schocher wrote: > save the GPIOD_ flags also in the gpio descriptor. > > Signed-off-by: Heiko Schocher > Reviewed-by: Patrick Delaunay > Reviewed-by: Simon Glass This fixes SD card access on Hummingboard2. Current master uses the wrong out polarity to control the SD card power regulator. Tested-by: Baruch Siach Should go to v2020.07 I believe. One more comment below. > @@ -614,10 +618,6 @@ int dm_gpio_set_dir_flags(struct gpio_desc *desc, ulong flags) > flags |= desc->flags; > ret = _dm_gpio_set_dir_flags(desc, flags); > > - /* update the descriptor flags */ > - if (ret) > - desc->flags = flags; > - > return ret; You can just do return _dm_gpio_set_dir_flags(desc, flags); here instead. Thanks, baruch -- ~. .~ Tk Open Systems =}------------------------------------------------ooO--U--Ooo------------{= - baruch at tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -