On Thu, Dec 21, 2017 at 04:09:46PM +0200, Tuomas Tynkkynen wrote:
> On Thu, 2017-12-21 at 14:09 +0100, Maxime Ripard wrote:
> 
> > >           sunxi_gpio_set_pull(cd_pin, SUNXI_GPIO_PULL_UP);
> > >   }
> > >  
> > > So: if the DT specifies GPIO_ACTIVE_LOW, dm_gpio_get_value()
> > > does its own inversion of the GPIO level. Then, on top of that
> > > we do another inversion if the "cd-inverted" property was
> > > specified.
> > > This matches what the Linux MMC driver does.
> > 
> > Hmmm, right.
> > 
> > I guess in your particular case then, you'd be better off droping the
> > cd-inverted property. Like I said, it's really legacy these days.
> > That
> > of course doesn't prevent the rest of the patch to go in.
> 
> Yes, getting rid of the cd-inverted properties from the DTs should make
> card detection work without any code changes. So the plan of action
> will be:
> 
> - Drop cd-inverted from U-Boot's sun7i-a20-pcduino3.dts
> - Flip the GPIO_ACTIVE_* around + drop cd-inverted from Linux DTs
> - Re-sync DTs from Linux to U-Boot
> - Finally switch all sunxi boards to DM_MMC in U-Boot

Looks good to me :)

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

Attachment: signature.asc
Description: PGP signature

_______________________________________________
U-Boot mailing list
[email protected]
https://lists.denx.de/listinfo/u-boot

Reply via email to