Commit graph

3004 commits

Author SHA1 Message Date
Antonio Ospite c8e1fb4a67 [media] Input: move drivers/input/fixp-arith.h to include/linux
Move drivers/input/fixp-arith.h to include/linux so that the functions
defined there can be used by other subsystems, for instance some video
devices ISPs can control the output HUE value by setting registers for
sin(HUE) and cos(HUE).

Signed-off-by: Antonio Ospite <ospite@studenti.unina.it>
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-14 09:47:23 -03:00
Viresh Kumar 829c4f9690 Input: spear-keyboard - add device tree bindings
This adds simple DT bindings for spear-keyboard controller.

Signed-off-by: Viresh Kumar <viresh.kumar@st.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2012-05-10 22:40:02 -07:00
Dmitry Torokhov b45c8f35a7 Input: matrix-keymap - wire up device tree support
When platform keymap is not supplied to matrix_keypad_build_keymap()
and device tree support is enabled, try locating specified property
and load keymap from it. If property name is not defined, try using
"linux,keymap".

Based on earlier patch by Viresh Kumar <viresh.kumar@st.com>

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2012-05-10 22:39:43 -07:00
Dmitry Torokhov 1932811f42 Input: matrix-keymap - uninline and prepare for device tree support
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-10 22:38:47 -07:00
Jean-François Dagenais d0a3457d38 Input: adp5588 - add support for gpio names
Signed-off-by: Jean-François Dagenais <jeff.dagenais@gmail.com>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2012-05-10 22:34:16 -07:00
Poddar, Sourav f77621cc64 Input: omap-keypad - dynamically handle register offsets
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-05-10 22:33:58 -07:00
JJ Ding 1a49a0a04d Input: synaptics - fix compile warning
Move synaptics_invert_y() inside CONFIG_MOUSE_PS2_SYNAPTICS to get rid of
a compile warning when we don't select synaptics support.

drivers/input/mouse/synaptics.c:53:12: warning: ‘synaptics_invert_y’ defined but not used [-Wunused-function]

Signed-off-by: JJ Ding <dgdunix@gmail.com>
Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2012-05-10 22:33:49 -07:00
Dmitry Torokhov 616575c2d2 Input: ALPS - switch to using input_mt_report_finger_count
Instead of open-coded reporting number of fingers on the touchpad
let's use input_mt_report_finger_count() helper.

Acked-by: Seth Forshee <seth.forshee@canonical.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2012-05-10 22:32:33 -07:00
George Pantalos 3b7e09fad9 Input: ALPS - add semi-MT support for v4 protocol
This patch adds semi-MT support for ALPS v4 protocol touchpads.
It is based on the work by Seth Forshee for ALPS v3 and v4 protocol
support. Three packets are required to assemble and process the MT
data. ST events are reported at once to avoid latency. If there
were two contacts or more, report MT data instead of ST events.

Thanks to Seth Forshee for providing most of the code, guidance
and insight for producing this patch.

Signed-off-by: George Pantalos <gpantalos@gmail.com>
Acked-by: Seth Forshee <seth.forshee@canonical.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2012-05-10 22:32:20 -07:00
Paul Parsons ae99ea562b Input: Add Synaptics NavPoint (PXA27x SSP/SPI) driver
This driver adds support for the Synaptics NavPoint touchpad connected
to a PXA27x SSP port in SPI slave mode. The device emulates a mouse;
a tap or tap-and-a-half drag gesture emulates the left mouse button.
For example, use the xf86-input-evdev driver for an X pointing device.

Signed-off-by: Paul Parsons <lost.distance@yahoo.com>
Tested-by: Philipp Zabel <philipp.zabel@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2012-05-10 22:12:39 -07:00
Daniel Kurtz 6ee3dbf93a Input: atmel_mxt_ts - dump each message on just 1 line
Helps ensure all bytes for a single message together in the system log.

Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
Reviewed-by: Joonyoung Shim <jy0922.shim@samsung.com>
Acked-by: Nick Dyer <nick.dyer@itdev.co.uk>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2012-05-10 20:39:06 -07:00
Daniel Kurtz 822115ff4b Input: atmel_mxt_ts - do not read extra (checksum) byte
atmel_mxt devices will send a checksum byte at the end of a message if
the MSB of the object address is set.
However, since this driver does not set this bit, the checksum byte
isn't actually sent, so don't even try to read it.

Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2012-05-10 20:39:06 -07:00
Daniel Kurtz d1ff320f0a Input: atmel_mxt_ts - verify object size in mxt_write_object
Don't allow writing past the length of an object.

Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2012-05-10 20:39:05 -07:00
Daniel Kurtz 71b3e938cb Input: atmel_mxt_ts - only allow root to update firmware
Restrict permissions on the update_fw sysfs entry to read only for root
only.

Also, update object permission to use a macro S_IRUGO macro instead of
hard coded 0444.

Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
Reviewed-by: Joonyoung Shim <jy0922.shim@samsung.com>
Acked-by: Nick Dyer <nick.dyer@itdev.co.uk>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2012-05-10 20:39:05 -07:00
Daniel Kurtz 3a73c8169e Input: atmel_mxt_ts - use CONFIG_PM_SLEEP
Simple cleanup to use newer PM APIs.

Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
Reviewed-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2012-05-10 20:39:04 -07:00
Tai-hwa Liang d3132c5c95 Input: sentelic - report device's production serial number
Hardware since Cx supports an unique identity (used to identify OEM vendors
and released lot number) which is very helpful for diagnostic purpose.
This revision tries to make it as a part of driver boot up message.

Whilst here, also bumping fsp_drv_ver to acknowledge recent addition of
absolute coordinates output.

Signed-off-by: Tai-hwa Liang <avatar@sentelic.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2012-05-10 20:39:04 -07:00
Peter Ujfalusi 9ac7b1a36c Input: tl6040-vibra - Device Tree support
Enable DT based probing of the vibra driver.

Example of dts section to load the twl6040-vibra driver:
twl6040: twl6040@4b {
	...
	twl6040_vibra: twl6040@1 {
		compatible = "ti,twl6040-vibra";
		interrupts = <4>;
		vddvibl-supply = <&vbat>;
		vddvibr-supply = <&vbat>;
		vibldrv_res = <8>;
		vibrdrv_res = <3>;
		viblmotor_res = <10>;
		vibrmotor_res = <10>;
	};
};

[Sasha Levin <levinsasha928@gmail.com>: fixed build error]
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2012-05-10 20:37:46 -07:00
Olof Johansson caafc71b1a DaVinci SoC updates for v3.5
This pull request updates the DaVinci SoC support to implement DEBUG_LL port
 choice and optimizes the DMA ISR by removing unnecessary register reads.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.10 (GNU/Linux)
 
 iQIcBAABAgAGBQJPqq+jAAoJEGFBu2jqvgRNs1MP/R1z0/h7nrN26aspSS9kxIJr
 M8HpG+qSmfLg+h6RSpQYY8SoMJ5mN7vA1AJQr9M2zUZXDYMy+AXYXdlJ2Q9p5ene
 A3Iz4yTfHgosrj9fd6fY7vH/Bd9v2T7H366SKPdk0gsSufzkSzEHvVkIROGLIQF2
 2kKgBdp94Vdgi+9nimePePIE5EyLxsMW3BNcFLVNkcdfZTFGlbtSav5zT4OCJoIm
 d/WI1Xh34nvzkHZptLqUwPF0u62YTcGY+Z6n6KhYk6mSJ2JHWfycwGOf7V9CFVkZ
 k7wdSaGfZbPrGQbKjK66Oahq+RN5kIklVB/GIyF5ZectxX+E+Mr8XLO8wKtCMxnf
 SvB9jy/LBIqPQlzodEy2FWryzh5gRB/KnDC3sYonpm81scYLEr9T1sw1k4yzR0cS
 ZgV2WfaqgfY9HoHzhoxwNB7hCo7VVHGL3r6BsB/30NUk8rnN/SGcDHdu5cTPT7gW
 qFfz4uGRC40kvUm2gq3yJh95r3iAnKmawFGjqhBSSMjHcPEVhEgsa913uSclR99w
 uKDWqsbhJN7h+W3nLPU7H4qq1PA+d3UGm7eWI8FBXxwf7qng00XJINBAssfxVRvJ
 xR0jC7/VeVypcvICPiKdDt2wxl80ptTF80461P0ieXKZsu/PXltLJXd+m7U/gq1u
 mhkE90gNGeSH7EsKC2A2
 =/we3
 -----END PGP SIGNATURE-----

Merge tag 'v3.5-soc' of git://gitorious.org/linux-davinci/linux-davinci into next/drivers

DaVinci SoC updates for v3.5

This pull request updates the DaVinci SoC support to implement DEBUG_LL port
choice and optimizes the DMA ISR by removing unnecessary register reads.

* tag 'v3.5-soc' of git://gitorious.org/linux-davinci/linux-davinci:
  ARM: davinci: optimize the DMA ISR
  ARM: davinci: implement DEBUG_LL port choice
  + sync with Linux 3.4-rc6

Signed-off-by: Olof Johansson <olof@lixom.net>
2012-05-10 00:23:17 -07:00
Olof Johansson d5a2a1ba83 Linux 3.4-rc6
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.18 (GNU/Linux)
 
 iQEcBAABAgAGBQJPpvY9AAoJEHm+PkMAQRiGpEoIAJgbu+Y8gITnBK/wh9O6zy3S
 5jie5KK4YWdbJsvO58WbNr3CyVIwGIqQ2dUZLiU59aBVLarlGw8xor0MmW+cZwhp
 6fBHaf0qDYAV0MZjD+mnnExOiCRyISa2lPmsfu9dAWywh5KGe6/oAP6/qcXIyok3
 KZyl3qQf4ENpaZPHwZPXCEkUvtuyHgNiszN+QXEadA3s19Ot4VGe9A3VGw+GNrSm
 JqFIq3acQAbKa5BYaqf7TQC02v2FI7//eqt6QHxTqbE6a7LGbTvLfX3HlJ2mnfqa
 1R6QHhM4y4OZDHbaMT2raHZ8WuLXzhehJzhP8Co7AHFOKwVKOb5XbcUr2RrukMU=
 =HkMd
 -----END PGP SIGNATURE-----

Merge tag 'v3.4-rc6' into next/cleanup

Linux 3.4-rc6

Resolve conflict where an u5500 file had a bugfix go in, but was
deleted in the branch staged for next merge window.

Signed-off-by: Olof Johansson <olof@lixom.net>
2012-05-09 02:31:01 -07:00
Greg Kroah-Hartman 61906313bd Merge 3.4-rc6 into usb-next
This resolves the conflict with:
	drivers/usb/host/ehci-tegra.c

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-07 09:03:39 -07:00
Greg Kroah-Hartman 3b923993da USB: input: appletouch: fix up compiler warning
My last patch fixing up the dev_* messages caused a compiler warning
accidentally for an unused variable.  Fix this up, as it was my fault.

