dect
/
linux-2.6
Archived
13
0
Fork 0
Commit Graph

593 Commits

Author SHA1 Message Date
JJ Ding 76496e7a02 Input: convert obsolete strict_strtox to kstrtox
With commit 67d0a07544 we mark strict_strtox
as obsolete. Convert all remaining such uses in drivers/input/.

Also change long to appropriate types, and return error conditions
from kstrtox separately, as Dmitry sugguests.

Signed-off-by: JJ Ding <dgdunix@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-11-09 21:23:26 -08:00
Linus Torvalds 32aaeffbd4 Merge branch 'modsplit-Oct31_2011' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux
* 'modsplit-Oct31_2011' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux: (230 commits)
  Revert "tracing: Include module.h in define_trace.h"
  irq: don't put module.h into irq.h for tracking irqgen modules.
  bluetooth: macroize two small inlines to avoid module.h
  ip_vs.h: fix implicit use of module_get/module_put from module.h
  nf_conntrack.h: fix up fallout from implicit moduleparam.h presence
  include: replace linux/module.h with "struct module" wherever possible
  include: convert various register fcns to macros to avoid include chaining
  crypto.h: remove unused crypto_tfm_alg_modname() inline
  uwb.h: fix implicit use of asm/page.h for PAGE_SIZE
  pm_runtime.h: explicitly requires notifier.h
  linux/dmaengine.h: fix implicit use of bitmap.h and asm/page.h
  miscdevice.h: fix up implicit use of lists and types
  stop_machine.h: fix implicit use of smp.h for smp_processor_id
  of: fix implicit use of errno.h in include/linux/of.h
  of_platform.h: delete needless include <linux/module.h>
  acpi: remove module.h include from platform/aclinux.h
  miscdevice.h: delete unnecessary inclusion of module.h
  device_cgroup.h: delete needless include <linux/module.h>
  net: sch_generic remove redundant use of <linux/module.h>
  net: inet_timewait_sock doesnt need <linux/module.h>
  ...

Fix up trivial conflicts (other header files, and  removal of the ab3550 mfd driver) in
 - drivers/media/dvb/frontends/dibx000_common.c
 - drivers/media/video/{mt9m111.c,ov6650.c}
 - drivers/mfd/ab3550-core.c
 - include/linux/dmaengine.h
2011-11-06 19:44:47 -08:00
Michael Gebetsroither d2cc817a76 Input: usbtouchscreen - add ELO IntelliTouch 2700 support
Signed-off-by: Michael Gebetsroither <michael@mgeb.org>
Reviewed-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-11-05 00:02:27 -07:00
Linus Torvalds a0a4194c94 Merge branch 'for-next' of git://git.infradead.org/users/sameo/mfd-2.6
* 'for-next' of git://git.infradead.org/users/sameo/mfd-2.6: (80 commits)
  mfd: Fix missing abx500 header file updates
  mfd: Add missing <linux/io.h> include to intel_msic
  x86, mrst: add platform support for MSIC MFD driver
  mfd: Expose TurnOnStatus in ab8500 sysfs
  mfd: Remove support for early drop ab8500 chip
  mfd: Add support for ab8500 v3.3
  mfd: Add ab8500 interrupt disable hook
  mfd: Convert db8500-prcmu panic() into pr_crit()
  mfd: Refactor db8500-prcmu request_clock() function
  mfd: Rename db8500-prcmu init function
  mfd: Fix db5500-prcmu defines
  mfd: db8500-prcmu voltage domain consumers additions
  mfd: db8500-prcmu reset code retrieval
  mfd: db8500-prcmu tweak for modem wakeup
  mfd: Add db8500-pcmu watchdog accessor functions for watchdog
  mfd: hwacc power state db8500-prcmu accessor
  mfd: Add db8500-prcmu accessors for PLL and SGA clock
  mfd: Move to the new db500 PRCMU API
  mfd: Create a common interface for dbx500 PRCMU drivers
  mfd: Initialize DB8500 PRCMU regs
  ...

Fix up trivial conflicts in
	arch/arm/mach-imx/mach-mx31moboard.c
	arch/arm/mach-omap2/board-omap3beagle.c
	arch/arm/mach-u300/include/mach/irqs.h
	drivers/mfd/wm831x-spi.c
