GitHub/MotorolaMobilityLLC/kernel-slsi.git
11 years agoInput: pxa27x-keypad - make platform data const
Dmitry Torokhov [Tue, 11 Jun 2013 05:16:29 +0000 (22:16 -0700)]
Input: pxa27x-keypad - make platform data const

It should not be changed by the driver, so let's make it const pointer.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: pxa27x-keypad - convert to using SIMPLE_DEV_PM_OPS
Dmitry Torokhov [Tue, 11 Jun 2013 05:10:07 +0000 (22:10 -0700)]
Input: pxa27x-keypad - convert to using SIMPLE_DEV_PM_OPS

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: pxa27x-keypad - add device tree support
Chao Xie [Mon, 6 May 2013 03:25:10 +0000 (20:25 -0700)]
Input: pxa27x-keypad - add device tree support

Signed-off-by: Chao Xie <chao.xie@marvell.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: pxa27x-keypad - use matrix_keymap for matrix keys
Chao Xie [Mon, 6 May 2013 03:24:58 +0000 (20:24 -0700)]
Input: pxa27x-keypad - use matrix_keymap for matrix keys

pxa27x-keypad includes matrix keys. Make use of matrix_keymap
for the matrix keys.

Signed-off-by: Chao Xie <chao.xie@marvell.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: evdev - flush queues during EVIOCGKEY-like ioctls
David Herrmann [Mon, 8 Apr 2013 04:13:19 +0000 (21:13 -0700)]
Input: evdev - flush queues during EVIOCGKEY-like ioctls

If userspace requests current KEY-state, they very likely assume that no
such events are pending in the output queue of the evdev device.
Otherwise, they will parse events which they already handled via
EVIOCGKEY(). For XKB applications this can cause irreversible keyboard
states if a modifier is locked multiple times because a CTRL-DOWN event is
handled once via EVIOCGKEY() and once from the queue via read(), even
though it should handle it only once.

Therefore, lets do the only logical thing and flush the evdev queue
atomically during this ioctl. We only flush events that are affected by
the given ioctl.

This only affects boolean events like KEY, SND, SW and LED. ABS, REL and
others are not affected as duplicate events can be handled gracefully by
user-space.

Note: This actually breaks semantics of the evdev ABI. However,
investigations showed that userspace already expects the new semantics and
we end up fixing at least all XKB applications.
All applications that are aware of this race-condition mirror the KEY
state for each open-file and detect/drop duplicate events. Hence, they do
not care whether duplicates are posted or not and work fine with this fix.

Also note that we need proper locking to guarantee atomicity and avoid
dead-locks. event_lock must be locked before queue_lock (see input-core).
However, we can safely release event_lock while flushing the queue. This
allows the input-core to proceed with pending events and only stop if it
needs our queue_lock to post new events.
This should guarantee that we don't block event-dispatching for too long
while flushing a single event queue.

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: sysrq - request graceful shutdown for key reset
Mathieu J. Poirier [Thu, 6 Jun 2013 05:51:46 +0000 (22:51 -0700)]
Input: sysrq - request graceful shutdown for key reset

Attempt to reboot the system gracefully when a key combo is detected.
If the reste combination is pressed the 2nd time we assume that graceful
reboot failed and perform emergency reboot. This fucntionality is useful
when UI is stuck but the system is otherwise working fine.

Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: atmel_tsadcc - fix error handing with missing platform data
Wei Yongjun [Tue, 28 May 2013 07:58:19 +0000 (00:58 -0700)]
Input: atmel_tsadcc - fix error handing with missing platform data

If pdata is NULL, atmel_tsadcc_probe() will release all the resources
and return 0, but we need a error code is returned in this case.
Fix to return -EINVAL and move the check for pdata to the begin
of this function.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: add TI-Nspire keypad support
Daniel Tang [Thu, 30 May 2013 20:16:10 +0000 (13:16 -0700)]
Input: add TI-Nspire keypad support

This is a driver for the keypads found on the TI-Nspire series calculators.

Signed-off-by: Daniel Tang <dt.tangr@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: sirfsoc_pwrc - add onkey input driver for CSR SiRFprimaII PWRC
Binghua Duan [Mon, 3 Jun 2013 06:38:46 +0000 (23:38 -0700)]
Input: sirfsoc_pwrc - add onkey input driver for CSR SiRFprimaII PWRC

There is an embedded PWRC(power controller) in SiRFprimaII and SiRFatlasVI,
we have an ONKEY button which can generate interrupt to IRQ controller.
In a typical user scenarios, at the runtime, if users touch the key, we put
system to s2ram status.

Signed-off-by: Binghua Duan <Binghua.Duan@csr.com>
Signed-off-by: Xianglong Du <Xianglong.Du@csr.com>
Signed-off-by: Barry Song <Baohua.Song@csr.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: xilinx_ps2 - remove redundant platform_set_drvdata()
Sachin Kamat [Tue, 28 May 2013 06:40:33 +0000 (23:40 -0700)]
Input: xilinx_ps2 - remove redundant platform_set_drvdata()

Commit 0998d06310 (device-core: Ensure drvdata = NULL when no
driver is bound) removes the need to set driver data field to
NULL.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: pcspkr - remove redundant platform_set_drvdata()
Sachin Kamat [Tue, 28 May 2013 06:40:15 +0000 (23:40 -0700)]
Input: pcspkr - remove redundant platform_set_drvdata()

