Re: [PATCH] input: vt8500: Add power button keypad driver

2012-12-30 Thread Dmitry Torokhov
On Mon, Dec 31, 2012 at 12:44:31PM +1300, Tony Prisk wrote: > > > > + status = readl(pmc_base + 0x14); > > > + udelay(100); > > > + writel(status, pmc_base + 0x14); > > > + > > > + if (status & BIT(14)) { > > > + if (!power_button_pressed) { > > > > No need to do this check. > > > The

Re: [PATCH] input: vt8500: Add power button keypad driver

2012-12-30 Thread Tony Prisk
> > +Example: > > + powerkey: pwrkey@0 { > > + compatible = "wm,power-keypad"; > > + interrupts = <22>; > > + keymap = <116>; /* KEY_POWER */ > > Do we really need this in DT? I'd say just having it manageable from > userspace is enough. Just seemed easier this

Re: [PATCH] input: vt8500: Add power button keypad driver

2012-12-30 Thread Dmitry Torokhov
Hi Tony, On Mon, Dec 31, 2012 at 11:01:02AM +1300, Tony Prisk wrote: > This patch adds support for the Power Button keypad found on > Wondermedia netbooks/tablets. > > A keymap property is exposed to allowing defining the key > event to be generated when the power button is pressed. > >

[PATCH] input: vt8500: Add power button keypad driver

2012-12-30 Thread Tony Prisk
This patch adds support for the Power Button keypad found on Wondermedia netbooks/tablets. A keymap property is exposed to allowing defining the key event to be generated when the power button is pressed. Signed-off-by: Tony Prisk --- .../bindings/input/vt8500-power-keypad.txt | 17

[PATCH] input: vt8500: Add power button keypad driver

2012-12-30 Thread Tony Prisk
This patch adds support for the Power Button keypad found on Wondermedia netbooks/tablets. A keymap property is exposed to allowing defining the key event to be generated when the power button is pressed. Signed-off-by: Tony Prisk li...@prisktech.co.nz ---

Re: [PATCH] input: vt8500: Add power button keypad driver

2012-12-30 Thread Dmitry Torokhov
Hi Tony, On Mon, Dec 31, 2012 at 11:01:02AM +1300, Tony Prisk wrote: This patch adds support for the Power Button keypad found on Wondermedia netbooks/tablets. A keymap property is exposed to allowing defining the key event to be generated when the power button is pressed. Signed-off-by:

Re: [PATCH] input: vt8500: Add power button keypad driver

2012-12-30 Thread Tony Prisk
+Example: + powerkey: pwrkey@0 { + compatible = wm,power-keypad; + interrupts = 22; + keymap = 116; /* KEY_POWER */ Do we really need this in DT? I'd say just having it manageable from userspace is enough. Just seemed easier this way. Will be changed.

Re: [PATCH] input: vt8500: Add power button keypad driver

2012-12-30 Thread Dmitry Torokhov
On Mon, Dec 31, 2012 at 12:44:31PM +1300, Tony Prisk wrote: + status = readl(pmc_base + 0x14); + udelay(100); + writel(status, pmc_base + 0x14); + + if (status BIT(14)) { + if (!power_button_pressed) { No need to do this check. The hardware generates multiple