2011-11-03 09:40:51 -07:00
Paul Gortmaker d2d8442d00 drivers/input: Add module.h to modular drivers implicitly using it
A pending cleanup will mean that module.h won't be implicitly
everywhere anymore.  Make sure the modular drivers in input dir
are actually calling out for <module.h> explicitly in advance.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
2011-10-31 19:31:16 -04:00
Dmitry Torokhov 6ad390a25a Merge branch 'next' into for-linus 2011-10-26 21:46:20 -07:00
Uwe Kleine-König 8dd93eeee8 input: Convert mc13783-ts to mc13xxx API
This is the first step to also support the touch interface of the mc13892
pmic chip.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2011-10-24 14:09:12 +02:00
Philip Rakity 341deefe8f Input: tsc2007 - make sure that X plate resistance is specified
Abort driver initialization if X plate resistance was not specified in
platform data as it will cause pressure to be always calculated as 0,
and making userspace ignore touch coordinates.

Signed-off-by: Philip Rakity <prakity@marvell.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-10-11 20:56:41 -07:00
Dmitry Torokhov d4f4158dcd Input: ad7879-i2c - wrap suspend and resume in CONFIG_PM_SLEEP
CONFIG_PM is defined when CONFIG_PM_SLEEP or CONFIG_PM_RUNTIME is defined,
however suspend and resume methods are only valid in the context of
CONFIG_PM_SLEEP. If only CONFIG_PM_RUNTIME is defined we get the following
warning (courtesy of Geerts randconfig builds):

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

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-10-06 19:43:05 -07:00
Daniel Kurtz 626af86112 Input: atmel_mxt_ts - use snprintf for sysfs attribute show method
Sysfs attribute show methods are always passed a buffer of length
PAGE_SIZE.  To keep from overwriting this buffer and causing havoc, use
snprintf() to guarantee we never write more than the buffer can hold.

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

Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
Acked-by: Nick Dyer <nick.dyer@itdev.co.uk>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-10-06 19:41:52 -07:00
Sebastian Andrzej Siewior f01536e3d6 Input: add a driver for TSC-40 serial touchscreen
This patch adds the TSC-40 serial touchscreen driver and should be
compatible with TSC-10 and TSC-25.

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

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-09-28 10:24:14 -07:00
Dmitry Torokhov c3a01ba9e4 Input: penmount - simplify unregister procedure
Since touchscreen driver does not handle any events to be sent to the
device we can close serio port first and then unregister the input device.

Tested-by: John Sung <penmount.touch@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-09-20 22:46:31 -07:00
Dmitry Torokhov 98b013eb7a Input: penmount - rework handling of different protocols
Instead of having one large switch based on product ID use pointer to
function actually doing protocol decoding.

Tested-by: John Sung <penmount.touch@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-09-20 22:46:30 -07:00
John Sung bd8f6d2ed4 Input: penmount - add PenMount 6250 support
Add multi touch support for PenMount 6250 touch controller.

Signed-off-by: John Sung <penmount.touch@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-09-20 22:46:30 -07:00
John Sung 90aba7d8b1 Input: penmount - add PenMount 3000 support
Add dual touch support for PenMount 3000 touch controller.

Signed-off-by: John Sung <penmount.touch@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-09-20 22:46:29 -07:00
John Sung c42e2e406a Input: penmount - add PenMount 6000 support
Add support for PenMount 6000 touch controller.

Signed-off-by: John Sung <penmount.touch@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-09-20 22:46:29 -07:00
John Sung 21ae508bab Input: penmount - fix the protocol
The MSB and LSB of the XY axis value are switched according to the PenMount 9000 protocol. The driver name is also changed from penmountlpc, since it is not for LPC interface at all.

Signed-off-by: John Sung <penmount.touch@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-09-20 22:46:28 -07:00
Jason Gerecke 3512069eef Input: wacom - add POINTER and DIRECT device properties
Adds INPUT_PROP_POINTER or INPUT_PROP_DIRECT as necessary to the
hardware supported by the Wacom driver. The DIRECT property is
assigned to devices with an embedded screen (i.e. touchscreens
and display tablets). The POINTER property is assigned to those
without embedded screens.

