Commit graph

827 commits

Author SHA1 Message Date
Heiko Stübner 499e61279d Input: zforce - fix possible driver hang during suspend
handle_level_irq masks the interrupt before handling it, and only
unmasks it after the handler is finished. So when a touch event
happens after threads are suspended, but before the system is fully asleep
the irq handler tries to wakeup the thread which will only happen on the
next resume, resulting in the wakeup event never being sent and the driver
not being able to wake the system from sleep due to the masked irq.

Therefore move the wakeup_event to a small non-threaded handler.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-12-15 02:53:13 -08:00
Dmitry Torokhov 5d43889c07 Linux 3.13-rc3
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.15 (GNU/Linux)
 
 iQEcBAABAgAGBQJSogqUAAoJEHm+PkMAQRiGM2MIAJrr5KEXEWuuAR4+JkkWBK7A
 +dVT4n1MM4wP/aCIyriSlq7kgT03Wxk4Q4wKsj2wZvDQkNgEQjrctgIihc75jqi5
 126nmT3YXJLwgDpFA3RHZUWve3j3vfUG53rRuk7K9Xx1sGWU3Ls7BuInvQZ//+QS
 6UB4UuEAalmose5U8ToXQfMqZhjwreZKeb64TEZwFvu2klv4cnka1L/zHbmQGgRg
 2Pfv+aUrjsYE8s9lkEKX8MIQsDn28Q5Lsv7XIEQwo2at4rYbJaxX6usuC1OI0MQ5
 BLUn1GgtvOidq6FzSg6kXiA/MJYH3J0S+p4uULWAprxA+KeJRbWNRroM94W1qAk=
 =1Wcq
 -----END PGP SIGNATURE-----

Merge tag 'v3.13-rc3' into for-linus

Merging with the mainline to sync up on changes to serio core.
2013-12-09 22:22:40 -08:00
Christian Engelmayer 4ef38351d7 Input: usbtouchscreen - separate report and transmit buffer size handling
This patch supports the separate handling of the USB transfer buffer length
and the length of the buffer used for multi packet support. For devices
supporting multiple report or diagnostic packets, the USB transfer size is now
limited to the USB endpoints wMaxPacketSize - otherwise it defaults to the
configured report packet size as before.

This fixes an issue where event reporting can be delayed for an arbitrary
time for multi packet devices. For instance the report size for eGalax devices
is defined to the 16 byte maximum diagnostic packet size as opposed to the 5
byte report packet size. In case the driver requests 16 byte from the USB
interrupt endpoint, the USB host controller driver needs to split up the
request into 2 accesses according to the endpoints wMaxPacketSize of 8 byte.
When the first transfer is answered by the eGalax device with not less than
the full 8 byte requested, the host controller has got no way of knowing
whether the touch controller has got additional data queued and will issue
the second transfer. If per example a liftoff event finishes at such a
wMaxPacketSize boundary, the data will not be available to the usbtouch driver
until a further event is triggered and transfered to the host. From user
perspective the BTN_TOUCH release event in this case is stuck until the next
touch down event.

Signed-off-by: Christian Engelmayer <christian.engelmayer@frequentis.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-12-01 22:18:04 -08:00
Dmitry Torokhov b884eb8c85 Input: sur40 - suppress false uninitialized variable warning
We will never use packet_id before initializing it as we start with
"need_blobs == -1" and will set packet_id there.

Also use le32_to_cpu when fetching header->packet_id.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-12-01 22:17:35 -08:00
Linus Torvalds 76ae076f99 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
Pull input updates from Dmitry Torokhov:
 "A new driver for Surface 2.0/Pixelsense touchscreen and a couple of
  driver fixups"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
  MAINTAINERS - add keyboard driver to Hyper-V file list
  Input: atmel-wm97xx - fix compile error
  Input: hp_sdc_rtc - unlock on error in hp_sdc_rtc_read_i8042timer()
  Input: cyttsp4 -  remove unnecessary work pending test
  Input: add sur40 driver for Samsung SUR40 (aka MS Surface 2.0/Pixelsense)
2013-11-24 10:45:29 -08:00
Dmitry Torokhov 2d4bba146e Input: atmel-wm97xx - fix compile error
Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-11-20 21:15:52 -08:00
Xie XiuQi 0221e670cd Input: cyttsp4 - remove unnecessary work pending test
Remove unnecessary work pending test before calling schedule_work().  It
has been tested in queue_work_on() already.

Signed-off-by: Xie XiuQi <xiexiuqi@huawei.com>
Reviewed-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-11-20 21:15:26 -08:00
Florian Echtler bdb5c57f20 Input: add sur40 driver for Samsung SUR40 (aka MS Surface 2.0/Pixelsense)
This patch adds support for the built-in multitouch sensor in the Samsung
SUR40 touchscreen device, also known as Microsoft Surface 2.0 or Microsoft
Pixelsense. Support for raw video output from the sensor as well as the
accelerometer will be added in a later patch.

