]> git.karo-electronics.de Git - linux-beck.git/log
linux-beck.git
10 years agoInput: zforce - add regulator handling
Heiko Stuebner [Mon, 21 Jul 2014 17:02:11 +0000 (10:02 -0700)]
Input: zforce - add regulator handling

It's possible that the controller has an individually switchable power supply.
Therefore add support to control a supplying regulator.

As this is not always the case, the regulator is requested as optional.

Signed-off-by: Heiko Stuebner <heiko.stuebner@bq.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
10 years agoInput: s3c2410_ts - fix preparing/enabling clock
Vasily Khoruzhick [Wed, 9 Jul 2014 00:57:42 +0000 (17:57 -0700)]
Input: s3c2410_ts - fix preparing/enabling clock

Use clk_prepare_enable/clk_disable_unprepare to make the driver
work properly with common clock framework.

Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Reviewed-by: Tomasz Figa <t.figa@samsung.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
10 years agoInput: add support for Wacom protocol 4 serial tablets
Hans de Goede [Sun, 20 Jul 2014 20:35:44 +0000 (13:35 -0700)]
Input: add support for Wacom protocol 4 serial tablets

Recent version of xf86-input-wacom no longer support directly accessing
serial tablets. Instead xf86-input-wacom now expects all wacom tablets to
be driven by the kernel and to show up as evdev devices.

This has caused old serial Wacom tablets to stop working for people who still
have such tablets. Julian Squires has written a serio input driver to fix this:
https://github.com/tokenrove/wacom-serial-iv

This is a cleaned up version of this driver with improved Graphire support
(I own an old Graphire myself).

Signed-off-by: Julian Squires <julian@cipht.net>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
10 years agoInput: max7359 - introduce the use of managed interfaces
Himangi Saraogi [Sat, 19 Jul 2014 23:16:02 +0000 (16:16 -0700)]
Input: max7359 - introduce the use of managed interfaces

This patch introduces the use of managed interfaces like devm_kzalloc,
devm_input_allocate_device, devm_request_threaded_irq etc. and does away
with the calls to free the allocated memory. The remove function is no
longer required and is completely done away with. Also, the labels in the
probe function are removed.

Signed-off-by: Himangi Saraogi <himangi774@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
10 years agoInput: add driver for Microchip's CAP1106
Daniel Mack [Tue, 15 Jul 2014 16:47:52 +0000 (09:47 -0700)]
Input: add driver for Microchip's CAP1106

This patch adds a driver for Microchips CAP1106, an I2C driven, 6-channel
capacitive touch sensor.

For now, only the capacitive buttons are supported, and no specific
settings that can be tweaked for individual channels, except for the
device-wide sensitivity gain. The defaults seem to work just fine out of
the box, so I'll leave configurable parameters for someone who's in need
of them and who can actually measure the impact. All registers are
prepared, however. Many of them are just not used for now.

The implementation does not make any attempt to be compatible to platform
data driven boards, but fully depends on CONFIG_OF.

Power management functions are also left for volounteers with the ability
to actually test them.

Signed-off-by: Daniel Mack <zonque@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
10 years agoInput: edt-ft5x06 - remove unnecessary null test
Fabian Frederick [Wed, 9 Jul 2014 16:45:57 +0000 (09:45 -0700)]
Input: edt-ft5x06 - remove unnecessary null test

Fix checkpatch warning:
"WARNING: debugfs_remove_recursive(NULL) is safe this check is probably not required"

Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
10 years agoInput: keyspan_remote - remove unnecessary break after goto
Fabian Frederick [Wed, 9 Jul 2014 00:56:23 +0000 (17:56 -0700)]
Input: keyspan_remote - remove unnecessary break after goto

Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
10 years agoInput: atmel_mxt_ts - fix invalid return from mxt_get_bootloader_version
Nick Dyer [Sun, 8 Jun 2014 06:17:26 +0000 (23:17 -0700)]
Input: atmel_mxt_ts - fix invalid return from mxt_get_bootloader_version

The patch e57a66aa8534: "Input: atmel_mxt_ts - read and report
bootloader version" from May 18, 2014, leads to the following static
checker warning:

drivers/input/touchscreen/atmel_mxt_ts.c:437 mxt_get_bootloader_version()
warn: signedness bug returning '(-5)'