Signed-off-by: Jason Gerecke <killertofu@gmail.com>
Reviewed-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-09-08 09:42:28 -07:00
Yong Zhang ec4665c46b Input: remove IRQF_DISABLED from drivers
This flag is a NOOP and can be removed now.

Signed-off-by: Yong Zhang <yong.zhang0@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-09-07 14:19:11 -07:00
Dmitry Torokhov 7e66eaf14e Merge commit 'v3.1-rc4' into next 2011-09-07 14:18:36 -07:00
Dmitry Torokhov d3654d7ef3 Input: tsc2007 - add open and close methods
This will ensure that the device delivers input events only when there
are users.

Tested-by: Thierry Reding <thierry.reding@avionic-design.de>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-08-26 23:25:14 -07:00
Dmitry Torokhov 377dc5538c Input: tsc2007 - convert to threaded IRQ
Instead of using hard IRQ and workqueue solution switch to using threaded
interrupt handler to simplify the code and locking rules.

Tested-by: Thierry Reding <thierry.reding@avionic-design.de>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-08-26 23:21:53 -07:00
Dmitry Torokhov 66fd9385ee Input: wacom_w8001 - simplify w8001_remove
Since touchscreen driver does not handle any events to be sent to the
device we can close serio port first and then unregister the input device.

Tested-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-08-23 23:07:51 -07:00
Dmitry Torokhov e9496746cc Input: wacom_w8001 - implement open and close
Implement open() and close() methods for the input device so that we
do not start the device unless there are users listening to the events.

Acked-by: Chris Bagwell <chris@cnpbagwell.com>
Tested-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-08-23 23:07:47 -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
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
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 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
Wolfram Sang 77da38387e Input: wm97xx - mark channels which need pen_down
Currently, battery drivers also use poll_sample() provided by the
wm97xx-core but this code always checks if the pen is down. Mark the
channels which really need this (i.e. for the touchscreen) with the
PEN_DOWN bit, and skip the checks otherwise. Now, the battery channels
can always be read.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-07-04 19:31:47 -07:00
Wolfram Sang c8f205258b Input: wm97xx - refactor channel selection in poll_sample()
The current implementation of poll_sample() has the problem that one of
its arguments, the channel to be selected, differs from wm9713 to other
variants. This parameter gets passed to the (currently unused)
mach-specific functions pre_sample() and post_sample() which thus have
to deal with codec-specific differences. Refactor the routine so that
the argument to poll_sample() is generic for all codecs and do necessary
conversions only in the codec-specific driver. The outcome even uses
less code and removes the non-standard use of the PEN_DOWN bit to mark
the AUX-channels.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-07-04 19:31:38 -07:00
Wolfram Sang 2456689b3b Input: wm97xx - remove redundant define
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-07-04 19:31:28 -07:00
Iiro Valkonen a93d4f2d02 Input: atmel_mxt_ts - handle objects with multiple instances correctly
Handle the objects with multiple instances correctly when the configuration
data is loaded.

Signed-off-by: Iiro Valkonen <iiro.valkonen@atmel.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-07-04 03:19:20 -07:00
Iiro Valkonen 81c88a711a Input: atmel_mxt_ts - update object list
Update the object list to include new objects, and add unique identifiers
so we can distinguish between old & new generation of the same object.

Signed-off-by: Iiro Valkonen <iiro.valkonen@atmel.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-07-04 03:19:11 -07:00
Hans-Christian Egtvedt 7c40952295 Input: update author email for gpio_mouse, at32psif, and atmel-wm97xx
This patch updates the email address of the gpio_mouse, at32psif, and
atmel-wm97xx drivers supported by me to an email account I will use on a more
regular basis in the future.