Signed-off-by: Florian Echtler <floe@butterbrot.org>
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Reviewed-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-11-20 06:38:44 -08:00
Linus Torvalds e0da5c9a49 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid
Pull HID updates from Jiri Kosina:
 - i2c-hid is not querying init reports any more, as it's not mandated
   by the spec, and annoys quite a few devices during enumeration, by
   Bibek Basu
 - a lot of fixes for Logitech devices, by Simon Wood
 - hid-apple now has an option to switch between Option and Command
   mode, by Nanno Langstraat
 - Some more workarounds for severely broken ELO devices, by Oliver
   Neukum
 - more devm conversions, by Benjamin Tissoires
 - wiimote correctness fixes, by David Herrmann
 - a lot of added support for various new device IDs and random small
   fixes here and there"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid: (34 commits)
  HID: enable Mayflash USB Gamecube Adapter
  HID: sony: Add force feedback support for Dualshock3 USB
  Input: usbtouchscreen: ignore eGalax/D-Wav/EETI HIDs
  HID: don't ignore eGalax/D-Wav/EETI HIDs
  HID: roccat: add missing special driver declarations
  HID:hid-lg4ff: Correct Auto-center strength for wheels other than MOMO and MOMO2
  HID:hid-lg4ff: Initialize device properties before we touch autocentering.
  HID:hid-lg4ff: ensure ConstantForce is disabled when set to 0
  HID:hid-lg4ff: Switch autocentering off when strength is set to zero.
  HID:hid-lg4ff: Scale autocentering force properly on Logitech wheel
  HID: roccat: fix Coverity CID 141438
  HID: multitouch: add manufacturer to Kconfig help text
  HID: logitech-dj: small cleanup in rdcat()
  HID: remove self-assignment from hid_input_report
  HID: hid-sensor-hub: fix report size
  HID: i2c-hid: Stop querying for init reports
  HID: roccat: add support for Ryos MK keyboards
  HID: roccat: generalize some common code
  HID: roccat: add new device return value
  HID: wiimote: add pro-controller analog stick calibration
  ...
2013-11-15 16:48:22 -08:00
Linus Torvalds 4937e2a6f9 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
Pull input updates from Dmitry Torokhov:
 "Updates for the input subsystem.  You will get an new drivers for
  Hyper-V synthetic keyboard and for Neonode zForce touchscreens, plus a
  bunch of driver fixes and cleanups"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (49 commits)
  Revert "Input: ALPS - add support for model found on Dell XT2"
  arm: dts: am335x sk: add touchscreen support
  Input: ti_am335x_tsc - fix spelling mistake in TSC/ADC DT binding
  Input: cyttsp4 - replace IS_ERR and PTR_ERR with PTR_ERR_OR_ZERO
  Input: mma8450 - add missing i2c_set_clientdata() in mma8450_probe()
  Input: mpu3050 - add missing i2c_set_clientdata() in mpu3050_probe()
  Input: tnetv107x-keypad - make irqs signed for error handling
  Input: add driver for Neonode zForce based touchscreens
  Input: sh_keysc - enable the driver on all ARM platforms
  Input: remove a redundant max() call
  Input: mousedev - allow disabling even without CONFIG_EXPERT
  Input: allow deselecting serio drivers even without CONFIG_EXPERT
  Input: i8042 - add PNP modaliases
  Input: evdev - fall back to vmalloc for client event buffer
  Input: cypress_ps2 - do not consider data bad if palm is detected
  Input: cypress_ps2 - remove useless cast
  Input: fix PWM-related undefined reference errors
  Input: ALPS - change secondary device's name
  Input: wacom - not all multi-interface devices support touch
  Input: nspire-keypad - add missing clk_disable_unprepare() on error path
  ...
2013-11-15 16:43:53 -08:00
Wolfram Sang 16735d022f tree-wide: use reinit_completion instead of INIT_COMPLETION
Use this new function to make code more comprehensible, since we are
reinitialzing the completion, not initializing.

[akpm@linux-foundation.org: linux-next resyncs]
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Acked-by: Linus Walleij <linus.walleij@linaro.org> (personally at LCE13)
Cc: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-11-15 09:32:21 +09:00
Forest Bond ae2aa3a512 Input: usbtouchscreen: ignore eGalax/D-Wav/EETI HIDs
The HID driver now handles these devices, regardless of what protocol
the device claims it supports.

Signed-off-by: Forest Bond <forest.bond@rapidrollout.com>
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2013-11-11 11:19:26 +01:00
Felipe Balbi c9aeb249bf Input: ti_am335x_tsc - fix spelling mistake in TSC/ADC DT binding
There was a spelling mistake on TSC/ADC binding where "coordinate" was
spelled as "coordiante".

We can't simply fix the error due to DT being an ABI, the approach taken
was to first use correct spelling and if that fails, fall back to
miss-spelled version.

