"Varadarajan, Charulatha" <charu@xxxxxx> writes: >> > -----Original Message----- >> > From: Kevin Hilman [mailto:khilman@xxxxxxxxxxxxxxxxxxx] >> > Sent: Saturday, May 01, 2010 4:33 AM >> > To: Varadarajan, Charulatha >> > Cc: linux-omap@xxxxxxxxxxxxxxx; Nayak, Rajendra; paul@xxxxxxxxx; >> tony@xxxxxxxxxxx >> > Subject: Re: [PATCH 5/9] OMAP:GPIO: Introduce support for OMAP2PLUS chip >> specific >> > GPIO >> > >> > Charulatha V <charu@xxxxxx> writes: >> > >> > > This patch adds support for handling GPIO as a HWMOD adapted >> > > platform device for OMAP2PLUS chips. >> > > >> > > Signed-off-by: Charulatha V <charu@xxxxxx> >> > > --- >> > > arch/arm/mach-omap2/gpio.c | 101 >> ++++++++++++++++++++++++++++++++++++++++++++ >> > > 1 files changed, 101 insertions(+), 0 deletions(-) >> > > create mode 100644 arch/arm/mach-omap2/gpio.c >> > > >> > > diff --git a/arch/arm/mach-omap2/gpio.c b/arch/arm/mach-omap2/gpio.c >> > > new file mode 100644 >> > > index 0000000..6424050 >> > > --- /dev/null >> > > +++ b/arch/arm/mach-omap2/gpio.c >> > > @@ -0,0 +1,101 @@ > > ..[snip].. > >> > > + if (cpu_is_omap24xx() || cpu_is_omap34xx()) >> > > + pdata->method = METHOD_GPIO_24XX; >> > > + if (cpu_is_omap44xx()) >> > > + pdata->method = METHOD_GPIO_44XX; >> > > + pdata->virtual_irq_start = IH_GPIO_BASE + 32 * i; >> > > + pdata->device_enable = omap_device_enable; >> > > + pdata->device_idle = omap_device_idle; >> > > + pdata->device_shutdown = omap_device_shutdown; >> > >> > These aren't valid for GPIO1 which is in WKUP. Maybe we need >> > to check if the hwmod is not in wkup_pwrdm before setting these? >> >> I need to check how to implement this. >> > > There are two ways to implement this: > 1. Use a flag in dev_attr of the device to indicate if the device belongs to > WKUP domain > 2. We can add an API in powerdomain FW to provide information if the > device belongs to a "always_on" domain or otherwise, and use > this API for each device. > Actually, as I think about this more, my initial comment is wrong. the omap_device* functions are perfectly valid for GPIO1 as they have independent control that is managed by hwmod, so please ignore my comment. Your approach is fine. Thanks, Kevin -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html