Signed-off-by: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-06-29 00:26:02 -07:00
Igor Grinberg 58c244009e Input: ads7846 - cleanup GPIO initialization
Use gpio_request_one() instead of multiple gpiolib calls.
This also simplifies error handling a bit.

Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-06-27 13:08:05 -07:00
Axel Lin 6a592a7f45 Input: tnetv107x-ts - fix MODULE_ALIAS
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>
2011-06-27 12:43:34 -07:00
Dmitry Torokhov b73077eb03 Merge branch 'next' into for-linus 2011-05-24 00:06:26 -07:00
Thierry Reding 891e376b1e Input: tsc2007 - add X, Y and Z fuzz factors to platform data
These new platform-specific values can be used to set the fuzz parameter
passed to the input_set_abs_params() function for the ABS_X, ABS_Y and
ABS_PRESSURE axes.

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-05-17 09:38:53 -07:00
Thierry Reding 1af38eac8c Input: tsc2007 - add poll_period parameter to platform data
This new parameter allows the polling frequency to be configured while
keeping the default of once every millisecond.

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-05-17 09:38:49 -07:00
Thierry Reding 2d137c7ed2 Input: tsc2007 - add poll_delay parameter to platform data
Depending on the quality of the touch panel, the time for the X-, X+, Y-
and Y+ inputs to settle may vary. The poll_delay parameter can be used
to override the default of 1 millisecond.

Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Kwangwoo Lee <kwangwoo.lee@gmail.com>
Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-05-17 09:38:43 -07:00
Thierry Reding 84005eb5ea Input: tsc2007 - add max_rt parameter to platform data
Finger touch events or very quick stylus events on low-quality panels
can cause the tsc2007 to read bogus values. Looking at oscilloscope
snapshots, this seems to be caused by the touch event disappearing
during the measurements. These bogus values result in misclicks, where
the X and Y values deviate from the real position.

Most of these misclicks can be filtered out by setting a low enough
threshold for the maximum resistance (which is loosely the inverse of
the pressure) allowed to consider a set of values valid. Since this
behaviour is largely dependent on the type and quality of the panel,
this commit introduces the max_rt parameter. The default value is kept
at MAX_12BIT.

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-05-17 09:38:39 -07:00
Thierry Reding 4a1a42af0a Input: tsc2007 - debounce pressure measurement
When the controller signals a pen-down event via the platform-specific
GPIO, while the sample values indicate an invalid measurement, the
measurement needs to be repeated.

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-05-17 09:38:34 -07:00
Julia Lawall 215ef98677 Input: atmel_tsadcc - correct call to input_free_device
This error handling code can be reached before ts_dev->input is
initialized, so it is safer to always use the original name,
input_dev.

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-05-14 23:42:41 -07:00
Igor Grinberg 1201e7e676 Input: ads7846 - fix gpio_pendown configuration
The pendown gpio was requested but not configured for input.
Configure it for input.

Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-05-12 08:28:57 -07:00
Alexander Stein ebcaaad9d5 Input: ads7846 - add possibility to use external vref on ads7846
Just set vref_mv in your platform config to use external vref. Otherwise
the internal one is used.

Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-05-12 08:28:56 -07:00
Alexander Stein 28350e330c Input: ads7846 - remove unused variable from struct ads7845_ser_req
Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-05-05 08:50:53 -07:00
Alexander Stein 1dbe7dada2 Input: ads7846 - make transfer buffers DMA safe
req.sample needs its own cacheline otherwise accessing req.msg fetches
it in again.

Note: This effect doesn't occur if the underlying SPI driver doesn't use
DMA at all.

Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-05-05 08:50:47 -07:00
Axel Lin 4296f1ad5a Input: h3600_ts_input - fix a leak of the IRQ during init failure
Make sure we are passing the same cookie in all calls to request_irq() and
free_irq().

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-05-03 09:02:13 -07:00
Mark Brown bf283707d5 Input: wm831x-ts - move BTN_TOUCH reporting to data transfer
Don't report BTN_TOUCH until we've got data as some less robust applications
can be confused by getting a touch event by itself and it doesn't seem
unreasonable for them to expect coordinates along with a touch.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-04-27 23:12:22 -07:00
Mark Brown acad9853b9 Input: wm831x-ts - allow IRQ flags to be specified
This allows maximum flexibility for configuring the direct GPIO based
interrupts.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-04-27 23:12:16 -07:00
Mark Brown f534666815 Input: wm831x-ts - fix races with IRQ management
If the WM831x pen down and data IRQs run in parallel it is possible for the
data and pen down IRQs to deadlock themselves as one is part way through
disabling its operation while the other is part way through enabling. Fix
this by always disabling the pen down interrupt while data is active and
vice versa.  When a changeover is required we disable the IRQ that is to
be stopped then schedule work that will enable the new IRQ.

