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

Lei Wen adrian.wenl at gmail.com
Wed Jul 20 09:28:34 CEST 2011


On Wed, Jul 20, 2011 at 3:14 PM, Ajay Bhargav
<ajay.bhargav at einfochips.com> wrote:
> 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.
>
I am not mixing those two concept together, and in our pratice, we
also do as you said,
use mfp to set that pin to GPIO state, and use gpio function to
manupulate the gpio.
So there is no need checking MFP setting for gpio requreset. Directly
set would be ok.
BTW, why there is need the gpio_request function?

> 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.

Actually, we use the same gpio driver for several series till now.
And configure pin as GPIO(AF0 or whatever) is the business of MFP.

Best regards,
Lei


More information about the U-Boot mailing list