Commit 0998d06310 (device-core: Ensure drvdata = NULL when no
driver is bound) removes the need to set driver data field to
NULL.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: m68kspkr - remove redundant platform_set_drvdata()
Sachin Kamat [Tue, 28 May 2013 06:40:01 +0000 (23:40 -0700)]
Input: m68kspkr - remove redundant platform_set_drvdata()

Commit 0998d06310 (device-core: Ensure drvdata = NULL when no
driver is bound) removes the need to set driver data field to
NULL.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: ixp4xx-beeper - remove redundant platform_set_drvdata()
Sachin Kamat [Tue, 28 May 2013 06:39:41 +0000 (23:39 -0700)]
Input: ixp4xx-beeper - remove redundant platform_set_drvdata()

Commit 0998d06310 (device-core: Ensure drvdata = NULL when no
driver is bound) removes the need to set driver data field to
NULL.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: navpoint - pass correct pointer to free_irq()
Lars-Peter Clausen [Thu, 23 May 2013 16:30:23 +0000 (09:30 -0700)]
Input: navpoint - pass correct pointer to free_irq()

free_irq() expects the same pointer that was passed to request_irq(),
otherwise the IRQ is not freed.

The issue was found using the following coccinelle script:

<smpl>
@r1@
type T;
T devid;
@@
request_irq(..., devid)

@r2@
type r1.T;
T devid;
position p;
@@
free_irq@p(..., devid)

@@
position p != r2.p;
@@
*free_irq@p(...)
</smpl>

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: pmic8xxx-pwrkey - pass correct pointer to free_irq()
Lars-Peter Clausen [Thu, 23 May 2013 16:30:19 +0000 (09:30 -0700)]
Input: pmic8xxx-pwrkey - pass correct pointer to free_irq()

free_irq() expects the same pointer that was passed to request_irq(),
otherwise the IRQ is not freed.

The issue was found using the following coccinelle script:

<smpl>
@r1@
type T;
T devid;
@@
request_irq(..., devid)

@r2@
type r1.T;
T devid;
position p;
@@
free_irq@p(..., devid)

@@
position p != r2.p;
@@
*free_irq@p(...)
</smpl>

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: ixp4xx-beeper - pass correct pointer to free_irq()
Lars-Peter Clausen [Thu, 23 May 2013 16:30:15 +0000 (09:30 -0700)]
Input: ixp4xx-beeper - pass correct pointer to free_irq()

free_irq() expects the same pointer that was passed to request_irq(),
otherwise the IRQ is not freed.

The issue was found using the following coccinelle script:

<smpl>
@r1@
type T;
T devid;
@@
request_irq(..., devid)

@r2@
type r1.T;
T devid;
position p;
@@
free_irq@p(..., devid)

@@
position p != r2.p;
@@
*free_irq@p(...)
</smpl>

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: w90p910_keypad - pass correct pointer to free_irq()
Lars-Peter Clausen [Thu, 23 May 2013 16:30:12 +0000 (09:30 -0700)]
Input: w90p910_keypad - pass correct pointer to free_irq()

free_irq() expects the same pointer that was passed to request_irq(),
otherwise the IRQ is not freed.

The issue was found using the following coccinelle script:

<smpl>
@r1@
type T;
T devid;
@@
request_irq(..., devid)

@r2@
type r1.T;
T devid;
position p;
@@
free_irq@p(..., devid)

@@
position p != r2.p;
@@
*free_irq@p(...)
</smpl>

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: twl4030_keypad - pass correct pointer to free_irq()
Lars-Peter Clausen [Thu, 23 May 2013 16:30:08 +0000 (09:30 -0700)]
Input: twl4030_keypad - pass correct pointer to free_irq()

free_irq() expects the same pointer that was passed to
request_threaded_irq(), otherwise the IRQ is not freed.

The issue was found using the following coccinelle script:

<smpl>
@r1@
type T;
T devid;
@@
request_threaded_irq(..., devid)

@r2@
type r1.T;
T devid;
position p;
@@
free_irq@p(..., devid)

@@
position p != r2.p;
@@
*free_irq@p(...)
</smpl>

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: pxa27x_keypad - pass correct pointer to free_irq()
Lars-Peter Clausen [Thu, 23 May 2013 16:30:04 +0000 (09:30 -0700)]
Input: pxa27x_keypad - pass correct pointer to free_irq()

free_irq() expects the same pointer that was passed to request_irq(),
otherwise the IRQ is not freed.

The issue was found using the following coccinelle script:

<smpl>
@r1@
type T;
T devid;
@@
request_irq(..., devid)

@r2@
type r1.T;
T devid;
position p;
@@
free_irq@p(..., devid)

@@
position p != r2.p;
@@
*free_irq@p(...)
</smpl>

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: ep93xx_keypad - pass correct pointer to free_irq()
Lars-Peter Clausen [Thu, 23 May 2013 16:29:59 +0000 (09:29 -0700)]
Input: ep93xx_keypad - pass correct pointer to free_irq()

free_irq() expects the same pointer that was passed to request_irq(),
otherwise the IRQ is not freed.

The issue was found using the following coccinelle script:

<smpl>
@r1@
type T;
T devid;
@@
request_irq(..., devid)

@r2@
type r1.T;
T devid;
position p;
@@
free_irq@p(..., devid)

@@
position p != r2.p;
@@
*free_irq@p(...)
</smpl>

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: touchscreen - use platform_{get,set}_drvdata()
Jingoo Han [Thu, 23 May 2013 16:20:26 +0000 (09:20 -0700)]
Input: touchscreen - use platform_{get,set}_drvdata()

