[U-Boot] [PATCH 1/4] gpio: Adds GPIO driver support for Armada100

Ajay Bhargav ajay.bhargav at einfochips.com
Wed Jul 20 09:14:08 CEST 2011


Hi Lei,

> Actually, as uboot target at small size, I tend to don't add too much
> logic to it. So there is no need to
> check the "MAX", if one need to set the gpio, he should notice by
> himself, the gpio number he specified
> is a valid gpio address in the system.

Yeah so i made this assumption already that gpio entered has to be valid.
But do you think checking MFP setup for each gpio requested is good? this way
we are mixing MFP with GPIO again. If a person want to use a GPIO he should
know that MFP has to be configured before using as GPIO. That's the reason we
have a mfp driver.

and I don't think MFP logic written once for one series can be applied to all series
to find out if Selected function is GPIO or not. In Armada100 series not all MFPs have
AF0 as GPIO. That's the reason I left gpio_request function returning only 0.

Even in Linux kernel source if you see, gpio_request just checks for valid pin gpio number
nothing more than that. I seriously need some input to move ahead.

Regards,
Ajay Bhargav


More information about the U-Boot mailing list