For i2c drivers, we should use "i2c:" prefix for modalias.
MODULE_DEVICE_TABLE will setup the modulalias for us, thus adding
a MODULE_ALIAS is redundant (in addition to being incorrect).
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
Input: ad714x - read the interrupt status registers in a row
Input: ad714x - use DMA-safe buffers for spi_write()
Input: ad714x - fix endianness issues
Input: ad714xx-spi - force SPI bus into the default 8-bit mode
Input: ep93xx_keypad - add missing include of linux/module.h
Input: tnetv107x-ts - add missing include of linux/module.h
Input: max11801_ts - correct license statement
Input: atmel_mxt_ts - report pressure information from the driver
Input: bcm5974 - Add support for newer MacBookPro8,2
Input: wacom - report id 3 returns 4 bytes of data
Input: wacom - add WAC_MSG_RETRIES define
Input: wacom - add support for the Wacom Bamboo Pen (CTL-660/K)
Input: tegra-kbc - correct call to input_free_device
Input: mpu3050 - correct call to input_free_device
Input: bcm5974 - add support for touchpads found in MacBookAir4,2
Input: mma8450 - fix module device table type
Input: remove CLOCK_TICK_RATE from analog joystick driver
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>
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>
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>
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>
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (53 commits)
Input: synaptics - fix reporting of min coordinates
Input: tegra-kbc - enable key autorepeat
Input: kxtj9 - fix locking typo in kxtj9_set_poll()
Input: kxtj9 - fix bug in probe()
Input: intel-mid-touch - remove pointless checking for variable 'found'
Input: hp_sdc - staticize hp_sdc_kicker()
Input: pmic8xxx-keypad - fix a leak of the IRQ during init failure
Input: cy8ctmg110_ts - set reset_pin and irq_pin from platform data
Input: cy8ctmg110_ts - constify i2c_device_id table
Input: cy8ctmg110_ts - fix checking return value of i2c_master_send
Input: lifebook - make dmi callback functions return 1
Input: atkbd - make dmi callback functions return 1
Input: gpio_keys - switch to using SIMPLE_DEV_PM_OPS
Input: gpio_keys - add support for device-tree platform data
Input: aiptek - remove double define
Input: synaptics - set minimum coordinates as reported by firmware
Input: synaptics - process button bits in AGM packets
Input: synaptics - rename set_slot to be more descriptive
Input: synaptics - fuzz position for touchpad with reduced filtering
Input: synaptics - set resolution for MT_POSITION_X/Y axes
...
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>
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>
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>
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>
The "#if" above should really be an "#ifdef" to avoid this warning:
CC drivers/input/keyboard/sh_keysc.o
drivers/input/keyboard/sh_keysc.c:294:5: warning: "CONFIG_PM_SLEEP" is
not defined
Reported-by: Magnus Damm <magnus.damm@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
The Quick Charge bit in Electrode conf register should be set in init
function. This bit was missed in chip's document, which may cause touch
controller charge too slow to generate an interrupt.
Also, adjust the default vlaue of touch and release threshold
to make touch key more sensitive, this fix touch may not sensitive
after setup with plastic case.
Signed-off-by: Jiejing Zhang <jiejing.zhang@freescale.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Initialize gpio_keys driver at late_initcall level, to give it a chance to
work with GPIO expanders that might not be ready yet if we initialize the
driver at module_init time.
This is strictly a band-aid until there is a better way to specify
inter-device dependencies.
Signed-off-by: David Jander <david@protonic.nl>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Remove the space between "platform:" prefix and the driver name.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
It was pointed out by 'make versioncheck' that some includes of
linux/version.h are not needed in drivers/input/.
This patch removes them.
Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Acked-by: Mike Frysinger <vapier@gentoo.org>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Use a threaded interrupt handler in order to permit the handler to use
a GPIO driver that causes things like I2C transactions being done inside
the handler context.
Signed-off-by: David Jander <david@protonic.nl>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
According to the data sheet the interrupt should be level rather than
edge triggered. This fixes the issue of the Nokia N810 keypad stopping
responding if multiple key events occur in quick succession.
Signed-off-by: Leigh Brown <leigh@solinno.co.uk>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
There's no need for that workqueue anymore. Get rid of it and move to
threaded IRQs instead.
Signed-off-by: Felipe Balbi <balbi@ti.com>
Tested-by: Leigh Brown <leigh@solinno.co.uk>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
A few new i2c-drivers came into the kernel which clear the clientdata
pointer on exit or error. This is not required anymore since the core
will do it for us.
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Acked-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
Input: sh_keysc - 8x8 MODE_6 fix
Input: omap-keypad - add missing input_sync()
Input: evdev - try to wake up readers only if we have full packet
Input: properly assign return value of clamp() macro.
According to the data sheet for G4, AP4 and AG5 KEYSC MODE_6 is 8x8 keys.
Bump up MAXKEYS to 64 too.
Signed-off-by: Magnus Damm <damm@opensource.se>
Reviewed-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Otherwise the updated evdev driver (commit cdda911c34,
"Input: evdev - only signal polls on full packets") no longer works on
top of omap-keypad.
Tested on Amstrad Delta.
Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Reviewed-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Atarimouse fails to load as a module (with ENODEV), due to a brown paper
bag bug, misinterpreting the semantics of atari_keyb_init().
[geert] Propagate the return value of atari_keyb_init() everywhere
Signed-off-by: Michael Schmitz <schmitz@debian.org>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
From http://www.analog.com/ADP5589:
The ADP5589 is an I/O port expander and keypad matrix decoder designed
for QWERTY type phones that require a large keypad matrix and expanded
I/O lines.
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
This patch adds basic support for Freescale MPR121 capacitive touch
sensor. It's an i2c controller with up to 12 capacitance sensing inputs.
Product information (data sheet, application notes) can be found here:
http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=MPR121
Signed-off-by: Zhang Jiejing <jiejing.zhang@freescale.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Tegra hardware design cannot reliably support an arbitrary set of keys
waking up the system. Modify wakeup logic so either any key wakes the
system up or none will do.
Signed-off-by: Rakesh Iyer <riyer@nvidia.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Update the KEYSC driver to make use of threaded IRQs with IRQF_ONESHOT
to improve interrupt latency. The driver is using udelay() in the ISR
to make sure the hardware has stabilized. Without using interrupt threads
this delay may affect the latency of the rest of the system.
Also pass dev_name() as string for /proc/interrupts.
Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Convert the KEYSC driver from MSTP bit control through a magic clock
string to making use of Runtime PM.
Also, update the system suspend/resume callbacks to drop the Runtime
PM reference in the case of wakeup disabled.
Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
In current implementation, free_irq() was using NULL rather than the
driver data as the data pointer so free_irq() wouldn't have matched.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Adding the necessary MODULE_DEVICE_TABLE() information allows the
driver to be automatically loaded by udev
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
Input: xen-kbdfront - fix mouse getting stuck after save/restore
Input: estimate number of events per packet
Input: evdev - indicate buffer overrun with SYN_DROPPED
Input: document event types and codes and their intended use
Input: add KEY_IMAGES specifically for AL Image Browser
Input: twl4030_keypad - fix potential NULL dereference in twl4030_kp_probe()
Input: h3600_ts - fix error handling at connect
Input: twl4030_keypad - avoid potential NULL-pointer dereference
This patch allows to set a device name which helps distinguishing several
gpio-keys devices.
Signed-off-by: Alexander Stein <alexander.stein@informatik.tu-chemnitz.de>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
With this patch you can setup a group of GPIOs representing a specific
position on an EV_ABS axis.
Signed-off-by: Alexander Stein <alexander.stein@informatik.tu-chemnitz.de>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
We should first check whether platform data is NULL or not, before
dereferencing it to get the keymap.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Reviewed-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>