Use the wrapper functions for getting and setting the driver data using
platform_device instead of using dev_{get,set}_drvdata() with &pdev->dev,
so we can directly pass a struct platform_device.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: misc - use platform_{get,set}_drvdata()
Jingoo Han [Thu, 23 May 2013 16:20:21 +0000 (09:20 -0700)]
Input: misc - use platform_{get,set}_drvdata()

Use the wrapper functions for getting and setting the driver data using
platform_device instead of using dev_{get,set}_drvdata() with &pdev->dev,
so we can directly pass a struct platform_device.

Also, unnecessary dev_set_drvdata() is removed, because the driver core
clears the driver data to NULL after device_release or on probe failure.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: w90p910_keypad - remove redundant platform_set_drvdata()
Sachin Kamat [Mon, 6 May 2013 14:39:36 +0000 (07:39 -0700)]
Input: w90p910_keypad - remove redundant platform_set_drvdata()

Commit 0998d06310 (device-core: Ensure drvdata = NULL when no
driver is bound) removes the need to set driver data field to
NULL.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Cc: Wan ZongShun <mcuos.com@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: twl4030_keypad - remove redundant platform_set_drvdata()
Sachin Kamat [Mon, 6 May 2013 14:39:14 +0000 (07:39 -0700)]
Input: twl4030_keypad - remove redundant platform_set_drvdata()

Commit 0998d06310 (device-core: Ensure drvdata = NULL when no
driver is bound) removes the need to set driver data field to
NULL.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: tnetv107x-keypad - remove redundant platform_set_drvdata()
Sachin Kamat [Mon, 6 May 2013 14:39:07 +0000 (07:39 -0700)]
Input: tnetv107x-keypad - remove redundant platform_set_drvdata()

Commit 0998d06310 (device-core: Ensure drvdata = NULL when no
driver is bound) removes the need to set driver data field to
NULL.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: spear-keyboard - remove redundant platform_set_drvdata()
Sachin Kamat [Mon, 6 May 2013 14:39:01 +0000 (07:39 -0700)]
Input: spear-keyboard - remove redundant platform_set_drvdata()

Commit 0998d06310 (device-core: Ensure drvdata = NULL when no
driver is bound) removes the need to set driver data field to
NULL.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: sh_keysc - remove redundant platform_set_drvdata()
Sachin Kamat [Mon, 6 May 2013 14:38:51 +0000 (07:38 -0700)]
Input: sh_keysc - remove redundant platform_set_drvdata()

Commit 0998d06310 (device-core: Ensure drvdata = NULL when no
driver is bound) removes the need to set driver data field to
NULL.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: samsung-keypad - remove redundant platform_set_drvdata()
Sachin Kamat [Mon, 6 May 2013 14:37:10 +0000 (07:37 -0700)]
Input: samsung-keypad - remove redundant platform_set_drvdata()

Commit 0998d06310 (device-core: Ensure drvdata = NULL when no
driver is bound) removes the need to set driver data field to
NULL.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Cc: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: pxa930_rotary - remove redundant platform_set_drvdata()
Sachin Kamat [Mon, 6 May 2013 14:36:22 +0000 (07:36 -0700)]
Input: pxa930_rotary - remove redundant platform_set_drvdata()

Commit 0998d06310 (device-core: Ensure drvdata = NULL when no
driver is bound) removes the need to set driver data field to
NULL.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: pxa27x_keypad - remove redundant platform_set_drvdata()
Sachin Kamat [Mon, 6 May 2013 14:35:41 +0000 (07:35 -0700)]
Input: pxa27x_keypad - remove redundant platform_set_drvdata()

Commit 0998d06310 (device-core: Ensure drvdata = NULL when no
driver is bound) removes the need to set driver data field to
NULL.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: pmic8xxx-keypad - remove redundant platform_set_drvdata()
Sachin Kamat [Mon, 6 May 2013 14:35:24 +0000 (07:35 -0700)]
Input: pmic8xxx-keypad - remove redundant platform_set_drvdata()

Commit 0998d06310 (device-core: Ensure drvdata = NULL when no
driver is bound) removes the need to set driver data field to
NULL.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: opencores-kbd - remove redundant platform_set_drvdata()
Sachin Kamat [Mon, 6 May 2013 14:35:06 +0000 (07:35 -0700)]
Input: opencores-kbd - remove redundant platform_set_drvdata()

Commit 0998d06310 (device-core: Ensure drvdata = NULL when no
driver is bound) removes the need to set driver data field to
NULL.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Cc: Javier Herrero <jherrero@hvsistemas.es>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: omap4-keypad - remove redundant platform_set_drvdata()
Sachin Kamat [Mon, 6 May 2013 14:34:41 +0000 (07:34 -0700)]
Input: omap4-keypad - remove redundant platform_set_drvdata()

Commit 0998d06310 (device-core: Ensure drvdata = NULL when no
driver is bound) removes the need to set driver data field to
NULL.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: matrix_keypad - remove redundant platform_set_drvdata()
Sachin Kamat [Mon, 6 May 2013 14:32:57 +0000 (07:32 -0700)]
Input: matrix_keypad - remove redundant platform_set_drvdata()