We need to handle the data flow in the data IRQ as the readback from the
device needs to be ordered correctly with the IRQ for robust operation.

This also fixes an issue when using the built in IRQs due to enable_irq()
not being valid from interrupt context on an interrupt controller with bus
operations like the built in IRQ controller - this issue may also have
affected other interrupt controllers.  We can't rely on having the data
and pen down IRQs available via GPIOs on the CPU on every system.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-04-27 23:12:12 -07:00
Dmitry Torokhov 03351ff4d8 Merge commit 'v2.6.39-rc4' into next 2011-04-22 23:35:25 -07:00
Linus Torvalds 96fd2d57b8 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
* '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
2011-04-18 13:29:03 -07:00
Joonyoung Shim 8b86c1c28f Input: atmel_mxt_ts - convert to MT protocol B
Atmel touchscreen chips can use MT protocol B because they can assign
unique id to ABS_MT_TRACKING_ID from finger id provided by hardware.

Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Reviewed-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-04-12 23:34:21 -07:00
Iiro Valkonen 08960a070a Input: atmel_mxt_ts - make CHG line high after enabling interrupts
Make the CHG line (interrupt line) go high after the interrupts have been
enabled to make sure we don't miss the falling edge.

Signed-off-by: Iiro Valkonen <iiro.valkonen@atmel.com>
Acked-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-04-12 23:34:16 -07:00
Joonyoung Shim 910d805130 Input: atmel_mxt_ts - support 12bit resolution
Atmel touchscreen chip can support 12bit resolution and this patch
modifies to get maximum x and y size from platform data.

Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Acked-by: Iiro Valkonen <iiro.valkonen@atmel.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-04-12 23:34:11 -07:00
Zhang Jiejing 4203306506 Input: add driver for Maxim max11801 touchscreen controller
Add MAXI max11801 resistive touchscreen controller driver. This driver
uses Auto Mode and Aperture Mode.

Support for other max1180x devices can be added to this driver as well,
as they use almost the same register addresses and codes.

You can find data sheet here:
http://www.maxim-ic.com/datasheet/index.mvp/id/5943

Signed-off-by: Zhang Jiejing <jiejing.zhang@freescale.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-04-11 23:53:51 -07:00
Linus Torvalds 42933bac11 Merge branch 'for-linus2' of git://git.profusion.mobi/users/lucas/linux-2.6
* 'for-linus2' of git://git.profusion.mobi/users/lucas/linux-2.6:
  Fix common misspellings
2011-04-07 11:14:49 -07:00
Christoph Fritz 908433833c Input: h3600_ts - fix error handling at connect
In case of an error in h3600ts_connect(), deconstruct in correct order
and with the right calls.

Signed-off-by: Christoph Fritz <chf.fritz@googlemail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-04-06 15:34:32 -07:00
Linus Torvalds 899631c791 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
  Input: rpckbd - fix a leak of the IRQ during init failure
  Input: wacom - add support for Lenovo tablet ID (0xE6)
  Input: i8042 - downgrade selftest error message to dbg()
  Input: synaptics - fix crash in synaptics_module_init()
  Input: spear-keyboard - fix inverted condition in interrupt handler
  Input: uinput - allow for 0/0 min/max on absolute axes.
  Input: sparse-keymap - report KEY_UNKNOWN for unknown scan codes
  Input: sparse-keymap - report scancodes with key events
  Input: h3600_ts_input - fix a spelling error
  Input: wacom - report resolution for pen devices
  Input: wacom - constify wacom_features for a new missed Bamboo models
2011-04-05 12:35:29 -07:00
Lucas De Marchi 25985edced Fix common misspellings
Fixes generated by 'codespell' and manually reviewed.

Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
2011-03-31 11:26:23 -03:00
Thomas Gleixner dced35aeb0 drivers: Final irq namespace conversion
Scripted with coccinelle.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2011-03-29 14:48:19 +02:00
Sylvestre Ledru d51ca07634 Input: h3600_ts_input - fix a spelling error
Signed-off-by: Sylvestre Ledru <sylvestre.ledru@scilab.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-03-26 22:53:08 -07:00
Linus Torvalds 24c6d02fe8 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
  Input: tsc2005 - fix locking issue
  Input: tsc2005 - use relative jiffies to schedule the watchdog
  Input: tsc2005 - driver should depend on GENERIC_HARDIRQS
