aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/keyboard/Kconfig (follow)
AgeCommit message (Collapse)AuthorFilesLines
2012-07-17Input: add support for key scan interface of the LPC32xx SoCRoland Stigge1-0/+10
This is a driver for the key scan interface of the LPC32xx SoC Signed-off-by: Roland Stigge <stigge@antcom.de> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2012-05-10Input: matrix-keymap - uninline and prepare for device tree supportDmitry Torokhov1-1/+17
Change matrix-keymap helper to be out-of-line, like sparse keymap, allow the helper perform basic keymap validation and return errors, and prepare for device tree support. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2012-05-10Input: omap-keypad - dynamically handle register offsetsPoddar, Sourav1-2/+2
Hi Dmitry, On Wed, May 9, 2012 at 3:14 PM, Poddar, Sourav <sourav.poddar@ti.com> wrote: > Hi Dmitry, > > I did some minor fixes to the patch which you suggested above and > the keypad is functional now. > > Changes: > - Move "pm_runtime_enable" before using "pm_runtime_get_sync". > > Sending the patch inlined..(also attached). > > From: G, Manjunath Kondaiah <manjugk@ti.com> > Date: Mon, 10 Oct 2011 20:52:05 +0530 > Subject: [PATCH] Input: omap-keypad: dynamically handle register offsets > > Keypad controller register offsets are different for omap4 > and omap5. Handle these offsets through static mapping and > assign these mappings during run time. > > Tested on omap4430 sdp with 3.4-rc3. > Tested on omap5430evm with 3.1-custom kernel. > > Cc: Andrew Morton <akpm@linux-foundation.org> > Signed-off-by: Felipe Balbi <balbi@ti.com> > Signed-off-by: G, Manjunath Kondaiah <manjugk@ti.com> > Signed-off-by: Sourav Poddar <sourav.poddar@ti.com> > Signed-off-by: Dmitry Torokhov <dtor@mail.ru> > --- >  drivers/input/keyboard/Kconfig        |    4 +- >  drivers/input/keyboard/omap4-keypad.c |  120 +++++++++++++++++++++++++------- >  2 files changed, 95 insertions(+), 29 deletions(-) > > diff --git a/drivers/input/keyboard/Kconfig b/drivers/input/keyboard/Kconfig > index f354813..33bbdee 100644 > --- a/drivers/input/keyboard/Kconfig > +++ b/drivers/input/keyboard/Kconfig > @@ -512,9 +512,9 @@ config KEYBOARD_OMAP >          module will be called omap-keypad. > >  config KEYBOARD_OMAP4 > -       tristate "TI OMAP4 keypad support" > +       tristate "TI OMAP4+ keypad support" >        help > -         Say Y here if you want to use the OMAP4 keypad. > +         Say Y here if you want to use the OMAP4+ keypad. > >          To compile this driver as a module, choose M here: the >          module will be called omap4-keypad. > diff --git a/drivers/input/keyboard/omap4-keypad.c > b/drivers/input/keyboard/omap4-keypad.c > index e809ac0..d7102e8 100644 > --- a/drivers/input/keyboard/omap4-keypad.c > +++ b/drivers/input/keyboard/omap4-keypad.c > @@ -68,19 +68,52 @@ > >  #define OMAP4_MASK_IRQSTATUSDISABLE    0xFFFF > > +enum { > +       KBD_REVISION_OMAP4 = 0, > +       KBD_REVISION_OMAP5, > +}; > + >  struct omap4_keypad { >        struct input_dev *input; > >        void __iomem *base; > -       int irq; > +       unsigned int irq; > >        unsigned int rows; >        unsigned int cols; > +       u32 reg_offset; > +       u32 irqreg_offset; >        unsigned int row_shift; >        unsigned char key_state[8]; >        unsigned short keymap[]; >  }; > > +static int kbd_readl(struct omap4_keypad *keypad_data, u32 offset) > +{ > +       return __raw_readl(keypad_data->base + > +                               keypad_data->reg_offset + offset); > +} > + > +static void kbd_writel(struct omap4_keypad *keypad_data, u32 offset, u32 value) > +{ > +       __raw_writel(value, > +                    keypad_data->base + keypad_data->reg_offset + offset); > +} > + > +static int kbd_read_irqreg(struct omap4_keypad *keypad_data, u32 offset) > +{ > +       return __raw_readl(keypad_data->base + > +                               keypad_data->irqreg_offset + offset); > +} > + > +static void kbd_write_irqreg(struct omap4_keypad *keypad_data, > +                            u32 offset, u32 value) > +{ > +       __raw_writel(value, > +                    keypad_data->base + keypad_data->irqreg_offset + offset); > +} > + > + >  /* Interrupt handler */ >  static irqreturn_t omap4_keypad_interrupt(int irq, void *dev_id) >  { > @@ -91,12 +124,11 @@ static irqreturn_t omap4_keypad_interrupt(int > irq, void *dev_id) >        u32 *new_state = (u32 *) key_state; > >        /* Disable interrupts */ > -       __raw_writel(OMAP4_VAL_IRQDISABLE, > -                    keypad_data->base + OMAP4_KBD_IRQENABLE); > +       kbd_write_irqreg(keypad_data, OMAP4_KBD_IRQENABLE, > +                        OMAP4_VAL_IRQDISABLE); > > -       *new_state = __raw_readl(keypad_data->base + OMAP4_KBD_FULLCODE31_0); > -       *(new_state + 1) = __raw_readl(keypad_data->base > -                                               + OMAP4_KBD_FULLCODE63_32); > +       *new_state = kbd_readl(keypad_data, OMAP4_KBD_FULLCODE31_0); > +       *(new_state + 1) = kbd_readl(keypad_data, OMAP4_KBD_FULLCODE63_32); > >        for (row = 0; row < keypad_data->rows; row++) { >                changed = key_state[row] ^ keypad_data->key_state[row]; > @@ -121,12 +153,13 @@ static irqreturn_t omap4_keypad_interrupt(int > irq, void *dev_id) >                sizeof(keypad_data->key_state)); > >        /* clear pending interrupts */ > -       __raw_writel(__raw_readl(keypad_data->base + OMAP4_KBD_IRQSTATUS), > -                       keypad_data->base + OMAP4_KBD_IRQSTATUS); > +       kbd_write_irqreg(keypad_data, OMAP4_KBD_IRQSTATUS, > +                        kbd_read_irqreg(keypad_data, OMAP4_KBD_IRQSTATUS)); > >        /* enable interrupts */ > -       __raw_writel(OMAP4_DEF_IRQENABLE_EVENTEN | OMAP4_DEF_IRQENABLE_LONGKEY, > -                       keypad_data->base + OMAP4_KBD_IRQENABLE); > +       kbd_write_irqreg(keypad_data, OMAP4_KBD_IRQENABLE, > +               OMAP4_DEF_IRQENABLE_EVENTEN | > +                               OMAP4_DEF_IRQENABLE_LONGKEY); > >        return IRQ_HANDLED; >  } > @@ -139,16 +172,17 @@ static int omap4_keypad_open(struct input_dev *input) > >        disable_irq(keypad_data->irq); > > -       __raw_writel(OMAP4_VAL_FUNCTIONALCFG, > -                       keypad_data->base + OMAP4_KBD_CTRL); > -       __raw_writel(OMAP4_VAL_DEBOUNCINGTIME, > -                       keypad_data->base + OMAP4_KBD_DEBOUNCINGTIME); > -       __raw_writel(OMAP4_VAL_IRQDISABLE, > -                       keypad_data->base + OMAP4_KBD_IRQSTATUS); > -       __raw_writel(OMAP4_DEF_IRQENABLE_EVENTEN | OMAP4_DEF_IRQENABLE_LONGKEY, > -                       keypad_data->base + OMAP4_KBD_IRQENABLE); > -       __raw_writel(OMAP4_DEF_WUP_EVENT_ENA | OMAP4_DEF_WUP_LONG_KEY_ENA, > -                       keypad_data->base + OMAP4_KBD_WAKEUPENABLE); > +       kbd_writel(keypad_data, OMAP4_KBD_CTRL, > +                       OMAP4_VAL_FUNCTIONALCFG); > +       kbd_writel(keypad_data, OMAP4_KBD_DEBOUNCINGTIME, > +                       OMAP4_VAL_DEBOUNCINGTIME); > +       kbd_write_irqreg(keypad_data, OMAP4_KBD_IRQSTATUS, > +                       OMAP4_VAL_IRQDISABLE); > +       kbd_write_irqreg(keypad_data, OMAP4_KBD_IRQENABLE, > +                       OMAP4_DEF_IRQENABLE_EVENTEN | > +                               OMAP4_DEF_IRQENABLE_LONGKEY); > +       kbd_writel(keypad_data, OMAP4_KBD_WAKEUPENABLE, > +                       OMAP4_DEF_WUP_EVENT_ENA | OMAP4_DEF_WUP_LONG_KEY_ENA); > >        enable_irq(keypad_data->irq); > > @@ -162,12 +196,12 @@ static void omap4_keypad_close(struct input_dev *input) >        disable_irq(keypad_data->irq); > >        /* Disable interrupts */ > -       __raw_writel(OMAP4_VAL_IRQDISABLE, > -                    keypad_data->base + OMAP4_KBD_IRQENABLE); > +       kbd_write_irqreg(keypad_data, OMAP4_KBD_IRQENABLE, > +                        OMAP4_VAL_IRQDISABLE); > >        /* clear pending interrupts */ > -       __raw_writel(__raw_readl(keypad_data->base + OMAP4_KBD_IRQSTATUS), > -                       keypad_data->base + OMAP4_KBD_IRQSTATUS); > +       kbd_write_irqreg(keypad_data, OMAP4_KBD_IRQSTATUS, > +                        kbd_read_irqreg(keypad_data, OMAP4_KBD_IRQSTATUS)); > >        enable_irq(keypad_data->irq); > > @@ -182,6 +216,7 @@ static int __devinit omap4_keypad_probe(struct > platform_device *pdev) >        struct resource *res; >        resource_size_t size; >        unsigned int row_shift, max_keys; > +       int rev; >        int irq; >        int error; > > @@ -241,11 +276,40 @@ static int __devinit omap4_keypad_probe(struct > platform_device *pdev) >        keypad_data->rows = pdata->rows; >        keypad_data->cols = pdata->cols; > > +       /* > +       * Enable clocks for the keypad module so that we can read > +       * revision register. > +       */ > +       pm_runtime_enable(&pdev->dev); > +       error = pm_runtime_get_sync(&pdev->dev); > +       if (error) { > +               dev_err(&pdev->dev, "pm_runtime_get_sync() failed\n"); > +               goto err_unmap; > +       } > +       rev = __raw_readl(keypad_data->base + OMAP4_KBD_REVISION); > +       rev &= 0x03 << 30; > +       rev >>= 30; > +       switch (rev) { > +       case KBD_REVISION_OMAP4: > +               keypad_data->reg_offset = 0x00; > +               keypad_data->irqreg_offset = 0x00; > +               break; > +       case KBD_REVISION_OMAP5: > +               keypad_data->reg_offset = 0x10; > +               keypad_data->irqreg_offset = 0x0c; > +               break; > +       default: > +               dev_err(&pdev->dev, > +                       "Keypad reports unsupported revision %d", rev); > +               error = -EINVAL; > +               goto err_pm_put_sync; > +       } > + >        /* input device allocation */ >        keypad_data->input = input_dev = input_allocate_device(); >        if (!input_dev) { >                error = -ENOMEM; > -               goto err_unmap; > +               goto err_pm_put_sync; >        } > >        input_dev->name = pdev->name; > @@ -273,14 +337,14 @@ static int __devinit omap4_keypad_probe(struct > platform_device *pdev) >                        input_dev->keycode, input_dev->keybit); > >        error = request_irq(keypad_data->irq, omap4_keypad_interrupt, > -                            IRQF_TRIGGER_RISING, > +                           IRQF_DISABLED | IRQF_TRIGGER_RISING, Sorry, " IRQF_DISABLED" got included by mistake. Removing this stray change and sending it again. >                             "omap4-keypad", keypad_data); >        if (error) { >                dev_err(&pdev->dev, "failed to register interrupt\n"); >                goto err_free_input; >        } > > -       pm_runtime_enable(&pdev->dev); > +       pm_runtime_put_sync(&pdev->dev); > >        error = input_register_device(keypad_data->input); >        if (error < 0) { > @@ -296,6 +360,8 @@ err_pm_disable: >        free_irq(keypad_data->irq, keypad_data); >  err_free_input: >        input_free_device(input_dev); > +err_pm_put_sync: > +       pm_runtime_put_sync(&pdev->dev); >  err_unmap: >        iounmap(keypad_data->base); >  err_release_mem: > > > ~Sourav > > On Wed, May 9, 2012 at 1:15 PM, Dmitry Torokhov > <dmitry.torokhov@gmail.com> wrote: >>> Hi Dmitry , >>> >>> >>> On Wed, May 9, 2012 at 10:48 AM, Dmitry Torokhov >>> <dmitry.torokhov@gmail.com> wrote: >>> > Ho Sourav, >>> > >>> > On Thu, Apr 26, 2012 at 11:24:37AM +0530, Sourav Poddar wrote: >>> >> >>> >> -config KEYBOARD_OMAP4 >>> >> -     tristate "TI OMAP4 keypad support" >>> >> +config KEYBOARD_OMAP4+ >>> > >>> > I think this works purely by accident - '+' sign getting dropped by >>> > parser... >>> > >>> >> @@ -139,16 +192,33 @@ static int omap4_keypad_open(struct input_dev *input) >>> >> >>> >>       disable_irq(keypad_data->irq); >>> >> >>> >> -     __raw_writel(OMAP4_VAL_FUNCTIONALCFG, >>> >> -                     keypad_data->base + OMAP4_KBD_CTRL); >>> >> -     __raw_writel(OMAP4_VAL_DEBOUNCINGTIME, >>> >> -                     keypad_data->base + OMAP4_KBD_DEBOUNCINGTIME); >>> >> -     __raw_writel(OMAP4_VAL_IRQDISABLE, >>> >> -                     keypad_data->base + OMAP4_KBD_IRQSTATUS); >>> >> -     __raw_writel(OMAP4_DEF_IRQENABLE_EVENTEN | OMAP4_DEF_IRQENABLE_LONGKEY, >>> >> -                     keypad_data->base + OMAP4_KBD_IRQENABLE); >>> >> -     __raw_writel(OMAP4_DEF_WUP_EVENT_ENA | OMAP4_DEF_WUP_LONG_KEY_ENA, >>> >> -                     keypad_data->base + OMAP4_KBD_WAKEUPENABLE); >>> >> +     keypad_data->revision = kbd_read_revision(keypad_data, >>> >> +                     OMAP4_KBD_REVISION); >>> >> +     switch (keypad_data->revision) { >>> >> +     case 1: >>> >> +             keypad_data->irqstatus = OMAP4_KBD_IRQSTATUS + 0x0c; >>> >> +             keypad_data->irqenable = OMAP4_KBD_IRQENABLE + 0x0c; >>> >> +             keypad_data->reg_offset = 0x10; >>> >> +             break; >>> > >>> > This should be done in probe(). >>> > >>> Dont we then require "pm_runtime_put_sync" in probe, since we are trying >>> to read the keypad revision register.? >> >> Ah, indeed, but I think not pm_runtime_get_sync() but >> pm_runtime_set_active(). >> >> Not sure if this will fix the crash... >> >> -- >> Dmitry >> >> >> Input: omap-keypad - dynamically handle register offsets >> >> From: G, Manjunath Kondaiah <manjugk@ti.com> >> >> Keypad controller register offsets are different for omap4 >> and omap5. Handle these offsets through static mapping and >> assign these mappings during run time. >> >> Tested on omap4430 sdp with 3.4-rc3. >> Tested on omap5430evm with 3.1-custom kernel. >> >> Signed-off-by: Felipe Balbi <balbi@ti.com> >> Signed-off-by: G, Manjunath Kondaiah <manjugk@ti.com> >> Signed-off-by: Sourav Poddar <sourav.poddar@ti.com> >> Signed-off-by: Dmitry Torokhov <dtor@mail.ru> >> --- >> >>  drivers/input/keyboard/Kconfig        |    4 + >>  drivers/input/keyboard/omap4-keypad.c |  117 ++++++++++++++++++++++++++------- >>  2 files changed, 94 insertions(+), 27 deletions(-) >> >> >> diff --git a/drivers/input/keyboard/Kconfig b/drivers/input/keyboard/Kconfig >> index 20a3753..84ee155 100644 >> --- a/drivers/input/keyboard/Kconfig >> +++ b/drivers/input/keyboard/Kconfig >> @@ -531,9 +531,9 @@ config KEYBOARD_OMAP >>          module will be called omap-keypad. >> >>  config KEYBOARD_OMAP4 >> -       tristate "TI OMAP4 keypad support" >> +       tristate "TI OMAP4+ keypad support" >>        help >> -         Say Y here if you want to use the OMAP4 keypad. >> +         Say Y here if you want to use the OMAP4+ keypad. >> >>          To compile this driver as a module, choose M here: the >>          module will be called omap4-keypad. >> diff --git a/drivers/input/keyboard/omap4-keypad.c b/drivers/input/keyboard/omap4-keypad.c >> index e809ac0..c9fd0df 100644 >> --- a/drivers/input/keyboard/omap4-keypad.c >> +++ b/drivers/input/keyboard/omap4-keypad.c >> @@ -68,19 +68,52 @@ >> >>  #define OMAP4_MASK_IRQSTATUSDISABLE    0xFFFF >> >> +enum { >> +       KBD_REVISION_OMAP4 = 0, >> +       KBD_REVISION_OMAP5, >> +}; >> + >>  struct omap4_keypad { >>        struct input_dev *input; >> >>        void __iomem *base; >> -       int irq; >> +       unsigned int irq; >> >>        unsigned int rows; >>        unsigned int cols; >> +       u32 reg_offset; >> +       u32 irqreg_offset; >>        unsigned int row_shift; >>        unsigned char key_state[8]; >>        unsigned short keymap[]; >>  }; >> >> +static int kbd_readl(struct omap4_keypad *keypad_data, u32 offset) >> +{ >> +       return __raw_readl(keypad_data->base + >> +                               keypad_data->reg_offset + offset); >> +} >> + >> +static void kbd_writel(struct omap4_keypad *keypad_data, u32 offset, u32 value) >> +{ >> +       __raw_writel(value, >> +                    keypad_data->base + keypad_data->reg_offset + offset); >> +} >> + >> +static int kbd_read_irqreg(struct omap4_keypad *keypad_data, u32 offset) >> +{ >> +       return __raw_readl(keypad_data->base + >> +                               keypad_data->irqreg_offset + offset); >> +} >> + >> +static void kbd_write_irqreg(struct omap4_keypad *keypad_data, >> +                            u32 offset, u32 value) >> +{ >> +       __raw_writel(value, >> +                    keypad_data->base + keypad_data->irqreg_offset + offset); >> +} >> + >> + >>  /* Interrupt handler */ >>  static irqreturn_t omap4_keypad_interrupt(int irq, void *dev_id) >>  { >> @@ -91,12 +124,11 @@ static irqreturn_t omap4_keypad_interrupt(int irq, void *dev_id) >>        u32 *new_state = (u32 *) key_state; >> >>        /* Disable interrupts */ >> -       __raw_writel(OMAP4_VAL_IRQDISABLE, >> -                    keypad_data->base + OMAP4_KBD_IRQENABLE); >> +       kbd_write_irqreg(keypad_data, OMAP4_KBD_IRQENABLE, >> +                        OMAP4_VAL_IRQDISABLE); >> >> -       *new_state = __raw_readl(keypad_data->base + OMAP4_KBD_FULLCODE31_0); >> -       *(new_state + 1) = __raw_readl(keypad_data->base >> -                                               + OMAP4_KBD_FULLCODE63_32); >> +       *new_state = kbd_readl(keypad_data, OMAP4_KBD_FULLCODE31_0); >> +       *(new_state + 1) = kbd_readl(keypad_data, OMAP4_KBD_FULLCODE63_32); >> >>        for (row = 0; row < keypad_data->rows; row++) { >>                changed = key_state[row] ^ keypad_data->key_state[row]; >> @@ -121,12 +153,13 @@ static irqreturn_t omap4_keypad_interrupt(int irq, void *dev_id) >>                sizeof(keypad_data->key_state)); >> >>        /* clear pending interrupts */ >> -       __raw_writel(__raw_readl(keypad_data->base + OMAP4_KBD_IRQSTATUS), >> -                       keypad_data->base + OMAP4_KBD_IRQSTATUS); >> +       kbd_write_irqreg(keypad_data, OMAP4_KBD_IRQSTATUS, >> +                        kbd_read_irqreg(keypad_data, OMAP4_KBD_IRQSTATUS)); >> >>        /* enable interrupts */ >> -       __raw_writel(OMAP4_DEF_IRQENABLE_EVENTEN | OMAP4_DEF_IRQENABLE_LONGKEY, >> -                       keypad_data->base + OMAP4_KBD_IRQENABLE); >> +       kbd_write_irqreg(keypad_data, OMAP4_KBD_IRQENABLE, >> +               OMAP4_DEF_IRQENABLE_EVENTEN | >> +                               OMAP4_DEF_IRQENABLE_LONGKEY); >> >>        return IRQ_HANDLED; >>  } >> @@ -139,16 +172,17 @@ static int omap4_keypad_open(struct input_dev *input) >> >>        disable_irq(keypad_data->irq); >> >> -       __raw_writel(OMAP4_VAL_FUNCTIONALCFG, >> -                       keypad_data->base + OMAP4_KBD_CTRL); >> -       __raw_writel(OMAP4_VAL_DEBOUNCINGTIME, >> -                       keypad_data->base + OMAP4_KBD_DEBOUNCINGTIME); >> -       __raw_writel(OMAP4_VAL_IRQDISABLE, >> -                       keypad_data->base + OMAP4_KBD_IRQSTATUS); >> -       __raw_writel(OMAP4_DEF_IRQENABLE_EVENTEN | OMAP4_DEF_IRQENABLE_LONGKEY, >> -                       keypad_data->base + OMAP4_KBD_IRQENABLE); >> -       __raw_writel(OMAP4_DEF_WUP_EVENT_ENA | OMAP4_DEF_WUP_LONG_KEY_ENA, >> -                       keypad_data->base + OMAP4_KBD_WAKEUPENABLE); >> +       kbd_writel(keypad_data, OMAP4_KBD_CTRL, >> +                       OMAP4_VAL_FUNCTIONALCFG); >> +       kbd_writel(keypad_data, OMAP4_KBD_DEBOUNCINGTIME, >> +                       OMAP4_VAL_DEBOUNCINGTIME); >> +       kbd_write_irqreg(keypad_data, OMAP4_KBD_IRQSTATUS, >> +                       OMAP4_VAL_IRQDISABLE); >> +       kbd_write_irqreg(keypad_data, OMAP4_KBD_IRQENABLE, >> +                       OMAP4_DEF_IRQENABLE_EVENTEN | >> +                               OMAP4_DEF_IRQENABLE_LONGKEY); >> +       kbd_writel(keypad_data, OMAP4_KBD_WAKEUPENABLE, >> +                       OMAP4_DEF_WUP_EVENT_ENA | OMAP4_DEF_WUP_LONG_KEY_ENA); >> >>        enable_irq(keypad_data->irq); >> >> @@ -162,12 +196,12 @@ static void omap4_keypad_close(struct input_dev *input) >>        disable_irq(keypad_data->irq); >> >>        /* Disable interrupts */ >> -       __raw_writel(OMAP4_VAL_IRQDISABLE, >> -                    keypad_data->base + OMAP4_KBD_IRQENABLE); >> +       kbd_write_irqreg(keypad_data, OMAP4_KBD_IRQENABLE, >> +                        OMAP4_VAL_IRQDISABLE); >> >>        /* clear pending interrupts */ >> -       __raw_writel(__raw_readl(keypad_data->base + OMAP4_KBD_IRQSTATUS), >> -                       keypad_data->base + OMAP4_KBD_IRQSTATUS); >> +       kbd_write_irqreg(keypad_data, OMAP4_KBD_IRQSTATUS, >> +                        kbd_read_irqreg(keypad_data, OMAP4_KBD_IRQSTATUS)); >> >>        enable_irq(keypad_data->irq); >> >> @@ -182,6 +216,7 @@ static int __devinit omap4_keypad_probe(struct platform_device *pdev) >>        struct resource *res; >>        resource_size_t size; >>        unsigned int row_shift, max_keys; >> +       int rev; >>        int irq; >>        int error; >> >> @@ -241,11 +276,40 @@ static int __devinit omap4_keypad_probe(struct platform_device *pdev) >>        keypad_data->rows = pdata->rows; >>        keypad_data->cols = pdata->cols; >> >> +       /* >> +        * Mark device as active (and wake up its parent) so we can read >> +        * revision register. >> +        */ >> +       error = pm_runtime_set_active(&pdev->dev); >> +       if (error) { >> +               dev_err(&pdev->dev, "pm_runtime_set_active() failed\n"); >> +               goto err_unmap; >> +       } >> + >> +       rev = __raw_readl(keypad_data->base + OMAP4_KBD_REVISION); >> +       rev &= 0x03 << 30; >> +       rev >>= 30; >> +       switch (rev) { >> +       case KBD_REVISION_OMAP4: >> +               keypad_data->reg_offset = 0x00; >> +               keypad_data->irqreg_offset = 0x00; >> +               break; >> +       case KBD_REVISION_OMAP5: >> +               keypad_data->reg_offset = 0x10; >> +               keypad_data->irqreg_offset = 0x0c; >> +               break; >> +       default: >> +               dev_err(&pdev->dev, >> +                       "Keypad reports unsupported revision %d", rev); >> +               error = -EINVAL; >> +               goto err_pm_suspended; >> +       } >> + >>        /* input device allocation */ >>        keypad_data->input = input_dev = input_allocate_device(); >>        if (!input_dev) { >>                error = -ENOMEM; >> -               goto err_unmap; >> +               goto err_pm_suspended; >>        } >> >>        input_dev->name = pdev->name; >> @@ -281,6 +345,7 @@ static int __devinit omap4_keypad_probe(struct platform_device *pdev) >>        } >> >>        pm_runtime_enable(&pdev->dev); >> +       pm_runtime_put_sync(&pdev->dev); >> >>        error = input_register_device(keypad_data->input); >>        if (error < 0) { >> @@ -296,6 +361,8 @@ err_pm_disable: >>        free_irq(keypad_data->irq, keypad_data); >>  err_free_input: >>        input_free_device(input_dev); >> +err_pm_suspended: >> +       pm_runtime_set_suspended(&pdev->dev); >>  err_unmap: >>        iounmap(keypad_data->base); >>  err_release_mem: From: G, Manjunath Kondaiah <manjugk@ti.com> Date: Mon, 10 Oct 2011 20:52:05 +0530 Subject: [PATCH] Input: omap-keypad: dynamically handle register offsets Keypad controller register offsets are different for omap4 and omap5. Handle these offsets through static mapping and assign these mappings during run time. Tested on omap4430 sdp with 3.4-rc3. Tested on omap5430evm with 3.1-custom kernel. Cc: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Felipe Balbi <balbi@ti.com> Signed-off-by: G, Manjunath Kondaiah <manjugk@ti.com> Signed-off-by: Sourav Poddar <sourav.poddar@ti.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2012-04-04Input: add support for LM8333 keypadsWolfram Sang1-0/+10
This driver adds support for the keypad part of the LM8333 and is prepared for possible GPIO/PWM drivers. Note that this is not a MFD because you cannot disable the keypad functionality which, thus, has to be handled by the core anyhow. Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2012-03-16Input: omap4-keypad - move platform_data to <linux/platform_data>Felipe Balbi1-1/+0
This patch allows us to drop the OMAP dependency from the OMAP4 keypad driver. Signed-off-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Sourav Poddar <sourav.poddar@ti.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2012-03-13Input: of_keymap - add device tree bindings for simple key matricesOlof Johansson1-0/+1
This adds a simple device tree binding for simple key matrix data and a helper to fill in the platform data. Signed-off-by: Olof Johansson <olof@lixom.net> Acked-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-11-15Input: samsung-keypad - enable compiling on other platformsDmitry Torokhov1-2/+3
There is nothing in keypad platform definitions that requires the driver be complied on Samsung platform only, so let's move them out of the platform subdirectory and relax the dependencies. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-10-29Input: tca8418_keypad - initial driver releaseKyle Manna1-0/+16
This driver has been tested with hardware and works as expected. To use it add the platform data as appropriate and register it with the corresponding I2C bus. Signed-off-by: Kyle Manna <kyle.manna@fuel7.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-10-18Input: adp5589-keys - add support for the ADP5585 derivativesMichael Hennerich1-2/+2
The ADP5585 family keypad decoder and IO expander is similar to the ADP5589, however it features less IO pins, and lacks hardware assisted key-lock functionality. Unfortunately the register addresses are different, as well as the event codes and bit organization within the port related registers. Move ADP5589 Register defines from the header file into the main source file. Add new defines while making sure we don't break existing platform_data. Add register address translation, and turn device specific defines into variables. Introduce some helper functions and disable functions that doesn't exist on the added devices. Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-05-26input: Add Qualcomm pm8xxx keypad controller driverTrilok Soni1-0/+11
Add Qualcomm PMIC8XXX based keypad controller driver supporting upto 18x8 matrix configuration. Acked-by: Dmitry Torokhov <dtor@mail.ru> Signed-off-by: Trilok Soni <tsoni@codeaurora.org> Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2011-05-19Input: ADP5589 - new driver for I2C Keypad Decoder and I/O ExpanderMichael Hennerich1-0/+10
From http://www.analog.com/ADP5589: The ADP5589 is an I/O port expander and keypad matrix decoder designed for QWERTY type phones that require a large keypad matrix and expanded I/O lines. Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-05-12Input: add driver FSL MPR121 capacitive touch sensorZhang Jiejing1-0/+12
This patch adds basic support for Freescale MPR121 capacitive touch sensor. It's an i2c controller with up to 12 capacitance sensing inputs. Product information (data sheet, application notes) can be found here: http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=MPR121 Signed-off-by: Zhang Jiejing <jiejing.zhang@freescale.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-03-13Input: add Atmel AT42QT1070 keypad driverBo Shen1-0/+10
The AT42QT1070 QTouch sensor supports up to 7 keys. The driver has been tested on Atmel AT91SAM9M10-G45-EK board, and it should work fine on other platforms. Signed-off-by: Bo Shen <voice.shen@atmel.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-01-26Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/inputLinus Torvalds1-0/+10
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: wacom - pass touch resolution to clients through input_absinfo Input: wacom - add 2 Bamboo Pen and touch models Input: sysrq - ensure sysrq_enabled and __sysrq_enabled are consistent Input: sparse-keymap - fix KEY_VSW handling in sparse_keymap_setup Input: tegra-kbc - add tegra keyboard driver Input: gpio_keys - switch to using request_any_context_irq Input: serio - allow registered drivers to get status flag Input: ct82710c - return proper error code for ct82c710_open Input: bu21013_ts - added regulator support Input: bu21013_ts - remove duplicate resolution parameters Input: tnetv107x-ts - don't treat NULL clk as an error Input: tnetv107x-keypad - don't treat NULL clk as an error Fix up trivial conflicts in drivers/input/keyboard/Makefile due to additions of tc3589x/Tegra drivers
2011-01-20Input: tegra-kbc - add tegra keyboard driverRakesh Iyer1-0/+10
This patch adds support for the internal matrix keyboard controller for Nvidia Tegra platforms. Signed-off-by: Rakesh Iyer <riyer@nvidia.com> Reviewed-by: Trilok Soni <tsoni@codeaurora.org> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-01-20kconfig: rename CONFIG_EMBEDDED to CONFIG_EXPERTDavid Rientjes1-2/+2
The meaning of CONFIG_EMBEDDED has long since been obsoleted; the option is used to configure any non-standard kernel with a much larger scope than only small devices. This patch renames the option to CONFIG_EXPERT in init/Kconfig and fixes references to the option throughout the kernel. A new CONFIG_EMBEDDED option is added that automatically selects CONFIG_EXPERT when enabled and can be used in the future to isolate options that should only be considered for embedded systems (RISC architectures, SLOB, etc). Calling the option "EXPERT" more accurately represents its intention: only expert users who understand the impact of the configuration changes they are making should enable it. Reviewed-by: Ingo Molnar <mingo@elte.hu> Acked-by: David Woodhouse <david.woodhouse@intel.com> Signed-off-by: David Rientjes <rientjes@google.com> Cc: Greg KH <gregkh@suse.de> Cc: "David S. Miller" <davem@davemloft.net> Cc: Jens Axboe <axboe@kernel.dk> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Robin Holt <holt@sgi.com> Cc: <linux-arch@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-01-13Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/inputLinus Torvalds1-12/+0
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: add SW_ROTATE_LOCK switch type Input: fix force feedback capability query example Input: wacom_w8001 - add single-touch support Input: add Austria Microsystem AS5011 joystick driver Input: remove aaed2000 keyboard driver Input: i8042 - introduce 'notimeout' blacklist for Dell Vostro V13 Input: cy8ctmg110_ts - Convert to dev_pm_ops Input: migor_ts - convert to dev_pm_ops Input: mcs5000_ts - convert to dev_pm_ops Input: eeti_ts - convert to dev_pm_ops Input: ad7879 - convert I2C to dev_pm_ops
2011-01-11Merge branch 'next' into for-linusDmitry Torokhov1-12/+0
2011-01-08Input: remove aaed2000 keyboard driverJamie Iles1-12/+0
The only platform using this driver (mach-aaec2000) is no longer in the kernel so remove the driver. Signed-off-by: Jamie Iles <jamie@jamieiles.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-01-07Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/inputLinus Torvalds1-4/+15
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (58 commits) Input: wacom_w8001 - support pen or touch only devices Input: wacom_w8001 - use __set_bit to set keybits Input: bu21013_ts - fix misuse of logical operation in place of bitop Input: i8042 - add Acer Aspire 5100 to the Dritek list Input: wacom - add support for digitizer in Lenovo W700 Input: psmouse - disable the synaptics extension on OLPC machines Input: psmouse - fix up Synaptics comment Input: synaptics - ignore bogus mt packet Input: synaptics - add multi-finger and semi-mt support Input: synaptics - report clickpad property input: mt: Document interface updates Input: fix double equality sign in uevent Input: introduce device properties hid: egalax: Add support for Wetab (726b) Input: include MT library as source for kerneldoc MAINTAINERS: Update input-mt entry hid: egalax: Add support for Samsung NB30 netbook hid: egalax: Document the new devices in Kconfig hid: egalax: Add support for Wetab hid: egalax: Convert to MT slots ... Fixed up trivial conflict in drivers/input/keyboard/Kconfig
2011-01-06Merge branch 'next' into for-linusDmitry Torokhov1-4/+15
Conflicts: include/linux/input.h
2011-01-03Merge branch 'ux500-core' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-stericsson into devel-stableRussell King1-0/+10
2010-12-29input/tc3589x: add tc3589x keypad supportSundar Iyer1-0/+10
Add support for the keypad controller module found on the TC3589X devices. This driver default adds the support for TC35893 device. Signed-off-by: Sundar Iyer <sundar.iyer@stericsson.com> Acked-by: Dmitry Torokhov <dtor@mail.ru> [Some minor fixups for compilation] Signed-off-by: Linus Walleij <linus.walleij@stericsson.com>
2010-12-07Input: tca6416-keypad - add support for tca6408aTony SIM1-4/+6
Support 8-bit tca6408a I/O expander as a keypad. Signed-off-by: Tony SIM <chinyeow.sim.xt@renesas.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-12-06Input: add input driver for polled GPIO buttonsGabor Juhos1-0/+16
The existing gpio-keys driver can be usable only for GPIO lines with interrupt support. Several devices have buttons connected to a GPIO line which is not capable to generate interrupts. This patch adds a new input driver using the generic GPIO layer and the input-polldev to support such buttons. [Ben Gardiner <bengardiner@nanometrics.ca: fold code to use more of the original gpio_keys infrastructure; cleanups and other improvements.] Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Signed-off-by: Ben Gardiner <bengardiner@nanometrics.ca> Tested-by: Ben Gardiner <bengardiner@nanometrics.ca> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-11-19Input: add support for keyboards on ST SPEAr platformRajeev Kumar1-0/+9
Signed-off-by: Rajeev Kumar <rajeev-dlh.kumar@st.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-10-25Merge branch 'davinci-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-davinciLinus Torvalds1-0/+9
* 'davinci-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-davinci: (50 commits) davinci: fix remaining board support after io_pgoffst removal davinci: mityomapl138: make file local data static arm/davinci: remove duplicated include davinci: Initial support for Omapl138-Hawkboard davinci: MityDSP-L138/MityARM-1808 read MAC address from I2C Prom davinci: add tnetv107x touchscreen platform device input: add driver for tnetv107x touchscreen controller davinci: add keypad config for tnetv107x evm board davinci: add tnetv107x keypad platform device input: add driver for tnetv107x on-chip keypad controller net: davinci_emac: cleanup unused cpdma code net: davinci_emac: switch to new cpdma layer net: davinci_emac: separate out cpdma code net: davinci_emac: cleanup unused mdio emac code omap: cleanup unused davinci mdio arch code davinci: cleanup mdio arch code and switch to phy_id net: davinci_emac: switch to new mdio omap: add mdio platform devices davinci: add mdio platform devices net: davinci_emac: separate out davinci mdio ... Fix up trivial conflict in drivers/input/keyboard/Kconfig (two entries added next to each other - one from the davinci merge, one from the input merge)
2010-10-25Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/inputLinus Torvalds1-0/+19
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (75 commits) Input: wacom - specify Cinitq supported tools Input: ab8500-ponkey - fix IRQ freeing in error path Input: adp5588-keys - use more obvious i2c_device_id name string Input: ad7877 - switch to using threaded IRQ Input: ad7877 - use attribute group to control visibility of attributes Input: serio - add support for PS2Mult multiplexer protocol Input: wacom - properly enable runtime PM Input: ad7877 - filter events where pressure is beyond the maximum Input: ad7877 - implement EV_KEY:BTN_TOUCH reporting Input: ad7877 - implement specified chip select behavior Input: hp680_ts_input - use cancel_delayed_work_sync() Input: mousedev - correct lockdep annotation Input: ads7846 - switch to using threaded IRQ Input: serio - support multiple child devices per single parent Input: synaptics - simplify pass-through port handling Input: add ROHM BU21013 touch panel controller support Input: omap4-keypad - wake-up on events & long presses Input: omap4-keypad - fix interrupt line configuration Input: omap4-keypad - SYSCONFIG register configuration Input: omap4-keypad - use platform device helpers ...
2010-10-21Merge branch 'davinci-next' into davinci-for-linusKevin Hilman1-0/+9
Conflicts: arch/arm/mach-davinci/board-da830-evm.c arch/arm/mach-davinci/board-da850-evm.c
2010-10-13Input: add support for Nomadik SKE keypad controllerSundar Iyer1-0/+10
Add support for the keypad controller in the Scroll Key Encoder (SKE) module on the Nomadik family and the DB8500 SoC. Acked-by: Linus Walleij <linus.walleij@stericsson.com> Signed-off-by: Sundar Iyer <sundar.iyer@stericsson.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-10-09ARM: pxa168: added keypad supportMark F. Brown1-1/+1
Signed-off-by: Mark F. Brown <mark.brown314@gmail.com> Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
2010-09-24input: add driver for tnetv107x on-chip keypad controllerCyril Chemparathy1-0/+9
This patch adds support for tnetv107x's on-chip keypad controller. Signed-off-by: Cyril Chemparathy <cyril@ti.com> Acked-by: Dmitry Torokhov <dtor@mail.ru> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
2010-08-31Input: add support for OMAP4 keyboard controllerAbraham Arce1-0/+9
OMAP4 keyboard controller includes: - built-in scanning algorithm - debouncing feature Driver implementation is based on matrix_keypad.c Signed-off-by: Syed Rafiuddin <rafiuddin.syed@ti.com> Signed-off-by: Abraham Arce <x0066660@ti.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2010-08-12input: Add STMPE keypad driverRabin Vincent1-0/+10
Add an input driver for the keypad on STMPE I/O expanders. This driver uses the common support provided by the STMPE MFD driver. Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Acked-by: Linus Walleij <linus.walleij@stericsson.com> Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2010-08-04Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/inputLinus Torvalds1-0/+21
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (57 commits) Input: adp5588-keypad - fix NULL dereference in adp5588_gpio_add() Input: cy8ctmg110 - capacitive touchscreen support Input: keyboard - also match braille-only keyboards Input: adp5588-keys - export unused GPIO pins Input: xpad - add product ID for Hori Fighting Stick EX2 Input: adxl34x - fix leak and use after free Input: samsung-keypad - Add samsung keypad driver Input: i8042 - reset keyboard controller wehen resuming from S2R Input: synaptics - set min/max for finger width Input: synaptics - only report width on hardware that supports it Input: evdev - signal that device is writable in evdev_poll() Input: mousedev - signal that device is writable in mousedev_poll() Input: change input handlers to use bool when possible Input: document the MT event slot protocol Input: introduce MT event slots Input: usbtouchscreen - implement reset_resume Input: usbtouchscreen - implement runtime power management Input: usbtouchscreen - implement basic suspend/resume Input: Add ATMEL QT602240 touchscreen driver Input: fix signedness warning in input_set_keycode() ...
2010-08-02Merge branch 'next' into for-linusDmitry Torokhov1-0/+21
2010-07-22Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/inputLinus Torvalds1-1/+1
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: synaptics - relax capability ID checks on newer hardware Input: twl40300-keypad - fix handling of "all ground" rows Input: gamecon - reference correct pad in gc_psx_command() Input: gamecon - reference correct input device in NES mode Input: w90p910_keypad - change platfrom driver name to 'nuc900-kpi' Input: i8042 - add Gigabyte Spring Peak to dmi_noloop_table Input: qt2160 - rename kconfig symbol name
2010-07-21Input: samsung-keypad - Add samsung keypad driverJoonyoung Shim1-0/+9
This patch adds support for keypad driver running on Samsung cpus. This driver is tested on GONI and Aquila board using S5PC110 cpu. [ch.naveen@samsung.com: tested on SMDK6410, SMDKC100, and SMDKV210] Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Tested-by: Naveen Krishna Ch <ch.naveen@samsung.com> Acked-by: Kukjin Kim <kgene.kim@samsung.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-07-17Input: qt2160 - rename kconfig symbol nameChristoph Fritz1-1/+1
drivers/input/keyboard/Kconfig defines QT2160 while the corresponding Makefile expects CONFIG_KEYBOARD_QT2160 as all other keyboard drivers do. To keep this Makefile consistent rename the config-token from CONFIG_QT2160 to CONFIG_KEYBOARD_QT2160. The various defconfig files are left alone. Reported-by: Robert P. J. Day <rpjday@crashcourse.ca> Signed-off-by: Christoph Fritz <chf.fritz@googlemail.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-07-07Revert "Input: fixup X86_MRST selects"Feng Tang1-1/+1
This reverts commit 0b28bac5aef7bd1ab213723df031e61db9ff151a. After adding x86_platform's detection for i8042 controller, we don't need the force dependency on !X86_MRST any more Cc: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Feng Tang <feng.tang@intel.com> LKML-Reference: <1278342202-10973-5-git-send-email-feng.tang@intel.com> Acked-by: Dmitry Torokhov <dtor@mail.ru> Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2010-07-07Revert "Input: do not force selecting i8042 on Moorestown"Feng Tang1-1/+1
This reverts commit 685afae02557a178185a4be36f58332976e79f63. After adding x86_platform's detection for i8042 controller, we don't need the force dependency on !X86_MRST any more Cc: Jacob Pan <jacob.jun.pan@linux.intel.com> Signed-off-by: Feng Tang <feng.tang@intel.com> LKML-Reference: <1278342202-10973-4-git-send-email-feng.tang@intel.com> Acked-by: Dmitry Torokhov <dtor@mail.ru> Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2010-07-04Input: mcs - Add MCS touchkey driverJoonyoung Shim1-0/+12
This adds support for MELPAS MCS5000/MSC5080 touch key controllers. Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-06-22Input: fixup X86_MRST selectsRandy Dunlap1-1/+1
Some of the recent X86_MRST additions make some "select"s conditional on X86_MRST but missed some related kconfig symbols, causing: drivers/built-in.o: In function `ps2_end_command': (.text+0x257ab2): undefined reference to `i8042_check_port_owner' drivers/built-in.o: In function `ps2_end_command': (.text+0x257ae1): undefined reference to `i8042_unlock_chip' drivers/built-in.o: In function `ps2_begin_command': (.text+0x257b40): undefined reference to `i8042_check_port_owner' drivers/built-in.o: In function `ps2_begin_command': (.text+0x257b6f): undefined reference to `i8042_lock_chip' when SERIO_I8042=m, SERIO_LIBPS2=y, KEYBOARD_ATKBD=y. We need to make i8042 dependant upon !X86_MRST and allow deselecting atkbd on Moorestown even when !CONFIG_EMBEDDED. Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Cc: Jacob Pan <jacob.jun.pan@intel.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-05-19Input: do not force selecting i8042 on MoorestownJacob Pan1-1/+1
Moorestown does not have i8042 based keyboard controller, so give an option to deselect i8042 for non-pc mid. Signed-off-by: Jacob Pan <jacob.jun.pan@linux.intel.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-05-03Input: add keypad driver for keys interfaced to TCA6416Sriramakrishnan Govindarajan1-0/+16
This patch implements a simple Keypad driver that functions as an I2C client. It handles key press events for keys connected to TCA6416 I2C based IO expander. Signed-off-by: Sriramakrishnan <srk@ti.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-05-03Input: remove obsolete {corgi,spitz,tosa}kbd.cEric Miao1-48/+0
Signed-off-by: Eric Miao <eric.y.miao@gmail.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-02-16Input: sh_keysc - enable building on SH-Mobile ARMMagnus Damm1-1/+1
Update the Kconfig entry for the sh_keysc driver to enable build on SH-Mobile ARM platforms. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-02-10Input: mark {corgi,spitz,tosa}kbd drivers deprecatedEric Miao1-6/+12
Provided that now keyboards on these devices are fully supported by generic GPIO based matrix keypad driver, mark these hardcoded and difficult to maintain drivers as deprecated. Signed-off-by: Eric Miao <eric.y.miao@gmail.com> Acked-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-01-31Input: add imx-keypad driver to support the IMX Keypad PortAlberto Panizzo1-0/+9
The IMX family of Application Processors is shipped with a Keypad Port supported by this driver. The peripheral can control up to an 8x8 matrix key pad where all the scanning is done via software. The hardware provides two interrupts: one for key presses (KDI) and one for all key releases (KRI). There is also a simple circuit for glitch reduction (said for synchronization) made by two series of 3 D-latches clocked by the keypad-clock that stabilize the interrupts sources. KDI and KRI are fired only if the respective conditions are maintained for at last 4 keypad-clock cycle. Since those circuits are poor for a correct debounce process (the keypad-clock frequency is 32K and bounces longer than 94us are not masked) the driver, when an interrupt arrives, samples the matrix with a period of 10ms until the readins are stable for IMX_KEYPAD_SCANS_FOR_STABILITY times (currently set at 3). After getting stable result appropriate events are sent through the input stack. If some keys are maintained pressed, the driver continues to scan the matrix with a longer period (60ms) to catch possible multiple key presses without overloading the cpu. This process ends when all keys are released. This driver is tested to build in kernel or as a module and follow the specification of Freescale Application processors: i.MX25 i.MX27 i.MX31 i.MX35 i.MX51 especially tested on i.MX31. Signed-off-by: Alberto Panizzo <maramaopercheseimorto@gmail.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-01-19Input: ADP5588 - add support for ADP5587 devicesMichael Hennerich1-2/+2
The ADP5587 is quite similar to the ADP5588 but features a greater I/O voltage range and lacks the Dual Light Sensor Interface. This new part is also supported by this driver. Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>