Commit 0998d06310 (device-core: Ensure drvdata = NULL when no
driver is bound) removes the need to set driver data field to
NULL.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Marek Vasut <marek.vasut@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: jornada720_kbd - remove redundant platform_set_drvdata()
Sachin Kamat [Mon, 6 May 2013 14:32:40 +0000 (07:32 -0700)]
Input: jornada720_kbd - remove redundant platform_set_drvdata()

Commit 0998d06310 (device-core: Ensure drvdata = NULL when no
driver is bound) removes the need to set driver data field to
NULL.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: jornada680_kbd - remove redundant platform_set_drvdata()
Sachin Kamat [Mon, 6 May 2013 14:32:17 +0000 (07:32 -0700)]
Input: jornada680_kbd - remove redundant platform_set_drvdata()

Commit 0998d06310 (device-core: Ensure drvdata = NULL when no
driver is bound) removes the need to set driver data field to
NULL.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: gpio_keys_polled - remove redundant platform_set_drvdata()
Sachin Kamat [Mon, 6 May 2013 14:31:56 +0000 (07:31 -0700)]
Input: gpio_keys_polled - remove redundant platform_set_drvdata()

Commit 0998d06310 (device-core: Ensure drvdata = NULL when no
driver is bound) removes the need to set driver data field to
NULL.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: gpio_keys - remove redundant platform_set_drvdata()
Sachin Kamat [Mon, 6 May 2013 14:31:25 +0000 (07:31 -0700)]
Input: gpio_keys - remove redundant platform_set_drvdata()

Commit 0998d06310 (device-core: Ensure drvdata = NULL when no
driver is bound) removes the need to set driver data field to
NULL.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: davinci_keyscan - remove redundant platform_set_drvdata()
Sachin Kamat [Mon, 6 May 2013 14:25:07 +0000 (07:25 -0700)]
Input: davinci_keyscan - remove redundant platform_set_drvdata()

Commit 0998d06310 (device-core: Ensure drvdata = NULL when no
driver is bound) removes the need to set driver data field to
NULL.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: bf54x-keys - remove redundant platform_set_drvdata()
Sachin Kamat [Mon, 6 May 2013 14:24:23 +0000 (07:24 -0700)]
Input: bf54x-keys - remove redundant platform_set_drvdata()

Commit 0998d06310 (device-core: Ensure drvdata = NULL when no
driver is bound) removes the need to set driver data field to
NULL.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: ep93xx_keypad - remove redundant platform_set_drvdata()
Sachin Kamat [Mon, 6 May 2013 14:25:48 +0000 (07:25 -0700)]
Input: ep93xx_keypad - remove redundant platform_set_drvdata()

Commit 0998d06310 (device-core: Ensure drvdata = NULL when no
driver is bound) removes the need to set driver data field to
NULL.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: amikbd - remove redundant platform_set_drvdata()
Sachin Kamat [Mon, 6 May 2013 14:23:55 +0000 (07:23 -0700)]
Input: amikbd - remove redundant platform_set_drvdata()

Commit 0998d06310 (device-core: Ensure drvdata = NULL when no
driver is bound) removes the need to set driver data field to
NULL.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: w90p910_ts - remove redundant platform_set_drvdata()
Sachin Kamat [Mon, 6 May 2013 14:40:39 +0000 (07:40 -0700)]
Input: w90p910_ts - remove redundant platform_set_drvdata()

Commit 0998d06310 (device-core: Ensure drvdata = NULL when no
driver is bound) removes the need to set driver data field to
NULL.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: gpio_mouse - remove redundant platform_set_drvdata()
Sachin Kamat [Mon, 6 May 2013 03:00:38 +0000 (20:00 -0700)]
Input: gpio_mouse - remove redundant platform_set_drvdata()

Commit 0998d06310 (device-core: Ensure drvdata = NULL when no
driver is bound) removes the need to set driver data field to
NULL.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Hans-Christian Egtvedt <egtvedt@samfundet.no>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: amimouse - remove redundant platform_set_drvdata()
Sachin Kamat [Mon, 6 May 2013 03:00:22 +0000 (20:00 -0700)]
Input: amimouse - remove redundant platform_set_drvdata()

Commit 0998d06310 (device-core: Ensure drvdata = NULL when no
driver is bound) removes the need to set driver data field to
NULL.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: q40kbd - remove redundant platform_set_drvdata()
Sachin Kamat [Mon, 6 May 2013 02:42:33 +0000 (19:42 -0700)]
Input: q40kbd - remove redundant platform_set_drvdata()

Commit 0998d06310 (device-core: Ensure drvdata = NULL when no
driver is bound) removes the need to set driver data field to
NULL.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: at32psif - remove redundant platform_set_drvdata()
Sachin Kamat [Mon, 6 May 2013 02:42:04 +0000 (19:42 -0700)]
Input: at32psif - remove redundant platform_set_drvdata()

Commit 0998d06310 (device-core: Ensure drvdata = NULL when no
driver is bound) removes the need to set driver data field to
NULL.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Hans-Christian Egtvedt <egtvedt@samfundet.no>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: altera_ps2 - remove redundant platform_set_drvdata()
Sachin Kamat [Mon, 6 May 2013 02:41:38 +0000 (19:41 -0700)]
Input: altera_ps2 - remove redundant platform_set_drvdata()

Commit 0998d06310 (device-core: Ensure drvdata = NULL when no
driver is bound) removes the need to set driver data field to
NULL.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Thomas Chou <thomas@wytron.com.tw>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: tnetv107x-ts - remove redundant platform_set_drvdata()
Sachin Kamat [Mon, 6 May 2013 02:41:20 +0000 (19:41 -0700)]
Input: tnetv107x-ts - remove redundant platform_set_drvdata()