2011-03-25 20:50:12 -07:00
Aaro Koskinen a0fa2206f5 Input: tsc2005 - fix locking issue
Commit 0b950d3 (Input: tsc2005 - add open/close) introduced a
locking issue with the ESD watchdog: __tsc2005_disable() is calling
cancel_delayed_work_sync() with mutex held, and the work also needs the
same mutex.

Fix the problem by using mutex_trylock() in tsc2005_esd_work(). If the
mutex is taken, we know we are in the middle of disable or enable and
the watchdog check can be skipped.

Signed-off-by: Aaro Koskinen <aaro.koskinen@nokia.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-03-23 23:50:36 -07:00
Aaro Koskinen 903427955b Input: tsc2005 - use relative jiffies to schedule the watchdog
Use relative jiffies to schedule the watchdog. Otherwise it will run
like a mad one.

Signed-off-by: Aaro Koskinen <aaro.koskinen@nokia.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-03-23 23:50:31 -07:00
Geert Uytterhoeven ddca6a3134 Input: tsc2005 - driver should depend on GENERIC_HARDIRQS
drivers/input/touchscreen/tsc2005.c: In function ‘tsc2005_probe’:
drivers/input/touchscreen/tsc2005.c:666: error: implicit declaration of function ‘set_irq_wake’

In addition, migrate from set_irq_wake() (marked "do not use" as of commit
a0cd9ca2b9 ("genirq: Namespace cleanup")) to
irq_set_irq_wake().

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-03-23 23:49:17 -07:00
Linus Torvalds a952baa034 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (64 commits)
  Input: tsc2005 - remove 'disable' sysfs attribute
  Input: tsc2005 - add open/close
  Input: tsc2005 - handle read errors from SPI layer
  Input: tsc2005 - do not rearm timer in hardirq handler
  Input: tsc2005 - don't use work for 'pen up' handling
  Input: tsc2005 - do not use 0 in place of NULL
  Input: tsc2005 - use true/false for boolean variables
  Input: tsc2005 - hide selftest attribute if we can't reset
  Input: tsc2005 - rework driver initialization code
  Input: tsc2005 - set up bus type in input device
  Input: tsc2005 - set up parent device
  Input: tsc2005 - clear driver data after unbinding
  Input: tsc2005 - add module description
  Input: tsc2005 - remove driver banner message
  Input: tsc2005 - remove incorrect module alias
  Input: tsc2005 - convert to using dev_pm_ops
  Input: tsc2005 - use spi_get/set_drvdata()
  Input: introduce tsc2005 driver
  Input: xen-kbdfront - move to drivers/input/misc
  Input: xen-kbdfront - add grant reference for shared page
  ...
2011-03-19 22:27:06 -07:00
Dmitry Torokhov 97eb3f2435 Merge branch 'next' into for-linus 2011-03-18 23:38:50 -07:00
Dmitry Torokhov def179c271 Merge branch 'tsc2005' into next 2011-03-16 23:29:56 -07:00
Dmitry Torokhov 5cb81d19ba Input: tsc2005 - remove 'disable' sysfs attribute
I believe that enable/disable functionality should not be implemented on
the individual driver level but rather in device core, potentially
reusing parts of PM framework. Therefore the driver-specific "disable"
attribute is removed from the mainline driver.

Tested-by: Aaro Koskinen <aaro.koskinen@nokia.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-03-16 23:29:33 -07:00
Dmitry Torokhov 0b950d3d7c Input: tsc2005 - add open/close
Introduce open and close methods for the input device to keep the device
powered down when it is not in use. Also rework interaction between
interrupt thread and starting/shutting off/resetting the device: instead
of taking a mutex in the intterrupt thread and elsewhere disable interrupts
before transitioning the device in a new state.