Cc: Alessandro Rubini <rubini@ipvvis.unipv.it>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-04 15:35:56 -07:00
Greg Kroah-Hartman 0a5ebc88c7 USB: input: usbtouchscreen.c: fix up dev_* messages
Previously I had made the struct device point to the input device, but
after talking with Dmitry, he said that the USB device would make more
sense for this driver to point to.  So converted it to use that instead.

CC: Dmitry Torokhov <dmitry.torokhov@gmail.com>
CC: Henrik Rydberg <rydberg@euromail.se>
CC: Rusty Russell <rusty@rustcorp.com.au>
CC: Viresh Kumar <viresh.kumar@st.com>
CC: Armando Visconti <armando.visconti@st.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-04 15:33:16 -07:00
Greg Kroah-Hartman 65e78a2062 USB: input: wacom_sys.c: fix up dev_* messages
Previously I had made the struct device point to the input device, but
after talking with Dmitry, he said that the USB device would make more
sense for this driver to point to.  So converted it to use that instead.

CC: Dmitry Torokhov <dmitry.torokhov@gmail.com>
CC: Ping Cheng <pingc@wacom.com>
CC: Chris Bagwell <chris@cnpbagwell.com>
CC: Eduard Hasenleithner <eduard@hasenleithner.at>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-04 15:33:13 -07:00
Greg Kroah-Hartman ed2b2f2db2 USB: input: kbtab.c: fix up dev_* messages
Previously I had made the struct device point to the input device, but
after talking with Dmitry, he said that the USB device would make more
sense for this driver to point to.  So converted it to use that instead.

CC: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-04 15:33:11 -07:00
Greg Kroah-Hartman 27c2597d45 USB: input: gtco.c: fix up dev_* messages
Previously I had made the struct device point to the input device, but
after talking with Dmitry, he said that the USB device would make more
sense for this driver to point to.  So converted it to use that instead.

CC: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-04 15:33:09 -07:00
Greg Kroah-Hartman 871ba51c13 USB: input: aiptek.c: fix up dev_* messages
Previously I had made the struct device point to the input device, but
after talking with Dmitry, he said that the USB device would make more
sense for this driver to point to.  So converted it to use that instead.

CC: Dmitry Torokhov <dmitry.torokhov@gmail.com>
CC: Jesper Juhl <jj@chaosbits.net>
CC: JJ Ding <dgdunix@gmail.com>
CC: Edwin van Vliet <edwin@cheatah.nl>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-04 15:33:06 -07:00
Greg Kroah-Hartman 334698d435 USB: input: acecad.c: fix up dev_* messages
Previously I had made the struct device point to the input device, but
after talking with Dmitry, he said that the USB device would make more
sense for this driver to point to.  So converted it to use that instead.

CC: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-04 15:33:04 -07:00
Greg Kroah-Hartman ab943ca894 USB: input: bcm5974.c: fix up dev_* messages
Previously I had made the struct device point to the input device, but
after talking with Dmitry, he said that the USB device would make more
sense for this driver to point to.  So converted it to use that instead.

CC: Henrik Rydberg <rydberg@euromail.se>
CC: Alessandro Rubini <rubini@ipvvis.unipv.it>
CC: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-04 15:33:02 -07:00
Greg Kroah-Hartman 2d744b0919 USB: input: appletouch.c: fix up dev_* messages
Previously I had made the struct device point to the input device, but
after talking with Dmitry, he said that the USB device would make more
sense for this driver to point to.  So converted it to use that instead.

CC: Alessandro Rubini <rubini@ipvvis.unipv.it>
CC: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-04 15:33:01 -07:00
Greg Kroah-Hartman 73e66ceada USB: input: yealink.c: fix up dev_* messages
Previously I had made the struct device point to the input device, but
after talking with Dmitry, he said that the USB device would make more
sense for this driver to point to.  So converted it to use that instead.

CC: Henk Vergonet <Henk.Vergonet@gmail.com>
CC: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-04 15:33:01 -07:00
Greg Kroah-Hartman c25e647836 USB: input: powermate.c: fix up dev_* messages
Previously I had made the struct device point to the input device, but
after talking with Dmitry, he said that the USB device would make more
sense for this driver to point to.  So converted it to use that instead.

CC: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-04 15:33:00 -07:00
Greg Kroah-Hartman 419b1a11fb USB: input: keyspan_remote.c: fix up dev_* messages
Previously I had made the struct device point to the input device, but
after talking with Dmitry, he said that the USB device would make more
sense for this driver to point to.  So converted it to use that instead.

CC: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-04 15:32:58 -07:00
Greg Kroah-Hartman ab242a73a1 USB: input: cm109.c: fix up dev_* messages
Previously I had made the struct device point to the input device, but
after talking with Dmitry, he said that the USB device would make more
sense for this driver to point to.  So converted it to use that instead.

CC: Dmitry Torokhov <dmitry.torokhov@gmail.com>
CC: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-04 15:32:55 -07:00
Greg Kroah-Hartman 8818e4190f USB: input: xpad.c: fix up dev_* messages
Previously I had made the struct device point to the input device, but
after talking with Dmitry, he said that the USB device would make more
sense for this driver to point to.  So converted it to use that instead.

CC: Dmitry Torokhov <dmitry.torokhov@gmail.com>
CC: "Magnus Hörlin" <magnus@alefors.se>
CC: Rusty Russell <rusty@rustcorp.com.au>
CC: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-04 15:32:53 -07:00
Greg Kroah-Hartman a852d78e4e USB: input: iforce: fix up dev_* messages
Previously I had made the struct device point to the input device, but
after talking with Dmitry, he said that the USB device would make more
sense for this driver to point to.  So converted it to use that instead.

Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-04 15:23:04 -07:00
Arnd Bergmann ced62c33fc ARM: i.MX cleanups for 3.5
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABCAAGBQJPoPBUAAoJEPFlmONMx+ez+x8P/1v4GU2XzwG2XBLrOeF1xzjO
 P1i3mYVN2aWGZ3ZGeVPvHd/X6Q2FiaajwFoiRVe1dOHCJwBDf0mFvYkQgaqAlk+D
 ZkhCPvshWtBG9uOSq47SAa4+Bw0O29kxPfTGsA1fyZoj/B0ZiyuTbPw53Fvgylmz
 7Jkl6Jh9dALI1Nb7P/xhGaeg4e7Out3U5f0ZITMuAJhMd1r2ikkV7BeQd77e/8hY
 xbzmQVCmWFtjK4iodHDrqKXgL7CVlAno8y6xiKtELipd1p+5Ao1BBlHkHg3bpjmb
 /G6YX86W9CVPU3jMhqLSoywiMX/PiElR559DPxPf/+8d5EaU1QsJyAU/D/zEb5D1
 Y5yi5jfrJFi2zEFYYDv5xHn/6M72JJT0HDQB8YBfs8n6uksDk+rZtoBZVlIbWBxC
 7vzvJ31712uxAtVeD5fbKOyVOgHRf6df8GByLR8Xi3Ak9ntMRfJSiEcxIrcqZ3dx
 M+A5S8g5Tbue5xDUu7cQG50OTu0t9JgoaSN3yHXnIesOXyMUylkatMEwpUamyGiD
 jX/DBmV7trwbe3re8SF7c2TTi2AfJsSFk840Ot9zfvuk7VaaZBjuC0tqmp0RyKIY
 kRlN0QGwn0+aNqRF74MWhDYsfnOXjdArcheW2szO5MiaUK9+85MLCQnvSoiV0Gkp
 flqaXKbjiUe/Oe83u+mC
 =7B/b
 -----END PGP SIGNATURE-----

Merge tag 'imx-cleanup' of git://git.pengutronix.de/git/imx/linux-2.6 into next/cleanup

From:  Sascha Hauer <s.hauer@pengutronix.de>

ARM: i.MX cleanups for 3.5

* tag 'imx-cleanup' of git://git.pengutronix.de/git/imx/linux-2.6: (5 commits)
  ARM: mx53: fix pad definitions for MX53_PAD_EIM_D28__I2C1_SDA and MX53_PAD_GPIO_8__CAN1_RXCAN
  ARM: imx/eukrea_mbimx27-baseboard: fix typo in error message
  ARM: i.MX51 iomux: add missed definitions for SION-bit and mode for some pads
  arm: imx: add missing select IMX_HAVE_PLATFORM for MACH_MX35_3DS in Kconfig
  arm: imx: make various struct sys_timer static

Includes an update to 3.4-rc4

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2012-05-02 17:07:03 +02:00
Dmitry Torokhov 2872a9b521 Input: evdev - properly handle read/write with count 0
According to the standard count 0 is special - no IO should happen but we
can check error conditions (device gone away, etc), and return 0 if there
are no errors. We used to return -EINVAL instead and we also could return 0
if an event was "stolen" by another thread.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2012-05-02 00:23:58 -07:00
Dmitry Torokhov dba4258068 Input: evdev - properly access RCU-protected 'grab' data
We should use rcu_dereference_protected() when checking if given client
is the one that grabbed the device. This fixes warnings produced by
sparse.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2012-05-02 00:23:14 -07:00
Stephen Warren f31ad40669 Input: mpu3050 - set IRQF_ONESHOT when requesting the interrupt
Commit 1c6c695 "genirq: Reject bogus threaded irq requests" requires
that request_threaded_irq() either be passed an explicit handler, or
that IRQF_ONESHOT be set. Set this flag.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2012-05-02 00:22:45 -07:00
Dmitry Torokhov 46f49b7a22 Input: serio_raw - signal EFAULT even if read/write partially succeeds
When copy_to/from_user fails in the middle of transfer we should not
report to the user that read/write partially succeeded but rather
report -EFAULT right away, so that application will know that it got
its buffers all wrong.

If application messed up its buffers we can't trust the data fetched
from userspace and successfully written to the device or if data read
from the device and transferred to userspace ended up where application
expected it to end.

If serio_write() fails we still going to report partial writes if failure
happens in the middle of the transfer.

This is basically a revert of 7a0a27d2ce
and 4fa0771138.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2012-05-02 00:21:13 -07:00
Dmitry Torokhov eb71d1bb27 Input: wacom - use dev_xxx() instead of naked printk()s and dbg()s
Reviewed-by: Chris Bagwell <chris@cnpbagwell.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2012-05-02 00:20:51 -07:00
Dmitry Torokhov a882c932a6 Input: wacom - return proper error if usb_get_extra_descriptor() fails
Instead of returning 1 (which is not even negative) let's capture and return
error codde returned by usb_get_extra_descriptor().