Commit 0998d06310 (device-core: Ensure drvdata = NULL when no
driver is bound) removes the need to set driver data field to
NULL.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: ti_am335x_tsc - remove redundant platform_set_drvdata()
Sachin Kamat [Mon, 6 May 2013 02:41:05 +0000 (19:41 -0700)]
Input: ti_am335x_tsc - remove redundant platform_set_drvdata()

Commit 0998d06310 (device-core: Ensure drvdata = NULL when no
driver is bound) removes the need to set driver data field to
NULL.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: mc13783_ts - remove redundant platform_set_drvdata()
Sachin Kamat [Mon, 6 May 2013 02:39:18 +0000 (19:39 -0700)]
Input: mc13783_ts - remove redundant platform_set_drvdata()

Commit 0998d06310 (device-core: Ensure drvdata = NULL when no
driver is bound) removes the need to set driver data field to
NULL.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: jornada720_ts - remove redundant platform_set_drvdata()
Sachin Kamat [Mon, 6 May 2013 02:39:04 +0000 (19:39 -0700)]
Input: jornada720_ts - remove redundant platform_set_drvdata()

Commit 0998d06310 (device-core: Ensure drvdata = NULL when no
driver is bound) removes the need to set driver data field to
NULL.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: intel-mid-touch - remove redundant platform_set_drvdata()
Sachin Kamat [Mon, 6 May 2013 02:38:48 +0000 (19:38 -0700)]
Input: intel-mid-touch - remove redundant platform_set_drvdata()

Commit 0998d06310 (device-core: Ensure drvdata = NULL when no
driver is bound) removes the need to set driver data field to
NULL.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: da9052_tsi - remove redundant platform_set_drvdata()
Sachin Kamat [Mon, 6 May 2013 02:38:34 +0000 (19:38 -0700)]
Input: da9052_tsi - remove redundant platform_set_drvdata()

Commit 0998d06310 (device-core: Ensure drvdata = NULL when no
driver is bound) removes the need to set driver data field to
NULL.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: atmel-wm97xx - remove redundant platform_set_drvdata()
Sachin Kamat [Mon, 6 May 2013 02:38:03 +0000 (19:38 -0700)]
Input: atmel-wm97xx - remove redundant platform_set_drvdata()

Commit 0998d06310 (device-core: Ensure drvdata = NULL when no
driver is bound) removes the need to set driver data field to
NULL.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Hans-Christian Egtvedt <egtvedt@samfundet.no>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: 88pm860x-ts - remove redundant platform_set_drvdata()
Sachin Kamat [Mon, 6 May 2013 02:37:43 +0000 (19:37 -0700)]
Input: 88pm860x-ts - remove redundant platform_set_drvdata()

Commit 0998d06310 (device-core: Ensure drvdata = NULL when no
driver is bound) removes the need to set driver data field to
NULL.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: rotary_encoder - remove redundant platform_set_drvdata()
Sachin Kamat [Mon, 6 May 2013 02:37:01 +0000 (19:37 -0700)]
Input: rotary_encoder - remove redundant platform_set_drvdata()

Commit 0998d06310 (device-core: Ensure drvdata = NULL when no
driver is bound) removes the need to set driver data field to
NULL.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: pwm-beeper - remove redundant platform_set_drvdata()
Sachin Kamat [Mon, 6 May 2013 02:36:43 +0000 (19:36 -0700)]
Input: pwm-beeper - remove redundant platform_set_drvdata()

Commit 0998d06310 (device-core: Ensure drvdata = NULL when no
driver is bound) removes the need to set driver data field to
NULL.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: pmic8xxx-pwrkey - remove redundant platform_set_drvdata()
Sachin Kamat [Mon, 6 May 2013 02:36:26 +0000 (19:36 -0700)]
Input: pmic8xxx-pwrkey - remove redundant platform_set_drvdata()

Commit 0998d06310 (device-core: Ensure drvdata = NULL when no
driver is bound) removes the need to set driver data field to
NULL.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Cc: Trilok Soni <tsoni@codeaurora.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: pm8xxx-vibrator - remove redundant platform_set_drvdata()
Sachin Kamat [Mon, 6 May 2013 02:36:11 +0000 (19:36 -0700)]
Input: pm8xxx-vibrator - remove redundant platform_set_drvdata()

Commit 0998d06310 (device-core: Ensure drvdata = NULL when no
driver is bound) removes the need to set driver data field to
NULL.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: mc13783-pwrbutton - remove redundant platform_set_drvdata()
Sachin Kamat [Mon, 6 May 2013 02:35:57 +0000 (19:35 -0700)]
Input: mc13783-pwrbutton - remove redundant platform_set_drvdata()

Commit 0998d06310 (device-core: Ensure drvdata = NULL when no
driver is bound) removes the need to set driver data field to
NULL.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: max8925_onkey - remove redundant platform_set_drvdata()
Sachin Kamat [Mon, 6 May 2013 02:35:43 +0000 (19:35 -0700)]
Input: max8925_onkey - remove redundant platform_set_drvdata()

Commit 0998d06310 (device-core: Ensure drvdata = NULL when no
driver is bound) removes the need to set driver data field to
NULL.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: gpio_tilt_polled - remove redundant platform_set_drvdata()
Sachin Kamat [Mon, 6 May 2013 02:35:04 +0000 (19:35 -0700)]
Input: gpio_tilt_polled - remove redundant platform_set_drvdata()