The ESD handling is also separated from the IRQ thread; we poll regularly
at a given interval and simply skip reads if we see that valid interrupt
happened not so long ago. This allows us not cancel and reschedule ESD
work from interrupt context all the time.

Tested-by: Aaro Koskinen <aaro.koskinen@nokia.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-03-16 23:29:29 -07:00
Dmitry Torokhov 71f80045d4 Input: tsc2005 - handle read errors from SPI layer
Tested-by: Aaro Koskinen <aaro.koskinen@nokia.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-03-16 23:29:22 -07:00
Dmitry Torokhov dacb650f12 Input: tsc2005 - do not rearm timer in hardirq handler
We will most likely rearm it yet again the IRQ thread so doing it here
is pointless.

Tested-by: Aaro Koskinen <aaro.koskinen@nokia.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-03-16 23:29:16 -07:00
Dmitry Torokhov 80cc2f0c92 Input: tsc2005 - don't use work for 'pen up' handling
We do not need process context to send input events so let's switch to
a regular timer. I am going to get rid of taking ts->mutex in
tsc2005_irq_thread() later.

Tested-by: Aaro Koskinen <aaro.koskinen@nokia.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-03-16 23:29:12 -07:00
Dmitry Torokhov 9a6e180af7 Input: tsc2005 - do not use 0 in place of NULL
Sparse in unhappy when people use 0 instead of NULL for pointers so
let's rework the way we initialize spi_transfer structure in
tsc2005_cmd() and tsc2005_write().

Tested-by: Aaro Koskinen <aaro.koskinen@nokia.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-03-16 23:29:08 -07:00
Dmitry Torokhov c8b6846a75 Input: tsc2005 - use true/false for boolean variables
Tested-by: Aaro Koskinen <aaro.koskinen@nokia.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-03-16 23:29:04 -07:00
Dmitry Torokhov 8dbcc432c2 Input: tsc2005 - hide selftest attribute if we can't reset
If implementation to perform self-test/reset has not been provided by the
platform code hide 'selftest' sysfs attribute instead of returning error
when someone tries to use it.

Tested-by: Aaro Koskinen <aaro.koskinen@nokia.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-03-16 23:29:00 -07:00
Dmitry Torokhov 99bb892d8a Input: tsc2005 - rework driver initialization code
We need to make sure we have time/work initialized before requesting and
enabling interrupts, otherwise we might start using them way too early.

Tested-by: Aaro Koskinen <aaro.koskinen@nokia.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-03-16 23:28:55 -07:00
Dmitry Torokhov f8a67139c6 Input: tsc2005 - set up bus type in input device
We know what bus we are residing on (SPI) so let's make this data
available to the users.

Tested-by: Aaro Koskinen <aaro.koskinen@nokia.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-03-16 23:28:40 -07:00
Dmitry Torokhov b4b480a8d6 Input: tsc2005 - set up parent device
Set up SPI device as parent of the input device so it gets placed into
proper place in sysfs tree.

Tested-by: Aaro Koskinen <aaro.koskinen@nokia.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-03-16 23:28:30 -07:00
Dmitry Torokhov 2721a89ac4 Input: tsc2005 - clear driver data after unbinding
We should not leave garbage pointers in driver structure after we unbind
it from the device or if bind fails.

Tested-by: Aaro Koskinen <aaro.koskinen@nokia.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-03-16 23:28:23 -07:00
Dmitry Torokhov b88aa494c2 Input: tsc2005 - add module description
Add proper module description so that it would show in 'modinfo'
output.

Tested-by: Aaro Koskinen <aaro.koskinen@nokia.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-03-16 23:28:18 -07:00
Dmitry Torokhov bcd11879fb Input: tsc2005 - remove driver banner message
The boot process is noisy as it is and input core already announces
all new device so let's get rid of the banner message in the driver.

Tested-by: Aaro Koskinen <aaro.koskinen@nokia.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-03-16 23:28:12 -07:00
Dmitry Torokhov ef5a672f8d Input: tsc2005 - remove incorrect module alias
TSC2005 is not a platform driver so it should not define "platform:tsc2005"
module alias.

Tested-by: Aaro Koskinen <aaro.koskinen@nokia.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-03-16 23:28:08 -07:00
Dmitry Torokhov 3ff8ff53aa Input: tsc2005 - convert to using dev_pm_ops
Newer code should not be using legacy suspend/resume methods but
rather supply dev_pm_ops structure as it allows better control
over power management.