Reviewed-by: Chris Bagwell <chris@cnpbagwell.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2012-05-02 00:20:30 -07:00
Dmitry Torokhov 0c9e300ade Input: wacom - fix sparse warning
This fixes the following warning from sparse

	warning: Using plain integer as NULL pointer

Reviewed-by: Chris Bagwell <chris@cnpbagwell.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2012-05-02 00:19:52 -07:00
Greg Kroah-Hartman b741ab9da6 USB: usbtouchscreen.c: remove dbg() usage
dbg() was a very old USB-specific macro that should no longer
be used. This patch removes it from being used in the driver
and uses dev_dbg() instead.

CC: Dmitry Torokhov <dmitry.torokhov@gmail.com>
CC: Henrik Rydberg <rydberg@euromail.se>
CC: Rusty Russell <rusty@rustcorp.com.au>
CC: Viresh Kumar <viresh.kumar@st.com>
CC: Armando Visconti <armando.visconti@st.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-01 21:33:23 -07:00
Greg Kroah-Hartman 6d0f7dcba6 USB: kbtab.c: remove dbg() usage
dbg() was a very old USB-specific macro that should no longer
be used. This patch removes it from being used in the driver
and uses dev_dbg() instead.

CC: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-01 21:33:20 -07:00
Greg Kroah-Hartman c6f880a781 USB: gtco.c: remove dbg() usage
dbg() was a very old USB-specific macro that should no longer
be used. This patch removes it from being used in the driver
and uses dev_dbg() instead.

CC: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-01 21:33:16 -07:00
Greg Kroah-Hartman 8fb6321b6b USB: aiptek.c: remove dbg() usage
dbg() was a very old USB-specific macro that should no longer
be used. This patch removes it from being used in the driver
and uses dev_dbg() instead.

CC: Dmitry Torokhov <dmitry.torokhov@gmail.com>
CC: Jesper Juhl <jj@chaosbits.net>
CC: JJ Ding <dgdunix@gmail.com>
CC: Edwin van Vliet <edwin@cheatah.nl>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-01 21:33:12 -07:00
Greg Kroah-Hartman eeba1ae13c USB: acecad.c: remove dbg() usage
dbg() was a very old USB-specific macro that should no longer
be used. This patch removes it from being used in the driver
and uses dev_dbg() instead.

CC: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-01 21:33:09 -07:00
Greg Kroah-Hartman bd028769f7 USB: bcm5974.c: remove dbg() usage
dbg() was a very old USB-specific macro that should no longer
be used. This patch removes it from being used in the driver
and uses dev_dbg() instead.

CC: Henrik Rydberg <rydberg@euromail.se>
CC: Alessandro Rubini <rubini@ipvvis.unipv.it>
CC: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-01 21:33:05 -07:00
Greg Kroah-Hartman 67946d1368 USB: appletouch.c: remove dbg() usage
dbg() was a very old USB-specific macro that should no longer
be used. This patch removes it from being used in the driver
and uses dev_dbg() instead.

CC: Alessandro Rubini <rubini@ipvvis.unipv.it>
CC: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-01 21:33:04 -07:00
Greg Kroah-Hartman 938476f923 USB: yealink.c: remove dbg() usage
dbg() was a very old USB-specific macro that should no longer
be used. This patch removes it from being used in the driver
and uses dev_dbg() instead.

CC: Henk Vergonet <Henk.Vergonet@gmail.com>
CC: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-01 21:33:03 -07:00
Greg Kroah-Hartman 8b0725c059 USB: powermate.c: remove dbg() usage
dbg() was a very old USB-specific macro that should no longer
be used. This patch removes it from being used in the driver
and uses dev_dbg() instead.

CC: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-01 21:33:03 -07:00
Greg Kroah-Hartman c4f0bbcd1d USB: xpad.c: remove dbg() usage
dbg() was a very old USB-specific macro that should no longer
be used. This patch removes it from being used in the driver
and uses dev_dbg() instead.

CC: Dmitry Torokhov <dmitry.torokhov@gmail.com>
CC: "Magnus Hörlin" <magnus@alefors.se>
CC: Rusty Russell <rusty@rustcorp.com.au>
CC: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-01 21:32:59 -07:00
Greg Kroah-Hartman f576125dc8 USB: iforce: remove dbg() usage
dbg() was a very old USB-specific macro that should no longer
be used. This patch removes it from being used in the driver
and uses dev_dbg() instead.

Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-01 21:31:55 -07:00
Greg Kroah-Hartman 3b6aee237e USB: wacom: remove dbg() usage
dbg() was a very old USB-specific macro that should no longer
be used. This patch removes it from being used in the driver
and uses dev_dbg() instead.

Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Ping Cheng <pingc@wacom.com>
Cc: Eduard Hasenleithner <eduard@hasenleithner.at>
Cc: Chris Bagwell <chris@cnpbagwell.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-01 21:31:55 -07:00
Greg Kroah-Hartman f864b60ad0 USB: input: usbtouchscreen.c: fix up dev_err() usage
We should always reference the input device for dev_err(), not the USB
device.  Fix up the places where I got this wrong.

Reported-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
CC: Henrik Rydberg <rydberg@euromail.se>
CC: Rusty Russell <rusty@rustcorp.com.au>
CC: Viresh Kumar <viresh.kumar@st.com>
CC: Armando Visconti <armando.visconti@st.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-01 20:57:11 -04:00
Greg Kroah-Hartman 1b5ca928e7 USB: input: wacom_sys.c: fix up dev_err() usage
We should always reference the input device for dev_err(), not the USB
device.  Fix up the places where I got this wrong.

Reported-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
CC: Ping Cheng <pingc@wacom.com>
CC: Chris Bagwell <chris@cnpbagwell.com>
CC: Eduard Hasenleithner <eduard@hasenleithner.at>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-01 20:57:07 -04:00
Greg Kroah-Hartman 3415b57cb3 USB: input: kbtab.c: fix up dev_err() usage
We should always reference the input device for dev_err(), not the USB
device.  Fix up the places where I got this wrong.

Reported-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-01 20:57:03 -04:00
Greg Kroah-Hartman 88d5ab3a18 USB: input: gtco.c: fix up dev_err() usage
We should always reference the input device for dev_err(), not the USB
device.  Fix up the places where I got this wrong.

Reported-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-01 20:57:00 -04:00
Greg Kroah-Hartman 383c52f338 USB: input: aiptek.c: fix up dev_err() usage
We should always reference the input device for dev_err(), not the USB
device.  Fix up the places where I got this wrong.

Reported-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
CC: Jesper Juhl <jj@chaosbits.net>
CC: JJ Ding <dgdunix@gmail.com>
CC: Edwin van Vliet <edwin@cheatah.nl>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-01 20:56:56 -04:00
Greg Kroah-Hartman b30662c472 USB: input: acecad.c: fix up dev_err() usage
We should always reference the input device for dev_err(), not the USB
device.  Fix up the places where I got this wrong.

Reported-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-01 20:56:51 -04:00
Greg Kroah-Hartman 140b1230a1 USB: input: bcm5974.c: fix up dev_err() usage
We should always reference the input device for dev_err(), not the USB
device.  Fix up the places where I got this wrong.

Reported-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
CC: Henrik Rydberg <rydberg@euromail.se>
CC: Alessandro Rubini <rubini@ipvvis.unipv.it>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-01 20:56:47 -04:00
Greg Kroah-Hartman 80f8594f63 USB: input: appletouch.c: fix up dev_err() usage
We should always reference the input device for dev_err(), not the USB
device.  Fix up the places where I got this wrong.

Reported-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
CC: Alessandro Rubini <rubini@ipvvis.unipv.it>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-01 20:56:47 -04:00
Greg Kroah-Hartman aa330384a6 USB: input: yealink.c: fix up dev_err() usage
We should always reference the input device for dev_err(), not the USB
device.  Fix up the places where I got this wrong.

Reported-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
CC: Henk Vergonet <Henk.Vergonet@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-01 20:56:46 -04:00
Greg Kroah-Hartman 6b37dbba5d USB: input: powermate.c: fix up dev_err() usage
We should always reference the input device for dev_err(), not the USB
device.  Fix up the places where I got this wrong.

Reported-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-01 20:56:45 -04:00
Greg Kroah-Hartman 3b449fe5d5 USB: input: keyspan_remote.c: fix up dev_err() usage
We should always reference the input device for dev_err(), not the USB
device.  Fix up the places where I got this wrong.

Reported-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-01 20:56:41 -04:00
Greg Kroah-Hartman 388fd20266 USB: input: cm109.c: fix up dev_err() usage
We should always reference the input device for dev_err(), not the USB
device.  Fix up the places where I got this wrong.

Reported-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
CC: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-01 20:56:38 -04:00
Greg Kroah-Hartman 39e85a2673 USB: input: xpad.c: fix up dev_err() usage
We should always reference the input device for dev_err(), not the USB
device.  Fix up the places where I got this wrong.

Reported-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
CC: "Magnus Hörlin" <magnus@alefors.se>
CC: Rusty Russell <rusty@rustcorp.com.au>
CC: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-01 20:56:34 -04:00
Greg Kroah-Hartman d331efdd99 USB: input: joystick: iforce: fix up dev_err() usages
We should always reference the input device for dev_err(), not the USB
device.  Fix up the places where I got this wrong.

Reported-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-01 18:40:57 -04:00
Linus Torvalds 84e92ef4f7 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
Pull input fix from Dmitry Torokhov:
 "A simple fix for a recent regression in Synaptics driver"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
  Input: synaptics - fix regression with "image sensor" trackpads
2012-04-30 10:13:48 -07:00
Ashish Jangam eead75a2b4 Input: add support for DA9052/53 touch screen controller
This driver adds support for DA9052/53 4-wire resistive ADC interfaced
touchscreen controller. DA9052/53 is a multi-function device, therefore
this driver depends on DA9052/53 core.

This patch is functionally tested on Samsung SMDKV6410.

Signed-off-by: David Dajun Chen <dchen@diasemi.com>
Signed-off-by: Ashish Jangam <ashish.jangam@kpitcummins.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2012-04-29 23:37:15 -07:00
Shawn Landden df052676e5 Input: usbtouchscreen - only expose e2i configure option in expert mode
as is the case of all other devices supported by usbtouchscreen.c

Also list e2i under the composite configure option (TOUCHSCREEN_USB_COMPOSITE)

Signed-off-by: Shawn Landden <shawnlandden@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2012-04-29 22:53:56 -07:00
Shawn Landden 41baf6368e Input: usbtouchscreen - fix typo
Signed-off-by: Shawn Landden <shawnlandden@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2012-04-29 22:53:52 -07:00
Ping Cheng 1963518b9b Input: wacom - add 0xE5 (MT device) support
Main part of patch is adding support for a new Wacom MT touch
packet and labels these devices using MTSCREEN type.