It's unfortunate that has creeped into the tree.

Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-11-11 00:01:45 -08:00
Duan Jiong a013781747 Input: cyttsp4 - replace IS_ERR and PTR_ERR with PTR_ERR_OR_ZERO
This patch fixes coccinelle error regarding usage of IS_ERR and
PTR_ERR instead of PTR_ERR_OR_ZERO.

Signed-off-by: Duan Jiong <duanj.fnst@cn.fujitsu.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-11-11 00:01:45 -08:00
Heiko Stübner c6d81bd723 Input: add driver for Neonode zForce based touchscreens
This adds a driver for touchscreens using the zforce infrared
technology from Neonode connected via i2c to the host system.

It supports multitouch with up to two fingers and tracking of the
contacts in hardware.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-10-31 08:46:08 -07:00
Dmitry Torokhov e3c55d406b Linux 3.12-rc4
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.14 (GNU/Linux)
 
 iQEcBAABAgAGBQJSUc9zAAoJEHm+PkMAQRiG9DMH/AtpuAF6LlMRPjrCeuJQ1pyh
 T0IUO+CsLKO6qtM5IyweP8V6zaasNjIuW1+B6IwVIl8aOrM+M7CwRiKvpey26ldM
 I8G2ron7hqSOSQqSQs20jN2yGAqQGpYIbTmpdGLAjQ350NNNvEKthbP5SZR5PAmE
 UuIx5OGEkaOyZXvCZJXU9AZkCxbihlMSt2zFVxybq2pwnGezRUYgCigE81aeyE0I
 QLwzzMVdkCxtZEpkdJMpLILAz22jN4RoVDbXRa2XC7dA9I2PEEXI9CcLzqCsx2Ii
 8eYS+no2K5N2rrpER7JFUB2B/2X8FaVDE+aJBCkfbtwaYTV9UYLq3a/sKVpo1Cs=
 =xSFJ
 -----END PGP SIGNATURE-----

Merge tag 'v3.12-rc4' into next

