Commit graph

253991 commits

Author SHA1 Message Date
Michael Hennerich
9eff794b77 Input: ad714x - read the interrupt status registers in a row
The interrupt status registers should be read in row to avoid invalid data.

Alter "read" method for both bus options to allow reading several registers
in a row and make sure we read interrupt status registers properly.

Read sequence saves 50% of bus transactions compared to single register
reads. So use it also for the result registers, which are also located
in a row.

Also update copyright notice.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-08-22 09:59:26 -07:00
Dmitry Torokhov
c0409feb86 Input: ad714x - use DMA-safe buffers for spi_write()
spi_write() requires use of DMA-safe (cacheline aligned) buffers.
Also use the same buffers when reading data since to avoid extra
locking and potential memory allocation in spi_write_then_read().

Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-08-22 09:59:20 -07:00
Michael Hennerich
6337de2204 Input: ad714x - fix endianness issues
Allow driver to be used on Big Endian boxes.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-08-22 09:59:12 -07:00
Michael Hennerich
5b9063b19c Input: ad714xx-spi - force SPI bus into the default 8-bit mode
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-08-22 09:59:06 -07:00
Axel Lin
b9cc510b39 Input: ep93xx_keypad - add missing include of linux/module.h
ep93xx_keypad.c uses interfaces from linux/module.h,
so it should include that file.  This patch fixes build errors.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-08-21 12:49:45 -07:00
Axel Lin
2782a35132 Input: tnetv107x-ts - add missing include of linux/module.h
tnetv107x-ts.c uses interfaces from linux/module.h,
so it should include that file.  This patch fixes build errors.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-08-21 12:49:41 -07:00
Jiejing Zhang
d70d43d7d7 Input: max11801_ts - correct license statement
The original license statement was confusing since it was unclear if
the license was pure GPLv2 or GPLv2+ and did not match the license
of the driver max11801_ts was derived from. The license is GPLv2+.

Signed-off-by: Jiejing Zhang <jiejing.zhang@freescale.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-08-20 14:39:53 -07:00
Yufeng Shen
28ac293363 Input: atmel_mxt_ts - report pressure information from the driver
Atmel mxt1386 touch controller has the touch pressure information so
let's report it to the user space.

[dtor@mail.ru: added ABS_RESSURE reporting for ST emulation.]

Signed-off-by: Yufeng Shen <miletus@chromium.org>
Acked-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
Acked-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-08-16 23:31:51 -07:00
Andrew Drake
c331eb580a Input: bcm5974 - Add support for newer MacBookPro8,2
New MacBook Pro devices reporting product name MacBookPro8,2 come with
newer/higher resolution touchpads than others with the same product
name with USB ID 05ac:0252. This patch adds support for these devices.

Signed-off-by: Andrew Drake <adrake@adrake.org>
Reviewed-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-08-16 23:31:43 -07:00
Ping Cheng
3b48c91cdf Input: wacom - report id 3 returns 4 bytes of data
Signed-off-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-08-16 00:21:52 -07:00
Ping Cheng
a417ea4432 Input: wacom - add WAC_MSG_RETRIES define
Use WAC_MSG_RETRIES define instead of a numeric constant.

Signed-off-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-08-16 00:21:48 -07:00
Gerard Braad
18adad1c57 Input: wacom - add support for the Wacom Bamboo Pen (CTL-660/K)
Signed-off-by: Gerard Braad <me@gbraad.nl>
Reviewed-by: Chris Bagwell <chris@cnpbagwell.com>
Signed-off-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-08-16 00:21:41 -07:00
Axel Lin
22f83205e5 Input: tegra-kbc - correct call to input_free_device
If kzalloc for kbc fails, then we have NULL pointer dereference while
calling input_free_device(kbc->idev) in the error handling.
So it is safer to always use the original name, input_dev.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-08-11 09:23:06 -07:00
Axel Lin
d9b830fa44 Input: mpu3050 - correct call to input_free_device
input_free_device() should be used if input_register_device() was not called
yet or if it failed.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-08-11 09:22:40 -07:00
Joshua V. Dillon
db0b34b074 Input: bcm5974 - add support for touchpads found in MacBookAir4,2
Added USB device IDs for MacBookAir4,2 trackpad. Device constants were
copied from the MacBookAir3,2 constants. The 4,2 device specification is
reportedly unchanged from the 3,2 predecessor and seems to work well.

Signed-off-by: Joshua V Dillon <jvdillon@gmail.com>
Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-08-08 23:55:03 -07:00
Axel Lin
cd566c64f5 Input: mma8450 - fix module device table type
The module device table for of_device_id should use "of" type.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-08-08 23:54:57 -07:00
Deepak Saxena
18b08c55a9 Input: remove CLOCK_TICK_RATE from analog joystick driver
The analog joystick driver is written for x86 systems. This
patch updates it to use the PIT_TICK_RATE value instead of
CLOCK_TICK_RATE as they are equivalent on x86 and we want to
deprecate the latter.