Tested-by: Aaro Koskinen <aaro.koskinen@nokia.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-03-16 23:28:04 -07:00
Dmitry Torokhov 6b007d62fa Input: tsc2005 - use spi_get/set_drvdata()
Instead of peeking into underlying device and using dev_get/set_drvdata(),
let's use SPI layer's implementation to access driver-private data
(which may be different from driver-core private data).

Tested-by: Aaro Koskinen <aaro.koskinen@nokia.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-03-16 23:27:57 -07:00
Lauri Leukkunen 37bd44694c Input: introduce tsc2005 driver
Discussions:

http://www.mail-archive.com/linux-omap@vger.kernel.org/msg26748.html

Introduce a driver for the Texas Instruments TSC2005 touchscreen
controller (http://focus.ti.com/docs/prod/folders/print/tsc2005.html).

The patch is based on a driver by Lauri Leukkunen, with modifications
by David Brownell, Phil Carmody, Imre Deak, Hiroshi DOYU, Ari Kauppi,
Tony Lindgren, Jarkko Nikula, Eero Nurkkala and Roman Tereshonkov.

Signed-off-by: Lauri Leukkunen <lauri.leukkunen@nokia.com>
[aaro.koskinen@nokia.com: patch description, rebasing & cleanup]
Signed-off-by: Aaro Koskinen <aaro.koskinen@nokia.com>
[ext-srikar.1.bhavanarayana@nokia.com: various fixes]
Signed-off-by: Srikar <ext-srikar.1.bhavanarayana@nokia.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-03-16 23:27:39 -07:00
Joonyoung Shim 4c75de32eb Input: atmel_mxt_ts - add objects of mXT1386 chip
Atmel mXT1386 chip is operated by atmel_mxt_ts driver and it has some
different objects.

Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-03-14 21:42:46 -07:00
Joonyoung Shim 979a72dad9 Input: atmel_mxt_ts - remove firmware version check
Atmel touchscreen chips have different firmware version with each chip,
so we cannot distinguish attribute of chip by firmware version.

Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-03-14 21:42:06 -07:00
Mark Brown e7cbb90ad2 Input: wm831x-ts - ensure the controller is in a known state on open
Explicitly set all the enable bits when opening the device just in case
something left the device in an unexpected state.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-03-14 21:41:29 -07:00
Mark Brown 23c483d29f Input: wm831x-ts - default pressure measurements on
tslib expects pressure measurements so enable them by default for better
compatibility.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-03-12 20:49:07 -08:00
Iiro Valkonen 0d3c07378b Input: atmel_mxt_ts - remove matrix size check
The mxt_check_matrix_size() is currently setting the CTE mode to match
xline/yline information that is in the platform data, but it does not
take into account for example the fact that we could have a key array
in use too (key array would use some x/y lines as well).

It would be better to simply rely on the configuration data, and make
sure that the CTE mode set in there matches the touch object (touchscreen,
key array, proximity) configuration (which are set in the config data too).

Signed-off-by: Iiro Valkonen <iiro.valkonen@atmel.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-02-25 09:27:00 -08:00
Iiro Valkonen 919ed895f0 Input: atmel_mxt_ts - allow board code to specify IRQ flags
Different board have different requirements/setups so let's be more
flexible.

Signed-off-by: Iiro Valkonen <iiro.valkonen@atmel.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-02-21 01:02:34 -08:00
Iiro Valkonen 71749f5c66 Input: atmel_mxt_ts - allow board code to suppliy controller config
As there is no common configuration settings that would work in every
situation, remove the fixed config data from driver code and add
config data to platform data.

Signed-off-by: Iiro Valkonen <iiro.valkonen@atmel.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-02-21 01:02:33 -08:00
Chris Leech 46ee2a05a4 Input: atmel_mxt_ts - add mXT224 identifier to id_table
"mXT224" is used in the Intel mid firmware in SFI tables to identify the
presence of this I2C device.

Signed-off-by: Chris Leech <christopher.leech@linux.intel.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-02-21 01:02:33 -08:00