Other items of interest:

Delete some duplicate code in HID parsing for Y info since
its already done in X path.

In wacom_query_tablet_data(), only invoke the set report
that requests tablets to send Wacom Touch packets for
Finger interfaces.  Mostly, this is to make code intent clear.

Tested-by: Jason Gerecke <killertofu@gmail.com>
Signed-off-by: Chris Bagwell <chris@cnpbagwell.com>
Signed-off-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2012-04-29 21:13:53 -07:00
Ping Cheng f393ee2b81 Input: wacom - retrieve maximum number of touch points
From the HID usage table when it is supported.

Tested-by: Jason Gerecke <killertofu@gmail.com>
Signed-off-by: Chris Bagwell <chris@cnpbagwell.com>
Signed-off-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2012-04-29 21:13:46 -07:00
Chao Xie fb054bf269 Input: pxa27x_keypad add choice to set direct_key_mask
Direct keys usage may not start from KP_DKIN0, add a msk option
to configure the specifics for platforms that can skip some keys.

Signed-off-by: Chao Xie <chao.xie@marvell.com>
Signed-off-by: Haojian Zhuang <haojian.zhuang@gmail.com>
2012-04-27 16:50:05 +08:00
Chao Xie ee1d8040a6 Input: pxa27x_keypad direct key may be low active
KPDK_DK only indicates the pin level of direct key.
So it is related to board, and low level may be active which
indicates that a key is pressed.

Signed-off-by: Chao Xie <chao.xie@marvell.com>
Signed-off-by: Haojian Zhuang <haojian.zhuang@gmail.com>
2012-04-27 16:49:07 +08:00
Chao Xie 5545fa897a Input: pxa27x_keypad bug fix for direct_key_mask
When direcct_key_num is 0, the mask should be 0.
When direcct_key_num is 1, the mask should be 0b1.

Signed-off-by: Chao Xie <chao.xie@marvell.com>
Signed-off-by: Haojian Zhuang <haojian.zhuang@gmail.com>
2012-04-27 16:48:33 +08:00
Chao Xie 6ce34a5fb4 Input: pxa27x_keypad keep clock on as wakeup source
When the keypad is used as wake up source, the clock can not
be disabled. Or it can not detect key pressing.
If the keypad is used as wake up source, when resume back,
do not enable the clock and configure it again because the
register content is retained.

Signed-off-by: Chao Xie <chao.xie@marvell.com>
Signed-off-by: Haojian Zhuang <haojian.zhuang@gmail.com>
2012-04-27 16:48:09 +08:00
Greg Kroah-Hartman e27ad0fe9c USB: usbtouchscreen.c: remove err() usage
err() was a very old USB-specific macro that I thought had
gone away.  This patch removes it from being used in the
driver and uses dev_err() instead.

CC: Dmitry Torokhov <dmitry.torokhov@gmail.com>
CC: Henrik Rydberg <rydberg@euromail.se>
CC: Rusty Russell <rusty@rustcorp.com.au>
CC: Viresh Kumar <viresh.kumar@st.com>
CC: Armando Visconti <armando.visconti@st.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-25 14:48:46 -07:00
Greg Kroah-Hartman b3169fecb1 USB: wacom_sys.c: remove err() usage
err() was a very old USB-specific macro that I thought had
gone away.  This patch removes it from being used in the
driver and uses dev_err() instead.

CC: Dmitry Torokhov <dmitry.torokhov@gmail.com>
CC: Ping Cheng <pingc@wacom.com>
CC: Chris Bagwell <chris@cnpbagwell.com>
CC: Eduard Hasenleithner <eduard@hasenleithner.at>
CC: Jason Gerecke <killertofu@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-25 14:48:44 -07:00
Greg Kroah-Hartman 202712c232 USB: kbtab.c: remove err() usage
err() was a very old USB-specific macro that I thought had
gone away.  This patch removes it from being used in the
driver and uses dev_err() instead.

CC: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-25 14:48:41 -07:00
Greg Kroah-Hartman 3bd9597a6b USB: gtco.c: remove err() usage
err() was a very old USB-specific macro that I thought had
gone away.  This patch removes it from being used in the
driver and uses dev_err() instead.

CC: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-25 14:48:39 -07:00
Greg Kroah-Hartman 1f80bb943d USB: aiptek.c: remove err() usage
err() was a very old USB-specific macro that I thought had
gone away.  This patch removes it from being used in the
driver and uses dev_err() instead.

CC: Dmitry Torokhov <dmitry.torokhov@gmail.com>
CC: Jesper Juhl <jj@chaosbits.net>
CC: JJ Ding <dgdunix@gmail.com>
CC: Edwin van Vliet <edwin@cheatah.nl>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-25 14:48:36 -07:00
Greg Kroah-Hartman b59c82bd6f USB: acecad.c: remove err() usage
err() was a very old USB-specific macro that I thought had
gone away.  This patch removes it from being used in the
driver and uses dev_err() instead.

CC: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-25 14:48:34 -07:00
Greg Kroah-Hartman 6c1d1b2461 USB: bcm5974.c: remove err() usage
err() was a very old USB-specific macro that I thought had
gone away.  This patch removes it from being used in the
driver and uses dev_err() instead.

CC: Henrik Rydberg <rydberg@euromail.se>
CC: Alessandro Rubini <rubini@ipvvis.unipv.it>
CC: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-25 14:48:31 -07:00
Greg Kroah-Hartman 9c113dc67a USB: appletouch.c: remove err() usage
err() was a very old USB-specific macro that I thought had
gone away.  This patch removes it from being used in the
driver and uses dev_err() instead.

CC: Alessandro Rubini <rubini@ipvvis.unipv.it>
CC: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-25 14:48:31 -07:00
Greg Kroah-Hartman 08813d35d2 USB: yealink.c: remove err() usage
err() was a very old USB-specific macro that I thought had
gone away.  This patch removes it from being used in the
driver and uses dev_err() instead.

CC: Henk Vergonet <Henk.Vergonet@gmail.com>
CC: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-25 14:48:31 -07:00
Greg Kroah-Hartman 2385f3c3c7 USB: powermate.c: remove err() usage
err() was a very old USB-specific macro that I thought had
gone away.  This patch removes it from being used in the
driver and uses dev_err() instead.

CC: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-25 14:48:30 -07:00
Greg Kroah-Hartman 4efeca581b USB: keyspan_remote.c: remove err() usage
err() was a very old USB-specific macro that I thought had
gone away.  This patch removes it from being used in the
driver and uses dev_err() instead.

CC: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-25 14:48:28 -07:00
Greg Kroah-Hartman 3f37d8e8e1 USB: cm109.c: remove err() usage
err() was a very old USB-specific macro that I thought had
gone away.  This patch removes it from being used in the
driver and uses dev_err() instead.

CC: Dmitry Torokhov <dmitry.torokhov@gmail.com>
CC: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-25 14:48:25 -07:00
Greg Kroah-Hartman 9cb757bfac USB: xpad.c: remove err() usage
err() was a very old USB-specific macro that I thought had
gone away.  This patch removes it from being used in the
driver and uses dev_err() instead.

CC: Dmitry Torokhov <dmitry.torokhov@gmail.com>
CC: "Magnus Hörlin" <magnus@alefors.se>
CC: Rusty Russell <rusty@rustcorp.com.au>
CC: Mauro Carvalho Chehab <mchehab@redhat.com>
CC: Chris Moeller <kode54@gmail.c>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-25 14:48:23 -07:00
Greg Kroah-Hartman 7b22a8855a USB: iforce: remove err() usage
err() was a very old USB-specific macro that I thought had gone away.
This patch removes it from being used in the driver and uses dev_err()
instead.

Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-25 14:34:49 -07:00
Julia Lawall 482d74ceb0 Input: aiptek - adjust error-handling code label
At the point of this error-handling code, aiptek->urb has been allocated,
and it does not appear to be less necessary to free it here than in the
error-handling code just below.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2012-04-23 23:36:05 -07:00
Roland Stigge 34604086be Input: lpc32xx_ts - fix device tree compatible string
During the device tree integration of the various LPC32xx drivers,
we agreed on using non-wildcard "compatible" strings. This change
switches lpc32xx_ts touchscreen driver to use "nxp,lpc3220-tsc".