Signed-off-by: Deepak Saxena <dsaxena@linaro.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-08-04 23:41:36 -07:00
Michael Hennerich
4fecc2088f Input: ad7879 - fix deficient device disable
Input close or device disable should not interact with the exported
gpiolib functionality. However that's the case. __ad7879_disable()
clears the entire AD7879_REG_CTRL2, while it should just power down
the ADC and its reference.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-08-02 22:17:44 -07:00
Tobias Klauser
0a7a8fff7b Input: gpio_keys - fix two typos in devicetree documentation
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-08-02 22:17:31 -07:00
Shawn Guo
71ff069c3d Input: mma8450 - add device tree probe support
It adds device tree probe support for mma8450 driver.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Acked-by: Eric Miao <eric.miao@linaro.org>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-07-31 20:08:15 -07:00
Tobias Klauser
1f4bb06643 Input: gpio_keys - return proper error code if memory allocation fails
Return -ENOMEM if kzalloc fails in gpio_keys_get_devtree_pdata().

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-07-30 12:19:02 -07:00
Axel Lin
52db9819ac Input: lm8323 - add missing device_remove_file for dev_attr_time
Add missing device_remove_file() for dev_attr_time in lm8323_remove().
Also calling device_remove_file() in lm8323_probe() error path to
remove sysfs attribute file.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-07-30 12:18:57 -07:00
Rakesh Iyer
3f27757a11 Input: tegra-kbc - fix computation of polling time
Fix a constant definition and computation of polling time.

[dtor@mail.ru: switched to using DIV_ROUND_UP as was suggested by
 Thierry Reding <thierry.reding@avionic-design.de>]

Signed-off-by: Rakesh Iyer <riyer@nvidia.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-07-30 12:03:36 -07:00
Stephen Rothwell
2501ec9766 Input: kxtj9 - explicitly include module.h
We need to explicitly include module.h since some of its facilities
are used.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-07-30 12:03:32 -07:00
Randy Dunlap
ab3d0abe2e Input: psmouse - hgpk.c needs module.h
hgpk.c uses interfaces from linux/module.h, so it should include that file.
This fixes build errors.

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-07-30 12:03:26 -07:00
Dmitry Torokhov
aa7eb8e78d Merge branch 'next' into for-linus 2011-07-27 00:54:47 -07:00
Dmitry Torokhov
3c6b50141e Input: synaptics - fix reporting of min coordinates
We were testing wrong bit in the extended capability query.

Reported-by: Daniel Kurtz <djkurtz@chromium.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-07-25 01:38:21 -07:00
Rakesh Iyer
5599d2e60b Input: tegra-kbc - enable key autorepeat
To support key repeats, keyboard needs to be setup as an autorepeating
device.

Signed-off-by: Rakesh Iyer <riyer@nvidia.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-07-25 01:26:17 -07:00
Dan Carpenter
6eab7ce65a Input: kxtj9 - fix locking typo in kxtj9_set_poll()
According to the comments we want to call mutex_lock() here instead
of mutex_unlock().  That makes more sense.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-07-19 23:18:09 -07:00
Dan Carpenter
4fd9fcf7c1 Input: kxtj9 - fix bug in probe()
We are testing the wrong variable here.  I believe tj9->input_dev
is always NULL at this point, so probe() will fail.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-07-19 23:18:05 -07:00
Axel Lin
e449edbb91 Input: intel-mid-touch - remove pointless checking for variable 'found'
The implementation does break from the for loop after we assign 'i' to
variable 'found'.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-07-18 17:10:41 -07:00
Axel Lin
dc3e8247eb Input: hp_sdc - staticize hp_sdc_kicker()
It's not referenced outside this file so there's no need for it to be in
the global name space.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-07-18 17:10:36 -07:00
Axel Lin
edf21d9c38 Input: pmic8xxx-keypad - fix a leak of the IRQ during init failure
Make sure we are passing the same cookie in all calls to
request_any_context_irq() and free_irq().

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-07-18 17:10:31 -07:00
Axel Lin
2c204109ec Input: cy8ctmg110_ts - set reset_pin and irq_pin from platform data
The implementation in cy8ctmg110_probe() does not properly set reset_pin
and irq_pin from platform data. Let's fix it.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-07-18 17:10:27 -07:00
Axel Lin
d448303a77 Input: cy8ctmg110_ts - constify i2c_device_id table
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-07-13 00:08:24 -07:00
Axel Lin
21184c4efb Input: cy8ctmg110_ts - fix checking return value of i2c_master_send
i2c_master_send returns negative errno, or else the number of bytes written.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-07-13 00:08:20 -07:00
Axel Lin
fea2021c76 Input: lifebook - make dmi callback functions return 1
We only care about if there is a successful match from the table (or
no match at all), so let's make dmi_check_system return immediately
instead of iterating thorough the whole table.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-07-13 00:08:15 -07:00
Axel Lin
c388b2c67e Input: atkbd - make dmi callback functions return 1
We only care about if there is a successful match from the table (or
no match at all), so let's make dmi_check_system return immediately
instead of iterating thorough the whole table.

