[U-Boot] [PATCH v6 1/2] gpio: Add GPIO driver framework for Marvell SoCs
Prafulla Wadaskar
prafulla at marvell.com
Wed Aug 17 14:03:47 CEST 2011
> -----Original Message-----
> From: Ajay Bhargav [mailto:ajay.bhargav at einfochips.com]
> Sent: Wednesday, August 17, 2011 2:18 PM
> To: Prafulla Wadaskar
> Cc: u-boot at lists.denx.de
> Subject: Re: [PATCH v6 1/2] gpio: Add GPIO driver framework for Marvell
> SoCs
>
>
> ----- "Prafulla Wadaskar" <prafulla at marvell.com> wrote:
>
> > Hi Ajay
> > I am sorry if I missed this in my earlier reviews.
> >
> > Why you wish to keep mvgpio.h in /include folder?
> > I think it should be in drivers/gpio/.
> >
> > Regards..
> > Prafulla . .
> >
>
> Hi Prafulla,
>
> gpio.h includes this file, as GPIO_LEVEL_SET/CLR are defined
> in mvgpio.h which may be needed by other files accessing gpios.
> In my case I am using gpio for PHY reset. I was thinking not to
> keep any magic number 1/0 for set/clr gpio pin.
Hi Ajay
In any case this gpio driver will be used by other drivers or board specific code to configure/set/clear particular gpio. And that is possible by just including asm/gpio.h and using standard gpio calls.
So in any case keeping mvgpio.h in include folder does not make any sense to me.
If needed, layered architecture suggest to include asm/gpio.h in your code, which will include asm/arch/gpio.h to get your architecture specific gpio definitions, I don't think this will be needed if you use standard API calls.
Regards..
Prafulla . .
More information about the U-Boot
mailing list