Merge with mainline to bring in changes to input subsystem that were
committed through other trees.
2013-10-08 08:43:00 -07:00
Sachin Kamat 4d6e482675 Input: st1232 - include linux/of.h header
'of_match_ptr' is defined in linux/of.h. Include it explicitly.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-10-06 01:22:29 -07:00
Sachin Kamat 8e6146bf5b Input: ti_am335x_tsc - remove redundant of_match_ptr
The data structure of_match_ptr() protects is always compiled in.
Hence of_match_ptr() is not needed.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-10-06 01:22:26 -07:00
Sachin Kamat 085f17c654 Input: egalax_ts - remove redundant of_match_ptr
The data structure of_match_ptr() protects is always compiled in.
Hence of_match_ptr() is not needed.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-10-06 01:22:26 -07:00
Greg Kroah-Hartman 3ffdea3fec First round of new drivers, functionality and cleanups for IIO in the 3.13 cycle
A number of new drivers and some new functionality + a lot of cleanups
 all over IIO.
 
 New Core Elements
 
 1) New INT_TIME info_mask element for integration time, which may have
    different effects on measurement noise and similar, than an amplifier
    and hence is different from existing SCALE.  Already existed in some
    drivers as a custom attribute.
 
 2) Introduce a iio_push_buffers_with_timestamp helper to cover the common
    case of filling the last 64 bits of data to be passed to the buffer with
    a timestamp.  Applied to lots of drivers. Cuts down on repeated code and
    moves a slightly fiddly bit of logic into a single location.
 
 3) Introduce info_mask_[shared_by_dir/shared_by_all] elements to allow support
    of elements such as sampling_frequency which is typically shared by all
    input channels on a device.  This reduces code and makes these controls
    available from in kernel consumers of IIO devices.
 
 New drivers
 
 1) MCP3422/3/4 ADC
 
 2) TSL4531 ambient light sensor
 
 3) TCS3472/5 color light sensor
 
 4) GP2AP020A00F ambient light / proximity sensor
 
 5) LPS001WP support added to ST pressure sensor driver.
 
 New driver functionality
 
 1) ti_am335x_adc Add buffered sampling support.
    This device has a hardware fifo that is fed directly into an IIO kfifo
    buffer based on a watershed interrupt.  Note this will act as an example
    of how to handle this increasingly common type of device.
    The only previous example - sca3000 - take a less than optimal approach
    which is largely why it is still in staging.
    A couple of little cleanups for that new functionality followed later.
 
 Core cleanups:
 
 1) MAINTAINERS - Sachin actually brought my email address up to date because
    I said I'd do it and never got around to it :)
 
 2) Assign buffer list elements as single element lists to simplify the
    iio_buffer_is_active logic.
 
 3) wake_up_interruptible_poll instead of wake_up_interruptible to only wake
    up threads waiting for poll notifications.
 
 4) Add O_CLOEXEC flag to anon_inode_get_fd call for IIO event interface.
 
 5) Change iio_push_to_buffers to take a void * pointer so as to avoid some
    annoying and unnecessary type casts.
 
 6) iio_compute_scan_bytes incorrectly took a long rather than unsigned long.
 
 7) Various minor tidy ups.
 
 Driver cleanups (in no particular order)
 
 1) Another set of devm_ allocations patches from Sachin Kamat.
 
 2) tsl2x7x - 0 to NULL cleanup.
 
 3) hmc5843 - fix missing > in MODULE_AUTHOR
 
 4) Set of strict_strto* to kstrto* conversions.
 
 5) mxs-lradc - fix ordering of resource removal to match creation
 
 6) mxs-lradc - add MODULE_ALIAS
 
 7) adc7606 - drop a work pending test duplicated in core functions.
 
 8) hmc5843 - devm_ allocation patch
 
 9) Series of redundant breaks removed.
 
 10) ad2s1200 - pr_err -> dev_err
 
 11) adjd_s311 - use INT_TIME
 
 12)  ST sensors - large set of cleanups from Lee Jones and removed restriction
     to using only triggers provided by the st_sensors themselves from
     Dennis Ciocca.
 
 13) dummy and tmp006 provide sampling_frequency via info_mask_shared_by_all.
 
 14) tcs3472 - fix incorrect buffer size and wrong device pointer used in
     suspend / resume functions.
 
 15) max1363 - use defaults for buffer setup ops as provided by the triggered
     buffer helpers as they are the same as were specified in max1363 driver.
 
 16) Trivial tidy ups in a number of other drivers.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.21 (GNU/Linux)
 
 iQIcBAABAgAGBQJSP0HUAAoJEFSFNJnE9BaIwiQQAKuJaoPrdMezm1TDaqgrzQWQ
 U95mSJ19xPYVSQVNHFLFidcajhADRMFhMUGOJF64VZObEdOtFWI0UkrJjFhYtJTt
 n1B6qAqPjatmruj434+n5PW32XtareOPThso5EDCAW0X+CNgSOgda+TVj+9g1Ilg
 Onltb3wugMcs27FakZpKv1YuGyKAKE6uT/33qr++cuynR89JZOlp0QmLgIXobVRR
 WdjuiH8OXFA4LsP7dWQhoSejs6+JPMn992qkACUc5fztQfFfCk0eJsgQIsOXkz1e
 U6MFvab0LtdPKDRyzT1kIpK/Jxf1OVNiOYaQNIGuNMipa+5WRz2lF1sZyERQTJWR
 HOZehkikBdL73WaaKwyaLTsYyDMbYM9ZkpLrBEFRr7ocZpg/0LA84BWYYDWu1Nok
 9Ib9xNAxcAgFwQMJpiz9J3ap/IzV2qJT9rv78q1chVwhNhVDs2CbwcuZKAB4UvWs
 Oz7C0Xx5DA/K7DlpJMLaVB1+BRJ3C1I9Jbr84mnu0clgOqFE+nrdKZcUTrOTFXdy
 2yTp7Bkc2JiRtOYhI40UL79N08KCGNTUfigmUDQseF2dsaNlz5rTOiMifYQCRw9+
 C1kxY00emzlGTvfUDdPwkiQTtz8tWf9Ahvjx/ufGfed68KWDMs1VuGNcqEzgqKNI
 SMP0VTEXbCiLeWYMqGep
 =mMgm
 -----END PGP SIGNATURE-----

Merge tag 'iio-for-3.13a' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next

Jonathan writes:

First round of new drivers, functionality and cleanups for IIO in the 3.13 cycle

A number of new drivers and some new functionality + a lot of cleanups
all over IIO.

New Core Elements

1) New INT_TIME info_mask element for integration time, which may have
   different effects on measurement noise and similar, than an amplifier
   and hence is different from existing SCALE.  Already existed in some
   drivers as a custom attribute.

2) Introduce a iio_push_buffers_with_timestamp helper to cover the common
   case of filling the last 64 bits of data to be passed to the buffer with
   a timestamp.  Applied to lots of drivers. Cuts down on repeated code and
   moves a slightly fiddly bit of logic into a single location.

3) Introduce info_mask_[shared_by_dir/shared_by_all] elements to allow support
   of elements such as sampling_frequency which is typically shared by all
   input channels on a device.  This reduces code and makes these controls
   available from in kernel consumers of IIO devices.

New drivers

1) MCP3422/3/4 ADC

2) TSL4531 ambient light sensor

3) TCS3472/5 color light sensor

4) GP2AP020A00F ambient light / proximity sensor

5) LPS001WP support added to ST pressure sensor driver.

New driver functionality

1) ti_am335x_adc Add buffered sampling support.
   This device has a hardware fifo that is fed directly into an IIO kfifo
   buffer based on a watershed interrupt.  Note this will act as an example
   of how to handle this increasingly common type of device.
   The only previous example - sca3000 - take a less than optimal approach
   which is largely why it is still in staging.
   A couple of little cleanups for that new functionality followed later.

