[...] > > Tarun Kanti DebBarma <tarun.kanti@xxxxxx> writes: > > > From: Charulatha V <charu@xxxxxx> > > > > Wakeup register offsets are initialized according to OMAP versions > > during device registration. These explicit checks are no longer needed. > > > > mpuio_init() function is defined under #ifdefs. It is required only in > case > > of MPUIO bank type and only when PM operations are supported by it. > > This is applicable only in case of OMAP16xx SoC's MPUIO GPIO bank type. > > For all the other cases it is a dummy function. Hence clean up the same > > and remove all the OMAP SoC specific #ifdefs. > > > > bank_is_mpuio() is defined as a check to identify if the bank type is > MPUIO. > > It is not required to define it separately as zero for OMAP2plus. Remove > this. > > The MPUIO stuff should really be separated from the wkup register stuff. Ok. > > [...] > > > @@ -596,27 +594,11 @@ static void omap_gpio_free(struct gpio_chip *chip, > unsigned offset) > > unsigned long flags; > > > > spin_lock_irqsave(&bank->lock, flags); > > -#ifdef CONFIG_ARCH_OMAP16XX > > - if (bank->method == METHOD_GPIO_1610) { > > - /* Disable wake-up during idle for dynamic tick */ > > - void __iomem *reg = bank->base + OMAP1610_GPIO_CLEAR_WAKEUPENA; > > - __raw_writel(1 << offset, reg); > > - } > > -#endif > > -#if defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3) > > - if (bank->method == METHOD_GPIO_24XX) { > > - /* Disable wake-up during idle for dynamic tick */ > > - void __iomem *reg = bank->base + OMAP24XX_GPIO_CLEARWKUENA; > > - __raw_writel(1 << offset, reg); > > - } > > -#endif > > -#ifdef CONFIG_ARCH_OMAP4 > > - if (bank->method == METHOD_GPIO_44XX) { > > + > > + if (bank->regs->wkup_clear) > > /* Disable wake-up during idle for dynamic tick */ > > - void __iomem *reg = bank->base + OMAP4_GPIO_IRQWAKEN0; > > - __raw_writel(1 << offset, reg); > > - } > > -#endif > > + __raw_writel(1 << offset, bank->base + bank->regs->wkup_clear); > > + > > Note that this is not an equivalent change. The current code is using > IRQWAKEN0 register and you're changing it to use the CLEARWKUPENA > register. Ok, I missed that. > > While the current code is clearly broken since it's not doing a > read/modify/write, this change is not very clear either, and not > documented in the changelog. > > I think a better approach is to just drop the parts of this patch where > the wkup_set and wkup_clear registers are added. Since they are removed > in patch 12/20 anyways, maybe moving 12/20 earlier in the series > would make this clearer and avoid unnessary additions followed by > removals. I will consolidate. Thanks. -- Tarun > > 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