Signed-off-by: Roland Stigge <stigge@antcom.de>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2012-04-23 23:35:59 -07:00
Jesper Juhl f57fe78ee4 Input: atkbd - fix language in a printed message
I believe that "trying to access hardware" is more correct English
than "trying access hardware".

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2012-04-23 23:35:53 -07:00
Axel Lin 5d066474cd Input: use module_pci_driver
This patch converts the drivers in drivers/input/* to use module_pci_driver()
macro which makes the code smaller and a bit simpler.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2012-04-21 23:48:58 -07:00
Dmitry Torokhov 57b8628bb0 Merge commit 'v3.4-rc4' into next 2012-04-21 23:28:35 -07:00
Dmitry Torokhov 486c8aba39 Input: serio_raw - ensure we don't block in non-blocking read
Avoid calling wait_event_interruptible() if client requested non-blocking
read, since it is not guaranteed that another thread will not consume
event after we checked if serio_raw->head != serio_raw->tail.

Also ensure we do not return 0 but keep waiting instead in blocking case,
when another thread steals "our" byte.

Reviewed-by: David Herrmann <dh.herrmann@googlemail.com>
Reviewed-by: Che-Liang Chiou <clchiou@chromium.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2012-04-20 23:11:01 -07:00
Dmitry Torokhov 71f3d070a3 Input: tc3589x-keypad - remove unnecessary checks
settle_time and debounce_period are u8 and thus can not be greater than
TC3589x_MAX_DEBOUNCE_SETTLE which is 255.

There also no need to mask out nibbles form board->krow and board->kcol
as we validate that they are in correct range.

Reported-by: Werner <w.landgraf@ru.ru>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2012-04-20 23:08:48 -07:00
Dmitry Torokhov bcad87bd92 Input: cma3000-d0x - remove unneeded checks
data->mode is unsigned and can not be less than 0.

Reported-by: Werner <w.landgraf@ru.ru>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2012-04-20 23:07:39 -07:00
Dmitry Torokhov b83643ebf2 Input: matrix-keypad - undo GPIO setup if input_register_device fails
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2012-04-20 23:06:52 -07:00
Dmitry Torokhov 01111fcd42 Input: matrix-keypad - allocate keycodes with keypad structure
Instead of allocating and managing keymap separately from the keypad
structure stick it at the end as a variable-length array.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2012-04-20 23:06:49 -07:00
Dmitry Torokhov 0508c19a6f Input: matrix-keypad - fix 'duplicate const' sparse warning
SIMPLE_DEV_PM_OPS already defines constant dev_pm_ops.

Also guard PM methods with CONFIG_PM_SLEEP and get rid of some
unneeded #ifdefs.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2012-04-20 23:06:45 -07:00
Roland Stigge 5cb727a867 Input: lpc32xx_ts - add device tree support
This change implements device tree support for the LPC32xx SoC's touchscreen
controller.

Signed-off-by: Roland Stigge <stigge@antcom.de>
Reviewed-by: Thierry Reding <thierry.reding@avionic-design.de>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2012-04-20 23:05:09 -07:00
Benjamin Herrenschmidt 899c612d74 Input: synaptics - fix regression with "image sensor" trackpads
commit 7968a5dd49
Input: synaptics - add support for Relative mode

Accidentally broke support for advanced gestures (multitouch)
on some trackpads such as the one in my ThinkPad X220 by
incorretly changing the condition for enabling them. This
restores it.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
CC: stable@kernel.org [3.3]
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2012-04-20 22:47:28 -07:00
Peter Ujfalusi 8eaeb93933 mfd: Convert twl6040 to i2c driver, and separate it from twl core
Complete the separation of the twl6040 from the twl core since
it is a separate chip, not part of the twl6030 PMIC.

Make the needed Kconfig changes for the depending drivers at the
same time to avoid breaking the kernel build (vibra, ASoC components).

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Reviewed-by: Mark Brown <broonie@opensource.wolfsonicro.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Acked-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-04-16 16:45:34 +02:00
Nicolas Ferre 1fc4ec3791 Input: Kconfig: remove dependency for atmel_tsadcc driver
This will allow to select this driver for newer SoCs.
Keep dependency on AT91 because of the use of an header
file located in include/mach directory.

Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Acked-by: Dmitry Torokhov <dtor@mail.ru>
2012-04-16 12:47:18 +02:00
Linus Torvalds 4abb663b64 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
Pull input updates from Dmitry Torokhov:
 "Just a few small fixes..."

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
  Input: da9052 - fix memory leak in da9052_onkey_probe()
  Input: gpio_mouse - use linux/gpio.h rather than asm/gpio.h
  Input: trackpoint - use psmouse_fmt() for messages
  Input: elantech - v4 is a clickpad, with only one button
  Input: elantech - reset touchpad before configuring it
  Input: sentelic - filter taps in absolute mode
  Input: tps6507x-ts - fix MODULE_ALIAS to match driver name
2012-04-12 12:49:07 -07:00
Jesper Juhl 0e3d0f3d96 Input: da9052 - fix memory leak in da9052_onkey_probe()
If, in drivers/input/misc/da9052_onkey.c::da9052_onkey_probe(), the
call to either kzalloc() or input_allocate_device() fails then we will
return -ENOMEM from the function without freeing the other allocation
that may have succeeded, thus we leak either the memory allocated for
'onkey' or the memory allocated for 'input_dev' if one succeeds and
the other fails.
Fix that by jumping to the 'err_free_mem' label at the end of the
function that properly cleans up rather than returning directly.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2012-04-11 22:15:04 -07:00
Dmitry Torokhov b5e9528bd1 Input: ep93xx_keypad - switch to using dev_pm_ops
Also use CONFIG_PM_SLEEP instead of CONFIG_PM to guard PM methods.

Acked-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2012-04-11 00:14:16 -07:00
Mark Brown 55158c886a Input: gpio_mouse - use linux/gpio.h rather than asm/gpio.h
Direct usage of the asm include has long been deprecated by the
introduction of gpiolib.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2012-04-10 09:05:27 -07:00
Dmitry Torokhov d568778298 Input: wacom_i2c - do not use irq_to_gpio
Because irq_to_gpio() is not available on many platforms let's switch
to level-triggered one-shot IRQs that will stay active as long as
there is data to be read.

Tested-by: Tobita Tatsunosuke <tobita.tatsunosuke@wacom.co.jp>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2012-04-10 00:42:15 -07:00
JJ Ding fb16395ee6 Input: trackpoint - use psmouse_fmt() for messages
Use psmouse_*() macros introduced in commit b5d2170436.

Signed-off-by: JJ Ding <dgdunix@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2012-04-10 00:40:39 -07:00
JJ Ding e3dde4fba9 Input: elantech - v4 is a clickpad, with only one button
Add pointer and buttonpad properties for v4 hardware.

Also, Jachiet reported that on Asus UX31, right button has no effect.
It turns out v4 has only one button, the right-button effect is
implemented with software when Windows driver is installed, or in
firmware when touchpad is in relative mode. So remove BTN_RIGHT
while at it.

Reported-by: Jachiet Louis <louis@jachiet.com>
Signed-off-by: JJ Ding <jj_ding@emc.com.tw>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2012-04-10 00:40:35 -07:00
JJ Ding a67ada7a72 Input: elantech - reset touchpad before configuring it
Acer VH40 has a Fn key toggling the touchpad on and off, but it's
implemented in system firmware, and the EC chip has to receive
reset command to activate this function. Also when this machine
wakes up after resume, psmouse_reset is necessary to bring the
touchpad back on.

Signed-off-by: JJ Ding <jj_ding@emc.com.tw>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2012-04-10 00:40:31 -07:00
Axel Lin 98a8413192 Input: gameport - use module_gameport_driver
This patch converts the drivers in drivers/input/* to use
module_gameport_driver() macro which makes the code smaller
and a bit simpler.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2012-04-04 09:25:44 -07:00
Axel Lin 65ac9f7a23 Input: serio - use module_serio_driver
This patch converts the drivers in drivers/input/* to use
module_serio_driver() macro which makes the code smaller and
a bit simpler.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2012-04-04 09:25:43 -07:00
Jason Gerecke ae584ca473 Input: wacom - add Intuos5 multitouch sensor support
Intuos5 tablets with PTH-* model numbers include a multitouch sensor
which use the same touch reports as the 3rd-generation Bamboo. No
useful information is in the HID descriptor for the touch interface
so hardcoded values are used during setup.

Signed-off-by: Jason Gerecke <killertofu@gmail.com>
Reviewed-by: Chris Bagwell <chris@cnpbagwell.com>
Reviewed-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2012-04-04 09:25:42 -07:00
Jason Gerecke 9b5b95dd51 Input: wacom - add Intuos5 Touch Ring LED support
The Touch Ring LEDs on Intuos5 tablets use a different report
format which supports only 4 levels of brightness. We remap
the 7-bit value obtained from sysfs to an appropriate value
for the tablet. Control of the crop mark LEDs (new to the I5)
is left for a later patch.

Signed-off-by: Jason Gerecke <killertofu@gmail.com>
Reviewed-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2012-04-04 09:25:42 -07:00
Jason Gerecke f860e581fd Input: wacom - add Intuos5 Touch Ring/ExpressKey support
Intuos5 uses a new report type for Touch Ring and ExpressKey data.
Note that data from the capacitive sensors present on the ExpressKeys
will be ignored until a proper way is found to expose it.

Signed-off-by: Jason Gerecke <killertofu@gmail.com>
Reviewed-by: Chris Bagwell <chris@cnpbagwell.com>
Reviewed-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2012-04-04 09:25:41 -07:00
Jason Gerecke 9fee619505 Input: wacom - add basic Intuos5 support
This patch adds support for the basic pen functions of Intuos5
tablets.

Signed-off-by: Jason Gerecke <killertofu@gmail.com>
Reviewed-by: Chris Bagwell <chris@cnpbagwell.com>
Reviewed-by: Ping Cheng <pingc@wacom.com>
Tested-by: Timo Aaltonen <tjaalton@ubuntu.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2012-04-04 09:25:41 -07:00
Dmitry Torokhov b357140039 Input: st1232 - switch to using SIMPLE_DEV_PM_OPS
Acked-by: Rafael J. Wysocki <rjw@sisk.pl>
Reviewed-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2012-04-04 09:25:40 -07:00
Magnus Damm e6293d2f8a Input: st1232 - add device tree support
This patch enables DT support for the st1232 driver
which is primarily used on the sh7372 Mackerel board.

[dtor@mail.ru: chnaged to use CONFIG_OF and of_match_ptr]
Signed-off-by: Magnus Damm <damm@opensource.se>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2012-04-04 09:25:40 -07:00
Wolfram Sang 0bf25a4538 Input: add support for LM8333 keypads
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-04-04 09:25:39 -07:00
Tatsunosuke Tobita 5a966261c0 Input: add support for Wacom Stylus device with I2C interface
This adds support for Wacom Stylus device with I2C interface.

[Dan Carpenter <dan.carpenter@oracle.com>: fix NULL-pointer dereference
 in error handling path.]
Signed-off-by: Tatsunosuke Tobita <tobita.tatsunosuke@wacom.co.jp>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2012-04-04 09:24:23 -07:00
Dmitry Torokhov 271002ca79 Input: xilinx_ps2 - allocate serio port separately
'struct serio' is a refcounted data structure with lifetime rules different
from 'struct xps2data'. It is quite likely that serio_unregister_port() will
try to free memory allocated by the port and that is why it should be
allocated separately.

Also switch to using platform_get/set_drvdata instead of dev_get/set_drvdata
because we are dealing with platform device.

Reported-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2012-04-03 09:57:11 -07:00
Oskari Saarenmaa d626dad58f Input: sentelic - filter taps in absolute mode
Taps in absolute positioning single-finger mode are currently reported
as physical clicks by the driver. This should be handled by userspace,
not the kernel.

When a tap occurs, the FSP_PB0_LBTN bit is set, but the FSP_PB0_PHY_BTN
is not. We use this to filter out physical clicks from taps.

Signed-off-by: Oskari Saarenmaa <os@ohmu.fi>
Reviewed-by: Tai-hwa Liang <avatar@sentelic.com>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2012-04-03 09:55:51 -07:00
Uwe Kleine-König 79026ff2b6 Input: tps6507x-ts - fix MODULE_ALIAS to match driver name
This is needed to make module auto loading work.

[dtor@mail.ru: remove file name from comment]
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2012-04-03 09:55:45 -07:00
Linus Torvalds 2f7fa1be66 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
Pull 2nd round of input updates from Dmitry Torokhov:
 - update to Wacom driver to support wireless devices
 - update to Sentelci touchpad driver to support newer hardware
 - update to gpio-keys driver to support "interrupt-only" keys
 - fixups to earlier commits

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
  Input: wacom - check for allocation failure in probe()
  Input: tegra-kbc - allocate pdata before using it
  Input: amijoy - add missing platform check
  Input: wacom - wireless battery status
  Input: wacom - create inputs when wireless connect
  Input: wacom - wireless monitor framework
  Input: wacom - isolate input registration
  Input: sentelic - improve packet debugging information
  Input: sentelic - minor code cleanup
  Input: sentelic - enabling absolute coordinates output for newer hardware
  Input: sentelic - refactor code for upcoming new hardware support
  Input: gpio_keys - add support for interrupt only keys
  Input: gpio_keys - consolidate key destructor code
  Input: revert "gpio_keys - switch to using threaded IRQs"
  Input: gpio_keys - constify platform data
  Input: spear-keyboard - remove kbd_set_plat_data()
2012-03-29 23:17:44 -07:00
Dan Carpenter f182394033 Input: wacom - check for allocation failure in probe()
We accidentally removed the check for NULL in 3aac0ef10b "Input: wacom -
isolate input registration".

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Chris Bagwell <chris@cnpbagwell.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2012-03-29 22:42:19 -07:00
Linus Torvalds 4bde23f875 ARM: arm-soc fixes for 3.4-rc
This is a first pass of some of the merge window fallout for ARM platforms.
 
 Nothing controversial:
 
 * A system.h fallout fix for OMAP
 * PXA fixes for breakage caused by the regulator struct changes
 * GPIO fixes for OMAP to properly deal with dynamic IRQ allocation
 * A mismerge in our arm-soc tree of an lpc32xx change for networking
 * A fix for USB setup on tegra
 * An undo of __init annotation of display mux setup on OMAP that's needed
   at runtime
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABAgAGBQJPdSzXAAoJEIwa5zzehBx3b6sQAIhmAQbkYmlkU5GefUmPR++B
 JIu8XFKEgWYaviRPj5cUZ4Lx3DWIIcwcGD2AmFdA2RY6JJmULY2Hw2v9yn8mhDPS
 7319kMK/Niu3c/DIwxyXHihOQ0LSF+V4dKyHcX1zhG8MFXtUVNudNMg9DwbWMqhk
 IXNNREuTTc5313i6cocSIKizGMqED6xxhnuAAt4cTzT/vfSDicNq7DdH6kmPqTgV
 azuAlgvDI+k7RvPQY360hLVXFBEGDZV/uOWJFfgtmZcxwhfRVJuEp6+lGFDHNLXU
 jbYt/NeLOOv4C+KEDKolR2YJ/xe/gM//rLD2vErT+DTPUuEyQblo8JXEGsRCdNhF
 UWK2PW/gBgVW/tFAaDSCLRYPxWL5IUoE2NA7XOF4Gi8hPn1o8JaRXeAhDRK47xiv
 NnS4nYJF6dFsxYCH+SJkiotY8/y+CkDPWhE4lChPWxJTDeMuREGrDkUNCRs06by8
 I7AVXqBv00q+e3QjE8zE+1AxQEXBty+DwhyzefGKwI8PntfqhuVSVXb2x7DO2hXk
 hBAJt/6nBy0IHa0pRPZ4QkA+phXRES5zAyZ9R3oDEW37t1EqhKEnOsmLU4s9CxAk
 Lqelzx31SzTpN1VkqjCkRDxXNC5Ww02WmAO+mWoeCUlvnM4GwpmWriXn9lej87KQ
 fbIgpnFen1ftSJn6fLnN
 =36Eb
 -----END PGP SIGNATURE-----

Merge tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc

Pull arm-soc fixes from Olof Johansson:
 "This is a first pass of some of the merge window fallout for ARM
  platforms.

  Nothing controversial:
   - A system.h fallout fix for OMAP
   - PXA fixes for breakage caused by the regulator struct changes
   - GPIO fixes for OMAP to properly deal with dynamic IRQ allocation
   - A mismerge in our arm-soc tree of an lpc32xx change for networking
   - A fix for USB setup on tegra
   - An undo of __init annotation of display mux setup on OMAP that's
     needed at runtime"

* tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
  ARM: pxa: fix build issue on stargate2
  ARM: pxa: fix build issue on cm-x300
  ARM: pxa: fix build failure for regulator consumer in em-x270.c
  ARM: LPC32xx: clock.c: Fix lpc-eth clock reference
  ARM: OMAP: pm: fix compilation break
  ARM: OMAP: Remove OMAP_GPIO_IRQ macro definition
  drivers: input: Fix OMAP_GPIO_IRQ with gpio_to_irq() in ams_delta_serio_exit()
  ARM: OMAP: boards: Fix OMAP_GPIO_IRQ usage with gpio_to_irq()
  ARM: pxa: fix regulator related build fail in magician_defconfig
  ARM: tegra: Fix device tree AUXDATA for USB/EHCI
  ARM: OMAP2+: Remove __init from DSI mux functions
2012-03-29 21:30:28 -07:00
Linus Torvalds a591afc01d Merge branch 'x86-x32-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x32 support for x86-64 from Ingo Molnar:
 "This tree introduces the X32 binary format and execution mode for x86:
  32-bit data space binaries using 64-bit instructions and 64-bit kernel
  syscalls.

  This allows applications whose working set fits into a 32 bits address
  space to make use of 64-bit instructions while using a 32-bit address
  space with shorter pointers, more compressed data structures, etc."

Fix up trivial context conflicts in arch/x86/{Kconfig,vdso/vma.c}

* 'x86-x32-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (71 commits)
  x32: Fix alignment fail in struct compat_siginfo
  x32: Fix stupid ia32/x32 inversion in the siginfo format
  x32: Add ptrace for x32
  x32: Switch to a 64-bit clock_t
  x32: Provide separate is_ia32_task() and is_x32_task() predicates
  x86, mtrr: Use explicit sizing and padding for the 64-bit ioctls
  x86/x32: Fix the binutils auto-detect
  x32: Warn and disable rather than error if binutils too old
  x32: Only clear TIF_X32 flag once
  x32: Make sure TS_COMPAT is cleared for x32 tasks
  fs: Remove missed ->fds_bits from cessation use of fd_set structs internally
  fs: Fix close_on_exec pointer in alloc_fdtable
  x32: Drop non-__vdso weak symbols from the x32 VDSO
  x32: Fix coding style violations in the x32 VDSO code
  x32: Add x32 VDSO support
  x32: Allow x32 to be configured
  x32: If configured, add x32 system calls to system call tables
  x32: Handle process creation
  x32: Signal-related system calls
  x86: Add #ifdef CONFIG_COMPAT to <asm/sys_ia32.h>
  ...
2012-03-29 18:12:23 -07:00
Tony Lindgren 2533c2cfbf Merge branch 'fixes-gpio-to-irq' into fixes
Conflicts:
	arch/arm/mach-omap1/board-htcherald.c
	arch/arm/mach-omap2/board-rx51-peripherals.c
	arch/arm/plat-omap/include/plat/gpio.h
	drivers/input/serio/ams_delta_serio.c
2012-03-29 10:16:04 -07:00
Tarun Kanti DebBarma e6801afb6b drivers: input: Fix OMAP_GPIO_IRQ with gpio_to_irq() in ams_delta_serio_exit()
Even though ams-delta-serio input driver uses gpio_to_irq() in all
relevent places to get irq number, the ams_delta_serio_exit() still
uses OMAP_GPIO_IRQ macro. Fix this.

Signed-off-by: Tarun Kanti DebBarma <tarun.kanti@ti.com>
Acked-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2012-03-29 08:41:01 -07:00
Linus Torvalds 0195c00244 Disintegrate and delete asm/system.h
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIVAwUAT3NKzROxKuMESys7AQKElw/+JyDxJSlj+g+nymkx8IVVuU8CsEwNLgRk
 8KEnRfLhGtkXFLSJYWO6jzGo16F8Uqli1PdMFte/wagSv0285/HZaKlkkBVHdJ/m
 u40oSjgT013bBh6MQ0Oaf8pFezFUiQB5zPOA9QGaLVGDLXCmgqUgd7exaD5wRIwB
 ZmyItjZeAVnDfk1R+ZiNYytHAi8A5wSB+eFDCIQYgyulA1Igd1UnRtx+dRKbvc/m
 rWQ6KWbZHIdvP1ksd8wHHkrlUD2pEeJ8glJLsZUhMm/5oMf/8RmOCvmo8rvE/qwl
 eDQ1h4cGYlfjobxXZMHqAN9m7Jg2bI946HZjdb7/7oCeO6VW3FwPZ/Ic75p+wp45
 HXJTItufERYk6QxShiOKvA+QexnYwY0IT5oRP4DrhdVB/X9cl2MoaZHC+RbYLQy+
 /5VNZKi38iK4F9AbFamS7kd0i5QszA/ZzEzKZ6VMuOp3W/fagpn4ZJT1LIA3m4A9
 Q0cj24mqeyCfjysu0TMbPtaN+Yjeu1o1OFRvM8XffbZsp5bNzuTDEvviJ2NXw4vK
 4qUHulhYSEWcu9YgAZXvEWDEM78FXCkg2v/CrZXH5tyc95kUkMPcgG+QZBB5wElR
 FaOKpiC/BuNIGEf02IZQ4nfDxE90QwnDeoYeV+FvNj9UEOopJ5z5bMPoTHxm4cCD
 NypQthI85pc=
 =G9mT
 -----END PGP SIGNATURE-----

Merge tag 'split-asm_system_h-for-linus-20120328' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-asm_system

Pull "Disintegrate and delete asm/system.h" from David Howells:
 "Here are a bunch of patches to disintegrate asm/system.h into a set of
  separate bits to relieve the problem of circular inclusion
  dependencies.

  I've built all the working defconfigs from all the arches that I can
  and made sure that they don't break.

  The reason for these patches is that I recently encountered a circular
  dependency problem that came about when I produced some patches to
  optimise get_order() by rewriting it to use ilog2().

  This uses bitops - and on the SH arch asm/bitops.h drags in
  asm-generic/get_order.h by a circuituous route involving asm/system.h.

  The main difficulty seems to be asm/system.h.  It holds a number of
  low level bits with no/few dependencies that are commonly used (eg.
  memory barriers) and a number of bits with more dependencies that
  aren't used in many places (eg.  switch_to()).

  These patches break asm/system.h up into the following core pieces:

    (1) asm/barrier.h

        Move memory barriers here.  This already done for MIPS and Alpha.

    (2) asm/switch_to.h

        Move switch_to() and related stuff here.

    (3) asm/exec.h

        Move arch_align_stack() here.  Other process execution related bits
        could perhaps go here from asm/processor.h.

    (4) asm/cmpxchg.h

        Move xchg() and cmpxchg() here as they're full word atomic ops and
        frequently used by atomic_xchg() and atomic_cmpxchg().

    (5) asm/bug.h

        Move die() and related bits.

    (6) asm/auxvec.h

        Move AT_VECTOR_SIZE_ARCH here.

  Other arch headers are created as needed on a per-arch basis."

Fixed up some conflicts from other header file cleanups and moving code
around that has happened in the meantime, so David's testing is somewhat
weakened by that.  We'll find out anything that got broken and fix it..

* tag 'split-asm_system_h-for-linus-20120328' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-asm_system: (38 commits)
  Delete all instances of asm/system.h
  Remove all #inclusions of asm/system.h
  Add #includes needed to permit the removal of asm/system.h
  Move all declarations of free_initmem() to linux/mm.h
  Disintegrate asm/system.h for OpenRISC
  Split arch_align_stack() out from asm-generic/system.h
  Split the switch_to() wrapper out of asm-generic/system.h
  Move the asm-generic/system.h xchg() implementation to asm-generic/cmpxchg.h
  Create asm-generic/barrier.h
  Make asm-generic/cmpxchg.h #include asm-generic/cmpxchg-local.h
  Disintegrate asm/system.h for Xtensa
  Disintegrate asm/system.h for Unicore32 [based on ver #3, changed by gxt]
  Disintegrate asm/system.h for Tile
  Disintegrate asm/system.h for Sparc
  Disintegrate asm/system.h for SH
  Disintegrate asm/system.h for Score
  Disintegrate asm/system.h for S390
  Disintegrate asm/system.h for PowerPC
  Disintegrate asm/system.h for PA-RISC
  Disintegrate asm/system.h for MN10300
  ...
2012-03-28 15:58:21 -07:00
Linus Torvalds 30304e5a79 MFD changes for 3.4
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABAgAGBQJPcXgCAAoJEIqAPN1PVmxKh2oP/2Ns+dr4oOF8z+uqYG1oisJd
 CxBTC1Bi9gYBtpiMztPiHZWiQtVXoDgLbLkx6ooWH5dpwCdvU6TVBZUJp4wpELtx
 mMk5vJy4/INHgI0nk5wUOr76rNlQfIcK04f+LHBSG1iljUkoVR3FefVKgoyIP+Wv
 oiCeuCyQcYIUmG1pVt1x43OoS+2xgjWQA67AalLLRj1DOA5OkvUL7NGsrZ1iZTUh
 YHQJsK6ER3MgbFFEImtn10NNFwAEG04o6vi42DFW1O0awm6kmVoLjo46wS+UiKoh
 Vx8t5ZGvlYOZ1ZM9N5ETgQnihBt7cOhA3ivZar8h+WiYVTRJs1ZSkpmnlpmM4YY9
 RCZ5DRw3N39R0ezkNVGSr1Xn1vkysIiZI82frrJiPUYLKihsrBzj2Jq3O25iILCf
 Iyv7HBEJxAb3x0zlF6kPhaA8OW4dssaHTLNx5IJSOKwiwVLdm4RPyOHh9QVz++p/
 p0hvSQWK1MUruBbBrjF/FN+FidgK2iU0iDW/GoDwI7OKymSxg7sauLtp0cZpo6nT
 F+Ep6yl/uR5vxih4LSYFJOjoeKuwIo/x92H0qJ3UroaUs9DNJ7UCKchXXiQ1Wtnz
 tAAsWP1YsMxMzlMxqW5J9w4LJynJ8bqrC0L8+HWzIUwikA8wv8/47Pmc/vPW0Y3N
 5L7KMS8/iFCsS8rPmGeP
 =onDl
 -----END PGP SIGNATURE-----

Merge tag 'mfd_3.4-1' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6

Pull MFD changes from Samuel Ortiz:
 - 4 new drivers: Freescale i.MX on-chip Anatop, Ricoh's RC5T583 and
   TI's TPS65090 and TPS65217.
 - New variants support (8420, 8520 ab9540), cleanups and bug fixes for
   the abx500 and db8500 ST-E chipsets.
 - Some minor fixes and update for the wm8994 from Mark.
 - The beginning of a long term TWL cleanup effort coming from the TI
   folks.
 - Various fixes and cleanups for the s5m, TPS659xx, pm860x, and MAX8997
   drivers.

Fix up trivial conflicts due to duplicate patches and header file
cleanups (<linux/device.h> removal etc).

* tag 'mfd_3.4-1' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6: (97 commits)
  gpio/twl: Add DT support to gpio-twl4030 driver
  gpio/twl: Allocate irq_desc dynamically for SPARSE_IRQ support
  mfd: Detach twl6040 from the pmic mfd driver
  mfd: Replace twl-* pr_ macros by the dev_ equivalent and do various cleanups
  mfd: Micro-optimization on twl4030 IRQ handler
  mfd: Make twl4030 SIH SPARSE_IRQ capable
  mfd: Move twl-core IRQ allocation into twl[4030|6030]-irq files
  mfd: Remove references already defineid in header file from twl-core
  mfd: Remove unneeded header from twl-core
  mfd: Make twl-core not depend on pdata->irq_base/end
  ARM: OMAP2+: board-omap4-*: Do not use anymore TWL6030_IRQ_BASE in board files
  mfd: Return twl6030_mmc_card_detect IRQ for board setup
  Revert "mfd: Add platform data for MAX8997 haptic driver"
  mfd: Add support for TPS65090
  mfd: Add some da9052-i2c section annotations
  mfd: Build rtc5t583 only if I2C config is selected to y.
  mfd: Add anatop mfd driver
  mfd: Fix compilation error in tps65910.h
  mfd: Add 8420 variant to db8500-prcmu
  mfd: Add 8520 PRCMU variant to db8500-prcmu
  ...
2012-03-28 13:56:35 -07:00
David Howells 9ffc93f203 Remove all #inclusions of asm/system.h
Remove all #inclusions of asm/system.h preparatory to splitting and killing
it.  Performed with the following command:

perl -p -i -e 's!^#\s*include\s*<asm/system[.]h>.*\n!!' `grep -Irl '^#\s*include\s*<asm/system[.]h>' *`

Signed-off-by: David Howells <dhowells@redhat.com>
2012-03-28 18:30:03 +01:00
Linus Torvalds 9e4db1c3ee Merge branch 'platforms' of git://git.linaro.org/people/rmk/linux-arm
Pull ARM platform updates from Russell King:
 "This covers platform stuff for platforms I have a direct interest in
  (iow, I have the hardware).  Essentially:
   - as we no longer support any other Acorn platforms other than RiscPC
     anymore, we can collect all that code into mach-rpc.
   - convert Acorn expansion card stuff to use IRQ allocation functions,
     and get rid of NO_IRQ from there.
   - cleanups to the ebsa110 platform to move some private stuff out of
     its header files.
   - large amount of SA11x0 updates:
   - conversion of private DMA implementation to DMA engine support
     (this actually gives us greater flexibility in drivers over the old
     API.)
   - re-worked ucb1x00 updates - convert to genirq, remove sa11x0
     dependencies, fix various minor issues
   - move platform specific sa11x0 framebuffer data into platform files
     in arch/arm instead of keeping this in the driver itself
   - update sa11x0 IrDA driver for DMA engine, and allow it to use DMA
     for SIR transmissions as well as FIR
   - rework sa1111 support for genirq, and irq allocation
   - fix sa1111 IRQ support so it works again
   - use sparse IRQ support

  After this, I have one more pull request remaining from my current
  set, which I think is going to be the most problematical as it
  generates 8 conflicts."

Fixed up the trivial conflict in arch/arm/mach-rpc/Makefile as per
Russell.

* 'platforms' of git://git.linaro.org/people/rmk/linux-arm: (125 commits)
  ARM: 7343/1: sa11x0: convert to sparse IRQ
  ARM: 7342/2: sa1100: prepare for sparse irq conversion
  ARM: 7341/1: input: prepare jornada720 keyboard and ts for sa11x0 sparse irq
  ARM: 7340/1: rtc: sa1100: include mach/irqs.h instead of asm/irq.h
  ARM: sa11x0: remove unused DMA controller definitions
  ARM: sa11x0: remove old SoC private DMA driver
  USB: sa1111: add hcd .reset method
  USB: sa1111: add OHCI shutdown methods
  USB: sa1111: reorganize ohci-sa1111.c
  USB: sa1111: get rid of nasty printk(KERN_DEBUG "%s: ...", __FILE__)
  USB: sa1111: sparse and checkpatch cleanups
  ARM: sa11x0: don't static map sa1111
  ARM: sa1111: use dev_err() rather than printk()
  ARM: sa1111: cleanup sub-device registration and unregistration
  ARM: sa1111: only setup DMA for DMA capable devices
  ARM: sa1111: register sa1111 devices with dmabounce in bus notifier
  ARM: sa1111: move USB interface register definitions to ohci-sa1111.c
  ARM: sa1111: move PCMCIA interface register definitions to sa1111_generic.c
  ARM: sa1111: move PS/2 interface register definitions to sa1111p2.c
  ARM: sa1111: delete unused physical GPIO register definitions
  ...
2012-03-27 18:17:02 -07:00
Linus Torvalds 1bfecd9358 ARM: board specific updates
These changes are all specific to one board only. We're trying to keep
 the number of board files low, but generally board level updates are
 ok on platforms that are working on moving towards DT based probing,
 which will eventually lead to removing them.
 
 The board-ams-delta.c board file gets a conflict between the removal of
 ams_delta_config and the addition of a lot of other data. The Kconfig
 file has two changes in the same line, and in exynos, the power domain
 cleanup conflicts with the addition of the image sensor device.
 
 Signed-off-by: Arnd Bergmann <arnd@arndb.de>
 [olof: Amended a fix for a mismerge to board-omap4panda.c]
 Signed-off-by: Olof Johansson <olof@lixom.net>
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABAgAGBQJPckIXAAoJEIwa5zzehBx35uUP/jns0renNAMmiu2vBHGQtn4z
 xiNXjDTJ8DeD4mKf17rjn/uaJgQ0w3Doq2nEsi5rPqLK4Uqqk+NG1zYa77QBWHbx
 FUgBPz+oViTDkanp4G8cygXvGfNkb1GvuJxEBvxQ1mwuG4JhwlFbQxGIaS8ZwOAN
 DIyVCgSXy40B+748RwdZ2AY7CYvWiQWrQYsIH6NO0rtZIXjyV0kIsyVtEXZpqWtF
 xNz2HHXVMrui2JQ7FQ0zZglY8+YCxjeJk4v++FfqCJiMzU1yZJw7E30NjhcWAaR6
 odJM2YIyhvunxPfx3ZUHimsNjfU+l/0uXgDHeLFSWVyIjPFXwqZDi/6onP3FI4Jc
 sIoTSwDAQpnZJ6KffAYkcyyfsWN61GOE96Xa2eRb6+78CEiMh7vJ8TIRieiOWxjm
 NbB0xzaKxa97F/8z7w6V6Z4dNhnokWJZvtJdgLZUYAqIgnxstFkJZ9+Tqt77G4t3
 5iSbIMeFPsfh5sUeAVjr5+zVeUOm9PTRI0n0RY+Wd16Ke6DO1qobKAYOzrzI5idz
 k7ni76/zgGn3NS5F3TxdRHowkeGUwUU6poyopgQ0pyscDylVpzgMIqmAwLdzrVp5
 joVEoKi6h4oqhAZtiysXuF85bUfCW0ziDUuib07SX8wcEIAIr+mWob1Ei+wJrefe
 g0Ch3ZbCRQMOwSOQ70Ci
 =HPiJ
 -----END PGP SIGNATURE-----

Merge tag 'boards' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc

Pull "ARM: board specific updates" from Arnd Bergmann/Olof Johansson:
 "These changes are all specific to one board only.  We're trying to
  keep the number of board files low, but generally board level updates
  are ok on platforms that are working on moving towards DT based
  probing, which will eventually lead to removing them.

  The board-ams-delta.c board file gets a conflict between the removal
  of ams_delta_config and the addition of a lot of other data.  The
  Kconfig file has two changes in the same line, and in exynos, the
  power domain cleanup conflicts with the addition of the image sensor
  device.

  Signed-off-by: Arnd Bergmann <arnd@arndb.de>
  [olof: Amended a fix for a mismerge to board-omap4panda.c]
  Signed-off-by: Olof Johansson <olof@lixom.net>"

Fixed up some fairly trivial conflicts manually.

* tag 'boards' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (82 commits)
  i.MX35-PDK: Add Camera support
  ARM : mx35: 3ds-board: add framebuffer device
  pxa/hx4700: Remove pcmcia platform_device structure
  ARM: pxa/hx4700: Reduce sleep mode battery discharge by 35%
  ARM: pxa/hx4700: Remove unwanted request for GPIO105
  ARM: EXYNOS: support Exynos4210-bus Devfreq driver on Nuri board
  ARM: EXYNOS: Register JPEG on nuri
  ARM: EXYNOS: Register JPEG on universal_c210
  ARM: S5PV210: Enable JPEG on SMDKV210
  ARM: S5PV210: Add JPEG board definition
  ARM: EXYNOS: Enable JPEG on Origen
  ARM: EXYNOS: Enable JPEG on SMDKV310
  ARM: EXYNOS: Add __init attribute to universal_camera_init()
  ARM: EXYNOS: Add __init attribute to nuri_camera_init()
  ARM: S5PV210: Enable FIMC on SMDKC110
  ARM: S5PV210: Enable FIMC on SMDKV210
  ARM: S5PV210: Enable MFC on SMDKC110
  ARM: S5PV210: Enable MFC on SMDKV210
  ARM: EXYNOS: Enable G2D on SMDKV310
  ARM: tegra: update defconfig
  ...
2012-03-27 16:27:28 -07:00
Linus Torvalds d61b7a572b ARM: global cleanups
Quite a bit of code gets removed, and some stuff moved around, mostly
 the old samsung s3c24xx stuff. There should be no functional changes
 in this series otherwise. Some cleanups have dependencies on other
 arm-soc branches and will be sent in the second round.
 
 Signed-off-by: Arnd Bergmann <arnd@arndb.de>
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIVAwUAT2pCjGCrR//JCVInAQLd8RAAqCxhzSc4ewTUP/974gVhujj3TrpiEQcS
 FKvYWF76yP38Lbf3CJZBZaONRtrQNOhYpVQ0jb3WCV4F8mEH9PCes2q9RObeBYiY
 TNX8VdcuVjX2U9HaH0+RQtBUdujNLHpEOqtO57un7T5UDNssR5JOive1tNAooRv1
 pL0Hgx3AVqUbNOPpqQqHzy/MDdd67S6dX80yysANjFGMX87Nvp/ztYAdNnIdta+Z
 pDJt+DPlmK8LvjoSL3SEUN0p3Thk75621cCuauGq88PLIB2w62tzF0NFFbvIAgJT
 3aMlHM2flOiTJAWkUvA8zJiUzwv/0vYvH3xPoTo84abve3lVfZcY+fHNcfxE/Gge
 ri2MmkHyimVP3rNeyM0GbN1RTej1TN1MezeQW3nq2wP6nvS2k0/t32ObLLtWU7XA
 6iA0hKVMSnhqj4ln6jPAmyaDkaWHyYz97urhgetHqGadvLTiGPXCSBPalSiFmyMo
 11tvuqwUNz9tw4nsvGboFQwS2ZoVquC5inoHp5seqZETkGCB67JyeRGxtAM4gbP/
 wIRa3OBLY99yo1on6QovWNnSOMC6X4cOvBI/qHIjSEY/T9JVkslY87gRg3LkxCBR
 XpXfZ6iuLHoSRUGcIjE8D6KHjMgWIDPRnLkIliK4H+3Jn08g0R1MxCplevFCRtis
 egswZ8C24Xw=
 =o5Xl
 -----END PGP SIGNATURE-----

Merge tag 'cleanup' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc

Pull "ARM: global cleanups" from Arnd Bergmann:
 "Quite a bit of code gets removed, and some stuff moved around, mostly
  the old samsung s3c24xx stuff.  There should be no functional changes
  in this series otherwise.  Some cleanups have dependencies on other
  arm-soc branches and will be sent in the second round.

  Signed-off-by: Arnd Bergmann <arnd@arndb.de>"

Fixed up trivial conflicts mainly due to #include's being changes on
both sides.

* tag 'cleanup' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (121 commits)
  ep93xx: Remove unnecessary includes of ep93xx-regs.h
  ep93xx: Move EP93XX_SYSCON defines to SoC private header
  ep93xx: Move crunch code to mach-ep93xx directory
  ep93xx: Make syscon access functions private to SoC
  ep93xx: Configure GPIO ports in core code
  ep93xx: Move peripheral defines to local SoC header
  ep93xx: Convert the watchdog driver into a platform device.
  ep93xx: Use ioremap for backlight driver
  ep93xx: Move GPIO defines to gpio-ep93xx.h
  ep93xx: Don't use system controller defines in audio drivers
  ep93xx: Move PHYS_BASE defines to local SoC header file
  ARM: EXYNOS: Add clock register addresses for EXYNOS4X12 bus devfreq driver
  ARM: EXYNOS: add clock registers for exynos4x12-cpufreq
  PM / devfreq: update the name of EXYNOS clock registers that were omitted
  PM / devfreq: update the name of EXYNOS clock register
  ARM: EXYNOS: change the prefix S5P_ to EXYNOS4_ for clock
  ARM: EXYNOS: use static declaration on regarding clock
  ARM: EXYNOS: replace clock.c for other new EXYNOS SoCs
  ARM: OMAP2+: Fix build error after merge
  ARM: S3C24XX: remove call to s3c24xx_setup_clocks
  ...
2012-03-27 16:03:32 -07:00
Dmitry Torokhov 993808253c Merge branch 'next' into for-linus
Conflicts:
	drivers/input/tablet/wacom_sys.c
2012-03-27 00:27:10 -07:00
Viresh Kumar 131c713fd9 Input: tegra-kbc - allocate pdata before using it
Following commit broke DT support for tegra-kbc by removing pdata
allocation completely:

   commit 023cea0ecf
   Author: Shridhar Rasal <srasal@nvidia.com>
   Date:   Fri Feb 3 00:27:30 2012 -0800

       Input: tegra-kbc - allow skipping setting up some of GPIO pins

This patch restores it.

Signed-off-by: Viresh Kumar <viresh.kumar@st.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2012-03-27 00:14:35 -07:00
Geert Uytterhoeven 3183968cbf Input: amijoy - add missing platform check
On multi-platform kernels, the Amiga joystick driver may be initialized
when running on Amiga only. Else it may crash later.
Fortunately this driver is almost always compiled as a module (to avoid
conflicts with the mouse driver), so it needs an explicit insmod to
trigger a crash.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2012-03-25 23:33:23 -07:00
Chris Bagwell a1d552cc15 Input: wacom - wireless battery status
Signed-off-by: Chris Bagwell <chris@cnpbagwell.com>
Tested-by: Jason Gerecke <killertofu@gmail.com>
Acked-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2012-03-25 23:33:17 -07:00
Chris Bagwell 16bf288c4b Input: wacom - create inputs when wireless connect
When a tablet connect or disconnect is detected, schedule
work queue to register or unregister related input devices.

When a wireless tablet connects, it reports same USB PID
used if tablet is connected with USB cable. Use this to
update features values, set input capabilities, and then
register device.  From there, the Pen and Touch interfaces
will reuse the existing tablet's IRQ routines.

Its possible that 1 receiver is shared with 2 tablets with
different PID (small and medium Bamboo for example) so the
input is unregister at disconnect to better support this case.

Signed-off-by: Chris Bagwell <chris@cnpbagwell.com>
Tested-by: Jason Gerecke <killertofu@gmail.com>
Acked-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2012-03-25 23:32:59 -07:00
Chris Bagwell d3825d51c3 Input: wacom - wireless monitor framework
The 3rd gen Bamboo Pen & Touch and Intuos5 tablets support an
optional wireless module. When its receiver is plugged into USB,
it presents 3 interfaces: 0) Monitor 1) Pen and 2) Touch.

The exact capabilities of the Pen and Touch interfaces can
not be determined until a tablet connection is established
and reported over the Monitor interface.

This patch detects this wireless receiver and enables interrupt
packets to be processed for the Monitor interface. Processing
the data in packets will be left to another patch.

Since it doesn't make sense to create an input device for the
Monitor interface, it is not created. Creation of Pen and Touch
input device is also delayed until monitor packets can be processed.

Signed-off-by: Chris Bagwell <chris@cnpbagwell.com>
Tested-by: Jason Gerecke <killertofu@gmail.com>
Acked-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2012-03-25 23:31:32 -07:00
Chris Bagwell 3aac0ef10b Input: wacom - isolate input registration
Although this better co-locates input registration logic,
the main goal is to make it easier to optionally create
input devices or delay creation to later time periods.

Signed-off-by: Chris Bagwell <chris@cnpbagwell.com>
Tested-by: Jason Gerecke <killertofu@gmail.com>
Acked-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2012-03-25 23:31:27 -07:00
Oskari Saarenmaa 727f9b4807 Input: sentelic - improve packet debugging information
Signed-off-by: Oskari Saarenmaa <os@ohmu.fi>
Signed-off-by: Tai-hwa Liang <avatar@sentelic.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2012-03-25 17:18:18 -07:00
Tai-hwa Liang 7b85f73d04 Input: sentelic - minor code cleanup
Improve code readability by converting yet another magic number into a
pre-defined constant.

Signed-off-by: Tai-hwa Liang <avatar@sentelic.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2012-03-25 17:18:15 -07:00