Core cleanups:

1) MAINTAINERS - Sachin actually brought my email address up to date because
   I said I'd do it and never got around to it :)

2) Assign buffer list elements as single element lists to simplify the
   iio_buffer_is_active logic.

3) wake_up_interruptible_poll instead of wake_up_interruptible to only wake
   up threads waiting for poll notifications.

4) Add O_CLOEXEC flag to anon_inode_get_fd call for IIO event interface.

5) Change iio_push_to_buffers to take a void * pointer so as to avoid some
   annoying and unnecessary type casts.

6) iio_compute_scan_bytes incorrectly took a long rather than unsigned long.

7) Various minor tidy ups.

Driver cleanups (in no particular order)

1) Another set of devm_ allocations patches from Sachin Kamat.

2) tsl2x7x - 0 to NULL cleanup.

3) hmc5843 - fix missing > in MODULE_AUTHOR

4) Set of strict_strto* to kstrto* conversions.

5) mxs-lradc - fix ordering of resource removal to match creation

6) mxs-lradc - add MODULE_ALIAS

7) adc7606 - drop a work pending test duplicated in core functions.

8) hmc5843 - devm_ allocation patch

9) Series of redundant breaks removed.

10) ad2s1200 - pr_err -> dev_err

11) adjd_s311 - use INT_TIME

12)  ST sensors - large set of cleanups from Lee Jones and removed restriction
    to using only triggers provided by the st_sensors themselves from
    Dennis Ciocca.

13) dummy and tmp006 provide sampling_frequency via info_mask_shared_by_all.

14) tcs3472 - fix incorrect buffer size and wrong device pointer used in
    suspend / resume functions.

15) max1363 - use defaults for buffer setup ops as provided by the triggered
    buffer helpers as they are the same as were specified in max1363 driver.

16) Trivial tidy ups in a number of other drivers.
2013-09-22 11:30:12 -07:00
Zubair Lutfullah baee539915 input: ti_am335x_tsc: Enable shared IRQ for TSC
Enable shared IRQ to allow ADC to share IRQ line from
parent MFD core. Only FIFO0 IRQs are for TSC and handled
on the TSC side.

Step mask would be updated from cached variable only previously.
In rare cases when both TSC and ADC are used, the cached
variable gets mixed up.
The step mask is written with the required mask every time.

Rachna Patil (TI) laid ground work for shared IRQ.

Signed-off-by: Zubair Lutfullah <zubair.lutfullah@gmail.com>
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-09-21 11:47:09 +01:00
Sachin Kamat c7c8b533c7 Input: tsc2005 - remove redundant spi_set_drvdata
Driver core sets driver data to NULL upon failure or remove.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-09-20 09:58:31 -07:00
Sachin Kamat 3a229b70d6 Input: ad7879-spi - remove redundant spi_set_drvdata
Driver core sets driver data to NULL upon failure or remove.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-09-20 09:58:29 -07:00
Sachin Kamat 993c379219 Input: ad7877 - remove redundant spi_set_drvdata
Driver core sets driver data to NULL upon failure or remove.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-09-20 09:58:27 -07:00
Sachin Kamat 8474caddcc Input: cyttsp4_core - remove redundant dev_set_drvdata
Driver core sets the data to NULL upon release or probe
failure. Hence explicit setting is not necessary.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-09-18 08:00:31 -07:00
Dmitry Torokhov 4ba25a496f Linux 3.11
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.19 (GNU/Linux)
 
 iQEcBAABAgAGBQJSJPkeAAoJEHm+PkMAQRiGVWMH/jo5f01Ra7G4/CYS59K+AlBQ
 /oWL3W81r5MORlsMxwUwGtJ3sZ7UulKwiDrluWeOkz2+/9SmoHoUfkpbByq1bSIV
 y0eqhmjtkHQZz5radJIHeyz1gJIICBIgAM0l45j8SpK4n9EXRcjLSZjdjAkPzxZp
 qZpfxKhVSTu79m96bud7F+HrboHDQEyhD9zqdSi4xPQNnOmTc7K3tvui9AB3rMbV
 ablM3C+LqBYjZx+pKS/rOdfATxZvtU392HU53XTALt6VD1e8alMmhmpe0I9Zxvjv
 scsB6hfRkevfe7VaK3aVoDnQnLKd61yxs+/XdzTtkWPbVGp+kiuFUdDv/5y2r1g=
 =7Xf6
 -----END PGP SIGNATURE-----

Merge tag 'v3.11' into next