Commit 0998d06310 (device-core: Ensure drvdata = NULL when no
driver is bound) removes the need to set driver data field to
NULL.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: bfin_rotary - remove redundant platform_set_drvdata()
Sachin Kamat [Mon, 6 May 2013 02:34:45 +0000 (19:34 -0700)]
Input: bfin_rotary - remove redundant platform_set_drvdata()

Commit 0998d06310 (device-core: Ensure drvdata = NULL when no
driver is bound) removes the need to set driver data field to
NULL.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: ab8500-ponkey - remove redundant platform_set_drvdata()
Sachin Kamat [Mon, 6 May 2013 02:34:17 +0000 (19:34 -0700)]
Input: ab8500-ponkey - remove redundant platform_set_drvdata()

Commit 0998d06310 (device-core: Ensure drvdata = NULL when no
driver is bound) removes the need to set driver data field to
NULL.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: egalax_ts - move to devm_* functions
Andy Shevchenko [Wed, 24 Apr 2013 16:53:25 +0000 (09:53 -0700)]
Input: egalax_ts - move to devm_* functions

The usage of devm_* functions makes code cleaner and tidier.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: trackpoint - Optimize trackpoint init to use power-on reset
Shawn Nematbakhsh [Mon, 15 Apr 2013 20:49:34 +0000 (13:49 -0700)]
Input: trackpoint - Optimize trackpoint init to use power-on reset

The trackpoint driver sets various parameter default values, all of
which happen to be power-on defaults (Source: IBM TrackPoint Engineering
Specification, Version 4.0. Also confirmed by empirical data).

By sending the power-on reset command to reset all parameters to
power-on state, we can skip the lengthy process of programming all
parameters. In testing, ~2.5 secs of time writing parameters was reduced
to .35 seconds waiting for power-on reset to complete.

Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: apbps2 - convert to devm_ioremap_resource()
Sachin Kamat [Mon, 15 Apr 2013 20:38:07 +0000 (13:38 -0700)]
Input: apbps2 - convert to devm_ioremap_resource()

Use the newly introduced devm_ioremap_resource() instead of
devm_request_and_ioremap() which provides more consistent error handling.

devm_ioremap_resource() provides its own error messages; so all explicit
error messages can be removed from the failure code paths.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: ALPS - use %ph to print buffers
Dmitry Torokhov [Thu, 14 Feb 2013 17:04:24 +0000 (09:04 -0800)]
Input: ALPS - use %ph to print buffers

This form is more concise.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoARM - shmobile: Armadillo800EVA: Move st1232 reset pin handling
Bastian Hecht [Mon, 15 Apr 2013 16:40:59 +0000 (09:40 -0700)]
ARM - shmobile: Armadillo800EVA: Move st1232 reset pin handling

We no longer need to set up the reset pin for the st1232 in the board
code, but can pass the GPIO number via the platform data to the driver.
This results in a cleaner grouping of the device setup.

Signed-off-by: Bastian Hecht <hechtb+renesas@gmail.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: st1232 - add reset pin handling
Bastian Hecht [Mon, 15 Apr 2013 16:31:00 +0000 (09:31 -0700)]
Input: st1232 - add reset pin handling

We add the possibility to hand over a GPIO number for the reset pin.
This way we can remove existing board code that takes care of it and
group this information properly in the platform data or in the device
tree configuration.

Signed-off-by: Bastian Hecht <hechtb+renesas@gmail.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: st1232 - convert to devm_* infrastructure
Laurent Pinchart [Mon, 15 Apr 2013 16:23:00 +0000 (09:23 -0700)]
Input: st1232 - convert to devm_* infrastructure

Use the devm_* managed functions to allocate resources.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: MT - handle semi-mt devices in core
Henrik Rydberg [Mon, 8 Apr 2013 03:52:22 +0000 (20:52 -0700)]
Input: MT - handle semi-mt devices in core

Most semi-mt drivers use the slots in a manual way, but really only
need to treat the finger count manually. With this patch, a semi-mt
driver may use the input-mt core for everything else.

Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: adxl34x - use spi_get_drvdata()
Jingoo Han [Mon, 8 Apr 2013 03:52:16 +0000 (20:52 -0700)]
Input: adxl34x - use spi_get_drvdata()

Use the wrapper functions for getting and setting the driver data using
spi_device instead of using dev_{get|set}_drvdata with &spi->dev, so we
can directly pass a struct spi_device.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: ad7877 - use spi_get_drvdata() and spi_set_drvdata()
Jingoo Han [Mon, 8 Apr 2013 03:52:12 +0000 (20:52 -0700)]
Input: ad7877 - use spi_get_drvdata() and spi_set_drvdata()

Use the wrapper functions for getting and setting the driver data using
spi_device instead of using dev_{get|set}_drvdata with &spi->dev, so we
can directly pass a struct spi_device.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: ads7846 - use spi_get_drvdata() and spi_set_drvdata()
Jingoo Han [Mon, 8 Apr 2013 03:52:07 +0000 (20:52 -0700)]
Input: ads7846 - use spi_get_drvdata() and spi_set_drvdata()

