On Thu, Jul 08, 2010 at 05:41:33PM +0100, Alan Cox wrote: > From: Zheng Ba <zheng.ba@xxxxxxxxx> > > An i2c bus driver for the Intel Medfield keypad interface. > > Signed-off-by: Zheng Ba <zheng.ba@xxxxxxxxx> > Signed-off-by: Alan Cox <alan@xxxxxxxxxxxxxxx> > --- > > drivers/input/keyboard/Kconfig | 10 + > drivers/input/keyboard/Makefile | 1 > drivers/input/keyboard/mfld_keypad.c | 613 ++++++++++++++++++++++++++++++++++ > drivers/input/keyboard/mfld_keypad.h | 56 +++ > 4 files changed, 680 insertions(+), 0 deletions(-) > create mode 100644 drivers/input/keyboard/mfld_keypad.c > create mode 100644 drivers/input/keyboard/mfld_keypad.h > > > diff --git a/drivers/input/keyboard/Kconfig b/drivers/input/keyboard/Kconfig > index 950f6d1..10cc686 100644 > --- a/drivers/input/keyboard/Kconfig > +++ b/drivers/input/keyboard/Kconfig > @@ -309,6 +309,16 @@ config KEYBOARD_MCS > To compile this driver as a module, choose M here: the > module will be called mcs_touchkey. > > +config KEYBOARD_MFLD > + tristate "Medfield I2C keypad support" > + depends on I2C && GPIOLIB && X86_MRST > + help > + Say Y here if you want to get support for the keypad controller > + on the Medfield (MFLD) platform of Intel MID. > + > + To compile this as a module, choose M here: the > + module will be called mfld_keypad. > + > config KEYBOARD_IMX > tristate "IMX keypad support" > depends on ARCH_MXC > diff --git a/drivers/input/keyboard/Makefile b/drivers/input/keyboard/Makefile > index a1f5e9d..9672c3d 100644 > --- a/drivers/input/keyboard/Makefile > +++ b/drivers/input/keyboard/Makefile <snip> > +/* > + * We cannot use I2c in interrupt context, so we just schedule work. > + */ > +static irqreturn_t mfld_keypad_irq(int irq, void *data) > +{ > + struct mfld_keypad_chip *tc = data; > + schedule_work(&tc->work); Use threaded irq? > + return IRQ_HANDLED; > +} -- Ville Syrjälä syrjala@xxxxxx http://www.sci.fi/~syrjala/ -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html