Yuri Khan [Thu, 12 Jul 2012 05:12:31 +0000 (22:12 -0700)]
Input: xpad - add Andamiro Pump It Up pad
I couldn't find the vendor ID in any of the online databases, but this
mat has a Pump It Up logo on the top side of the controller compartment,
and a disclaimer stating that Andamiro will not be liable on the bottom.
Signed-off-by: Yuri Khan <yurivkhan@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Ilia Katsnelson [Wed, 11 Jul 2012 07:54:20 +0000 (00:54 -0700)]
Input: xpad - add signature for Razer Onza Tournament Edition
Signed-off-by: Ilia Katsnelson <k0009000@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Yuri Khan [Wed, 11 Jul 2012 07:49:18 +0000 (00:49 -0700)]
Input: xpad - handle all variations of Mad Catz Beat Pad
The device should be handled by xpad driver instead of generic HID driver.
Signed-off-by: Yuri Khan <yurivkhan@gmail.com>
Acked-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Henrik Rydberg [Tue, 10 Jul 2012 16:43:57 +0000 (09:43 -0700)]
Input: bcm5974 - Add support for 2012 MacBook Pro Retina
Add support for the 15'' MacBook Pro Retina model (MacBookPro10,1).
Patch originally written by clipcarl (forums.opensuse.org).
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Ryan Bourgeois [Tue, 10 Jul 2012 16:43:33 +0000 (09:43 -0700)]
HID: add support for 2012 MacBook Pro Retina
Add support for the 15'' MacBook Pro Retina. The keyboard is
the same as recent models.
The patch needs to be synchronized with the bcm5974 patch for
the trackpad - as usual.
Patch originally written by clipcarl (forums.opensuse.org).
[rydberg@euromail.se: Amended mouse ignore lines]
Signed-off-by: Ryan Bourgeois <bluedragonx@gmail.com>
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Acked-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Lars-Peter Clausen [Wed, 4 Jul 2012 20:02:56 +0000 (13:02 -0700)]
Input: request threaded-only IRQs with IRQF_ONESHOT
Since commit
1c6c69525b ("genirq: Reject bogus threaded irq requests")
threaded IRQs without a primary handler need to be requested with
IRQF_ONESHOT, otherwise the request will fail. This patch adds the
IRQF_ONESHOT to input drivers where it is missing. Not modified by
this patch are those drivers where the requested IRQ will always be a
nested IRQ (e.g. because it's part of an MFD), since for this special
case IRQF_ONESHOT is not required to be specified when requesting the
IRQ.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Ping Cheng [Thu, 28 Jun 2012 23:47:30 +0000 (16:47 -0700)]
Input: wacom - don't retrieve touch_max when it is predefined
Some models, such as 0xE6, report more fingers than we process.
Reported-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Ping Cheng <pingc@wacom.com>
Tested-by: Nils Kanning <nils@kanning.de>
Tested-by: Rafi Rubin <rafi@seas.upenn.edu>
Reviewed-by: Jason Gerecke <killertofu@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Ping Cheng [Thu, 28 Jun 2012 23:46:27 +0000 (16:46 -0700)]
Input: wacom - fix retrieving touch_max bug
rep_data is not an array anymore, so taking it's address when passing to
wacom_get_report() is wrong.
Signed-off-by: Ping Cheng <pingc@wacom.com>
Tested-by: Rafi Rubin <rafi@seas.upenn.edu>
Reviewed-by: Jason Gerecke <killertofu@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Randy Dunlap [Tue, 12 Jun 2012 06:56:09 +0000 (23:56 -0700)]
Input: fix input.h kernel-doc warning
Fix kernel-doc warning in input.h:
Warning(include/linux/input.h:140): No description found for parameter 'len'
Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Dmitry Torokhov [Thu, 24 May 2012 08:13:01 +0000 (01:13 -0700)]
Merge branch 'next' into for-linus
Dmitry Torokhov [Thu, 24 May 2012 08:10:20 +0000 (01:10 -0700)]
Input: matrix-keymap - fix building keymaps
Keymaps used by drivers based on matrix-keymap facilities are arrays of
unsigned shorts, not chars. Treating them otherwise produces corrupted
keymaps.
Reported-by: Sourav Poddar <sourav.poddar@ti.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Viresh Kumar [Mon, 21 May 2012 04:18:19 +0000 (21:18 -0700)]
Input: spear-keyboard - document DT bindings
Signed-off-by: Viresh Kumar <viresh.kumar@st.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Viresh Kumar [Fri, 11 May 2012 05:37:16 +0000 (22:37 -0700)]
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>
Dmitry Torokhov [Fri, 11 May 2012 05:37:15 +0000 (22:37 -0700)]
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>
Dmitry Torokhov [Fri, 11 May 2012 05:37:08 +0000 (22:37 -0700)]
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>
Jean-François Dagenais [Fri, 11 May 2012 05:32:00 +0000 (22:32 -0700)]
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>
Poddar, Sourav [Fri, 11 May 2012 05:32:00 +0000 (22:32 -0700)]
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>
JJ Ding [Fri, 11 May 2012 05:32:00 +0000 (22:32 -0700)]
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>
Dmitry Torokhov [Fri, 11 May 2012 05:31:59 +0000 (22:31 -0700)]
MAINTAINERS: adjust input-related patterns
Add pattens for input-related headers to MAINTAINERS file.
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Dmitry Torokhov [Fri, 11 May 2012 05:31:59 +0000 (22:31 -0700)]
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>
George Pantalos [Fri, 11 May 2012 05:31:59 +0000 (22:31 -0700)]
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>
Paul Parsons [Fri, 11 May 2012 05:11:51 +0000 (22:11 -0700)]
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>
Daniel Kurtz [Wed, 9 May 2012 05:40:29 +0000 (22:40 -0700)]
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>
Daniel Kurtz [Wed, 9 May 2012 05:40:26 +0000 (22:40 -0700)]
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>
Daniel Kurtz [Wed, 9 May 2012 05:38:52 +0000 (22:38 -0700)]
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>
Daniel Kurtz [Wed, 9 May 2012 05:30:14 +0000 (22:30 -0700)]
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>
Daniel Kurtz [Wed, 9 May 2012 05:29:14 +0000 (22:29 -0700)]
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>
Tai-hwa Liang [Mon, 7 May 2012 15:45:58 +0000 (08:45 -0700)]
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>
Peter Ujfalusi [Mon, 7 May 2012 15:45:50 +0000 (08:45 -0700)]
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>
Dmitry Torokhov [Wed, 2 May 2012 07:13:37 +0000 (00:13 -0700)]
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>
Dmitry Torokhov [Wed, 2 May 2012 07:13:36 +0000 (00:13 -0700)]
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>
Stephen Warren [Wed, 2 May 2012 07:15:18 +0000 (00:15 -0700)]
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>
Dmitry Torokhov [Wed, 2 May 2012 07:13:38 +0000 (00:13 -0700)]
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
7a0a27d2ce38aee19a31fee8c12095f586eed393
and
4fa0771138d0b56fe59ab8ab3b1ce9e594484362.
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Dmitry Torokhov [Wed, 2 May 2012 07:13:38 +0000 (00:13 -0700)]
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>
Dmitry Torokhov [Wed, 2 May 2012 07:13:38 +0000 (00:13 -0700)]
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>
Dmitry Torokhov [Wed, 2 May 2012 07:13:38 +0000 (00:13 -0700)]
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>
Ashish Jangam [Mon, 30 Apr 2012 06:33:41 +0000 (23:33 -0700)]
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>
Shawn Landden [Mon, 30 Apr 2012 05:53:35 +0000 (22:53 -0700)]
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>
Shawn Landden [Mon, 30 Apr 2012 05:53:35 +0000 (22:53 -0700)]
Input: usbtouchscreen - fix typo
Signed-off-by: Shawn Landden <shawnlandden@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Ping Cheng [Mon, 30 Apr 2012 04:09:18 +0000 (21:09 -0700)]
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>
Ping Cheng [Mon, 30 Apr 2012 04:09:17 +0000 (21:09 -0700)]
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>
Julia Lawall [Tue, 24 Apr 2012 05:26:58 +0000 (22:26 -0700)]
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>
Roland Stigge [Tue, 24 Apr 2012 05:26:38 +0000 (22:26 -0700)]
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>
Jesper Juhl [Mon, 23 Apr 2012 06:18:11 +0000 (23:18 -0700)]
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>
Axel Lin [Sun, 22 Apr 2012 06:37:53 +0000 (23:37 -0700)]
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>
Dmitry Torokhov [Sun, 22 Apr 2012 06:28:35 +0000 (23:28 -0700)]
Merge commit 'v3.4-rc4' into next
Linus Torvalds [Sat, 21 Apr 2012 21:47:52 +0000 (14:47 -0700)]
Linux 3.4-rc4
Yong Zhang [Thu, 19 Apr 2012 20:28:32 +0000 (20:28 +0000)]
sparc32,leon: add notify_cpu_starting()
Otherwise cpu_active_mask will not set, which lead to other issue.
Signed-off-by: Yong Zhang <yong.zhang0@gmail.com>
Signed-off-by: Konrad Eisele <konrad@gaisler.com>
Reviewed-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Linus Torvalds [Sat, 21 Apr 2012 19:45:52 +0000 (12:45 -0700)]
Merge tag 'fixes-for-linus' of git://git./linux/kernel/git/arm/arm-soc
Pull "ARM: SoC fixes" from Olof Johansson:
* at91, ux500, imx, omap and bcmring:
- at91 fixes for =m driver build issues, irqdomain fixes and config
dependency fixes
- ux500 kconfig dependency fixes and a smp wakeup bugfix
- imx idle bugfix and build fix due to irq domain changes
- omap uart pinmux fixes, softreset regression revert and misc fixes
- bcmring build error regression fix
* ux500 and imx had some small defconfig updates in this branch
* tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (27 commits)
ARM: bcmring: fix UART declarations
ARM: imx: Fix imx5 idle logic bug
ARM: imx27-dt: Fix build due to removal of irq_domain_add_simple()
ARM: imx_v4_v5_defconfig: Add support for CONFIG_REGULATOR_FIXED_VOLTAGE
ARM: OMAP1: DMTIMER: fix broken timer clock source selection
ARM: OMAP: serial: Fix the ocp smart idlemode handling bug
ARM: OMAP2+: UART: Fix incorrect population of default uart pads
ARM: OMAP: sram: fix BUG in dpll code for !PM case
dmaengine: Kconfig: fix Atmel at_hdmac entry
USB: gadget/at91_udc: add gpio_to_irq() function to vbus interrupt
USB: ohci-at91: change annotations for probe/remove functions
leds-atmel-pwm.c: Make pwmled_probe() __devinit
ARM: at91: fix at91sam9261ek Ethernet dm9000 irq
ARM: at91: fix rm9200ek flash size
ARM: at91: remove empty at91_init_serial function
ARM: at91: fix typo in at91_pmc_base assembly declaration
ARM: at91: Export at91_matrix_base
ARM: at91: Export at91_pmc_base
ARM: at91: Export at91_ramc_base
ARM: at91: Export at91_st_base
...
Linus Torvalds [Sat, 21 Apr 2012 19:44:37 +0000 (12:44 -0700)]
Merge tag 'mmc-fixes-for-3.4-rc4' of git://git./linux/kernel/git/cjb/mmc
Pull MMC fixes from Chris Ball:
- Build fix for omap_hsmmc with OF against 3.4-rc1.
- Fix CONFIG_MMC_UNSAFE_RESUME semantics regression against 3.3, which
broke hotplug card detection when UNSAFE_RESUME is set.
- Fix a race condition in omap_hsmmc with runtime PM.
- Fix two libertas SDIO-powered-resume regressions.
- Small fixes for discard/sanitize, dw_mmc, cd-gpio and esdhc-imx.
* tag 'mmc-fixes-for-3.4-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc:
mmc: core: Do not pre-claim host in suspend
mmc: dw_mmc: prevent NULL dereference for dma_ops
mmc: unbreak sdhci-esdhc-imx on i.MX25
mmc: cd-gpio: Include header to pickup exported symbol prototypes
mmc: sdhci: refine non-removable card checking for card detection
mmc: dw_mmc: Fix switch from DMA to PIO
mmc: remove MMC bus legacy suspend/resume method
mmc: omap_hsmmc: Get rid of of_have_populated_dt() usage
mmc: omap_hsmmc: build fix for CONFIG_OF=y and CONFIG_MMC_OMAP_HS=m
mmc: fixes for eMMC v4.5 sanitize operation
mmc: fixes for eMMC v4.5 discard operation
Linus Torvalds [Sat, 21 Apr 2012 19:43:23 +0000 (12:43 -0700)]
Merge branch 'v4l_for_linus' of git://git./linux/kernel/git/mchehab/linux-media
Pull media fixes from Mauro Carvalho Chehab:
- Fixes a regression at DVB core when switching from DVB-S2 to DVB-S on
Kaffeine (Fedora 16 Bugzilla #812895);
- Fixes a mutex unlock at an error condition at drx-k;
- Fix winbond-cir set mode;
- mt9m032: Fix a compilation breakage with some random Kconfig;
- mt9m032: fix two dead locks;
- xc5000: don't require an special firmware (that won't be provided by
the vendor) just because the xtal frequency is different;
- V4L DocBook: fix some typos at multi-plane formats description.
* 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media:
[media] xc5000: support 32MHz & 31.875MHz xtal using the 41.024.5 firmware
[media] V4L: mt9m032: fix compilation breakage
[media] V4L: DocBook: Fix typos in the multi-plane formats description
[media] V4L: mt9m032: fix two dead-locks
[media] rc-core: set mode for winbond-cir
[media] drxk: Does not unlock mutex if sanity check failed in scu_command()
[media] dvb_frontend: Fix a regression when switching back to DVB-S
Linus Torvalds [Sat, 21 Apr 2012 19:42:12 +0000 (12:42 -0700)]
Merge tag 'mfd-for-linus-3.4' of git://git./linux/kernel/git/sameo/mfd-2.6
Pull MFD fixes from Samuel Ortiz:
"We have 3 build fixes, a OMAP USB host PHY reset fix and the twl6040
conversion to an i2c driver. The latter may not sound like a fix but
the twl6040 MFD driver won't probe without it, triggering an OMAP4
audio regression."
* tag 'mfd-for-linus-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6:
mfd: Fix modular builds of rc5t583 regulator support
mfd: Fix asic3_gpio_to_irq
ARM: OMAP3: USB: Fix the EHCI ULPI PHY reset issue
mfd: Convert twl6040 to i2c driver, and separate it from twl core
mfd : Fix dbx500 compilation error
Dmitry Torokhov [Sat, 21 Apr 2012 05:33:08 +0000 (22:33 -0700)]
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>
Dmitry Torokhov [Sat, 21 Apr 2012 05:33:09 +0000 (22:33 -0700)]
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>
Dmitry Torokhov [Sat, 21 Apr 2012 05:33:09 +0000 (22:33 -0700)]
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>
Dmitry Torokhov [Sat, 21 Apr 2012 05:33:09 +0000 (22:33 -0700)]
Input: matrix-keypad - undo GPIO setup if input_register_device fails
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Dmitry Torokhov [Sat, 21 Apr 2012 05:33:08 +0000 (22:33 -0700)]
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>
Dmitry Torokhov [Sat, 21 Apr 2012 05:33:08 +0000 (22:33 -0700)]
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>
Roland Stigge [Sat, 21 Apr 2012 06:02:49 +0000 (23:02 -0700)]
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>
Al Viro [Sat, 21 Apr 2012 01:57:04 +0000 (21:57 -0400)]
kill mm argument of vm_munmap()
it's always current->mm
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Al Viro [Sat, 21 Apr 2012 01:53:35 +0000 (21:53 -0400)]
perfmon: kill some helpers and arguments
pfm_vm_munmap() is simply vm_munmap() and pfm_remove_smpl_mapping()
always get current as the first argument.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Al Viro [Sat, 21 Apr 2012 01:49:41 +0000 (21:49 -0400)]
aio: don't bother with unmapping when aio_free_ring() is coming from exit_aio()
... since exit_mmap() is coming and it will munmap() everything anyway.
In all other cases aio_free_ring() has ctx->mm == current->mm; moreover,
all other callers of vm_munmap() have mm == current->mm, so this will
allow us to get rid of mm argument of vm_munmap().
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Benjamin Herrenschmidt [Sat, 21 Apr 2012 05:34:49 +0000 (22:34 -0700)]
Input: synaptics - fix regression with "image sensor" trackpads
commit
7968a5dd492ccc38345013e534ad4c8d6eb60ed1
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>
Ulf Hansson [Thu, 19 Apr 2012 09:55:25 +0000 (11:55 +0200)]
mmc: core: Do not pre-claim host in suspend
Since SDIO drivers may want to do some SDIO operations in their suspend
callback functions, we must not keep the host claimed when calling them.
Daniel Drake reported that libertas_sdio encountered a deadlock in its
suspend function.
Signed-off-by: Ulf Hansson <ulf.hansson@stericsson.com>
Tested-by: Daniel Drake <dsd@laptop.org>
[stable@: please apply to 3.2-stable and 3.3-stable]
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
Jaehoon Chung [Wed, 18 Apr 2012 06:42:31 +0000 (15:42 +0900)]
mmc: dw_mmc: prevent NULL dereference for dma_ops
Now, dma_ops is assumed that use the IDMAC. But if dma_ops is assigned
the pdata->dma_ops, we didn't ensure that callback function is defined.
If the callback isn't defined, then we should run in PIO mode.
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Will Newton <will.newton@imgtec.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
Eric Bénard [Wed, 18 Apr 2012 00:30:20 +0000 (02:30 +0200)]
mmc: unbreak sdhci-esdhc-imx on i.MX25
This was broken by me in
37865fe91582582a6f6c00652f6a2b1ff71f8a78
("mmc: sdhci-esdhc-imx: fix timeout on i.MX's sdhci") where more
extensive tests would have shown that read or write of data to the
card were failing (even if the partition table was correctly read).
Signed-off-by: Eric Bénard <eric@eukrea.com>
Acked-by: Wolfram Sang <w.sang@pengutronix.de>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
H Hartley Sweeten [Tue, 17 Apr 2012 20:03:38 +0000 (13:03 -0700)]
mmc: cd-gpio: Include header to pickup exported symbol prototypes
Include the linux/mmc/cd-gpio.h header to pickup the prototypes
for the two exported symbols.
This quiets the sparse warnings:
warning: symbol 'mmc_cd_gpio_request' was not declared. Should it be static?
warning: symbol 'mmc_cd_gpio_free' was not declared. Should it be static?
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: Venkatraman S <svenkatr@ti.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
Daniel Drake [Mon, 9 Apr 2012 23:14:20 +0000 (00:14 +0100)]
mmc: sdhci: refine non-removable card checking for card detection
Commit
c79396c191bc19 ("mmc: sdhci: prevent card detection activity
for non-removable cards") disables card detection where the cards
are marked as non-removable.
This makes sense, but the implementation detail of calling
mmc_card_is_removable() causes some problems, because
mmc_card_is_removable() is overloaded with CONFIG_MMC_UNSAFE_RESUME
semantics.
In the OLPC XO case, we need CONFIG_MMC_UNSAFE_RESUME because our root
filesystem is stored on SD, but we also have external SD card slots
where we want automatic card detection.
Refine the check to only apply to hosts marked as MMC_CAP_NONREMOVABLE,
which is defined to mean that the card is *really* nonremovable. This
could be revisited in future if we find a way to improve
CONFIG_MMC_UNSAFE_RESUME semantics.
Signed-off-by: Daniel Drake <dsd@laptop.org>
Acked-by: Chuanxiao Dong <chuanxiao.dong@intel.com>
[stable@: please apply to 3.3-stable]
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
Seungwon Jeon [Tue, 10 Apr 2012 00:53:32 +0000 (09:53 +0900)]
mmc: dw_mmc: Fix switch from DMA to PIO
When dw_mci_pre_dma_transfer returns failure in some reasons,
dw_mci_submit_data will prepare to switch the PIO mode from DMA.
After switching to PIO mode, DMA(IDMAC in particular) is still
enabled. This makes the corruption in handling interrupt and
the driver lock-up.
Signed-off-by: Seungwon Jeon <tgih.jun@samsung.com>
Acked-by: Will Newton <will.newton@imgtec.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
Chuanxiao Dong [Wed, 11 Apr 2012 11:54:38 +0000 (19:54 +0800)]
mmc: remove MMC bus legacy suspend/resume method
MMC bus is using legacy suspend/resume method, which is not compatible if
runtime pm callbacks are used. In this scenario, MMC bus suspend/resume
callbacks cannot be called when system entering S3. So change to use the
new defined dev_pm_ops for system sleeping mode.
Tested on AM335x Platform. Solves major issue/crash reported at
http://www.mail-archive.com/linux-omap@vger.kernel.org/msg65425.html
Signed-off-by: Chuanxiao Dong <chuanxiao.dong@intel.com>
Tested-by: Hebbar, Gururaja <gururaja.hebbar@ti.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Ulf Hansson <ulf.hansson@stericsson.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
Linus Torvalds [Sat, 21 Apr 2012 00:13:58 +0000 (17:13 -0700)]
VM: add "vm_mmap()" helper function
This continues the theme started with vm_brk() and vm_munmap():
vm_mmap() does the same thing as do_mmap(), but additionally does the
required VM locking.
This uninlines (and rewrites it to be clearer) do_mmap(), which sadly
duplicates it in mm/mmap.c and mm/nommu.c. But that way we don't have
to export our internal do_mmap_pgoff() function.
Some day we hopefully don't have to export do_mmap() either, if all
modular users can become the simpler vm_mmap() instead. We're actually
very close to that already, with the notable exception of the (broken)
use in i810, and a couple of stragglers in binfmt_elf.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Fri, 20 Apr 2012 23:20:01 +0000 (16:20 -0700)]
VM: add "vm_munmap()" helper function
Like the vm_brk() function, this is the same as "do_munmap()", except it
does the VM locking for the caller.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Rajendra Nayak [Wed, 11 Apr 2012 10:03:13 +0000 (15:33 +0530)]
mmc: omap_hsmmc: Get rid of of_have_populated_dt() usage
of_have_populated_dt() is not expected to be used in drivers but
instead only in early platform init code.
Drivers on the other hand should rely on dev->of_node or of_match_device().
Besides usage of of_have_populated_dt() also throws up build error as below
which was reported by Balaji TK, when omap_hsmmc is built as a module.
ERROR: "allnodes" [drivers/mmc/host/omap_hsmmc.ko] undefined!
make[1]: *** [__modpost] Error 1
make: *** [modules] Error 2
So get rid of all of_have_populated_dt() usage in omap_hsmmc driver and
instead use dev->of_node to make the same dicisions as earlier.
Signed-off-by: Rajendra Nayak <rnayak@ti.com>
Reported-by: Benoit Cousson <b-cousson@ti.com>
Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Acked-by: Rob Herring <rob.herring@calxeda.com>
Reviewed-by: Balaji T K <balajitk@ti.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
Chris Ball [Tue, 10 Apr 2012 13:57:36 +0000 (09:57 -0400)]
mmc: omap_hsmmc: build fix for CONFIG_OF=y and CONFIG_MMC_OMAP_HS=m
Commit
46856a68dc ("mmc: omap_hsmmc: Convert hsmmc driver to use device tree")
introduced in 3.4-rc1 has a missing semi-colon, causing:
drivers/mmc/host/omap_hsmmc.c:1745: error: expected ',' or ';' before 'extern'
Reported-by: Russell King <linux@arm.linux.org.uk>
Signed-off-by: Chris Ball <cjb@laptop.org>
Adrian Hunter [Thu, 5 Apr 2012 11:45:48 +0000 (14:45 +0300)]
mmc: fixes for eMMC v4.5 sanitize operation
eMMC v4.5 sanitize operation erases all copies of unmapped
data. However trim or erase operations must be used first
to unmap the required sectors. That was not being done.
Fixes apply to linux 3.2 on.
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: <stable@vger.kernel.org>
Acked-by: Jaehoon Chung <jh80.chung@samsung.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
Adrian Hunter [Thu, 5 Apr 2012 11:45:47 +0000 (14:45 +0300)]
mmc: fixes for eMMC v4.5 discard operation
eMMC v4.5 discard operation is significantly different from the
existing trim operation because it is not guaranteed to work with
the new sanitize operation. Consequently mmc_can_trim() is
separated from mmc_can_discard().
Also the new discard operation does not result in the sectors being
set to all-zeros, so discard_zeroes_data must not be set.
In addition, the new discard has the same timeout as trim, but from
v4.5 trim is defined to use the hc timeout. The timeout calculation
is adjusted accordingly.
Fixes apply to linux 3.2 on.
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: <stable@vger.kernel.org>
Acked-by: Jaehoon Chung <jh80.chung@samsung.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
Linus Torvalds [Fri, 20 Apr 2012 22:35:40 +0000 (15:35 -0700)]
VM: add "vm_brk()" helper function
It does the same thing as "do_brk()", except it handles the VM locking
too.
It turns out that all external callers want that anyway, so we can make
do_brk() static to just mm/mmap.c while at it.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Fri, 20 Apr 2012 19:28:06 +0000 (12:28 -0700)]
Merge tag 'for-torvalds-
20120418' of git://git./linux/kernel/git/linusw/linux-pinctrl
Pull pinctrl fixes from Linus Walleij:
- Fixed compilation errors and warnings
- Stricter checks on the ops vtable
* tag 'for-torvalds-
20120418' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl:
pinctrl: implement pinctrl_check_ops
pinctrl: include <linux/bug.h> to prevent compile errors
pinctrl: fix compile error if not select PINMUX support
Linus Torvalds [Fri, 20 Apr 2012 18:40:43 +0000 (11:40 -0700)]
Merge tag 'tty-3.4-rc4' of git://git./linux/kernel/git/gregkh/tty
Pull 3 tiny tty bugfixes from Greg Kroah-Hartman.
* tag 'tty-3.4-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
drivers/tty/amiserial.c: add missing tty_unlock
pch_uart: Fix dma channel unallocated issue
ARM: clps711x: serial driver hungs are a result of call disable_irq within ISR
Linus Torvalds [Fri, 20 Apr 2012 18:38:02 +0000 (11:38 -0700)]
Merge tag 'usb-3.4-rc4' of git://git./linux/kernel/git/gregkh/usb
Pull USB fixes from Greg Kroah-Hartman:
"Here are a number of tiny USB fixes for 3.4-rc4.
Most of them are in the USB gadget area, but a few other minor USB
driver and core fixes are here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>"
* tag 'usb-3.4-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (36 commits)
USB: serial: cp210x: Fixed usb_control_msg timeout values
USB: ehci-tegra: don't call set_irq_flags(IRQF_VALID)
USB: yurex: Fix missing URB_NO_TRANSFER_DMA_MAP flag in urb
USB: yurex: Remove allocation of coherent buffer for setup-packet buffer
drivers/usb/misc/usbtest.c: add kfrees
USB: ehci-fsl: Fix kernel crash on mpc5121e
uwb: fix error handling
uwb: fix use of del_timer_sync() in interrupt
EHCI: always clear the STS_FLR status bit
EHCI: fix criterion for resuming the root hub
USB: sierra: avoid QMI/wwan interface on MC77xx
usb: usbtest: avoid integer overflow in alloc_sglist()
usb: usbtest: avoid integer overflow in test_ctrl_queue()
USB: fix deadlock in bConfigurationValue attribute method
usb: gadget: eliminate NULL pointer dereference (bugfix)
usb: gadget: uvc: Remove non-required locking from 'uvc_queue_next_buffer' routine
usb: gadget: rndis: fix Missing req->context assignment
usb: musb: omap: fix the error check for pm_runtime_get_sync
usb: gadget: udc-core: fix asymmetric calls in remove_driver
usb: musb: omap: fix crash when musb glue (omap) gets initialized
...
Linus Torvalds [Fri, 20 Apr 2012 18:31:00 +0000 (11:31 -0700)]
Merge tag 'stable/for-linus-3.4-rc3-tag' of git://git./linux/kernel/git/konrad/xen
Pull xen fixes from Konrad Rzeszutek Wilk:
- mechanism to work with misconfigured backends (where they are
advertised but in reality don't exist).
- two tiny compile warning fixes.
- proper error handling in gnttab_resume
- Not using VM_PFNMAP anymore to allow backends in the same domain.
* tag 'stable/for-linus-3.4-rc3-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen:
Revert "xen/p2m: m2p_find_override: use list_for_each_entry_safe"
xen/resume: Fix compile warnings.
xen/xenbus: Add quirk to deal with misconfigured backends.
xen/blkback: Fix warning error.
xen/p2m: m2p_find_override: use list_for_each_entry_safe
xen/gntdev: do not set VM_PFNMAP
xen/grant-table: add error-handling code on failure of gnttab_resume
Linus Torvalds [Fri, 20 Apr 2012 18:19:35 +0000 (11:19 -0700)]
Revert "ACPI: ignore FADT reset-reg-sup flag"
This reverts commit
cf450136bfde77c7f95065c91bffded4aa7fa731.
It breaks reboot on at least one Thinkpad T43, as reported by Jörg Otte:
"On reboot it shuts down as normal.
The last lines displayed are:
>Unmounting temporary filesystems.. [OK]
>Deactivating swap... [OK]
>Unmounting local filesystems... [OK]
>Will now restart
> Restarting system
Then I hear it accessing the cd-drive, but then it's being stuck."
Jörg bisected the regression to this commit.
That commit fixes another machine (see
https://bugzilla.kernel.org/show_bug.cgi?id=11533
for details) that has a BIOS bug and doesn't support ACPI reset.
However, at least one of those other reporters no longer even has the
machine in question, and had a different workaround to begin with.
Besides, it clearly was a buggy BIOS. Let's not break the correct case
to fix that case.
Reported-and-bisected-by: Jörg Otte <jrg.otte@googlemail.com>
Cc: linux-acpi@vger.kernel.org
Cc: Len Brown <lenb@kernel.org>
Cc: Peter Anvin <hpa@zytor.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Tejun Heo [Fri, 20 Apr 2012 15:31:34 +0000 (08:31 -0700)]
memblock: memblock should be able to handle zero length operations
Commit
24aa07882b ("memblock, x86: Replace memblock_x86_reserve/
free_range() with generic ones") replaced x86 specific memblock
operations with the generic ones; unfortunately, it lost zero length
operation handling in the process making the kernel panic if somebody
tries to reserve zero length area.
There isn't much to be gained by being cranky to zero length operations
and panicking is almost the worst response. Drop the BUG_ON() in
memblock_reserve() and update memblock_add_region/isolate_range() so
that all zero length operations are handled as noops.
Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: stable@vger.kernel.org
Reported-by: Valere Monseur <valere.monseur@ymail.com>
Bisected-by: Joseph Freeman <jfree143dev@gmail.com>
Tested-by: Joseph Freeman <jfree143dev@gmail.com>
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=43098
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Fri, 20 Apr 2012 18:16:53 +0000 (11:16 -0700)]
Merge tag 'hwmon-for-linus' of git://git./linux/kernel/git/groeck/linux-staging
Pyll hwmon fixes from Guenter Roeck:
"Two patches: Fix build warning in ads1015 driver, and fix bogus power
values with current BIOSes in fam15h_power driver."
* tag 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging:
hwmon: (ads1015) Fix build warning
hwmon: fam15h_power: fix bogus values with current BIOSes
Linus Torvalds [Fri, 20 Apr 2012 18:14:58 +0000 (11:14 -0700)]
Merge git://git./linux/kernel/git/herbert/crypto-2.6
Pull crypto fixes from Herbert Xu:
- Locking fix for talitos driver
- Fix 64-bit counter overflow in SHA-512
- Build fix for ixp4xx.
* git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
crypto: talitos - properly lock access to global talitos registers
crypto: ixp4xx - include fix
crypto: sha512 - Fix byte counter overflow in SHA-512
Linus Torvalds [Fri, 20 Apr 2012 17:41:00 +0000 (10:41 -0700)]
Merge tag 'sound-3.4' of git://git./linux/kernel/git/tiwai/sound
Pull sound fixes from Takashi Iwai:
"Fixes for a few regressions of HD-audio, originated partly from 3.4
and partly 3.3.
The fixes for ThinkPad docking-station are for 3.3 kernels, thus they
are based on 3.3 then merged back to 3.4, so that they can be merged
to stable tree cleanly. The non-trivial merge conflicts are because
of this action.
In addition, a couple of trivial fixes for documentation and a long-
standing issue in the listing of built-in sound driver at boot time."
* tag 'sound-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
ALSA: hda/conexant - Set up the missing docking-station pins
ALSA: hda/conexant - Don't set HP pin-control bit unconditionally
ALSA: workaround: change the timing of alsa_sound_last_init()
ALSA: hda/sigmatel - Fix inverted mute LED
ALSA: hda/realtek - Fix regression on Quanta/Gericom KN1
ALSA: fix core/vmaster.c kernel-doc warning
Linus Torvalds [Fri, 20 Apr 2012 17:39:33 +0000 (10:39 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/jikos/hid
Pull HID fixes from Jiri Kosina:
"Fix for one particular device (bluetooth Tivo Slide) and change of
'default y' -> 'default n' for CONFIG_HID_BATTERY_STRENGTH which I
overlooked in the initial merge of the battery support"
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid:
HID: default HID_BATTERY_STRENGTH to no
HID: tivo: fix support for bluetooth version of tivo Slide
Linus Torvalds [Fri, 20 Apr 2012 17:38:08 +0000 (10:38 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/gerg/m68knommu
Pull m68k arch fixes from Greg Ungerer:
"This contains four fixes for 3.4. Two fix and clean up compilation
for the nommu 68x328 CPU targets. The other two fix the platform
definition and multi-function pin setup of the second eth interface
on the ColdFire 5275 SoC."
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu:
m68knommu: make sure 2nd FEC eth interface pins are enabled on 5275 ColdFire
m68knommu: fix id number for second eth device on 5275 ColdFire
m68knommu: move and fix the 68VZ328 platform bootlogo.h
m68knommu: remove the unused bootlogo.h processing for 68EZ328 and 68VZ328
Konrad Rzeszutek Wilk [Fri, 20 Apr 2012 15:50:30 +0000 (11:50 -0400)]
Revert "xen/p2m: m2p_find_override: use list_for_each_entry_safe"
This reverts commit
b960d6c43a63ebd2d8518b328da3816b833ee8cc.
If we have another thread (very likely) touched the list, we
end up hitting a problem "that the next element is wrong because
we should be able to cope with that. The problem is that the
next->next pointer would be set LIST_POISON1. " (Stefano's
comment on the patch).
Reverting for now.
Suggested-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Yuri Matylitski [Fri, 20 Apr 2012 09:38:32 +0000 (12:38 +0300)]
USB: serial: cp210x: Fixed usb_control_msg timeout values
Fixed too small hardcoded timeout values for usb_control_msg
in driver for SiliconLabs cp210x-based usb-to-serial adapters.
Replaced with USB_CTRL_GET_TIMEOUT/USB_CTRL_SET_TIMEOUT.
Signed-off-by: Yuri Matylitski <ym@tekinsoft.com>
Acked-by: Kirill A. Shutemov <kirill@shutemov.name>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Julia Lawall [Thu, 19 Apr 2012 16:12:40 +0000 (18:12 +0200)]
drivers/tty/amiserial.c: add missing tty_unlock
tty_unlock is used on all other exits from the function.
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Acked-by: Jiri Slaby <jslaby@suse.cz>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Linus Torvalds [Thu, 19 Apr 2012 21:54:52 +0000 (14:54 -0700)]
Merge branch 'for-3.4' of git://linux-nfs.org/~bfields/linux
Pull nfsd bugfixes from J. Bruce Fields:
"One bugfix, and one minor header fix from Jeff Layton while we're
here"
* 'for-3.4' of git://linux-nfs.org/~bfields/linux:
nfsd: include cld.h in the headers_install target
nfsd: don't fail unchecked creates of non-special files
Michael Krufky [Mon, 16 Apr 2012 17:59:32 +0000 (14:59 -0300)]
[media] xc5000: support 32MHz & 31.875MHz xtal using the 41.024.5 firmware
Rather than loading firmware specific for the xtal frequency, just use
the standard firmware and set the xtal frequency after firmware upload.
The modified firmware will never be released, so we're better off
merging this now rather than waiting for v3.5.
Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Konrad Rzeszutek Wilk [Tue, 17 Apr 2012 18:35:49 +0000 (14:35 -0400)]
xen/resume: Fix compile warnings.
linux/drivers/xen/manage.c: In function 'do_suspend':
linux/drivers/xen/manage.c:160:5: warning: 'si.cancelled' may be used uninitialized in this function
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Linus Torvalds [Thu, 19 Apr 2012 19:08:11 +0000 (12:08 -0700)]
Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux
Pull drm fixes from Dave Airlie:
"It's like a grab bag of one liners:
- core: fix page flip error path, reorder object teardown.
- usb: fix the drm_usb module license.
- i915: VT switch on SNB with non-native modes fix, and a regression
fix from 3.3.
- radeon: missing unreserve on SI, AGP/VRAM setup fix (fixes radeon on
IA64, but its a generic bug), an rn50 regression from 3.3, turn off
MSIs on rv515 (it loses rearms every so often)."
* 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
nouveau: Set special lane map for the right chipset
drm/radeon: fix load detect on rn50 with hardcoded EDIDs.
drm: Releasing FBs before releasing GEM objects during drm_release
drm/nouveau/pm: don't read/write beyond end of stack buffer
drivers: gpu: drm: gma500: mdfld_dsi_output.h: Remove not unneeded include of version.h
radeon: fix r600/agp when vram is after AGP (v3)
drm: fix page_flip error handling
drm/radeon/kms: fix the regression of DVI connector check
drm/usb: fix module license on drm/usb layer.
drm/i915: Do not set "Enable Panel Fitter" on SNB pageflips
drm/i915: Hold mode_config lock whilst changing mode for lastclose()
drm/radeon/si: add missing radeon_bo_unreserve in si_rlc_init() v2
drm/radeon: disable MSI on RV515
drm/i915: don't clobber the special upscaling lvds timings
Guennadi Liakhovetski [Wed, 18 Apr 2012 06:59:01 +0000 (03:59 -0300)]
[media] V4L: mt9m032: fix compilation breakage
Fix the following compilation failure:
linux-2.6/drivers/media/video/mt9m032.c: In function '__mt9m032_get_pad_crop':
linux-2.6/drivers/media/video/mt9m032.c:337: error: implicit declaration of function 'v4l2_subdev_get_try_crop'
linux-2.6/drivers/media/video/mt9m032.c:337: warning: return makes pointer from integer without a cast
linux-2.6/drivers/media/video/mt9m032.c: In function '__mt9m032_get_pad_format':
linux-2.6/drivers/media/video/mt9m032.c:359: error: implicit declaration of function 'v4l2_subdev_get_try_format'
linux-2.6/drivers/media/video/mt9m032.c:359: warning: return makes pointer from integer without a cast
linux-2.6/drivers/media/video/mt9m032.c: In function 'mt9m032_probe':
linux-2.6/drivers/media/video/mt9m032.c:767: error: 'struct v4l2_subdev' has no member named 'entity'
linux-2.6/drivers/media/video/mt9m032.c:826: error: 'struct v4l2_subdev' has no member named 'entity'
linux-2.6/drivers/media/video/mt9m032.c: In function 'mt9m032_remove':
linux-2.6/drivers/media/video/mt9m032.c:842: error: 'struct v4l2_subdev' has no member named 'entity'
make[4]: *** [drivers/media/video/mt9m032.o] Error 1
by adding a dependency on VIDEO_V4L2_SUBDEV_API.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Linus Torvalds [Thu, 19 Apr 2012 17:28:59 +0000 (10:28 -0700)]
Merge git://git.kernel.org/pub/scm/virt/kvm/kvm
Pull KVM updates from Marcelo Tosatti.
* git://git.kernel.org/pub/scm/virt/kvm/kvm:
KVM: lock slots_lock around device assignment
KVM: VMX: Fix kvm_set_shared_msr() called in preemptible context
KVM: unmap pages from the iommu when slots are removed
KVM: PMU emulation: GLOBAL_CTRL MSR should be enabled on reset
Konrad Rzeszutek Wilk [Wed, 18 Apr 2012 02:21:38 +0000 (22:21 -0400)]
xen/xenbus: Add quirk to deal with misconfigured backends.
A rather annoying and common case is when booting a PVonHVM guest
and exposing the PV KBD and PV VFB - as broken toolstacks don't
always initialize the backends correctly.
Normally The HVM guest is using the VGA driver and the emulated
keyboard for this (though upstream version of QEMU implements
PV KBD, but still uses a VGA driver). We provide a very basic
two-stage wait mechanism - where we wait for 30 seconds for all
devices, and then for 270 for all them except the two mentioned.
That allows us to wait for the essential devices, like network
or disk for the full 6 minutes.
To trigger this, put this in your guest config:
vfb = [ 'vnc=1, vnclisten=0.0.0.0 ,vncunused=1']
instead of this:
vnc=1
vnclisten="0.0.0.0"
CC: stable@kernel.org
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
[v3: Split delay in non-essential (30 seconds) and essential
devices per Ian and Stefano suggestion]
[v4: Added comments per Stefano suggestion]
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Henrik Rydberg [Thu, 12 Apr 2012 22:37:00 +0000 (00:37 +0200)]
nouveau: Set special lane map for the right chipset
The refactoring of the nv50 logic, introduced in
8663bc7c, modified the
test for the special lane map used on some Apple computers with Nvidia
chipsets. The tested MBA3,1 would still boot, but resume from suspend
stopped working. This patch restores the old test, which fixes the problem.
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Acked-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Takashi Iwai [Thu, 19 Apr 2012 15:13:03 +0000 (17:13 +0200)]
Merge branch 'fix/cxt-stable' into fix/hda
Merge fixes for Thinkpad docking-station regressions for 3.3 kernels
back to 3.4. These were committed in that branch to make the stable
merging easier.
Conflicts:
sound/pci/hda/patch_conexant.c