Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 256711
b: refs/heads/master
c: 9942da0
h: refs/heads/master
i:
  256709: 05de76d
  256707: a5e09ce
  256703: 2045640
v: v3
  • Loading branch information
Kevin Hilman committed Jun 16, 2011
1 parent cb282ce commit b502fbc
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f64ad1a0e21a4948894c7a1b6f2f03b5e7151ddf
refs/heads/master: 9942da0e4b037a852b230208410141768d473deb
4 changes: 4 additions & 0 deletions trunk/arch/arm/mach-omap2/gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ static int omap2_gpio_dev_init(struct omap_hwmod *oh, void *unused)
pdata->regs->irqenable = OMAP24XX_GPIO_IRQENABLE1;
pdata->regs->set_irqenable = OMAP24XX_GPIO_SETIRQENABLE1;
pdata->regs->clr_irqenable = OMAP24XX_GPIO_CLEARIRQENABLE1;
pdata->regs->debounce = OMAP24XX_GPIO_DEBOUNCE_VAL;
pdata->regs->debounce_en = OMAP24XX_GPIO_DEBOUNCE_EN;
break;
case 2:
pdata->bank_type = METHOD_GPIO_44XX;
Expand All @@ -94,6 +96,8 @@ static int omap2_gpio_dev_init(struct omap_hwmod *oh, void *unused)
pdata->regs->irqenable = OMAP4_GPIO_IRQSTATUSSET0;
pdata->regs->set_irqenable = OMAP4_GPIO_IRQSTATUSSET0;
pdata->regs->clr_irqenable = OMAP4_GPIO_IRQSTATUSCLR0;
pdata->regs->debounce = OMAP4_GPIO_DEBOUNCINGTIME;
pdata->regs->debounce_en = OMAP4_GPIO_DEBOUNCENABLE;
break;
default:
WARN(1, "Invalid gpio bank_type\n");
Expand Down
2 changes: 2 additions & 0 deletions trunk/arch/arm/plat-omap/include/plat/gpio.h
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,8 @@ struct omap_gpio_reg_offs {
u16 irqenable;
u16 set_irqenable;
u16 clr_irqenable;
u16 debounce;
u16 debounce_en;

bool irqenable_inv;
};
Expand Down
15 changes: 3 additions & 12 deletions trunk/drivers/gpio/gpio-omap.c
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ do { \
static void _set_gpio_debounce(struct gpio_bank *bank, unsigned gpio,
unsigned debounce)
{
void __iomem *reg = bank->base;
void __iomem *reg;
u32 val;
u32 l;

Expand All @@ -184,19 +184,10 @@ static void _set_gpio_debounce(struct gpio_bank *bank, unsigned gpio,

l = GPIO_BIT(bank, gpio);

if (bank->method == METHOD_GPIO_44XX)
reg += OMAP4_GPIO_DEBOUNCINGTIME;
else
reg += OMAP24XX_GPIO_DEBOUNCE_VAL;

reg = bank->base + bank->regs->debounce;
__raw_writel(debounce, reg);

reg = bank->base;
if (bank->method == METHOD_GPIO_44XX)
reg += OMAP4_GPIO_DEBOUNCENABLE;
else
reg += OMAP24XX_GPIO_DEBOUNCE_EN;

reg = bank->base + bank->regs->debounce_en;
val = __raw_readl(reg);

if (debounce) {
Expand Down

0 comments on commit b502fbc

Please sign in to comment.