Merge with mainline to bring in sync changes to cyttsp4 driver.
2013-09-18 07:58:33 -07:00
Sachin Kamat 4906a31b4c Input: htcpen - remove redundant dev_set_drvdata
Driver core sets the data to NULL upon release or probe
failure. Hence explicit setting is not necessary.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-09-18 07:53:30 -07:00
Martin Schwidefsky 0244ad004a Remove GENERIC_HARDIRQ config option
After the last architecture switched to generic hard irqs the config
options HAVE_GENERIC_HARDIRQS & GENERIC_HARDIRQS and the related code
for !CONFIG_GENERIC_HARDIRQS can be removed.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2013-09-13 15:09:52 +02:00
Linus Torvalds 8b8a7df9a1 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
Pull input updates from Dmitry Torokhov:
 "A new driver for slidebar on Ideapad laptops and a bunch of assorted
  driver fixes"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (32 commits)
  Input: add SYN_MAX and SYN_CNT constants
  Input: max11801_ts - convert to devm
  Input: egalax-ts - fix typo and improve text
  Input: MAINTAINERS - change maintainer for cyttsp driver
  Input: cyttsp4 - kill 'defined but not used' compiler warnings
  Input: add driver for slidebar on Lenovo IdeaPad laptops
  Input: omap-keypad - set up irq type from DT
  Input: omap-keypad - enable wakeup capability for keypad.
  Input: omap-keypad - clear interrupts on open
  Input: omap-keypad - convert to threaded IRQ
  Input: omap-keypad - use bitfiled instead of hardcoded values
  Input: cyttsp4 - remove useless NULL test from cyttsp4_watchdog_timer()
  Input: wacom - fix error return code in wacom_probe()
  Input: as5011 - fix error return code in as5011_probe()
  Input: keyboard, serio - simplify use of devm_ioremap_resource
  Input: tegra-kbc - simplify use of devm_ioremap_resource
  Input: htcpen - fix incorrect placement of __initdata
  Input: qt1070 - add power management ops
  Input: wistron_btns - add MODULE_DEVICE_TABLE
  Input: wistron_btns - mark the Medion MD96500 keymap as tested
  ...
2013-09-07 10:38:46 -07:00
Dmitry Torokhov 07176b988e Merge branch 'next' into for-linus
Merge first round of changes for 3.12 merge window.
2013-09-06 20:23:44 -07:00
Fabio Estevam d33c4aa32d Input: max11801_ts - convert to devm
Converting to devm functions can make the code smaller and cleaner.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-08-29 09:34:48 -07:00
Geert Uytterhoeven ca0abe3d89 Input: cyttsp4 - kill 'defined but not used' compiler warnings
If both CONFIG_PM_SLEEP and CONFIG_PM_RUNTIME are unset:

drivers/input/touchscreen/cyttsp4_core.c:1556: warning: ‘cyttsp4_core_sleep’ defined but not used
drivers/input/touchscreen/cyttsp4_core.c:1634: warning: ‘cyttsp4_core_wake’ defined but not used

Move cyttsp4_core_sleep(), cyttsp4_core_wake(), and cyttsp4_core_wake_()
(which is called from cyttsp4_core_wake() only) inside the existing section
protected by #if defined(CONFIG_PM_SLEEP) || defined(CONFIG_PM_RUNTIME)

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-08-29 08:45:15 -07:00
Wei Yongjun e87ca42464 Input: cyttsp4 - remove useless NULL test from cyttsp4_watchdog_timer()
Remove useless NULL test from cyttsp4_watchdog_timer().

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Acked-by: Ferruh Yigit <fery@cypress.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-08-26 00:15:05 -07:00
Sachin Kamat f01868dcb1 Input: htcpen - fix incorrect placement of __initdata
__initdata should be placed between the variable name and equal
sign for the variable to be placed in the intended section.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Cc: Pau Oliva Fora <pau@eslack.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-08-15 00:30:04 -07:00
Jingoo Han 54e9f45010 Input: eeti_ts - add CONFIG_PM_SLEEP to suspend/resume
Add CONFIG_PM_SLEEP to suspend/resume functions to fix the build
warnings when CONFIG_PM_SLEEP is not selected. This is because
sleep PM callbacks defined by SET_SYSTEM_SLEEP_PM_OPS are only used
when the CONFIG_PM_SLEEP is enabled.

drivers/input/touchscreen/eeti_ts.c:268:12: warning: 'eeti_ts_suspend' defined but not used [-Wunused-function]
drivers/input/touchscreen/eeti_ts.c:287:12: warning: 'eeti_ts_resume' defined but not used [-Wunused-function]

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-08-12 22:32:23 -07:00
Jingoo Han 04245e9fde Input: cy8ctmg110_ts - add CONFIG_PM_SLEEP to suspend/resume
Add CONFIG_PM_SLEEP to suspend/resume functions to fix the build
warnings when CONFIG_PM_SLEEP is not selected. This is because
sleep PM callbacks defined by SET_SYSTEM_SLEEP_PM_OPS are only used
when the CONFIG_PM_SLEEP is enabled.

