> -----Original Message----- > From: Hilman, Kevin > Sent: Friday, June 17, 2011 9:22 PM > To: DebBarma, Tarun Kanti > Cc: linux-omap@xxxxxxxxxxxxxxx; Shilimkar, Santosh; tony@xxxxxxxxxxx > Subject: Re: [PATCH v2 08/18] GPIO: OMAP: Use wkup regs off/suspend > support flag > > "DebBarma, Tarun Kanti" <tarun.kanti@xxxxxx> writes: > > [...] > > >> > diff --git a/arch/arm/mach-omap1/gpio16xx.c b/arch/arm/mach- > >> omap1/gpio16xx.c > >> > index 9a97e60..d1da7c8 100644 > >> > --- a/arch/arm/mach-omap1/gpio16xx.c > >> > +++ b/arch/arm/mach-omap1/gpio16xx.c > >> > @@ -52,6 +52,7 @@ static struct __initdata omap_gpio_platform_data > >> omap16xx_mpu_gpio_config = { > >> > .bank_type = METHOD_MPUIO, > >> > .bank_width = 16, > >> > .bank_stride = 1, > >> > + .suspend_support = true, > >> > .regs = &omap16xx_mpuio_regs, > >> > }; > >> > > >> > @@ -89,12 +90,16 @@ static struct omap_gpio_reg_offs > omap16xx_gpio_regs > >> = { > >> > .irqenable = OMAP1610_GPIO_IRQENABLE1, > >> > .set_irqenable = OMAP1610_GPIO_SET_IRQENABLE1, > >> > .clr_irqenable = OMAP1610_GPIO_CLEAR_IRQENABLE1, > >> > + .wkup_status = OMAP1610_GPIO_WAKEUPENABLE, > >> > + .wkup_clear = OMAP1610_GPIO_CLEAR_WAKEUPENA, > >> > + .wkup_set = OMAP1610_GPIO_SET_WAKEUPENA, > >> > }; > >> > > >> > static struct __initdata omap_gpio_platform_data > omap16xx_gpio1_config > >> = { > >> > .virtual_irq_start = IH_GPIO_BASE, > >> > .bank_type = METHOD_GPIO_1610, > >> > .bank_width = 16, > >> > + .suspend_support = true, > >> > .regs = &omap16xx_gpio_regs, > >> > }; > >> > > >> > @@ -125,6 +130,7 @@ static struct __initdata omap_gpio_platform_data > >> omap16xx_gpio2_config = { > >> > .virtual_irq_start = IH_GPIO_BASE + 16, > >> > .bank_type = METHOD_GPIO_1610, > >> > .bank_width = 16, > >> > + .suspend_support = true, > >> > .regs = &omap16xx_gpio_regs, > >> > }; > >> > > >> > @@ -155,6 +161,7 @@ static struct __initdata omap_gpio_platform_data > >> omap16xx_gpio3_config = { > >> > .virtual_irq_start = IH_GPIO_BASE + 32, > >> > .bank_type = METHOD_GPIO_1610, > >> > .bank_width = 16, > >> > + .suspend_support = true, > >> > .regs = &omap16xx_gpio_regs, > >> > }; > >> > > >> > @@ -185,6 +192,7 @@ static struct __initdata omap_gpio_platform_data > >> omap16xx_gpio4_config = { > >> > .virtual_irq_start = IH_GPIO_BASE + 48, > >> > .bank_type = METHOD_GPIO_1610, > >> > .bank_width = 16, > >> > + .suspend_support = true, > >> > .regs = &omap16xx_gpio_regs, > >> > }; > >> > >> Notice that you add a 'suspend_support = true' everywhere you add a the > >> wkup_* registers. This suggests to me that checking for the presence > of > >> one of those registers would tell you the same thing. > > > > Agreed! > > > > Specifically, I recommend checking for wake_status, since wake_set and > wake_clear are legacy registers and may not be recommended (or present) > on OMAP4+. OK. > > 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