Make the dmi callback function return 1 then dmi_check_system
will return immediately if we have a successful match.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-07-13 00:08:10 -07:00
Dmitry Torokhov
bdda821628 Input: gpio_keys - switch to using SIMPLE_DEV_PM_OPS
This reduces amount #ifdeds in the code.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-07-10 16:08:32 -07:00
David Jander
fd05d08920 Input: gpio_keys - add support for device-tree platform data
This patch enables fetching configuration data, which is normally provided
via platform_data, from the device-tree instead.

If the device is configured from device-tree data, the platform_data struct
is not used, and button data needs to be allocated dynamically. Big part of
this patch deals with confining pdata usage to the probe function, to make
this possible.

Signed-off-by: David Jander <david@protonic.nl>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-07-10 16:08:28 -07:00
Edwin van Vliet
eadba0c9c4 Input: aiptek - remove double define
Constant AIPTEK_TOOL_BUTTON_PEN_MODE was defined twice.

Signed-off-by: Edwin van Vliet <edwin@cheatah.nl>
Reviewed-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-07-10 16:08:23 -07:00
Dmitry Torokhov
a66413fbc3 Input: synaptics - set minimum coordinates as reported by firmware
Newer Synaptics firmware allows to query minimum coordinates reported by
the device, let's use this data.

Acked-by: Chase Douglas <chase.douglas@canonical.com>
Acked-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-07-09 12:33:35 -07:00
Daniel Kurtz
28d5fd860f Input: synaptics - process button bits in AGM packets
AGM packets contain valid button bits, too.
This patch refactors packet processing to parse button bits in AGM packets.
However, they aren't actually used or reported.

The point is to more completely process AGM packets,
and prepare for future patches that may actually use AGM packet button bits.

Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
Acked-by: Chase Douglas <chase.douglas@canonical.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-07-06 23:01:17 -07:00
Daniel Kurtz
bea9f0ff26 Input: synaptics - rename set_slot to be more descriptive
Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
Acked-by: Chase Douglas <chase.douglas@canonical.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-07-06 23:01:13 -07:00
Daniel Kurtz
a9f0b79edf Input: synaptics - fuzz position for touchpad with reduced filtering
Synaptics touchpads indicate via a capability bit when they perform reduced
filtering on position data. In such a case, use a non-zero fuzz value.
Fuzz = 8 was chosen empirically by observing the raw position data
reported by a clickpad indicating it had reduced filtering.

Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
Acked-by: Chase Douglas <chase.douglas@canonical.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-07-06 23:01:09 -07:00
Daniel Kurtz
8be3c650f5 Input: synaptics - set resolution for MT_POSITION_X/Y axes
Set resolution for MT_POSITION_X and MT_POSITION_Y to match ABS_X and
ABS_Y, respectively.

Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
Acked-by: Chase Douglas <chase.douglas@canonical.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-07-06 23:01:00 -07:00
Ping Cheng
8446001450 Input: wacom - cleanup a return value for the old Bamboo
The old code may call input_sync() without sending any other events.
While it will be suppressed by the input core not calling it at all
is still cheaper.

Signed-off-by: Ping Cheng <pingc@wacom.com>
Reviewed-by: Chris Bagwell <chris@cnpbagwell.com>
Reviewed-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-07-06 21:24:35 -07:00
Ping Cheng
0bd10ef8f8 Input: wacom - update Graphire4 and old Bamboo tablet buttons
Bamboo touch sets BTN_BACK, BTN_FORWARD, BTN_LEFT, and BTN_RIGHT
as the default button events for tablet buttons. Change Graphire4
and old Bamboo to the same settings.

Signed-off-by: Ping Cheng <pingc@wacom.com>
Reviewed-by: Chris Bagwell <chris@cnpbagwell.com>
Reviewed-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-07-06 21:24:25 -07:00
Ping Cheng
998c454e1c Input: wacom - add serial number for Graphire4 and old Bamboo
With the removal of BTN_TOOL_FINGER for tablet buttons and
expresskeys, serial number is needed to distingush if the
events were from a regular tool (stylus, eraser, or mouse)
or the attribures (buttons, strips, or wheels) on the tablet
since there are overlapped events between the tools and the
tablet attributes.

Signed-off-by: Ping Cheng <pingc@wacom.com>
Reviewed-by: Chris Bagwell <chris@cnpbagwell.com>
Reviewed-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-07-06 21:24:15 -07:00
Ping Cheng
358ea22ee3 Input: wacom - remove BTN_TOOL_FINGER for pad
BTN_TOOL_FINGER was designed to indicate a single finger touch.
Remove the lines that borrowed this type for expresskeys and
tablet buttons.

Signed-off-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-07-06 21:24:06 -07:00