drivers/input/touchscreen/cy8ctmg110_ts.c:295:12: warning: 'cy8ctmg110_suspend' defined but not used [-Wunused-function]
drivers/input/touchscreen/cy8ctmg110_ts.c:309:12: warning: 'cy8ctmg110_resume' defined but not used [-Wunused-function]

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-08-12 22:32:18 -07:00
Linus Torvalds 18fb38e2f5 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
Pull second round of input updates from Dmitry Torokhov:
 "An update to Elantech driver to support hardware v7, fix to the new
  cyttsp4 driver to use proper addressing, ads7846 device tree support
  and nspire-keypad got a small cleanup."

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
  Input: nspire-keypad - replace magic offset with define
  Input: elantech - fix for newer hardware versions (v7)
  Input: cyttsp4 - use 16bit address for I2C/SPI communication
  Input: ads7846 - add device tree bindings
  Input: ads7846 - make sure we do not change platform data
2013-07-13 18:05:13 -07:00
Dmitry Torokhov 88ce3c3ca3 Merge branch 'next' into for-linus
Bring in second round of updates for 3.11.
2013-07-12 23:34:25 -07:00
Linus Torvalds 3aa78e0cb5 For the 3.11 merge we only have one new MFD driver for the Kontron PLD.
But we also have:
 
 - Support for the TPS659038 PMIC from the palmas driver.
 
 - Intel's Coleto Creek and Avoton SoCs support from the lpc_ich driver.
 
 - RTL8411B support from the rtsx driver.
 
 - More DT support for the Arizona, max8998, twl4030-power and the
   ti_am335x_tsadc drivers.
 
 - The SSBI driver move under MFD.
 
 - A conversion to the devm_* API for most of the MFD drivers.
 
 - The twl4030-power got split from twl-core into its own module.
 
 - A major ti_am335x_adc cleanup, leading to a proper DT support.
 
 - Our regular arizona and wm* updates and cleanups from the Wolfson
   folks.
 
 - A better error handling and initialization, and a regulator subdevice
   addition for the 88pm80x driver.
 
 - A bulk platform_set_drvdata() call removal that's no longer need since
   commit 0998d063.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJR2zCaAAoJEIqAPN1PVmxK29EP/ieZf7Z7z7bg/0lEOvtOzACy
 WoCdSGFu5XcHOnlv0Fl1Rr/1AJFQoh4KugkGnVyrlztYVOFymj5VDdd8B43cxMLt
 7ymK/3crIH7uJuOoeDoDr3glLuo0TGB9f5Kv4ITdVD3/+AuqY4VIAisEDb0aWghW
 +v0I3fYeGdwRv+IqO5wacvddSoLa4rmOhnpbVMB2O1Y/LCm/yHI6tAFx1+AfH7y8
 zMHbGFc+gHg1xupJBCnRel0v8J+KNc02G/B1zNom/avL8b/mNXNI8JFxs3bMA0r8
 NpTHJ49OVPbhBQTA4U+BPoG4nzOiAOj0czf9dkGa5cyR8t4C9mmK+s8QHwepzrSG
 qbhCgTqp4bomB1m0RAO+z4F6BHTpmoChpho2btrwN9ZmhMHQeTWnGjjhEwZngpBq
 F22DC6k5ipV0k4962ZHfZ76v2Vot1gfd6zQ5r+2oHMMfWaKgS4L5efP2/wsU9H58
 BxMm84C7OWbgcTRmNn9jl4L9phBD31wvNANfUeMhLMyshnwPK5ZuUdX/+K2rq6h9
 w26Hg62HtKZFv/TEsCBQqpB6zSZa4u/KZzvwEahllQSQGKxIHaNYGtLGzJj9sCM+
 baT/82DFKuEvKfJpUKSBMznImp4WNGEz+8s2w4m/Ssuf30GN2GHjM9Q4gcHJu2mk
 7fTrsSHWYN+EHVzh1Zb8
 =RqMp
 -----END PGP SIGNATURE-----

Merge tag 'mfd-3.11-1' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-next