Use the wrapper functions for getting and setting the driver data using
spi_device instead of using dev_{get|set}_drvdata with &spi->dev, so we
can directly pass a struct spi_device.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: ims-pcu - fix a memory leak on error
Dmitry Torokhov [Mon, 1 Apr 2013 08:09:15 +0000 (01:09 -0700)]
Input: ims-pcu - fix a memory leak on error

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: sysrq - supplement reset sequence with timeout functionality
Mathieu J. Poirier [Tue, 2 Apr 2013 05:14:19 +0000 (22:14 -0700)]
Input: sysrq - supplement reset sequence with timeout functionality

Some devices have too few buttons, which it makes it hard to have
a reset combo that won't trigger automatically.  As such a
timeout functionality that requires the combination to be held for
a given amount of time before triggering is introduced.

If a key combo is recognized and held for a 'timeout' amount of time,
the system triggers a reset.  If the timeout value is omitted the
driver simply ignores the functionality.

Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: tegra-kbc - support for defining row/columns based on SoC
Laxman Dewangan [Sun, 31 Mar 2013 07:41:12 +0000 (00:41 -0700)]
Input: tegra-kbc - support for defining row/columns based on SoC

NVIDIA's Tegra20 and Tegra30 supports the 16x8 keyboard matrix and T114
support the 11x8 Key matrix.

Add support for defining the maximum row/columns based on SoC through
proper compatibility.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: imx_keypad - switch to using managed resources
Fabio Estevam [Sun, 31 Mar 2013 07:38:21 +0000 (00:38 -0700)]
Input: imx_keypad - switch to using managed resources

Using devm_ functions can make the code cleaner and simpler.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: arc_ps2 - add support for device tree
Mischa Jonker [Sun, 31 Mar 2013 07:25:33 +0000 (00:25 -0700)]
Input: arc_ps2 - add support for device tree

Add match table for device tree binding and dts binding doc.

Signed-off-by: Mischa Jonker <mjonker@synopsys.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: mma8450 - fix signed 12bits to 32bits conversion
Sebastien Royen [Sun, 31 Mar 2013 07:24:13 +0000 (00:24 -0700)]
Input: mma8450 - fix signed 12bits to 32bits conversion

Event value is wrong. Should be in range -2048 to 2047, but is in
range 0 to 4095.  Use s8 to int conversion and remove 0xfff mask.

Signed-off-by: Sebastien Royen <sebastien.royen@armadeus.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: eeti_ts - remove redundant null check
Sachin Kamat [Thu, 28 Mar 2013 08:14:46 +0000 (01:14 -0700)]
Input: eeti_ts - remove redundant null check

'pdata' is already dereferenced earlier. Hence this check is
meaningless.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: edt-ft5x06 - remove redundant null check before kfree
Sachin Kamat [Thu, 28 Mar 2013 08:14:42 +0000 (01:14 -0700)]
Input: edt-ft5x06 - remove redundant null check before kfree

kfree on a null pointer is a no-op. Hence null check is not
necessary.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: ad714x - add CONFIG_PM_SLEEP to suspend/resume functions
Jingoo Han [Wed, 27 Mar 2013 04:38:52 +0000 (21:38 -0700)]
Input: ad714x - add CONFIG_PM_SLEEP to suspend/resume functions

Add CONFIG_PM_SLEEP to suspend/resume functions to fix the following
build warning when CONFIG_PM_SLEEP is not selected. This is because
sleep PM callbacks defined by SIMPLE_DEV_PM_OPS are only used when
the CONFIG_PM_SLEEP is enabled.

drivers/input/misc/ad714x-i2c.c:17:12: warning: 'ad714x_i2c_suspend' defined but not used [-Wunused-function]
drivers/input/misc/ad714x-i2c.c:22:12: warning: 'ad714x_i2c_resume' defined but not used [-Wunused-function]
drivers/input/misc/ad714x-spi.c:20:12: warning: 'ad714x_spi_suspend' defined but not used [-Wunused-function]
drivers/input/misc/ad714x-spi.c:25:12: warning: 'ad714x_spi_resume' defined but not used [-Wunused-function]

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: adxl34x - add CONFIG_PM_SLEEP to suspend/resume functions
Jingoo Han [Wed, 27 Mar 2013 04:38:47 +0000 (21:38 -0700)]
Input: adxl34x - add CONFIG_PM_SLEEP to suspend/resume functions

Add CONFIG_PM_SLEEP to suspend/resume functions to fix the following
build warning when CONFIG_PM_SLEEP is not selected. This is because
sleep PM callbacks defined by SIMPLE_DEV_PM_OPS are only used when
the CONFIG_PM_SLEEP is enabled.

drivers/input/misc/adxl34x-spi.c:98:12: warning: 'adxl34x_spi_suspend' defined but not used [-Wunused-function]
drivers/input/misc/adxl34x-spi.c:108:12: warning: 'adxl34x_spi_resume' defined but not used [-Wunused-function]
drivers/input/misc/adxl34x-i2c.c:109:12: warning: 'adxl34x_i2c_suspend' defined but not used [-Wunused-function]
drivers/input/misc/adxl34x-i2c.c:119:12: warning: 'adxl34x_i2c_resume' defined but not used [-Wunused-function]

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: mc13783_ts - use module_platform_driver_probe()
Fabio Porcedda [Mon, 18 Mar 2013 04:31:03 +0000 (21:31 -0700)]
Input: mc13783_ts - use module_platform_driver_probe()

This patch converts the drivers to use the
module_platform_driver_probe() macro which makes the code smaller and
a bit simpler.