drivers/input/touchscreen/atmel_mxt_ts.c
   429  static u8 mxt_get_bootloader_version(struct mxt_data *data, u8 val)
   430  {
   431          struct device *dev = &data->client->dev;
   432          u8 buf[3];
   433
   434          if (val & MXT_BOOT_EXTENDED_ID) {
   435                  if (mxt_bootloader_read(data, &buf[0], 3) != 0) {
   436                          dev_err(dev, "%s: i2c failure\n", __func__);
   437                          return -EIO;
                                       ^^^^
This gets truncated into a number from 0-255 and anyway the caller
doesn't check for errors.

(reported by Dan Carpenter)

Signed-off-by: Nick Dyer <nick.dyer@itdev.co.uk>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
10 years agoInput: max8997_haptic - add error handling for regulator and pwm
Sachin Kamat [Sun, 8 Jun 2014 06:10:25 +0000 (23:10 -0700)]
Input: max8997_haptic - add error handling for regulator and pwm

Let's start checking return value of regulator_enable and pwm_enable to
avoid errors. Fixes the following warning:

drivers/input/misc/max8997_haptic.c:185:19: warning: ignoring return value of ‘regulator_enable’, declared with attribute warn_unused_result [-Wunused-result]

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
10 years agoInput: elantech - don't set bit 1 of reg_10 when the no_hw_res quirk is set
Hans de Goede [Sun, 8 Jun 2014 06:07:13 +0000 (23:07 -0700)]
Input: elantech - don't set bit 1 of reg_10 when the no_hw_res quirk is set

The touchpad on the GIGABYTE U2442 not only stops communicating when we try
to set bit 3 (enable real hardware resolution) of reg_10, but on some BIOS
versions also when we set bit 1 (enable two finger mode auto correct).

I've asked the original reporter of:
https://bugzilla.kernel.org/show_bug.cgi?id=61151

To check that not setting bit 1 does not lead to any adverse effects on his
model / BIOS revision, and it does not, so this commit fixes the touchpad
not working on these versions by simply never setting bit 1 for laptop
models with the no_hw_res quirk.

Reported-and-tested-by: James Lademann <jwlademann@gmail.com>
Tested-by: Philipp Wolfer <ph.wolfer@gmail.com>
Cc: stable@vger.kernel.org
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
10 years agoInput: elantech - deal with clickpads reporting right button events
Hans de Goede [Sun, 8 Jun 2014 05:35:07 +0000 (22:35 -0700)]
Input: elantech - deal with clickpads reporting right button events

At least the Dell Vostro 5470 elantech *clickpad* reports right button
clicks when clicked in the right bottom area:

https://bugzilla.redhat.com/show_bug.cgi?id=1103528

This is different from how (elantech) clickpads normally operate, normally
no matter where the user clicks on the pad the pad always reports a left
button event, since there is only 1 hardware button beneath the path.

It looks like Dell has put 2 buttons under the pad, one under each bottom
corner, causing this.

Since this however still clearly is a real clickpad hardware-wise, we still
want to report it as such to userspace, so that things like finger movement
in the bottom area can be properly ignored as it should be on clickpads.

So deal with this weirdness by simply mapping a right click to a left click
on elantech clickpads. As an added advantage this is something which we can
simply do on all elantech clickpads, so no need to add special quirks for
this weird model.

Reported-and-tested-by: Elder Marco <eldermarco@gmail.com>
Cc: stable@vger.kernel.org
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
10 years agoInput: edt-ft5x06 - fix an i2c write for M09 support
Robert Woerle [Sun, 8 Jun 2014 05:20:23 +0000 (22:20 -0700)]
Input: edt-ft5x06 - fix an i2c write for M09 support

The driver sends 3 bytes instead of 2 when accessing a register on the M09
firmware, so writing to gain seems to overflow into the offset register.

Signed-off-by: Robert Woerle <robert@linuxdevelopment.de>
Acked-By: Simon Budig <simon.budig@kernelconcepts.de>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
10 years agoInput: omap-keypad - remove platform data support
Joachim Eastwood [Thu, 29 May 2014 07:30:02 +0000 (00:30 -0700)]
Input: omap-keypad - remove platform data support

This is unused since all users (OMAP4/5) are DT only.

Signed-off-by: Joachim Eastwood <manabian@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
10 years agoARM: OMAP2+: remove unused omap4-keypad file and code
Joachim Eastwood [Thu, 29 May 2014 07:29:31 +0000 (00:29 -0700)]
ARM: OMAP2+: remove unused omap4-keypad file and code

This has been unused since omap4 board files went away.

Signed-off-by: Joachim Eastwood <manabian@gmail.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
10 years agoInput: ab8500-ponkey - switch to using managed resources
Himangi Saraogi [Thu, 29 May 2014 07:23:39 +0000 (00:23 -0700)]
Input: ab8500-ponkey - switch to using managed resources

Let's switch the driver to use managed resources, this will simplify
error handling and driver unbinding logic.

Signed-off-by: Himangi Saraogi <himangi774@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
10 years agoInput: max8925_onkey - switch to using managed resources
Himangi Saraogi [Thu, 29 May 2014 07:21:56 +0000 (00:21 -0700)]
Input: max8925_onkey - switch to using managed resources

Let's switch the driver to use managed resources, this will simplify
error handling and driver unbinding logic.

Signed-off-by: Himangi Saraogi <himangi774@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
10 years agoInput: 88pm860x-ts - switch to using managed resources
Himangi Saraogi [Thu, 29 May 2014 07:19:45 +0000 (00:19 -0700)]
Input: 88pm860x-ts - switch to using managed resources

Let's switch the driver to use managed resources, this will simplify
error handling and driver unbinding logic.

Signed-off-by: Himangi Saraogi <himangi774@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
10 years agoInput: 88pm860x_onkey - switch to using managed resources
Himangi Saraogi [Thu, 29 May 2014 07:17:59 +0000 (00:17 -0700)]
Input: 88pm860x_onkey - switch to using managed resources

Let's switch the driver to use managed resources, this will simplify
error handling and driver unbinding logic.

Signed-off-by: Himangi Saraogi <himangi774@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
10 years agoInput: intel-mid-touch - switch to using managed resources
Himangi Saraogi [Thu, 29 May 2014 07:11:09 +0000 (00:11 -0700)]
Input: intel-mid-touch - switch to using managed resources

Let's switch the driver to use managed resources, this will simplify
error handling and driver unbinding logic.

Signed-off-by: Himangi Saraogi <himangi774@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
10 years agoInput: wacom - process outbound for newer Cintiqs
Ping Cheng [Thu, 29 May 2014 07:08:41 +0000 (00:08 -0700)]
Input: wacom - process outbound for newer Cintiqs

New Cintiq tablets have a 200 tablet counts outside of screen area.
Add x/y_min for ABS_X/Y to pass this information to userland.

Signed-off-by: Ping Cheng <pingc@wacom.com>
Reviewed-by: Jason Gerecke <killertofu@gmail.com>
Tested-by: Jason Gerecke <killertofu@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
10 years agoInput: wacom - set stylus_in_proximity when pen is in range
Ping Cheng [Thu, 29 May 2014 07:08:20 +0000 (00:08 -0700)]
Input: wacom - set stylus_in_proximity when pen is in range

Signed-off-by: Ping Cheng <pingc@wacom.com>
Reviewed-by: Jason Gerecke <killertofu@gmail.com>
Tested-by: Jason Gerecke <killertofu@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
10 years agoDTS: ARM: OMAP3-N900: Add tsc2005 support
Sebastian Reichel [Thu, 29 May 2014 07:03:59 +0000 (00:03 -0700)]
DTS: ARM: OMAP3-N900: Add tsc2005 support

This adds support for the tsc2005 touchscreen
to the Nokia N900 DTS file.

Signed-off-by: Sebastian Reichel <sre@kernel.org>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
10 years agoInput: tsc2005 - add DT support
Sebastian Reichel [Thu, 29 May 2014 06:57:29 +0000 (23:57 -0700)]
Input: tsc2005 - add DT support

This adds DT support to the tsc2005 touchscreen driver. It also adds
regulator support to the driver if booted via DT.

Reviewed-by: Pavel Machek <pavel@ucw.cz>
Acked-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Sebastian Reichel <sre@kernel.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
10 years agoInput: add common DT binding for touchscreens
Sebastian Reichel [Thu, 29 May 2014 06:51:53 +0000 (23:51 -0700)]
Input: add common DT binding for touchscreens

Add common DT binding documentation for touchscreen devices and
implement input_parse_touchscreen_of_params, which parses the common
properties and configures the input device accordingly.

The method currently does not interpret the axis inversion properties,
since there is no matching flag in the generic linux input device.

Reviewed-by: Pavel Machek <pavel@ucw.cz>
Acked-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Sebastian Reichel <sre@kernel.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
10 years agoInput: jornada680_kbd - switch top using managed resources
Himangi Saraogi [Mon, 26 May 2014 05:30:19 +0000 (22:30 -0700)]
Input: jornada680_kbd - switch top using managed resources

Let's switch the driver to use managed resources, this will simplify
error handling and driver unbinding logic.

Signed-off-by: Himangi Saraogi <himangi774@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
10 years agoInput: adp5520-keys - switch to using managed resources
Himangi Saraogi [Thu, 22 May 2014 17:40:42 +0000 (10:40 -0700)]
Input: adp5520-keys - switch to using managed resources

Let's switch the driver to use managed resources, this will simplify
error handling and driver unbinding logic.

Signed-off-by: Himangi Saraogi <himangi774@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
10 years agoInput: da9034-ts - switch to using managed resources
Himangi Saraogi [Wed, 21 May 2014 15:27:06 +0000 (08:27 -0700)]
Input: da9034-ts - switch to using managed resources

Let's switch the driver to use managed resources, this will simplify error
handling and allows us to get rid of da9034_touch_remove().

Signed-off-by: Himangi Saraogi <himangi774@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
10 years agoInput: mcs5000_ts - switch to using managed resources
Beomho Seo [Mon, 26 May 2014 20:36:13 +0000 (13:36 -0700)]
Input: mcs5000_ts - switch to using managed resources

Let's switch the driver to use managed resources, this will simplify
error handling and driver unbinding logic.

Signed-off-by: Beomho Seo <beomho.seo@samsung.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
10 years agoInput: mcs5000_ts - fix incorrect input device name
Beomho Seo [Tue, 27 May 2014 17:22:12 +0000 (10:22 -0700)]
Input: mcs5000_ts - fix incorrect input device name

This patch fix a typo error in MELFAS MCS-5000 controller driver.

Signed-off-by: Beomho Seo <beomho.seo@samsung.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
10 years agoInput: mms114 - fix incorrect input device name
Beomho Seo [Tue, 27 May 2014 17:21:51 +0000 (10:21 -0700)]
Input: mms114 - fix incorrect input device name

This patch fix a typo error in mms114 touchscreen driver.

Signed-off-by: Beomho Seo <beomho.seo@samsung.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
10 years agoInput: mcs_touchkey - fix incorrect input device name
Beomho Seo [Tue, 27 May 2014 17:21:34 +0000 (10:21 -0700)]
Input: mcs_touchkey - fix incorrect input device name

This patch fix a typo error in MELFAS 5000/5080 controller driver.

Signed-off-by: Beomho Seo <beomho.seo@samsung.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
10 years agoInput: soc_button_array - remove duplicate inclusion of input.h
Sachin Kamat [Wed, 28 May 2014 16:34:25 +0000 (09:34 -0700)]
Input: soc_button_array - remove duplicate inclusion of input.h

input.h was included twice.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
10 years agoInput: atmel_mxt_ts - handle multiple input reports in one message
Nick Dyer [Mon, 19 May 2014 06:22:22 +0000 (23:22 -0700)]
Input: atmel_mxt_ts - handle multiple input reports in one message

Signed-off-by: Nick Dyer <nick.dyer@itdev.co.uk>
Acked-by: Benson Leung <bleung@chromium.org>
Acked-by: Yufeng Shen <miletus@chromium.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
10 years agoInput: atmel_mxt_ts - rename touchscreen defines to include T9
Nick Dyer [Mon, 19 May 2014 06:22:04 +0000 (23:22 -0700)]
Input: atmel_mxt_ts - rename touchscreen defines to include T9

This avoids confusion with the newer T100 touchscreen object.

Signed-off-by: Nick Dyer <nick.dyer@itdev.co.uk>
Acked-by: Benson Leung <bleung@chromium.org>
Acked-by: Yufeng Shen <miletus@chromium.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
10 years agoInput: atmel_mxt_ts - rename pressure to amplitude to match spec
Nick Dyer [Mon, 19 May 2014 06:21:48 +0000 (23:21 -0700)]
Input: atmel_mxt_ts - rename pressure to amplitude to match spec

Signed-off-by: Nick Dyer <nick.dyer@itdev.co.uk>
Acked-by: Benson Leung <bleung@chromium.org>
Acked-by: Yufeng Shen <miletus@chromium.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
10 years agoInput: atmel_mxt_ts - read screen config from chip
Nick Dyer [Mon, 19 May 2014 06:16:49 +0000 (23:16 -0700)]
Input: atmel_mxt_ts - read screen config from chip

By reading the touchscreen configuration from the settings that the
maXTouch chip is actually using, we can remove some platform data.

The matrix size is not used for anything, and results in some rather
confusing code to re-read it because it may change when configuration
is downloaded, so don't print it out.

Signed-off-by: Nick Dyer <nick.dyer@itdev.co.uk>
Acked-by: Benson Leung <bleung@chromium.org>
Acked-by: Yufeng Shen <miletus@chromium.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
10 years agoInput: atmel_mxt_ts - add check for incorrect firmware file format
Nick Dyer [Mon, 19 May 2014 06:15:01 +0000 (23:15 -0700)]
Input: atmel_mxt_ts - add check for incorrect firmware file format

Atmel supplies firmware files in ASCII HEX format (.enc) which must be
converted before they can be loaded by kernel driver. Try to detect
the error and print a friendly error message rather than feeding junk
to the bootloader.

Signed-off-by: Nick Dyer <nick.dyer@itdev.co.uk>
Acked-by: Benson Leung <bleung@chromium.org>
Acked-by: Yufeng Shen <miletus@chromium.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
10 years agoInput: atmel_mxt_ts - improve bootloader progress output
Nick Dyer [Mon, 19 May 2014 06:14:45 +0000 (23:14 -0700)]
Input: atmel_mxt_ts - improve bootloader progress output

By implementing a frame counter, print out fewer debug messages (the
firmware may contain hundreds of frames).

Signed-off-by: Nick Dyer <nick.dyer@itdev.co.uk>
Acked-by: Benson Leung <bleung@chromium.org>
Acked-by: Yufeng Shen <miletus@chromium.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
10 years agoInput: atmel_mxt_ts - implement bootloader frame retries
Nick Dyer [Mon, 19 May 2014 06:14:20 +0000 (23:14 -0700)]
Input: atmel_mxt_ts - implement bootloader frame retries

Signed-off-by: Nick Dyer <nick.dyer@itdev.co.uk>
Acked-by: Benson Leung <bleung@chromium.org>
Acked-by: Yufeng Shen <miletus@chromium.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
10 years agoInput: atmel_mxt_ts - read and report bootloader version
Nick Dyer [Mon, 19 May 2014 06:13:40 +0000 (23:13 -0700)]
Input: atmel_mxt_ts - read and report bootloader version

Signed-off-by: Nick Dyer <nick.dyer@itdev.co.uk>
Acked-by: Benson Leung <bleung@chromium.org>
Acked-by: Yufeng Shen <miletus@chromium.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
10 years agoInput: atmel_mxt_ts - add additional bootloader addresses
Nick Dyer [Mon, 19 May 2014 06:10:49 +0000 (23:10 -0700)]
Input: atmel_mxt_ts - add additional bootloader addresses

Move bootloaders reads/writes into separate functions. Instead of switching
client->addr, define new field bootloader_addr in mxt_data. Implement
lookup calculation for bootloader addresses.

Signed-off-by: Nick Dyer <nick.dyer@itdev.co.uk>
Acked-by: Benson Leung <bleung@chromium.org>
Acked-by: Yufeng Shen <miletus@chromium.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
10 years agoInput: atmel_mxt_ts - implement CRC check for configuration data
Nick Dyer [Mon, 19 May 2014 06:04:46 +0000 (23:04 -0700)]
Input: atmel_mxt_ts - implement CRC check for configuration data

The configuration is stored in NVRAM on the maXTouch chip. When the device
is reset it reports a CRC of the stored configuration values. Therefore it
isn't necessary to send the configuration on each probe - we can check the
CRC matches and avoid a timeconsuming backup/reset cycle.

Signed-off-by: Nick Dyer <nick.dyer@itdev.co.uk>
Acked-by: Benson Leung <bleung@chromium.org>
Acked-by: Yufeng Shen <miletus@chromium.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
10 years agoInput: atmel_mxt_ts - improve error reporting and debug
Nick Dyer [Mon, 19 May 2014 06:04:09 +0000 (23:04 -0700)]
Input: atmel_mxt_ts - improve error reporting and debug

- Add error messages for probe errors
- Report type in invalid object type
- Tweak some other debug output messages

Signed-off-by: Nick Dyer <nick.dyer@itdev.co.uk>
Acked-by: Benson Leung <bleung@chromium.org>
Acked-by: Yufeng Shen <miletus@chromium.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
10 years agoInput: atmel_mxt_ts - make wait-after-reset period compatible with all chips
Iiro Valkonen [Mon, 19 May 2014 06:03:44 +0000 (23:03 -0700)]
Input: atmel_mxt_ts - make wait-after-reset period compatible with all chips

The delay before the chip can be accessed after reset varies between
different chips in maXTouch family. Waiting for an interrupt and a T6
status message with the RESET bit set is a better behaviour.

Signed-off-by: Nick Dyer <nick.dyer@itdev.co.uk>
Acked-by: Benson Leung <bleung@chromium.org>
Acked-by: Yufeng Shen <miletus@chromium.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
10 years agoInput: atmel_mxt_ts - wait for CHG after bootloader resets
Benson Leung [Mon, 19 May 2014 06:03:09 +0000 (23:03 -0700)]
Input: atmel_mxt_ts - wait for CHG after bootloader resets

Rather than msleep for MXT_RESET_TIME and MXT_FWRESET_TIME during the
transition to bootloader mode and the transition back from app, wait for
the CHG assert to indicate that the transition is done.

This change replaces the msleep with a wait for completion that the
mxt_interrupt handler signals.

Also add CHG poll after last firmware frame - some bootloader versions will
assert the interrupt line after the final frame, in testing this meant that
the driver attempts to read the info block too early whilst the chip is
still resetting.

This improves firmware update time as we no longer wait longer than
necessary for each reset.

Signed-off-by: Benson Leung <bleung@chromium.org>
Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
Signed-off-by: Nick Dyer <nick.dyer@itdev.co.uk>
Acked-by: Yufeng Shen <miletus@chromium.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
10 years agoInput: atmel_mxt_ts - wait for CHG assert in mxt_check_bootloader
Benson Leung [Mon, 19 May 2014 06:02:52 +0000 (23:02 -0700)]
Input: atmel_mxt_ts - wait for CHG assert in mxt_check_bootloader

The driver should not immediately read bootloader status when in
Application Update Mode. The CHG line will assert when the device has made
a state transition and is ready to report a new status via i2c.

This change adds a wait for completion in mxt_check_bootloader, and changes
the mxt_interrupt handler to signal the completion.

Signed-off-by: Benson Leung <bleung@chromium.org>
Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
Signed-off-by: Nick Dyer <nick.dyer@itdev.co.uk>
Acked-by: Yufeng Shen <miletus@chromium.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
10 years agoInput: atmel_mxt_ts - select FW_LOADER for firmware code
Nick Dyer [Mon, 19 May 2014 06:02:18 +0000 (23:02 -0700)]
Input: atmel_mxt_ts - select FW_LOADER for firmware code

Signed-off-by: Nick Dyer <nick.dyer@itdev.co.uk>
Acked-by: Benson Leung <bleung@chromium.org>
Acked-by: Yufeng Shen <miletus@chromium.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
10 years agoInput: atmel_mxt_ts - define helper functions for size and instances
Daniel Kurtz [Mon, 19 May 2014 06:01:12 +0000 (23:01 -0700)]
Input: atmel_mxt_ts - define helper functions for size and instances

These two object table entry fields are reported 1 less than their value.
When used, however, we always want the actual size and instances.

To keep the object size and instances 1-byte fields, and thus preserve
the object-table struct's 6-byte packed alignment, add some convenient
accessor functions that do the +1 every time these fields are accessed.

Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
Signed-off-by: Nick Dyer <nick.dyer@itdev.co.uk>
Acked-by: Benson Leung <bleung@chromium.org>
Acked-by: Yufeng Shen <miletus@chromium.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
10 years agoInput: atmel_mxt_ts - return IRQ_NONE when interrupt handler fails
Nick Dyer [Mon, 19 May 2014 06:00:56 +0000 (23:00 -0700)]
Input: atmel_mxt_ts - return IRQ_NONE when interrupt handler fails

Signed-off-by: Nick Dyer <nick.dyer@itdev.co.uk>
Acked-by: Benson Leung <bleung@chromium.org>
Acked-by: Yufeng Shen <miletus@chromium.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
10 years agoInput: atmel_mxt_ts - improve T19 GPIO keys handling
Nick Dyer [Mon, 19 May 2014 06:00:15 +0000 (23:00 -0700)]
Input: atmel_mxt_ts - improve T19 GPIO keys handling

 * The mapping of the GPIO numbers into the T19 status byte varies between
   different maXTouch chips. Some have up to 7 GPIOs. Allowing a keycode array
   of up to 8 items is simpler and more generic. So replace #define with
   configurable number of keys which also allows the removal of is_tp.
 * Rename platform data parameters to include "t19" to prevent confusion with
   T15 key array.
 * Probe aborts early on when pdata is NULL, so no need to check.
 * Move "int i" to beginning of function (mixed declarations and code)
 * Use API calls rather than __set_bit()
 * Remove unused dev variable.

Signed-off-by: Nick Dyer <nick.dyer@itdev.co.uk>
Acked-by: Yufeng Shen <miletus@chromium.org>
Reviewed-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
10 years agoInput: atmel_mxt_ts - remove unnecessary platform data
Nick Dyer [Mon, 19 May 2014 05:59:20 +0000 (22:59 -0700)]
Input: atmel_mxt_ts - remove unnecessary platform data

It is not necessary to download these values to the maXTouch chip on every
probe, since they are stored in NVRAM. It makes life difficult when tuning
the device to keep them in sync with the config array/file, and requires a
new kernel build for minor tweaks.

These parameters only represent a tiny subset of the available
configuration options, tracking all of these options in platform data would
be a endless task. In addition, different versions of maXTouch chips may
have these values in different places or may not even have them at all.

Having these values also makes life more complex for device tree and other
platforms where having to define a static configuration isn't helpful.

Signed-off-by: Nick Dyer <nick.dyer@itdev.co.uk>
Acked-by: Benson Leung <bleung@chromium.org>
Acked-by: Yufeng Shen <miletus@chromium.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
10 years agoInput: pixcir_i2c_ts - implement wakeup from suspend
Roger Quadros [Mon, 19 May 2014 05:49:20 +0000 (22:49 -0700)]
Input: pixcir_i2c_ts - implement wakeup from suspend

Improve the suspend and resume handlers to allow the device
to wakeup the system from suspend.

Signed-off-by: Roger Quadros <rogerq@ti.com>
Acked-by: Mugunthan V N <mugunthanvnm@ti.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
10 years agoInput: pixcir_i2c_ts - get rid of pdata->attb_read_val()
Roger Quadros [Mon, 19 May 2014 05:46:43 +0000 (22:46 -0700)]
Input: pixcir_i2c_ts - get rid of pdata->attb_read_val()

Get rid of the attb_read_val() platform hook. Instead, read the ATTB gpio
directly from the driver.

Fail if valid ATTB gpio is not provided by patform data.

Signed-off-by: Roger Quadros <rogerq@ti.com>
Acked-by: Mugunthan V N <mugunthanvnm@ti.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
10 years agoInput: pixcir_i2c_ts - initialize interrupt mode and power mode
Roger Quadros [Mon, 19 May 2014 05:44:35 +0000 (22:44 -0700)]
Input: pixcir_i2c_ts - initialize interrupt mode and power mode

Introduce helper functions to configure power and interrupt registers.
Default to IDLE mode on probe as device supports auto wakeup to ACVIE mode
on detecting finger touch.

Configure interrupt mode and polarity on start up.  Power down on device
closure or module removal.

Signed-off-by: Roger Quadros <rogerq@ti.com>
Acked-by: Mugunthan V N <mugunthanvnm@ti.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
10 years agoInput: pixcir_i2c_ts - use devres managed resource allocations
Roger Quadros [Mon, 19 May 2014 05:43:42 +0000 (22:43 -0700)]
Input: pixcir_i2c_ts - use devres managed resource allocations

Use devm_() and friends for allocating memory, input device
and IRQ.

Signed-off-by: Roger Quadros <rogerq@ti.com>
Acked-by: Mugunthan V N <mugunthanvnm@ti.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
10 years agoInput: ims-pcu - fix uninitialized use of 'error' in ims_pcu_buffers_alloc()
Christian Engelmayer [Sun, 18 May 2014 23:00:40 +0000 (16:00 -0700)]
Input: ims-pcu - fix uninitialized use of 'error' in ims_pcu_buffers_alloc()

In case allocation via usb_alloc_coherent() fails in ims_pcu_buffers_alloc(),
the function jumps to the exit path without initializing local variable
'error' that is used as return value. Detected by Coverity - CID 1016531.

Signed-off-by: Christian Engelmayer <cengelma@gmx.at>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
10 years agoInput: gpio-keys - move the gpio-keys bindings documentation
Ezequiel Garcia [Sun, 18 May 2014 20:41:57 +0000 (13:41 -0700)]
Input: gpio-keys - move the gpio-keys bindings documentation

This is an input driver and belongs to input not gpio.

Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
10 years agoInput: wacom - add support for three new ISDv4 sensors
Jason Gerecke [Thu, 15 May 2014 00:14:29 +0000 (17:14 -0700)]
Input: wacom - add support for three new ISDv4 sensors

This patch adds support for the 0x4004, 0x5000, and 0x5002 sensors found
on what should be the Motion R12, Fujitsu Q704, and Fujitsu T904. These
tablets use a new report ID (3) for their touch packets and a slightly
different HID descriptor format, but are otherwise largely identical in
protocol to the "MTTPC" tablets.

Note:
 * The R12 uses its 0x4004 sensor for touch input only. A pen interface
   is not present in its HID descriptor, though its possible a 0x4004
   may be used for pen input by other tablet PCs in the future.

 * The 0x5002 sensor appears to use a new report ID (8) for its pen
   packets. The other sensors continue to use the traditional report
   ID (2).

Signed-off-by: Jason Gerecke <killertofu@gmail.com>
Reviewed-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
10 years agoInput: wacom - use unaligned access where necessary
Jason Gerecke [Wed, 14 May 2014 23:53:30 +0000 (16:53 -0700)]
Input: wacom - use unaligned access where necessary

A few cases of incorrectly using 'le16_to_cpup' instead of
'get_unaligned_le16' have been noticed and fixed.

Signed-off-by: Jason Gerecke <killertofu@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
10 years agoMerge tag 'v3.15-rc5' into next
Dmitry Torokhov [Wed, 14 May 2014 23:49:19 +0000 (16:49 -0700)]
Merge tag 'v3.15-rc5' into next

Merge with Linux 3.15-rc5 to sync up Wacom and other changes.

10 years agoInput: pmic8xxx-pwrkey - set sane default for debounce time
Stephen Boyd [Wed, 14 May 2014 18:58:55 +0000 (11:58 -0700)]
Input: pmic8xxx-pwrkey - set sane default for debounce time

If the debounce time is 0 our usage of ilog2() later on in this driver will
cause undefined behavior. If CONFIG_OF=n this fact is evident to the
compiler, and it emits a call to ____ilog2_NaN() which doesn't exist. Fix
this by setting a sane default for debounce and failing to probe if
debounce is 0 in the DT.

Reported-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
10 years agoInput: wacom - add support for 0x116 sensor on Win8 Panasonic CF-H2
Jason Gerecke [Wed, 14 May 2014 18:42:22 +0000 (11:42 -0700)]
Input: wacom - add support for 0x116 sensor on Win8 Panasonic CF-H2

The Win8 version of the Panasonic CF-H2 includes a new Wacom device.
The pen interface appears to use the same protocol as before, but the
touch interface has been tweaked to send Win8-compatible reports.

Signed-off-by: Jason Gerecke <killertofu@gmail.com>
Reviewed-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
10 years agoInput: sun4i-ts - add support for temperature sensor
Hans de Goede [Wed, 14 May 2014 18:22:09 +0000 (11:22 -0700)]
Input: sun4i-ts - add support for temperature sensor

The sun4i resisitive touchscreen controller also comes with a built-in
temperature sensor. This commit adds support for it.

This commit also introduces a new "ts-attached" device-tree property,
when this is not set, the input part of the driver won't register. This way
the internal temperature sensor can be used to measure the SoC temperature
independent of there actually being a touchscreen attached to the controller.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
10 years agoInput: add driver for Allwinner sunxi SoC's rtp controller
Hans de Goede [Wed, 14 May 2014 18:20:45 +0000 (11:20 -0700)]
Input: add driver for Allwinner sunxi SoC's rtp controller

Note the sun4i-ts controller is capable of detecting a second touch, but
when a second touch is present then the accuracy becomes so bad the
reported touch location is not useable.

The original android driver contains some complicated heuristics using the
aprox. distance between the 2 touches to see if the user is making a pinch
open / close movement, and then reports emulated multi-touch events around
the last touch coordinate (as the dual-touch coordinates are worthless).

These kinds of heuristics are just asking for trouble (and don't belong in
the kernel). So this driver offers straight forward, reliable single touch
functionality only.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
10 years agoInput: logips2pp - fix typo in Kconfig help
Daniele Forsi [Mon, 12 May 2014 17:58:19 +0000 (10:58 -0700)]
Input: logips2pp - fix typo in Kconfig help

s/Logictech/Logitech/

Signed-off-by: Daniele Forsi <dforsi@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
10 years agoInput: gpio_keys_polled - convert to devm-* API
Alexander Shiyan [Mon, 28 Apr 2014 17:48:49 +0000 (10:48 -0700)]
Input: gpio_keys_polled - convert to devm-* API

Replace existing resource handling in the driver with managed device
resources, this ensures more consistent error values and simplifies error
handling paths:

kzalloc -> devm_kzalloc
gpio_request_one -> devm_gpio_request_one
input_allocate_polled_device -> devm_input_allocate_polled_device

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
10 years agoInput: implement managed polled input devices
Dmitry Torokhov [Mon, 28 Apr 2014 17:49:51 +0000 (10:49 -0700)]
Input: implement managed polled input devices

Managed resources are becoming more and more popular in drivers. Let's
implement managed polled input devices, to complement managed regular input
devices.

Similarly to managed regular input devices only one new call
devm_input_allocate_polled_device() is added and the rest of APIs is
modified to work with both managed and non-managed devices.

Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Tested-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
10 years agoInput: remove race when instantiating polled device attributes
Dmitry Torokhov [Mon, 28 Apr 2014 20:16:00 +0000 (13:16 -0700)]
Input: remove race when instantiating polled device attributes

Polled device's attributes controlling polling rate and whether polling is
enabled are attached to input device. We should have device core
instantiate them for us, so that they are created by the time new device
notification is sent to userspace, instead of doing it ourselves
afterwards.

Tested-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
10 years agoInput: gpio_keys - more conversions to devm-* API
Alexander Shiyan [Mon, 28 Apr 2014 16:52:36 +0000 (09:52 -0700)]
Input: gpio_keys - more conversions to devm-* API

Replace existing gpio resource handling in the driver with managed
resources, this ensures more consistent error values and simplifies error
paths.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
10 years agoInput: zforce - make of_device_id array const
Jingoo Han [Wed, 7 May 2014 20:10:16 +0000 (13:10 -0700)]
Input: zforce - make of_device_id array const

Make of_device_id array const, because all OF functions handle it as const.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Acked-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
10 years agoInput: mms114 - make of_device_id array const
Jingoo Han [Wed, 7 May 2014 20:09:52 +0000 (13:09 -0700)]
Input: mms114 - make of_device_id array const

Make of_device_id array const, because all OF functions handle it as const.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
10 years agoInput: lpc32xx_ts - make of_device_id array const
Jingoo Han [Wed, 7 May 2014 20:09:17 +0000 (13:09 -0700)]
Input: lpc32xx_ts - make of_device_id array const

Make of_device_id array const, because all OF functions handle it as const.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Acked-by: Roland Stigge <stigge@antcom.de>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
10 years agoInput: egalax_ts - make of_device_id array const
Jingoo Han [Wed, 7 May 2014 20:08:53 +0000 (13:08 -0700)]
Input: egalax_ts - make of_device_id array const

Make of_device_id array const, because all OF functions handle it as const.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
10 years agoInput: auo-pixcir-ts - make of_device_id array const
Jingoo Han [Wed, 7 May 2014 20:05:15 +0000 (13:05 -0700)]
Input: auo-pixcir-ts - make of_device_id array const

Make of_device_id array const, because all OF functions handle it as const.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Acked-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
10 years agoInput: apbps2 - make of_device_id array const
Jingoo Han [Wed, 7 May 2014 20:04:50 +0000 (13:04 -0700)]
Input: apbps2 - make of_device_id array const

Make of_device_id array const, because all OF functions handle it as const.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
10 years agoInput: olpc_apsp - make of_device_id array const
Jingoo Han [Wed, 7 May 2014 20:03:20 +0000 (13:03 -0700)]
Input: olpc_apsp - make of_device_id array const

Make of_device_id array const, because all OF functions handle it as const.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
10 years agoInput: rotary_encoder - make of_device_id array const
Jingoo Han [Wed, 7 May 2014 20:03:00 +0000 (13:03 -0700)]
Input: rotary_encoder - make of_device_id array const

Make of_device_id array const, because all OF functions handle it as const.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
10 years agoInput: gpio-beeper - make of_device_id array const
Jingoo Han [Wed, 7 May 2014 20:02:39 +0000 (13:02 -0700)]
Input: gpio-beeper - make of_device_id array const

Make of_device_id array const, because all OF functions handle it as const.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
10 years agoInput: imx_keypad - make of_device_id array const
Jingoo Han [Wed, 7 May 2014 19:59:47 +0000 (12:59 -0700)]
Input: imx_keypad - make of_device_id array const

Make of_device_id array const, because all OF functions handle it as const.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
10 years agoInput: gpio_keys_polled - make of_device_id array const
Jingoo Han [Wed, 7 May 2014 19:58:36 +0000 (12:58 -0700)]
Input: gpio_keys_polled - make of_device_id array const

Make of_device_id array const, because all OF functions handle it as const.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
10 years agoInput: gpio_keys - make of_device_id array const
Jingoo Han [Wed, 7 May 2014 19:58:06 +0000 (12:58 -0700)]
Input: gpio_keys - make of_device_id array const

Make of_device_id array const, because all OF functions handle it as const.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
10 years agoInput: clps711x-keypad - make of_device_id array const
Jingoo Han [Wed, 7 May 2014 19:57:31 +0000 (12:57 -0700)]
Input: clps711x-keypad - make of_device_id array const

Make of_device_id array const, because all OF functions handle it as const.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
10 years agoInput: gpio-beeper - simplify GPIO handling
Alexander Shiyan [Sat, 26 Apr 2014 06:45:05 +0000 (23:45 -0700)]
Input: gpio-beeper - simplify GPIO handling

This patch simplifies GPIO handling in the driver by using GPIO functions
based on descriptors. As a result this driver now can be used for boards
without DT support.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
10 years agoInput: tsc2005 - convert driver to use devm_*
Sebastian Reichel [Sat, 26 Apr 2014 04:50:21 +0000 (21:50 -0700)]
Input: tsc2005 - convert driver to use devm_*

Simplify the driver by using managed resources for memory allocation of
internal structure, input device allocation and irq request.

Signed-off-by: Sebastian Reichel <sre@kernel.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
10 years agoInput: tsc2005 - use dev_err for error messages
Sebastian Reichel [Sat, 26 Apr 2014 04:50:13 +0000 (21:50 -0700)]
Input: tsc2005 - use dev_err for error messages

Change some dev_dbg() invocations to dev_err() ones, because they
are supposed to output error messages.

Signed-off-by: Sebastian Reichel <sre@kernel.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
10 years agoInput: gpio_keys - convert struct descriptions to kernel-doc
Andy Shevchenko [Fri, 25 Apr 2014 22:08:29 +0000 (15:08 -0700)]
Input: gpio_keys - convert struct descriptions to kernel-doc

This patch converts descriptions of the structures defined in
linux/gpio_keys.h to follow kernel-doc format.

There is no functional change.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
10 years agoInput: gpio_keys - convert to use devm_*
Andy Shevchenko [Fri, 25 Apr 2014 21:21:59 +0000 (14:21 -0700)]
Input: gpio_keys - convert to use devm_*

This makes the error handling much more simpler than open-coding everything
and in addition makes the probe function smaller an tidier.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
10 years agoInput: twl6040-vibra - use devm functions
Fabio Estevam [Fri, 25 Apr 2014 16:21:12 +0000 (09:21 -0700)]
Input: twl6040-vibra - use devm functions

Using devm_regulator_bulk_get() and devm_input_allocate_device() can make
the code cleaner and smaller as we do not need to manually free resources
the error and remove paths.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
10 years agoInput: ads7877 - remove bitrotted comment
Mark Brown [Fri, 25 Apr 2014 06:37:56 +0000 (23:37 -0700)]
Input: ads7877 - remove bitrotted comment

While searching for users of spi_async() I found a reference in the ad7877
driver to using it to initiate data transfer from the interrupt handler.
However there is no code for this, instead the interrupt handler is a
threaded handler and uses spi_sync() instead.

Remove the bitrotted comment, though in actual fact the use case mentioned
is a great use for spi_async() since it would cut down on latency handling
the interrupt by saving us a context switch before we start SPI.

This was previously implemented, it was removed in commit b534422b2d11
(Input: ad7877 - switch to using threaded IRQ) for code complexity reasons.
It may be better to revert that commit instead.

Signed-off-by: Mark Brown <broonie@linaro.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
10 years agoInput: evdev - get rid of old workaround for EVIOCGBIT
Dmitry Torokhov [Wed, 23 Apr 2014 16:56:33 +0000 (09:56 -0700)]
Input: evdev - get rid of old workaround for EVIOCGBIT

We put this workaround in 2008 and the offending userspace has been fixed
up long time ago; the link in the message is no longer valid either, so it
is time to retire it.

Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
10 years agoInput: add st-keyscan driver
Gabriel FERNANDEZ [Sat, 12 Apr 2014 20:45:50 +0000 (13:45 -0700)]
Input: add st-keyscan driver

This patch adds ST Keyscan driver to use the keypad hw a subset of ST
boards provide. Specific board setup will be put in the given dt.

Signed-off-by: Gabriel Fernandez <gabriel.fernandez@linaro.org>
Signed-off-by: Giuseppe Condorelli <giuseppe.condorelli@st.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
10 years agoInput: ads7846 - correct log message for spi_sync() errors
Mark Brown [Wed, 23 Apr 2014 00:37:43 +0000 (17:37 -0700)]
Input: ads7846 - correct log message for spi_sync() errors

While searching for users of spi_async() I got a false positive in the
ads7846 driver, fix that.

Signed-off-by: Mark Brown <broonie@linaro.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
10 years agoInput: tc3589x-keypad - support probing from device tree
Linus Walleij [Sun, 20 Apr 2014 19:34:34 +0000 (12:34 -0700)]
Input: tc3589x-keypad - support probing from device tree

Implement device tree probing for the tc3589x keypad driver.
This is modeled on the STMPE keypad driver and tested on the
Ux500 TVK1281618 UIB.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
10 years agoInput: w90p910_ts - depend on ARCH_W90X900
Jean Delvare [Sun, 20 Apr 2014 05:37:58 +0000 (22:37 -0700)]
Input: w90p910_ts - depend on ARCH_W90X900

The w90p910_ts touchscreen driver is heavily architecture dependent,
so there is no point in letting it be built on other architectures
than it was written for.

All other W90P910/W90X900 drivers already have that dependency, so it
makes things more consistent and configuration easier.

Signed-off-by: Jean Delvare <jdelvare@suse.de>
Acked-by Wan Zongshun <mcuos.com@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
10 years agoLinux 3.15-rc5
Linus Torvalds [Fri, 9 May 2014 20:10:52 +0000 (13:10 -0700)]
Linux 3.15-rc5

10 years agoMerge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Fri, 9 May 2014 19:24:20 +0000 (12:24 -0700)]
Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull x86 fixes from Peter Anvin:
 "A somewhat unpleasantly large collection of small fixes.  The big ones
  are the __visible tree sweep and a fix for 'earlyprintk=efi,keep'.  It
  was using __init functions with predictably suboptimal results.

  Another key fix is a build fix which would produce output that simply
  would not decompress correctly in some configuration, due to the
  existing Makefiles picking up an unfortunate local label and mistaking
  it for the global symbol _end.

  Additional fixes include the handling of 64-bit numbers when setting
  the vdso data page (a latent bug which became manifest when i386
  started exporting a vdso with time functions), a fix to the new MSR
  manipulation accessors which would cause features to not get properly
  unblocked, a build fix for 32-bit userland, and a few new platform
  quirks"

* 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86, vdso, time: Cast tv_nsec to u64 for proper shifting in update_vsyscall()
  x86: Fix typo in MSR_IA32_MISC_ENABLE_LIMIT_CPUID macro
  x86: Fix typo preventing msr_set/clear_bit from having an effect
  x86/intel: Add quirk to disable HPET for the Baytrail platform
  x86/hpet: Make boot_hpet_disable extern
  x86-64, build: Fix stack protector Makefile breakage with 32-bit userland
  x86/reboot: Add reboot quirk for Certec BPC600
  asmlinkage: Add explicit __visible to drivers/*, lib/*, kernel/*
  asmlinkage, x86: Add explicit __visible to arch/x86/*
  asmlinkage: Revert "lto: Make asmlinkage __visible"
  x86, build: Don't get confused by local symbols
  x86/efi: earlyprintk=efi,keep fix

10 years agox86, vdso, time: Cast tv_nsec to u64 for proper shifting in update_vsyscall()
Boris Ostrovsky [Fri, 9 May 2014 15:11:27 +0000 (11:11 -0400)]
x86, vdso, time: Cast tv_nsec to u64 for proper shifting in update_vsyscall()

With tk->wall_to_monotonic.tv_nsec being a 32-bit value on 32-bit
systems, (tk->wall_to_monotonic.tv_nsec << tk->shift) in update_vsyscall()
may lose upper bits or, worse, add them since compiler will do this:
(u64)(tk->wall_to_monotonic.tv_nsec << tk->shift)
instead of
((u64)tk->wall_to_monotonic.tv_nsec << tk->shift)

So if, for example, tv_nsec is 0x800000 and shift is 8 we will end up
with 0xffffffff80000000 instead of 0x80000000. And then we are stuck in
the subsequent 'while' loop.

We need an explicit cast.

Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Link: http://lkml.kernel.org/r/1399648287-15178-1-git-send-email-boris.ostrovsky@oracle.com
Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: <stable@vger.kernel.org> # v3.14
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
10 years agox86: Fix typo in MSR_IA32_MISC_ENABLE_LIMIT_CPUID macro
Andres Freund [Fri, 9 May 2014 01:29:17 +0000 (03:29 +0200)]
x86: Fix typo in MSR_IA32_MISC_ENABLE_LIMIT_CPUID macro

The spuriously added semicolon didn't have any effect because the
macro isn't currently in use.

c0a639ad0bc6b178b46996bd1f821a04643e2bde

Signed-off-by: Andres Freund <andres@anarazel.de>
Link: http://lkml.kernel.org/r/1399598957-7011-3-git-send-email-andres@anarazel.de
Cc: Borislav Petkov <bp@suse.de>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
10 years agox86: Fix typo preventing msr_set/clear_bit from having an effect
Andres Freund [Fri, 9 May 2014 01:29:16 +0000 (03:29 +0200)]
x86: Fix typo preventing msr_set/clear_bit from having an effect

Due to a typo the msr accessor function introduced in
22085a66c2fab6cf9b9393c056a3600a6b4735de didn't have any lasting
effects because they accidentally wrote the old value back.

After c0a639ad0bc6b178b46996bd1f821a04643e2bde this at the very least
this causes cpuid limits not to be lifted on some cpus leading to
missing capabilities for those.

Signed-off-by: Andres Freund <andres@anarazel.de>
Link: http://lkml.kernel.org/r/1399598957-7011-2-git-send-email-andres@anarazel.de
Cc: Borislav Petkov <bp@suse.de>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
10 years agoMerge tag 'xfs-for-linus-3.15-rc5' of git://oss.sgi.com/xfs/xfs
Linus Torvalds [Fri, 9 May 2014 02:20:45 +0000 (19:20 -0700)]
Merge tag 'xfs-for-linus-3.15-rc5' of git://oss.sgi.com/xfs/xfs

Pull xfs fixes from Dave Chinner:
 "The main fix is adding support for default ACLs on O_TMPFILE opened
  inodes to bring XFS into line with other filesystems.  Metadata CRCs
  are now also considered well enough tested to be fully supported, so
  we're removing the shouty warnings issued at mount time for
  filesystems with that format.  And there's transaction block
  reservation overrun fix.

  Summary:
   - fix a remote attribute size calculation bug that leads to a
     transaction overrun
   - add default ACLs to O_TMPFILE files
   - Remove the EXPERIMENTAL tag from filesystems with metadata CRC
     support"

* tag 'xfs-for-linus-3.15-rc5' of git://oss.sgi.com/xfs/xfs:
  xfs: remote attribute overwrite causes transaction overrun
  xfs: initialize default acls for ->tmpfile()
  xfs: fully support v5 format filesystems