Pull MFD update from Samuel Ortiz:
 "For the 3.11 merge we only have one new MFD driver for the Kontron
  PLD.

  But we also have:
   - Support for the TPS659038 PMIC from the palmas driver.
   - Intel's Coleto Creek and Avoton SoCs support from the lpc_ich
     driver.
   - RTL8411B support from the rtsx driver.
   - More DT support for the Arizona, max8998, twl4030-power and the
     ti_am335x_tsadc drivers.
   - The SSBI driver move under MFD.
   - A conversion to the devm_* API for most of the MFD drivers.
   - The twl4030-power got split from twl-core into its own module.
   - A major ti_am335x_adc cleanup, leading to a proper DT support.
   - Our regular arizona and wm* updates and cleanups from the Wolfson
     folks.
   - A better error handling and initialization, and a regulator
     subdevice addition for the 88pm80x driver.
   - A bulk platform_set_drvdata() call removal that's no longer need
     since commit 0998d06310 ("device-core: Ensure drvdata = NULL when
     no driver is bound")

* tag 'mfd-3.11-1' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-next: (102 commits)
  mfd: sec: Provide max_register to regmap
  mfd: wm8994: Remove duplicate check for active JACKDET
  MAINTAINERS: Add include directory to MFD file patterns
  mfd: sec: Remove fields not used since regmap conversion
  watchdog: Kontron PLD watchdog timer driver
  mfd: max8998: Add support for Device Tree
  regulator: max8998: Use arrays for specifying voltages in platform data
  mfd: max8998: Add irq domain support
  regulator: palmas: Add TPS659038 support
  mfd: Kontron PLD mfd driver
  mfd: palmas: Add TPS659038 PMIC support
  mfd: palmas: Add SMPS10_BOOST feature
  mfd: palmas: Check if irq is valid
  mfd: lpc_ich: iTCO_wdt patch for Intel Coleto Creek DeviceIDs
  mfd: twl-core: Change TWL6025 references to TWL6032
  mfd: davinci_voicecodec: Fix build breakage
  mfd: vexpress: Make the driver optional for arm and arm64
  mfd: htc-egpio: Use devm_ioremap_nocache() instead of ioremap_nocache()
  mfd: davinci_voicecodec: Convert to use devm_* APIs
  mfd: twl4030-power: Fix relocking on error
  ...
2013-07-10 11:10:27 -07:00
Ferruh Yigit 62f548d0c2 Input: cyttsp4 - use 16bit address for I2C/SPI communication
In TSG4, register map is 512bytes long and to access all of it,
one bit from address byte is used (which bit to use differs for
I2C and SPI);

Since common code used for TSG3 and TSG4 for I2C, this parameter
wrongly used as u8. TSG3 does not access beyond 255 bytes
but TSG4 may.

Tested-on:TMA3XX DVB && TMA4XX DVB

Signed-off-by: Ferruh Yigit <fery@cypress.com>
Acked-by: Javier Martinez Canillas <javier@dowhile0.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-07-06 21:57:06 -07:00
Ferruh Yigit 57961e3ba7 Input: cyttsp4 - kfree xfer_buf on error path in probe()
If probe() fails after cd->xfer_buf allocated, it will not freed.
Added kfree(cd->xfer_buf) with and error label.

Signed-off-by: Ferruh Yigit <fery@cypress.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-07-04 14:05:50 -07:00
Dmitry Torokhov 9ff9f6dab7 Input: tps6507x-ts - select INPUT_POLLDEV
Since the driver was converted to polled device infrastructure we need
to make sure it is enabled.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-07-02 23:11:01 -07:00
Daniel Mack a608026eac Input: ads7846 - add device tree bindings
Signed-off-by: Daniel Mack <zonque@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-07-02 20:40:50 -07:00
Dmitry Torokhov 57691a1e27 Input: ads7846 - make sure we do not change platform data
Let's declare platform data a const pointer so that we don't accitentally
change it. Also fetch it with dev_get_platdata().

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-07-02 20:40:47 -07:00
Dan Carpenter 394fc05b79 Input: cyttsp4 - leak on error path in probe()
We leak "cd" if the cd->xfer_buf allocation fails.  It was weird to
"goto error_gpio_irq" so I changed the label name.  (Label names should
reflect the label location not the goto location otherwise you get an
"all roads lead to Rome problem").

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-07-02 20:39:24 -07:00
Dan Carpenter 7c4c018aad Input: cyttsp4 - silence NULL dereference warning
If "cd" were NULL then we would dereference it when we print the error
message.  Fortunately enough, it can't ever be NULL so we can remove
those lines.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-07-02 20:39:20 -07:00
Dan Carpenter 0fb82ec026 Input: cyttsp4 - silence shift wrap warning
"*max" is a size_t (long) type but "1" is an int so static checkers
complain that the shift could wrap.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-07-02 20:39:17 -07:00
Dmitry Torokhov 27eb2c4b3d Merge branch 'next' into for-linus
Prepare first set of updates for 3.11 merge window.
2013-07-02 09:01:31 -07:00
Dmitry Torokhov 5705b8aca5 Input: tps6507x-ts - convert to polled input device infrastructure
There is no need to roll our own polling scheme when we already have
one implemented by the core.

Tested-by: Manish Badarkhe <badarkhe.manish@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-07-01 11:38:41 -07:00
Ferruh Yigit 67bf12ca50 Input: cyttsp4 - SPI driver for Cypress TMA4XX touchscreen devices
Cypress TrueTouch(tm) Standard Product controllers,
Generation4 devices, SPI adapter module.

This driver adds communication support with TTSP controller
using SPI bus.

Signed-off-by: Ferruh Yigit <fery@cypress.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Javier Martinez Canillas <javier@dowhile0.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-06-30 21:24:28 -07:00