Signed-off-by: Fabio Porcedda <fabio.porcedda@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: atmel-wm97xx - use module_platform_driver_probe macro
Sachin Kamat [Mon, 18 Mar 2013 04:29:07 +0000 (21:29 -0700)]
Input: atmel-wm97xx - use module_platform_driver_probe macro

module_platform_driver_probe() eliminates the boilerplate and simplifies
the code.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: q40kbd - use module_platform_driver_probe macro
Sachin Kamat [Mon, 18 Mar 2013 04:28:28 +0000 (21:28 -0700)]
Input: q40kbd - use module_platform_driver_probe macro

module_platform_driver_probe() eliminates the boilerplate and simplifies
the code.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: at32psif - use module_platform_driver_probe macro
Sachin Kamat [Mon, 18 Mar 2013 04:28:14 +0000 (21:28 -0700)]
Input: at32psif - use module_platform_driver_probe macro

module_platform_driver_probe() eliminates the boilerplate and simplifies
the code.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: amimouse - use module_platform_driver_probe macro
Sachin Kamat [Mon, 18 Mar 2013 04:28:00 +0000 (21:28 -0700)]
Input: amimouse - use module_platform_driver_probe macro

module_platform_driver_probe() eliminates the boilerplate and simplifies
the code.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: nomadik-ske-keypad - use module_platform_driver_probe macro
Sachin Kamat [Mon, 18 Mar 2013 04:27:41 +0000 (21:27 -0700)]
Input: nomadik-ske-keypad - use module_platform_driver_probe macro

module_platform_driver_probe() eliminates the boilerplate and simplifies
the code.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: amikbd - use module_platform_driver_probe macro
Sachin Kamat [Mon, 18 Mar 2013 04:27:11 +0000 (21:27 -0700)]
Input: amikbd - use module_platform_driver_probe macro

module_platform_driver_probe() eliminates the boilerplate and simplifies
the code.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: twl4030-pwrbutton - use module_platform_driver_probe macro
Sachin Kamat [Mon, 18 Mar 2013 04:26:44 +0000 (21:26 -0700)]
Input: twl4030-pwrbutton - use module_platform_driver_probe macro

module_platform_driver_probe() eliminates the boilerplate and simplifies
the code.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: davinci_keyscan - use module_platform_driver_probe macro
Sachin Kamat [Mon, 18 Mar 2013 04:26:22 +0000 (21:26 -0700)]
Input: davinci_keyscan - use module_platform_driver_probe macro

module_platform_driver_probe() simplifies the code by eliminating
boilerplate code.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: tegra-kbc - convert to devm_ioremap_resource()
Sachin Kamat [Mon, 18 Mar 2013 04:30:05 +0000 (21:30 -0700)]
Input: tegra-kbc - convert to devm_ioremap_resource()

Use the newly introduced devm_ioremap_resource() instead of
devm_request_and_ioremap() which provides more consistent error handling.

devm_ioremap_resource() provides its own error messages; so all explicit
error messages can be removed from the failure code paths.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Reviewed-by: Thierry Reding <thierry.reding@avionic-design.de>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoMerge tag 'v3.9-rc3' into next
Dmitry Torokhov [Mon, 18 Mar 2013 02:40:50 +0000 (19:40 -0700)]
Merge tag 'v3.9-rc3' into next

Merge with mainline to bring in module_platform_driver_probe() and
devm_ioremap_resource().

11 years agoLinux 3.9-rc3
Linus Torvalds [Sun, 17 Mar 2013 22:59:32 +0000 (15:59 -0700)]
Linux 3.9-rc3

11 years agoperf,x86: fix link failure for non-Intel configs
David Rientjes [Sun, 17 Mar 2013 22:49:10 +0000 (15:49 -0700)]
perf,x86: fix link failure for non-Intel configs

Commit 1d9d8639c063 ("perf,x86: fix kernel crash with PEBS/BTS after
suspend/resume") introduces a link failure since
perf_restore_debug_store() is only defined for CONFIG_CPU_SUP_INTEL:

arch/x86/power/built-in.o: In function `restore_processor_state':
(.text+0x45c): undefined reference to `perf_restore_debug_store'

Fix it by defining the dummy function appropriately.

Signed-off-by: David Rientjes <rientjes@google.com>
Cc: stable@vger.kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
11 years agoperf,x86: fix wrmsr_on_cpu() warning on suspend/resume
Linus Torvalds [Sun, 17 Mar 2013 22:44:43 +0000 (15:44 -0700)]
perf,x86: fix wrmsr_on_cpu() warning on suspend/resume

Commit 1d9d8639c063 ("perf,x86: fix kernel crash with PEBS/BTS after
suspend/resume") fixed a crash when doing PEBS performance profiling
after resuming, but in using init_debug_store_on_cpu() to restore the
DS_AREA mtrr it also resulted in a new WARN_ON() triggering.

init_debug_store_on_cpu() uses "wrmsr_on_cpu()", which in turn uses CPU
cross-calls to do the MSR update.  Which is not really valid at the
early resume stage, and the warning is quite reasonable.  Now, it all
happens to _work_, for the simple reason that smp_call_function_single()
ends up just doing the call directly on the CPU when the CPU number
matches, but we really should just do the wrmsr() directly instead.

This duplicates the wrmsr() logic, but hopefully we can just remove the
wrmsr_on_cpu() version eventually.

Reported-and-tested-by: Parag Warudkar <parag.lkml@gmail.com>
Cc: stable@vger.kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>