pandora-kernel.git
12 years agoInput: sentelic - release mutex upon register write failure
Tai-hwa Liang [Fri, 23 Dec 2011 09:14:31 +0000 (01:14 -0800)]
Input: sentelic - release mutex upon register write failure

Make sure that mutex is released upon register writing failure.
This fixes boot freezing observed on ARM based OLPC
(http://dev.laptop.org/ticket/11357).

Signed-off-by: Paul Fox <pgf@laptop.org>
Signed-off-by: Tai-hwa Liang <avatar@sentelic.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
12 years agoInput: synaptics - fix touchpad not working after S2R on Vostro V13
Dmitry Torokhov [Mon, 12 Dec 2011 08:05:53 +0000 (00:05 -0800)]
Input: synaptics - fix touchpad not working after S2R on Vostro V13

Synaptics touchpads on several Dell laptops, particularly Vostro V13
systems, may not respond properly to PS/2 commands and queries immediately
after resuming from suspend to RAM. This leads to unresponsive touchpad
after suspend/resume cycle.

Adding a 1-second delay after resetting the device allows touchpad to
finish initializing (calibrating?) and start reacting properly.

Reported-by: Daniel Manrique <daniel.manrique@canonical.com>
Tested-by: Daniel Manrique <daniel.manrique@canonical.com>
Cc: stable@kernel.org
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
12 years agoInput: cma3000_d0x - fix signedness bug in cma3000_thread_irq()
Xi Wang [Mon, 12 Dec 2011 07:40:56 +0000 (23:40 -0800)]
Input: cma3000_d0x - fix signedness bug in cma3000_thread_irq()

The error check (intr_status < 0) didn't work because intr_status is
a u8.  Change its type to signed int.

Signed-off-by: Xi Wang <xi.wang@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
12 years agoInput: wacom - add product id used by Samsung Slate 7
Chris Bagwell [Mon, 12 Dec 2011 07:50:59 +0000 (23:50 -0800)]
Input: wacom - add product id used by Samsung Slate 7

New product ID reported by Harvey Braun on linuxwacom mailing list
and also tested this patch with new hardware.

Signed-off-by: Chris Bagwell <chris@cnpbagwell.com>
Acked-by: Ping Cheng <pinglinux@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
12 years agoInput: ams_delta_serio - include linux/module.h
Aaro Koskinen [Wed, 9 Nov 2011 18:13:33 +0000 (10:13 -0800)]
Input: ams_delta_serio - include linux/module.h

Fix the following compilation failure with v3.2-rc1 by including module.h:

  CC      drivers/input/serio/ams_delta_serio.o
drivers/input/serio/ams_delta_serio.c:33:15: error: expected declaration specifiers or '...' before string constant
drivers/input/serio/ams_delta_serio.c:34:20: error: expected declaration specifiers or '...' before string constant
drivers/input/serio/ams_delta_serio.c:35:16: error: expected declaration specifiers or '...' before string constant
drivers/input/serio/ams_delta_serio.c: In function 'ams_delta_serio_init':
drivers/input/serio/ams_delta_serio.c:155:2: error: 'THIS_MODULE' undeclared (first use in this function)
drivers/input/serio/ams_delta_serio.c:155:2: note: each undeclared identifier is reported only once for each function it appears in

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
12 years agoInput: elantech - adjust hw_version detection logic
JJ Ding [Wed, 9 Nov 2011 06:13:14 +0000 (22:13 -0800)]
Input: elantech - adjust hw_version detection logic

This patch fixes some v3 hardware (fw_version: 0x150500) wrongly detected
as v2 hardware.

Reported-by: Marc Dietrich <marvin24@gmx.de>
Signed-off-by: JJ Ding <jj_ding@emc.com.tw>
Tested-By: Marc Dietrich <marvin24@gmx.de>
Acked-by: Éric Piel <eric.piel@tremplin-utc.net>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
12 years agoInput: i8042 - add HP Pavilion dv4s to 'notimeout' and 'nomux' blacklists
Tomas Miljenović [Sat, 5 Nov 2011 06:59:49 +0000 (23:59 -0700)]
Input: i8042 - add HP Pavilion dv4s to 'notimeout' and 'nomux' blacklists

Touchpad input doesn't work with newer HP Pavilion dv4 laptops due to bad i8042
timeout data.  Booting with i8042.notimeout and i8042.nomux successfully works
around the problem.

This patch adds the devices to the i8042 notimeout and nomux blacklists.

Signed-off-by: Tomas Miljenovic <TomasM@tomasm.tk>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
12 years agoMerge branch 'next' into for-linus
Dmitry Torokhov [Thu, 27 Oct 2011 04:46:20 +0000 (21:46 -0700)]
Merge branch 'next' into for-linus

12 years agoInput: adp5589-keys - add support for the ADP5585 derivatives
Michael Hennerich [Wed, 19 Oct 2011 04:12:39 +0000 (21:12 -0700)]
Input: adp5589-keys - add support for the ADP5585 derivatives

The ADP5585 family keypad decoder and IO expander is similar to the ADP5589,
however it features less IO pins, and lacks hardware assisted key-lock
functionality. Unfortunately the register addresses are different, as well as
the event codes and bit organization within the port related registers.

Move ADP5589 Register defines from the header file into the main source file.
Add new defines while making sure we don't break existing platform_data.
Add register address translation, and turn device specific defines into variables.
Introduce some helper functions and disable functions that doesn't
exist on the added devices.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
12 years agoInput: imx_keypad - add pm suspend and resume support
Hui Wang [Thu, 13 Oct 2011 04:11:16 +0000 (21:11 -0700)]
Input: imx_keypad - add pm suspend and resume support

The imx_keypad driver was indicating that it was wakeup capable in
imx_keypad_probe(), but it didn't implement suspend or resume methods.

According to the i.MX series MCU Reference Manual, the kpp (keypad
port) is a major wake up source which can detect any key press even
in low power mode and even when there is no clock.

Signed-off-by: Hui Wang <jason77.wang@gmail.com>
Reviewed-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
12 years agoInput: force feedback - potential integer wrap in input_ff_create()
Dan Carpenter [Thu, 13 Oct 2011 04:05:53 +0000 (21:05 -0700)]
Input: force feedback - potential integer wrap in input_ff_create()

The problem here is that max_effects can wrap on 32 bits systems.
We'd allocate a smaller amount of data than sizeof(struct ff_device).
The call to kcalloc() on the next line would fail but it would write
the NULL return outside of the memory we just allocated causing data
corruption.

The call path is that uinput_setup_device() get ->ff_effects_max from
the user and sets the value in the ->private_data struct.  From there
it is:
-> uinput_ioctl_handler()
   -> uinput_create_device()
      -> input_ff_create(dev, udev->ff_effects_max);

I've also changed ff_effects_max so it's an unsigned int instead of
a signed int as a cleanup.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
12 years agoInput: tsc2007 - make sure that X plate resistance is specified
Philip Rakity [Wed, 12 Oct 2011 03:54:55 +0000 (20:54 -0700)]
Input: tsc2007 - make sure that X plate resistance is specified

Abort driver initialization if X plate resistance was not specified in
platform data as it will cause pressure to be always calculated as 0,
and making userspace ignore touch coordinates.

Signed-off-by: Philip Rakity <prakity@marvell.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
12 years agoInput: serio_raw - fix memory leak when closing char device
Dmitry Torokhov [Tue, 11 Oct 2011 01:31:39 +0000 (18:31 -0700)]
Input: serio_raw - fix memory leak when closing char device

Apparently we never freed memory allocated when users open our char
devices nor removed old users from the list of connected clients.

Also unregister misc device immediately upon disconnecting the port
instead of waiting until last user drops off (refcounting in misc
device code will make sure needed pieces stay around while they
are needed) and make sure we are not holing holding serio_raw_mutex
when registering/unregistering misc device. This should fix potential
deadlock between serio_raw and misc device code uncovered by lockdep
and reported by Thomas Tuttle.

Reviewed-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
12 years agoInput: serio_raw - kick clients when disconnecting port
Dmitry Torokhov [Tue, 11 Oct 2011 01:31:30 +0000 (18:31 -0700)]
Input: serio_raw - kick clients when disconnecting port

Send SIGIO/POLL_HUP and otherwise wake up waiters when corresponding serio
port is being disconnected. Also check if port is dead in serio_raw_poll
and signal POLLHUP|POLLERR.

This should speed up process of releasing dead devices by userspace
applications.

Reviewed-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
12 years agoInput: serio_raw - explicitly mark disconnected ports as dead
Dmitry Torokhov [Tue, 11 Oct 2011 01:31:04 +0000 (18:31 -0700)]
Input: serio_raw - explicitly mark disconnected ports as dead

Instead of relying on setting serio_raw->serio to NULL upon disconnecting
ports mark them explicitly as "dead". Also take and carry reference to
underlying serio port to make sure it does not go away until we are done
with it.

Reviewed-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
12 years agoInput: serio_raw - fix coding style issues
Dmitry Torokhov [Tue, 11 Oct 2011 01:30:56 +0000 (18:30 -0700)]
Input: serio_raw - fix coding style issues

This makes checkpatch.pl happy with the driver

Reviewed-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
12 years agoInput: serio_raw - use dev_*() for messages
Dmitry Torokhov [Tue, 11 Oct 2011 01:30:46 +0000 (18:30 -0700)]
Input: serio_raw - use dev_*() for messages

This will ensure our reporting is consistent with the rest of the system.

Reviewed-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
12 years agoInput: serio_raw - use bool for boolean data
Dmitry Torokhov [Tue, 11 Oct 2011 01:30:36 +0000 (18:30 -0700)]
Input: serio_raw - use bool for boolean data

Reviewed-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
12 years agoInput: serio_raw - perform proper locking when adding clients to list
Dmitry Torokhov [Tue, 11 Oct 2011 01:30:26 +0000 (18:30 -0700)]
Input: serio_raw - perform proper locking when adding clients to list

Make sure we hold serio lock when adding clients to client list so that
we do not race with serio_raw_release() removing clients from the same
list.

Reviewed-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
12 years agoInput: serio_raw - rename serio_raw_list to serio_raw_client
Dmitry Torokhov [Tue, 11 Oct 2011 01:30:14 +0000 (18:30 -0700)]
Input: serio_raw - rename serio_raw_list to serio_raw_client

'serio_raw_list' and 'list' names do not accurately represent their objects
and are extremely confusing when reading the code. Let's use better suited
names.

Reviewed-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
12 years agoInput: serio_raw - use kref instead of rolling out its own refcounting
Dmitry Torokhov [Tue, 11 Oct 2011 01:30:03 +0000 (18:30 -0700)]
Input: serio_raw - use kref instead of rolling out its own refcounting

Reviewed-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
12 years agoInput: psmouse - switch to using dev_*() for messages
Dmitry Torokhov [Tue, 11 Oct 2011 01:27:03 +0000 (18:27 -0700)]
Input: psmouse - switch to using dev_*() for messages

This will ensure our reporting is consistent with the rest of the system
and we do not refer to obsolete source file names.

Reviewed-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
Reviewed-by: JJ Ding <dgdunix@gmail.com>
Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
12 years agoInput: wacom - correct max Y value on medium bamboos
Chris Bagwell [Mon, 10 Oct 2011 15:52:32 +0000 (08:52 -0700)]
Input: wacom - correct max Y value on medium bamboos

Medium size Bamboo P&T driver reused max X/Y form older Bamboo 1
medium size tablets and never updated to real value. Actual
active area of tablet is slightly larger in Y direction.

Signed-off-by: Chris Bagwell <chris@cnpbagwell.com>
Acked-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
12 years agoInput: wacom - add ABS_DISTANCE to Bamboo Pen reports
Chris Bagwell [Mon, 10 Oct 2011 15:52:13 +0000 (08:52 -0700)]
Input: wacom - add ABS_DISTANCE to Bamboo Pen reports

Tablet reports a distance of 0 right at highest point possible
to be in proximity and distance_max when touching tablet. Inverse
the distance since user land has no way of knowing ABS_DISTANCE
is not distance from tablet.

Signed-off-by: Chris Bagwell <chris@cnpbagwell.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
12 years agoInput: wacom - remove unneeded touch pressure initialization
Chris Bagwell [Mon, 10 Oct 2011 15:51:52 +0000 (08:51 -0700)]
Input: wacom - remove unneeded touch pressure initialization

These were left in during removal of touch pressure reports but not
needed now.

Signed-off-by: Chris Bagwell <chris@cnpbagwell.com>
Reviewed-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
12 years agoInput: lm8323 - wrap suspend and resume in CONFIG_PM_SLEEP
Dmitry Torokhov [Thu, 6 Oct 2011 22:26:52 +0000 (15:26 -0700)]
Input: lm8323 - wrap suspend and resume in CONFIG_PM_SLEEP

CONFIG_PM is defined when CONFIG_PM_SLEEP or CONFIG_PM_RUNTIME is defined,
however suspend and resume methods are only valid in the context of
CONFIG_PM_SLEEP. If only CONFIG_PM_RUNTIME is defined we get the following
warning (courtesy of Geerts randconfig builds):

lm8323.c: warning: 'lm8323_resume' defined but not used

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
12 years agoInput: ad7879-i2c - wrap suspend and resume in CONFIG_PM_SLEEP
Dmitry Torokhov [Thu, 6 Oct 2011 22:26:52 +0000 (15:26 -0700)]
Input: ad7879-i2c - wrap suspend and resume in CONFIG_PM_SLEEP

CONFIG_PM is defined when CONFIG_PM_SLEEP or CONFIG_PM_RUNTIME is defined,
however suspend and resume methods are only valid in the context of
CONFIG_PM_SLEEP. If only CONFIG_PM_RUNTIME is defined we get the following
warning (courtesy of Geerts randconfig builds):

ad7879-i2c.c: warning: 'ad7879_i2c_resume' defined but not used

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
12 years agoInput: synaptics_i2c - wrap suspend and resume in CONFIG_PM_SLEEP
Dmitry Torokhov [Thu, 6 Oct 2011 22:26:51 +0000 (15:26 -0700)]
Input: synaptics_i2c - wrap suspend and resume in CONFIG_PM_SLEEP

CONFIG_PM is defined when CONFIG_PM_SLEEP or CONFIG_PM_RUNTIME is defined,
however suspend and resume methods are only valid in context of
CONFIG_PM_SLEEP. If only CONFIG_PM_RUNTIME is defined we get the following
warning (courtesy of Geerts randconfig builds):

synaptics_i2c.c: warning: 'synaptics_i2c_resume' defined but not used

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
12 years agoInput: mma8450 - silence some 'uninitialized variable' warnings
Dmitry Torokhov [Thu, 6 Oct 2011 22:26:50 +0000 (15:26 -0700)]
Input: mma8450 - silence some 'uninitialized variable' warnings

Sometimes GCC is not smart enough to recognize that x, y and z are
always used properly initialized in mma8450_poll(). Let's rearrange
the code a bit to help GCC.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
12 years agoInput: atmel_mxt_ts - use snprintf for sysfs attribute show method
Daniel Kurtz [Thu, 6 Oct 2011 22:43:20 +0000 (15:43 -0700)]
Input: atmel_mxt_ts - use snprintf for sysfs attribute show method

Sysfs attribute show methods are always passed a buffer of length
PAGE_SIZE.  To keep from overwriting this buffer and causing havoc, use
snprintf() to guarantee we never write more than the buffer can hold.

In addition, at least for my touchscreen, the number and size of objects
was far too big to fit in a single 4K page.  Therefore, this patch also
trims some redundant framing text to leave more room for actual data.

Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
Acked-by: Nick Dyer <nick.dyer@itdev.co.uk>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
12 years agoInput: wacom - make LED status readable through sysfs
Ping Cheng [Wed, 5 Oct 2011 06:51:49 +0000 (23:51 -0700)]
Input: wacom - make LED status readable through sysfs

Reviewed-by: Eduard Hasenleithner <eduard@hasenleithner.at>
Tested-by: Eduard Hasenleithner <eduard@hasenleithner.at>
Signed-off-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
12 years agoInput: wacom - add LED support for Cintiq 21ux2
Ping Cheng [Wed, 5 Oct 2011 06:51:14 +0000 (23:51 -0700)]
Input: wacom - add LED support for Cintiq 21ux2

Cintiq 21ux2 has two sets of four LEDs on right and left side of
the tablet, respectively.

Reviewed-by: Eduard Hasenleithner <eduard@hasenleithner.at>
Tested-by: Eduard Hasenleithner <eduard@hasenleithner.at>
Signed-off-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
12 years agoInput: wacom - don't expose LED inactive option
Ping Cheng [Wed, 5 Oct 2011 06:50:42 +0000 (23:50 -0700)]
Input: wacom - don't expose LED inactive option

The LED also indicates the status of the tablet. Don't turn it off.

Reviewed-by: Eduard Hasenleithner <eduard@hasenleithner.at>
Tested-by: Eduard Hasenleithner <eduard@hasenleithner.at>
Signed-off-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
12 years agoInput: wacom - lower the LED luminance
Ping Cheng [Wed, 5 Oct 2011 06:49:42 +0000 (23:49 -0700)]
Input: wacom - lower the LED luminance

The LED luminance level is normally lower when no button is pressed.

Reviewed-by: Eduard Hasenleithner <eduard@hasenleithner.at>
Tested-by: Eduard Hasenleithner <eduard@hasenleithner.at>
Signed-off-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
12 years agoInput: wacom - revert "Cintiq 21UX2 does not have menu strips"
Jason Gerecke [Wed, 5 Oct 2011 05:50:45 +0000 (22:50 -0700)]
Input: wacom - revert "Cintiq 21UX2 does not have menu strips"

This reverts commit 71c86ce59791bcd67af937bbea719a508079d7c2.
The 21UX2 does have touchstrips, but they are in a somewhat-
hidden location.

Signed-off-by: Jason Gerecke <killertofu@gmail.com>
Acked-by: Ping Cheng <pinglinux@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
12 years agoInput: add a driver for TSC-40 serial touchscreen
Sebastian Andrzej Siewior [Wed, 28 Sep 2011 17:04:21 +0000 (10:04 -0700)]
Input: add a driver for TSC-40 serial touchscreen

This patch adds the TSC-40 serial touchscreen driver and should be
compatible with TSC-10 and TSC-25.

The driver was written by Linutronix on behalf of Bachmann electronic GmbH.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
12 years agoInput: adxl34x - documentation cleanup
Michael Tandy [Wed, 21 Sep 2011 05:42:51 +0000 (22:42 -0700)]
Input: adxl34x - documentation cleanup

This patch clarifies a few bits of documentation in the header file
for the adxl34x driver.

Signed-off-by: Michael Tandy <lkml@mkt.me.uk>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
12 years agoInput: gpio_keys - use of_property_read_u32()
Tobias Klauser [Fri, 9 Sep 2011 18:09:50 +0000 (11:09 -0700)]
Input: gpio_keys - use of_property_read_u32()

Use the of_property_read_u32() helper function to retrieve u32 values
from the device tree. Also do not pass the len parameter to
of_get_property if it isn't checked afterwards.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
12 years agoInput: penmount - simplify unregister procedure
Dmitry Torokhov [Tue, 13 Sep 2011 05:13:00 +0000 (22:13 -0700)]
Input: penmount - simplify unregister procedure

Since touchscreen driver does not handle any events to be sent to the
device we can close serio port first and then unregister the input device.

Tested-by: John Sung <penmount.touch@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
12 years agoInput: penmount - rework handling of different protocols
Dmitry Torokhov [Tue, 13 Sep 2011 05:12:58 +0000 (22:12 -0700)]
Input: penmount - rework handling of different protocols

Instead of having one large switch based on product ID use pointer to
function actually doing protocol decoding.

Tested-by: John Sung <penmount.touch@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
12 years agoInput: penmount - add PenMount 6250 support
John Sung [Fri, 9 Sep 2011 20:33:12 +0000 (13:33 -0700)]
Input: penmount - add PenMount 6250 support

Add multi touch support for PenMount 6250 touch controller.

Signed-off-by: John Sung <penmount.touch@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
12 years agoInput: penmount - add PenMount 3000 support
John Sung [Fri, 9 Sep 2011 20:33:12 +0000 (13:33 -0700)]
Input: penmount - add PenMount 3000 support

Add dual touch support for PenMount 3000 touch controller.

Signed-off-by: John Sung <penmount.touch@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
12 years agoInput: penmount - add PenMount 6000 support
John Sung [Fri, 9 Sep 2011 20:33:12 +0000 (13:33 -0700)]
Input: penmount - add PenMount 6000 support

Add support for PenMount 6000 touch controller.

Signed-off-by: John Sung <penmount.touch@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
12 years agoInput: penmount - fix the protocol
John Sung [Fri, 9 Sep 2011 20:33:12 +0000 (13:33 -0700)]
Input: penmount - fix the protocol

The MSB and LSB of the XY axis value are switched according to the PenMount 9000 protocol. The driver name is also changed from penmountlpc, since it is not for LPC interface at all.

Signed-off-by: John Sung <penmount.touch@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
12 years agoInput: elantech - remove module parameter force_elantech
JJ Ding [Wed, 21 Sep 2011 05:42:51 +0000 (22:42 -0700)]
Input: elantech - remove module parameter force_elantech

This essentially reverts commit f81bc788ff91d4efd4baf88b2c29713838caa8e5.

With recent work on elantech driver, I believe we now have complete support
for all elantech touchpads. So remove this hack.

Signed-off-by: JJ Ding <jj_ding@emc.com.tw>
Reviewed-by: Éric Piel <eric.piel@tremplin-utc.net>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
12 years agoInput: elantech - better support all those v2 variants
JJ Ding [Wed, 21 Sep 2011 05:42:51 +0000 (22:42 -0700)]
Input: elantech - better support all those v2 variants

V2 hardware has many variants. This patch adddresses two issues:

 - some model also has debounce packets, but with a different signature
   than v3. Now we just check debounce for all v2 hardware.

 - due to different scanning methods the hardware uses, x and y ranges have
   to be calculated differently. And for some specific versions, we can just
   see them as custom-made, so set {x, y} the same values as Windows driver
   does.

Signed-off-by: JJ Ding <jj_ding@emc.com.tw>
Tested-by: Richard Schütz <r.schtz@t-online.de>
Reviewed-by: Éric Piel <eric.piel@tremplin-utc.net>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
12 years agoInput: wacom - fix touch parsing on newer Bamboos
Chris Bagwell [Fri, 9 Sep 2011 20:38:10 +0000 (13:38 -0700)]
Input: wacom - fix touch parsing on newer Bamboos

Bamboos with Product ID's > 0xD4 return values unrelated to pressure
in touch 1 pressure field.  They also report 2nd touch X/Y values
shifted down 1 byte (where pressure was).  This results in jumpy
1 finger touch and totally invalid 2nd finger data.

For touch detection, switch to a Touch Present single bit that
all versions of Bamboo support.

For touch 2 offset, calculate offset based on a bit that is set
different between the two packet layouts.

Since touch pressure reports were removed from driver, there was
no need to be reading pressure any more.

Signed-off-by: Chris Bagwell <chris@cnpbagwell.com>
Reviewed-by: Ping Cheng <pinglinux@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
12 years agoInput: bcm5974 - add MacBookAir4,1 trackpad support
Pieter-Augustijn Van Malleghem [Fri, 9 Sep 2011 20:29:45 +0000 (13:29 -0700)]
Input: bcm5974 - add MacBookAir4,1 trackpad support

This patch adds trackpad support for the MacBookAir4,1, released in July 2011.
It is very similar to the MacBookAir4,2 patch submitted by Joshua Dillon and
Chase Douglas.

Signed-off-by: Pieter-Augustijn Van Malleghem <p-a@scarlet.be>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
12 years agoInput: elantech - add v4 hardware support
JJ Ding [Fri, 9 Sep 2011 17:31:58 +0000 (10:31 -0700)]
Input: elantech - add v4 hardware support

v4 hardware is a true multitouch capable touchpad (up to 5 fingers).
The packet format is quite complex, please see protocol document for
reference.

Signed-off-by: JJ Ding <jj_ding@emc.com.tw>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
12 years agoInput: elantech - add v3 hardware support
JJ Ding [Fri, 9 Sep 2011 17:30:31 +0000 (10:30 -0700)]
Input: elantech - add v3 hardware support

v3 hardware's packet format is almost identical to v2 (one/three finger touch),
except when sensing two finger touch, the hardware sends 12 bytes of data.

Signed-off-by: JJ Ding <jj_ding@emc.com.tw>
Acked-by: Daniel Kurtz <djkurtz@chromium.org>
Acked-by: Éric Piel <eric.piel@tremplin-utc.net>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
12 years agoInput: elantech - clean up elantech_init
JJ Ding [Fri, 9 Sep 2011 17:28:19 +0000 (10:28 -0700)]
Input: elantech - clean up elantech_init

Group property setting code into elantech_set_properties.

Signed-off-by: JJ Ding <jj_ding@emc.com.tw>
Acked-by: Daniel Kurtz <djkurtz@chromium.org>
Acked-by: Éric Piel <eric.piel@tremplin-utc.net>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
12 years agoInput: elantech - packet checking for v2 hardware
JJ Ding [Fri, 9 Sep 2011 17:28:04 +0000 (10:28 -0700)]
Input: elantech - packet checking for v2 hardware

For v2 hardware, there is no real parity check, but we can still check
some constant bits for data integrity.

Also rename elantech_check_parity_v1 to elantech_packet_check_v1 to make
these packet checking function names consistent.

Signed-off-by: JJ Ding <jj_ding@emc.com.tw>
Acked-by: Daniel Kurtz <djkurtz@chromium.org>
Acked-by: Éric Piel <eric.piel@tremplin-utc.net>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
12 years agoInput: elantech - remove ETP_EDGE_FUZZ_V2
JJ Ding [Fri, 9 Sep 2011 17:27:42 +0000 (10:27 -0700)]
Input: elantech - remove ETP_EDGE_FUZZ_V2

Don't try to be too clever and remove ETP_EDGE_FUZZ_V2. X, Y ranges
should be just the raw resolution of the device. Otherwise, they can
cause underflow on the Y axis.

Suggested-by: Éric Piel <eric.piel@tremplin-utc.net>
Signed-off-by: JJ Ding <jj_ding@emc.com.tw>
Acked-by: Daniel Kurtz <djkurtz@chromium.org>
Acked-by: Éric Piel <eric.piel@tremplin-utc.net>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
12 years agoInput: elantech - use firmware provided x, y ranges
JJ Ding [Fri, 9 Sep 2011 17:26:16 +0000 (10:26 -0700)]
Input: elantech - use firmware provided x, y ranges

With newer hardware, the touchpad provides range info.
Let's use it.

Signed-off-by: JJ Ding <jj_ding@emc.com.tw>
Acked-by: Daniel Kurtz <djkurtz@chromium.org>
Acked-by: Éric Piel <eric.piel@tremplin-utc.net>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
12 years agoInput: elantech - get rid of ETP_2FT_* in elantech.h
JJ Ding [Fri, 9 Sep 2011 17:22:58 +0000 (10:22 -0700)]
Input: elantech - get rid of ETP_2FT_* in elantech.h

For two finger touches the coordinate of each finger gets reported
separately but with reduced resolution.

With this change, we now have the same range for ST and MT data and
scale MT data because it has lower resolution to match ST.

Suggested-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: JJ Ding <jj_ding@emc.com.tw>
Acked-by: Daniel Kurtz <djkurtz@chromium.org>
Acked-by: Éric Piel <eric.piel@tremplin-utc.net>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
12 years agoInput: elantech - correct x, y value range for v2 hardware
JJ Ding [Fri, 9 Sep 2011 17:22:19 +0000 (10:22 -0700)]
Input: elantech - correct x, y value range for v2 hardware

x, y values are actually 12-bit long. Also update protocol document to
reflect the change.

Signed-off-by: JJ Ding <jj_ding@emc.com.tw>
Acked-by: Daniel Kurtz <djkurtz@chromium.org>
Acked-by: Éric Piel <eric.piel@tremplin-utc.net>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
12 years agoInput: twl6040-vibra - fix compiler warning
Randy Dunlap [Fri, 9 Sep 2011 17:15:29 +0000 (10:15 -0700)]
Input: twl6040-vibra - fix compiler warning

Fix warning from Geert's build summary emails by changing "if" to
"ifdef". Thsi should fix the following:

drivers/input/misc/twl6040-vibra.c:231:5: warning: "CONFIG_PM_SLEEP" is not defined

Builds cleanly with CONFIG_PM_SLEEP enabled or disabled.

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
12 years agoInput: tegra-kbc - tighten locking
Dmitry Torokhov [Fri, 9 Sep 2011 16:24:20 +0000 (09:24 -0700)]
Input: tegra-kbc - tighten locking

Take spinlock when entering ISR and timer routine to ensure that we do not
race while enabling/disabling FIFO interrupts.

Also we do not need to take teh spinlock in tegra_kbc_startremove() since
interrupt is completely disabled.

Tested-by: Rakesh Iyer <riyer@nvidia.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
12 years agoInput: tegra-kbc - fix wakeup from suspend
Rakesh Iyer [Thu, 8 Sep 2011 22:34:11 +0000 (15:34 -0700)]
Input: tegra-kbc - fix wakeup from suspend

For wakeup to be reliable, kbc needs to be in interrupt mode before suspend.
Created common routine to control the FIFO interrupt.
Added synchronization to ensure orderly suspend.

Signed-off-by: Rakesh Iyer <riyer@nvidia.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
12 years agoInput: tc3589x-keypad - fix section mismatch warning
Harvey Yang [Thu, 8 Sep 2011 16:46:55 +0000 (09:46 -0700)]
Input: tc3589x-keypad - fix section mismatch warning

WARNING: drivers/input/keyboard/built-in.o(.text+0xb55b): Section mismatch in reference from the function tc3589x_keypad_open() to the function .devinit.text:tc3589x_keypad_init_key_hardware()
The function tc3589x_keypad_open() references
the function __devinit tc3589x_keypad_init_key_hardware().
This is often because tc3589x_keypad_open lacks a __devinit
annotation or the annotation of tc3589x_keypad_init_key_hardware is wrong.

Signed-off-by: Harvey Yang <harvey.huawei.yang@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
12 years agoInput: wacom - add POINTER and DIRECT device properties
Jason Gerecke [Thu, 8 Sep 2011 16:38:14 +0000 (09:38 -0700)]
Input: wacom - add POINTER and DIRECT device properties

Adds INPUT_PROP_POINTER or INPUT_PROP_DIRECT as necessary to the
hardware supported by the Wacom driver. The DIRECT property is
assigned to devices with an embedded screen (i.e. touchscreens
and display tablets). The POINTER property is assigned to those
without embedded screens.

Signed-off-by: Jason Gerecke <killertofu@gmail.com>
Reviewed-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
12 years agoInput: remove IRQF_DISABLED from drivers
Yong Zhang [Wed, 7 Sep 2011 21:04:16 +0000 (14:04 -0700)]
Input: remove IRQF_DISABLED from drivers

This flag is a NOOP and can be removed now.

Signed-off-by: Yong Zhang <yong.zhang0@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
12 years agoInput: wacom - add Intuos4 LED and OLED control
Eduard Hasenleithner [Wed, 7 Sep 2011 21:08:54 +0000 (14:08 -0700)]
Input: wacom - add Intuos4 LED and OLED control

This commit enables control of the LEDs and OLED displays found on the
Wacom Intuos4 M, L, and XL. For this purpose, a new "wacom_led" attribute
group is added to the sysfs entry of the USB device.

This "wacom_led" group only shows up when the correct device (M, L, or XL)
is detected. The attributes are described in
 Documentation/ABI/testing/sysfs-wacom

Signed-off-by: Eduard Hasenleithner <eduard@hasenleithner.at>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
12 years agoMerge commit 'v3.1-rc4' into next
Dmitry Torokhov [Wed, 7 Sep 2011 21:18:36 +0000 (14:18 -0700)]
Merge commit 'v3.1-rc4' into next

12 years agoLinux 3.1-rc4 v3.1-rc4
Linus Torvalds [Mon, 29 Aug 2011 04:16:01 +0000 (21:16 -0700)]
Linux 3.1-rc4

12 years agoMerge branch 'pm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Linus Torvalds [Sun, 28 Aug 2011 17:05:39 +0000 (10:05 -0700)]
Merge branch 'pm-fixes' of git://git./linux/kernel/git/rafael/linux-pm

* 'pm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  ARM: mach-shmobile: sh7372 LCDC1 suspend fix V2 (incremental)
  OMAP: omap_device: only override _noirq methods, not normal suspend/resume
  PM / Runtime: Correct documentation of pm_runtime_irq_safe()
  ARM: mach-shmobile: sh7372 LCDC1 suspend fix
  sh-sci / PM: Use power.irq_safe
  PM: Use spinlock instead of mutex in clock management functions

12 years agoMerge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1...
Linus Torvalds [Sat, 27 Aug 2011 16:32:08 +0000 (09:32 -0700)]
Merge branch 'fixes' of git://git./linux/kernel/git/ieee1394/linux1394-2.6

* 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6:
  firewire: sbp2: fix panic after rmmod with slow targets

12 years agoARM: mach-shmobile: sh7372 LCDC1 suspend fix V2 (incremental)
Magnus Damm [Sat, 27 Aug 2011 12:21:00 +0000 (14:21 +0200)]
ARM: mach-shmobile: sh7372 LCDC1 suspend fix V2 (incremental)

This patch updates the recently submitted
"Associate the HDMI clock together with LCDC1 on sh7372"
to V2 with the following change:
 - Use lcdc1_device on AP4EVB to build properly.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
12 years agoInput: adp5588-keys - remove incorrect modalias
Axel Lin [Sat, 27 Aug 2011 06:37:33 +0000 (23:37 -0700)]
Input: adp5588-keys - remove incorrect modalias

For i2c drivers, we should use "i2c:" prefix for modalias.

MODULE_DEVICE_TABLE will setup the modulalias for us, thus adding
a MODULE_ALIAS is redundant (in addition to being incorrect).

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
12 years agoInput: tsc2007 - add open and close methods
Dmitry Torokhov [Thu, 25 Aug 2011 08:05:46 +0000 (01:05 -0700)]
Input: tsc2007 - add open and close methods

This will ensure that the device delivers input events only when there
are users.

Tested-by: Thierry Reding <thierry.reding@avionic-design.de>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
12 years agoInput: tsc2007 - convert to threaded IRQ
Dmitry Torokhov [Thu, 25 Aug 2011 07:25:12 +0000 (00:25 -0700)]
Input: tsc2007 - convert to threaded IRQ

Instead of using hard IRQ and workqueue solution switch to using threaded
interrupt handler to simplify the code and locking rules.

Tested-by: Thierry Reding <thierry.reding@avionic-design.de>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
12 years agoInput: cm109 - fix checking return value of usb_control_msg
axel lin [Thu, 25 Aug 2011 16:42:09 +0000 (09:42 -0700)]
Input: cm109 - fix checking return value of usb_control_msg

If successful, usb_control_msg returns the number of bytes transferred,
otherwise a negative error number.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
12 years agoInput: wacom - advertise BTN_TOOL_PEN and BTN_STYLUS for PenPartner
Jason Gerecke [Sat, 27 Aug 2011 06:18:22 +0000 (23:18 -0700)]
Input: wacom - advertise BTN_TOOL_PEN and BTN_STYLUS for PenPartner

The Wacom PenPartner should advertise its stylus tip and button
in addition to the eraser tool. These are both physically
present on the hardware, and emitted from 'wacom_penpartner_irq'.

Signed-off-by: Jason Gerecke <killertofu@gmail.com>
Reviewed-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
12 years agoInput: wacom - remove pressure for touch devices
Ping Cheng [Sat, 27 Aug 2011 06:10:02 +0000 (23:10 -0700)]
Input: wacom - remove pressure for touch devices

Touch devices do not report valid pressure or capacitance.

Signed-off-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
12 years agoAll Arch: remove linkage for sys_nfsservctl system call
NeilBrown [Fri, 26 Aug 2011 22:03:11 +0000 (18:03 -0400)]
All Arch: remove linkage for sys_nfsservctl system call

The nfsservctl system call is now gone, so we should remove all
linkage for it.

Signed-off-by: NeilBrown <neilb@suse.de>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoMerge branch 'drm-intel-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/keith...
Linus Torvalds [Fri, 26 Aug 2011 22:00:49 +0000 (15:00 -0700)]
Merge branch 'drm-intel-fixes' of git://git./linux/kernel/git/keithp/linux-2.6

* 'drm-intel-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/keithp/linux-2.6:
  drm/i915: Fix wrong initializer for "locked" variable in assert_panel_unlocked
  i915: do not setup intel_backlight twice

12 years agoMerge branch 'usb-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh...
Linus Torvalds [Fri, 26 Aug 2011 20:10:06 +0000 (13:10 -0700)]
Merge branch 'usb-linus' of git://git./linux/kernel/git/gregkh/usb-2.6

* 'usb-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: (30 commits)
  USB: ftdi_sio: add Calao reference board support
  USB option driver K3765/K4505 avoid CDC_DATA interface
  USB: option: add YUGA device id to driver
  usb: s5p-ehci: fix a NULL pointer deference
  USB: EHCI: Do not rely on PORT_SUSPEND to stop USB resuming in ehci_bus_resume().
  USB option driver add PID of Huawei Vodafone K4605
  USB option driver add PID of Huawei Vodafone K3806
  xhci: Handle zero-length isochronous packets.
  USB: Avoid NULL pointer deref in usb_hcd_alloc_bandwidth.
  usb: musb: gadget: fix error path
  usb: gadget: f_phonet: unlock in error case
  usb: musb: blackfin: include prefetch head file
  usb: musb: tusb6010: fix compilation
  usb: gadget: renesas_usbhs: fix DMA build by including dma-mapping.h
  usb: musb: cppi: fix build errors due to DBG and missing musb variable
  usb: musb: ux500: replace missing DBG with dev_dbg
  usb: musb: ux500: set dma config for both src and dst
  usb: musb: fix oops on musb_gadget_pullup
  usb: host: ehci-omap: fix .remove and failure handling path of .probe(v1)
  usb: gadget: hid: don't STALL when processing a HID Descriptor request
  ...

12 years agoMerge branch 'tty-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh...
Linus Torvalds [Fri, 26 Aug 2011 20:06:06 +0000 (13:06 -0700)]
Merge branch 'tty-linus' of git://git./linux/kernel/git/gregkh/tty-2.6

* 'tty-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6:
  omap-serial: Allow IXON and IXOFF to be disabled.
  TTY: serial, document ignoring of uart->ops->startup error
  TTY: pty, fix pty counting
  8250: Fix race condition in serial8250_backup_timeout().
  serial/8250_pci: delete duplicate data definition
  8250_pci: add support for Rosewill RC-305 4x serial port card
  tty: Add "spi:" prefix for spi modalias
  atmel_serial: fix atmel_default_console_device
  serial: 8250_pnp: add Intermec CV60 touchscreen device
  drivers/serial/ucc_uart.c: Fix compiler warning
  pch_uart: Set PCIe bus number using probe parameter
  serial: samsung: Fix build error

12 years agoMerge branch 'driver-core-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Fri, 26 Aug 2011 20:05:09 +0000 (13:05 -0700)]
Merge branch 'driver-core-linus' of git://git./linux/kernel/git/gregkh/driver-core-2.6

* 'driver-core-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6:
  drivers:misc: ti-st: fix unexpected UART close
  drivers:misc: ti-st: free skb on firmware download
  drivers:misc: ti-st: wait for completion at fail
  drivers:misc: ti-st: reinit completion before send
  drivers:misc: ti-st: fail-safe on wrong pkt type
  drivers:misc: ti-st: reinit completion on ver read
  drivers:misc:ti-st: platform hooks for chip states
  drivers:misc: ti-st: avoid a misleading dbg msg
  base/devres.c: quiet sparse noise about context imbalance
  pti: add missing CONFIG_PCI dependency
  drivers/base/devtmpfs.c: correct annotation of `setup_done'
  driver core: fix kernel-doc warning in platform.c
  firmware: fix google/gsmi.c build warning

12 years agoMerge branch 'staging-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh...
Linus Torvalds [Fri, 26 Aug 2011 20:03:12 +0000 (13:03 -0700)]
Merge branch 'staging-linus' of git://git./linux/kernel/git/gregkh/staging-2.6

* 'staging-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6:
  staging: tidspbridge: fix compilation on dsp clock functions
  staging: octeon-ethernet: Add missing #includes.
  Staging: zcache: signedness bug in tmem_get()
  staging: zcache: fix crash on high memory swap
  staging: brcm80211: SPARC build error fix
  staging: brcm80211: fix compile error on non-x86 archs since 3.0 kernel

12 years agoMerge branch 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6
Linus Torvalds [Fri, 26 Aug 2011 16:28:22 +0000 (09:28 -0700)]
Merge branch 'for-linus' of git://git390.marist.edu/linux-2.6

* 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6:
  [S390] memory hotplug: only unassign assigned increments
  [S390] Change default action from reipl to stop for on_restart
  [S390] arch/s390/kernel/ipl.c: correct error detection check
  [S390] drivers/s390/block/dasd_ioctl.c: add missing kfree
  [S390] nss,initrd: kernel image and initrd must be in different segments

12 years agosfi: table irq 0xFF means 'no interrupt'
Kirill A. Shutemov [Fri, 26 Aug 2011 11:20:59 +0000 (12:20 +0100)]
sfi: table irq 0xFF means 'no interrupt'

According to the SFI specification irq number 0xFF means device has no
interrupt or interrupt attached via GPIO.

Currently, we don't handle this special case and set irq field in
*_board_info structs to 255.  It leads to confusion in some drivers.
Accelerometer driver tries to register interrupt 255, fails and prints
"Cannot get IRQ" to dmesg.

Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
Linus Torvalds [Fri, 26 Aug 2011 16:01:30 +0000 (09:01 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/tiwai/sound-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6: (32 commits)
  ALSA: hda: Conexant: Allow different output types to share DAC
  ASoC: Correct element count for WM8996 sidetone HPF
  ASoC: Tegra: wm8903 machine driver: Drop Ventana support
  ASoC: Add samsung maintainer
  ASoC: Add Springbank I/O card to Speyside Kconfig
  ALSA: hda/conexant - Enable ADC-switching for auto-mic mode, too
  ALSA: hda - Fix double-headphone/speaker paths for Cxt auto-parser
  ALSA: hda - Update jack-sense info even when no automute is set
  ALSA: hda - Fix output-path initialization for Realtek auto-parser
  sound/soc/fsl/mpc8610_hpcd.c: add missing of_node_put
  sound/soc/fsl/p1022_ds.c: add missing of_node_put
  sound/soc/ep93xx/ep93xx-i2s.c: add missing kfree
  sound/soc/kirkwood/kirkwood-i2s.c: add missing kfree
  ASoC: soc-core: use GFP_KERNEL flag for kmalloc in snd_soc_cnew
  sound/soc/fsl/fsl_dma.c: add missing of_node_put
  ASoC: Clear completions from late WM8996 FLL lock IRQs
  ASoC: Clear any outstanding WM8962 FLL lock completions before waiting
  ASoC: Ensure we only run Speyside WM8962 bias level callbacks once
  ASoC: Fix configuration of WM8996 input enables
  ASoC: WM8996 record paths need AIFCLK
  ...

12 years agoMerge branch 'fix/asoc' into for-linus
Takashi Iwai [Fri, 26 Aug 2011 07:29:43 +0000 (09:29 +0200)]
Merge branch 'fix/asoc' into for-linus

12 years agoarch/powerpc/sysdev/fsl_rio.c: correct IECSR register clear value
Liu Gang-B34182 [Thu, 25 Aug 2011 22:59:25 +0000 (15:59 -0700)]
arch/powerpc/sysdev/fsl_rio.c: correct IECSR register clear value

This bug causes the IECSR register clear failure.  In this case, the RETE
(retry error threshold exceeded) interrupt will be generated and cannot be
cleared.  So the related ISR may be called persistently.

The RETE bit in IECSR is cleared by writing a 1 to it.

Signed-off-by: Liu Gang <Gang.Liu@freescale.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Kumar Gala <galak@kernel.crashing.org>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agodrivers/rtc/rtc-s3c.c: allow multiple open / allow no-ioctl-open'ed rtc to have irq.
MyungJoo Ham [Thu, 25 Aug 2011 22:59:24 +0000 (15:59 -0700)]
drivers/rtc/rtc-s3c.c: allow multiple open / allow no-ioctl-open'ed rtc to have irq.

The previous rtc-s3c had two issues related with its IRQ.

1. Users cannot open rtc multiple times because an open operation
   calls request_irq on the same IRQ.  (e.g., two user processes wants to
   open and read RTC time from rtc-s3c at the same time)

2. If alarm is set and no one has the rtc opened with filesystem
   (either the alarm is set by kernel/boot-loader or user set an alarm and
   closed rtc dev file), the pending bit is not cleared and no further
   interrupt is invoked.  When the alarm is used by the system itself such
   as a resume from suspend-to-RAM or other Low-power modes/idle, this is
   a critical issue.

This patch mitigates these issues by calling request_irq at probe and
free_irq at remove.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Kukjin Kim <kgene.kim@samsung.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: Changhwan Youn <chaos.youn@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agodrivers/rtc/rtc-s3c.c: correct debug messages
MyungJoo Ham [Thu, 25 Aug 2011 22:59:22 +0000 (15:59 -0700)]
drivers/rtc/rtc-s3c.c: correct debug messages

RTC-S3C used to print out debug messages incorrectly.  This patch
corrects incorrect outputs.  (undecoded bcd numbers, incorrectly decoded
register values)

This patch affects the pr-debug messages only.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Kukjin Kim <kgene.kim@samsung.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: Changhwan Youn <chaos.youn@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agodrivers/leds/leds-bd2802.c: bd2802_unregister_led_classdev() should unregister all...
Axel Lin [Thu, 25 Aug 2011 22:59:21 +0000 (15:59 -0700)]
drivers/leds/leds-bd2802.c: bd2802_unregister_led_classdev() should unregister all registered leds

bd2802_unregister_led_classdev() should unregister all registered
instances of led_classdev class that had registered by
bd2802_register_led_classdev().

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Kim Kyuwon <q1.kim@samsung.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agocris: add arch/cris/include/asm/serial.h
WANG Cong [Thu, 25 Aug 2011 22:59:20 +0000 (15:59 -0700)]
cris: add arch/cris/include/asm/serial.h

Fix the following build errors:

  drivers/tty/serial/8250_early.c:160: error: 'BASE_BAUD' undeclared (first use in this function): 1 errors in 1 logs
  drivers/tty/serial/8250_early.c:37:24: error: asm/serial.h: No such file or directory: 1 errors in 1 logs

I am not sure if (1843200 / 16) is suitable for cris, but most other
arch's define it as this value.

Signed-off-by: WANG Cong <xiyou.wangcong@gmail.com>
Cc: Mikael Starvik <starvik@axis.com>
Cc: Jesper Nilsson <jesper.nilsson@axis.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agodrivers/misc/ab8500-pwm.c: fix modalias
Axel Lin [Thu, 25 Aug 2011 22:59:20 +0000 (15:59 -0700)]
drivers/misc/ab8500-pwm.c: fix modalias

Since 43cc71eed12 ("platform: prefix MODALIAS with "platform:""), the
platform modalias is prefixed with "platform:".

This patch changes the MODULE_ALIAS to "platform:ab8500-pwm".

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Arun Murthy <arun.murthy@stericsson.com>
Cc: Linus Walleij <linus.walleij@stericsson.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agodrivers/misc/fsa9480.c: fix a leak of the IRQ during init failure
Axel Lin [Thu, 25 Aug 2011 22:59:19 +0000 (15:59 -0700)]
drivers/misc/fsa9480.c: fix a leak of the IRQ during init failure

Make sure we are passing the same cookie in all calls to
request_threaded_irq() and free_irq().

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Cc: Donggeun Kim <dg77.kim@samsung.com>
Cc: Minkyu Kang <mk7.kang@samsung.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agobacklight: fix module alias prefix for adp8870_bl
Axel Lin [Thu, 25 Aug 2011 22:59:18 +0000 (15:59 -0700)]
backlight: fix module alias prefix for adp8870_bl

This is an i2c driver, not a platform driver, thus use "i2c" prefix for
the module alias.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agobacklight: add a callback 'notify_after' for backlight control
Dilan Lee [Thu, 25 Aug 2011 22:59:17 +0000 (15:59 -0700)]
backlight: add a callback 'notify_after' for backlight control

We need a callback to do some things after pwm_enable, pwm_disable
and pwm_config.

Signed-off-by: Dilan Lee <dilee@nvidia.com>
Reviewed-by: Robert Morell <rmorell@nvidia.com>
Reviewed-by: Arun Murthy <arun.murthy@stericsson.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Cc: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agomemcg: fix hierarchical oom locking
Johannes Weiner [Thu, 25 Aug 2011 22:59:16 +0000 (15:59 -0700)]
memcg: fix hierarchical oom locking

Commit 79dfdaccd1d5 ("memcg: make oom_lock 0 and 1 based rather than
counter") tried to oom lock the hierarchy and roll back upon
encountering an already locked memcg.

The code is confused when it comes to detecting a locked memcg, though,
so it would fail and rollback after locking one memcg and encountering
an unlocked second one.

The result is that oom-locking hierarchies fails unconditionally and
that every oom killer invocation simply goes to sleep on the oom
waitqueue forever.  The tasks practically hang forever without anyone
intervening, possibly holding locks that trip up unrelated tasks, too.

Signed-off-by: Johannes Weiner <jweiner@redhat.com>
Acked-by: Michal Hocko <mhocko@suse.cz>
Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoleds: add missing include of linux/module.h
Axel Lin [Thu, 25 Aug 2011 22:59:15 +0000 (15:59 -0700)]
leds: add missing include of linux/module.h

Add missing include of linux/module.h for drivers that use interfaces from
linux/module.h.  This patch fixes build errors.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Cc: Jonathan McDowell <noodles@earth.li>
Acked-by: Kristoffer Ericson <kristoffer.ericson@gmail.com>
Cc: Magnus Damm <damm@opensource.se>
Cc: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agodrivers/video/backlight/ep93xx_bl.c: add missing include of linux/module.h
Axel Lin [Thu, 25 Aug 2011 22:59:14 +0000 (15:59 -0700)]
drivers/video/backlight/ep93xx_bl.c: add missing include of linux/module.h

ep93xx_bl.c uses interfaces from linux/module.h, so it should include
that file.  This patch fixes build errors:

    CC [M]  drivers/video/backlight/ep93xx_bl.o
  drivers/video/backlight/ep93xx_bl.c:138: error: 'THIS_MODULE' undeclared here (not in a function)
  drivers/video/backlight/ep93xx_bl.c:158: error: expected declaration specifiers or '...' before string constant
  drivers/video/backlight/ep93xx_bl.c:158: warning: data definition has no type or storage class
  ...

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ryan Mallon <rmallon@gmail.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agorapidio: fix use of non-compatible registers
Alexandre Bounine [Thu, 25 Aug 2011 22:59:13 +0000 (15:59 -0700)]
rapidio: fix use of non-compatible registers

Replace/remove use of RIO v.1.2 registers/bits that are not
forward-compatible with newer versions of RapidIO specification.

RapidIO specification v.1.3 removed Write Port CSR, Doorbell CSR,
Mailbox CSR and Mailbox and Doorbell bits of the PEF CAR.

Use of removed (since RIO v.1.3) register bits affects users of
currently available 1.3 and 2.x compliant devices who may use not so
recent kernel versions.

Removing checks for unsupported bits makes corresponding routines
compatible with all versions of RapidIO specification.  Therefore,
backporting makes stable kernel versions compliant with RIO v.1.3 and
later as well.

Signed-off-by: Alexandre Bounine <alexandre.bounine@idt.com>
Cc: Kumar Gala <galak@kernel.crashing.org>
Cc: Matt Porter <mporter@kernel.crashing.org>
Cc: Li Yang <leoli@freescale.com>
Cc: Thomas Moll <thomas.moll@sysgo.com>
Cc: Chul Kim <chul.kim@idt.com>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agovmscan: clear ZONE_CONGESTED for zone with good watermark
Shaohua Li [Thu, 25 Aug 2011 22:59:12 +0000 (15:59 -0700)]
vmscan: clear ZONE_CONGESTED for zone with good watermark

ZONE_CONGESTED is only cleared in kswapd, but pages can be freed in any
task.  It's possible ZONE_CONGESTED isn't cleared in some cases:

 1. the zone is already balanced just entering balance_pgdat() for
    order-0 because concurrent tasks free memory.  In this case, later
    check will skip the zone as it's balanced so the flag isn't cleared.

 2. high order balance fallbacks to order-0.  quote from Mel: At the
    end of balance_pgdat(), kswapd uses the following logic;

If reclaiming at high order {
for each zone {
if all_unreclaimable
skip
if watermark is not met
order = 0
loop again

/* watermark is met */
clear congested
}
}

    i.e. it clears ZONE_CONGESTED if it the zone is balanced.  if not,
    it restarts balancing at order-0.  However, if the higher zones are
    balanced for order-0, kswapd will miss clearing ZONE_CONGESTED as
    that only happens after a zone is shrunk.  This can mean that
    wait_iff_congested() stalls unnecessarily.

This patch makes kswapd clear ZONE_CONGESTED during its initial
highmem->dma scan for zones that are already balanced.

Signed-off-by: Shaohua Li <shaohua.li@intel.com>
Acked-by: Mel Gorman <mgorman@suse.de>
Reviewed-by: Minchan Kim <minchan.kim@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agokernel/printk: do not turn off bootconsole in printk_late_init() if keep_bootcon
Nishanth Aravamudan [Thu, 25 Aug 2011 22:59:11 +0000 (15:59 -0700)]
kernel/printk: do not turn off bootconsole in printk_late_init() if keep_bootcon

It seems that 7bf693951a8e ("console: allow to retain boot console via
boot option keep_bootcon") doesn't always achieve what it aims, as when
printk_late_init() runs it unconditionally turns off all boot consoles.
With this patch, I am able to see more messages on the boot console in
KVM guests than I can without, when keep_bootcon is specified.

I think it is appropriate for the relevant -stable trees.  However, it's
more of an annoyance than a serious bug (ideally you don't need to keep
the boot console around as console handover should be working -- I was
encountering a situation where the console handover wasn't working and
not having the boot console available meant I couldn't see why).

Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Greg KH <gregkh@suse.de>
Acked-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Cc: <stable@kernel.org> [2.6.39.x, 3.0.x]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoMAINTAINERS: Paul Menage has moved
Wanlong Gao [Thu, 25 Aug 2011 22:59:10 +0000 (15:59 -0700)]
MAINTAINERS: Paul Menage has moved

Paul said: I left Google at the end of last week - if it's not bouncing
already, menage@google.com isn't going to work for much longer.

Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
Acked-by: Paul Menage <paul@paulmenage.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>