1
0
Fork 0
Commit Graph

32 Commits (80503b23b23b5b2228d8750b786eb182f2fa28d2)

Author SHA1 Message Date
Thomas Gleixner 80503b23b2 treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 149
Based on 1 normalized pattern(s):

  licensed under the gpl 2 or later

extracted by the scancode license scanner the SPDX license identifier

  GPL-2.0-or-later

has been chosen to replace the boilerplate/reference in 82 file(s).

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Allison Randal <allison@lohutok.net>
Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org>
Reviewed-by: Richard Fontana <rfontana@redhat.com>
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190524100845.150836982@linutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-05-30 11:25:18 -07:00
Wolfram Sang c1a4634013 gpio: adp5588: move header file out of I2C realm
include/linux/i2c is not for client devices. Move the header file to a
more appropriate location.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2017-05-29 13:36:45 +02:00
Linus Walleij d3baee37f1 input: adp5588-keys: use gpiochip data pointer
This makes the driver use the data pointer added to the gpio_chip
to store a pointer to the state container instead of relying on
container_of().

Cc: Michael Hennerich <michael.hennerich@analog.com>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2016-04-26 15:33:44 +02:00
Linus Torvalds fb378df57d 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:
 "Mostly simple bug fixes, although we do have one brand new driver for
  Microchip AR1021 i2c touchscreen.

  Also there is the change to stop trying to use i8042 active
  multiplexing by default (it is still possible to activate it via
  i8042.nomux=0 on boxes that implement it)"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
  Input: xpad - add Thrustmaster as Xbox 360 controller vendor
  Input: xpad - add USB ID for Thrustmaster Ferrari 458 Racing Wheel
  Input: max77693-haptic - fix state check in imax77693_haptic_disable()
  Input: xen-kbdfront - free grant table entry in xenkbd_disconnect_backend
  Input: alps - fix v4 button press recognition
  Input: i8042 - disable active multiplexing by default
  Input: i8042 - add noloop quirk for Asus X750LN
  Input: synaptics - gate forcepad support by DMI check
  Input: Add Microchip AR1021 i2c touchscreen
  Input: cros_ec_keyb - add of match table
  Input: serio - avoid negative serio device numbers
  Input: avoid negative input device numbers
  Input: automatically set EV_ABS bit in input_set_abs_params
  Input: adp5588-keys - cancel workqueue in failure path
  Input: opencores-kbd - switch to using managed resources
  Input: evdev - fix EVIOCG{type} ioctl
2014-10-19 12:40:24 -07:00
Pramod Gurav b3f9db49c1 Input: adp5588-keys - cancel workqueue in failure path
In case we start with the device not fully quiesced we should make sure we
cancel the workqueue after freeing interrupt.

Signed-off-by: Pramod Gurav <pramod.gurav@smartplayin.com>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-10-07 09:55:01 -07:00
abdoulaye berthe 88d5e520aa driver:gpio remove all usage of gpio_remove retval in driver
this remove all reference to gpio_remove retval in all driver
except pinctrl and gpio. the same thing is done for gpio and
pinctrl in two different patches.

Signed-off-by: Abdoulaye Berthe <berthe.ab@gmail.com>
Acked-by: Michael Büsch <m@bues.ch>
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Acked-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Acked-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2014-09-18 11:03:10 -07:00
Jean-Francois Dagenais 910a9f5636 Input: adp5588-keys - get value from data out when dir is out
As discussed here: http://ez.analog.com/message/35852, the 5587 revC and
5588 revB spec sheets contain a mistake in the GPIO_DAT_STATx register
description.

According to R.Shnell at ADI, as well as my own observations, it should
read: "GPIO data status (shows GPIO state when read for inputs)".

This commit changes the get value function accordingly.

Signed-off-by: Jean-Francois Dagenais <jeff.dagenais@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-02-15 13:13:17 -08:00
Paul Gortmaker bf9a9f8e51 Input: delete non-required instances of include <linux/init.h>
None of these files are actually using any __init type directives
and hence don't need to include <linux/init.h>.  Most are just a
left over from __devinit and __cpuinit removal, or simply due to
code getting copied from one driver to the next.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-01-06 23:23:57 -08:00
Dmitry Torokhov 348324c5b1 Linux 3.13-rc4
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.15 (GNU/Linux)
 
 iQEcBAABAgAGBQJSrhGrAAoJEHm+PkMAQRiGsNoH/jIK3CsQ2lbW7yRLXmfgtbzz
 i2Kep6D4SDvmaLpLYOVC8xNYTiE8jtTbSXHomwP5wMZ63MQDhBfnEWsEWqeZ9+D9
 3Q46p0QWuoBgYu2VGkoxTfygkT6hhSpwWIi3SeImbY4fg57OHiUil/+YGhORM4Qc
 K4549OCTY3sIrgmWL77gzqjRUo+pQ4C73NKqZ3+5nlOmYBZC1yugk8mFwEpQkwhK
 4NRNU760Fo+XIht/bINqRiPMddzC15p0mxvJy3cDW8bZa1tFSS9SB7AQUULBbcHL
 +2dFlFOEb5SV1sNiNPrJ0W+h2qUh2e7kPB0F8epaBppgbwVdyQoC2u4uuLV2ZN0=
 =lI2r
 -----END PGP SIGNATURE-----

Merge tag 'v3.13-rc4' into next

Synchronize with mainline to bring in the new keycode definitions and
new hwmon API.
2013-12-16 02:04:49 -08:00
Jingoo Han c838cb3d47 Input: use dev_get_platdata()
Use the wrapper function for retrieving the platform data instead
of accessing dev->platform_data directly. This is a cosmetic change
to make the code simpler and enhance the readability.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Acked-by: Fugang Duan <B38611@freescale.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-12-06 02:06:29 -08:00
Andrew Liu e4cfb034e8 Input: keyboard - "keycode & KEY_MAX" changes some keycode values
For exmaple, keycode: KEY_OK(0x160) is changed by "and" operation with
KEY_MAX(0x2ff) to KEY_KPENTER(96).

Signed-off-by: Andrew Liu <andrew.liu200917@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-11-25 18:26:17 -08:00
Bill Pemberton e2619cf78e Input: remove use of __devexit
CONFIG_HOTPLUG is going away as an option so __devexit is no
longer needed.

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2012-11-24 00:05:38 -08:00
Bill Pemberton 5298cc4cc7 Input: remove use of __devinit
CONFIG_HOTPLUG is going away as an option so __devinit is no longer
needed.

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Javier Martinez Canillas <javier@dowhile0.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2012-11-24 00:05:19 -08:00
Bill Pemberton 1cb0aa8817 Input: remove use of __devexit_p
CONFIG_HOTPLUG is going away as an option so __devexit_p is no longer
needed.

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Acked-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2012-11-24 00:03:48 -08:00
Jean-François Dagenais d0a3457d38 Input: adp5588 - add support for gpio names
Signed-off-by: Jean-François Dagenais <jeff.dagenais@gmail.com>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2012-05-10 22:34:16 -07:00
Axel Lin 1b92c1cf6b Input: convert I2C drivers to use module_i2c_driver()
This patch converts the drivers in drivers/input/* to use the
module_i2c_driver() macro which makes the code smaller and a bit
simpler.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2012-03-16 23:06:19 -07:00
Dmitry Torokhov 6ad390a25a Merge branch 'next' into for-linus 2011-10-26 21:46:20 -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
Axel Lin 8c67566039 Input: adp5588-keys - remove incorrect modalias
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>
2011-08-26 23:40:14 -07:00
Jesper Juhl 5993548725 Input: remove unneeded version.h includes
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>
2011-06-27 12:42:54 -07:00
Michael Hennerich 95716c0dec Input: adp5588-keys - unify common header defines
Unify adp5588-gpio and adp5588-keys common header defines (as per Andrew
Morton request). For consistency, move remaining defines and prefix
accordingly.

No functional changes.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-11-03 10:44:20 -07:00
Michael Hennerich d537155a09 Input: adp5588-keys - use more obvious i2c_device_id name string
KBUILD_MODNAME normalizes "-" to "_".  This is non-obvious and results in
the id name for ADP5588 being "adp5588_keys" while the other supported id
is "adp5587-keys".  So avoid this define and use an explicit string as the
id name.

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>
2010-10-18 17:48:11 -07:00
Dmitry Torokhov 0d87c7228a Input: adp5588-keypad - fix NULL dereference in adp5588_gpio_add()
The kpad structure is assigned to i2c client via i2s_set_clientdata()
at the end of adp5588_probe(), but in adp5588_gpio_add() we tried to
access it (via dev_get_drvdata! which is not nice at all) causing an
oops.

Let's pass pointer to kpad directly into adp5588_gpio_add() and
adp5588_gpio_remove() to avoid accessing driver data before it is
set up.

Also split out building of gpiomap into a separate function to
clear the logic.

Reported-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-08-02 18:34:07 -07:00
Xiaolong Chen ba9f507a1b Input: adp5588-keys - export unused GPIO pins
This patch allows exporting GPIO pins not used by the keypad itself
to be accessible from elsewhere.

Signed-off-by: Xiaolong Chen <xiao-long.chen@motorola.com>
Signed-off-by: Yuanbo Ye <yuan-bo.ye@motorola.com>
Signed-off-by: Tao Hu <taohu@motorola.com>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-07-26 01:17:41 -07:00
Dmitry Torokhov 08fa16b6b7 Merge commit 'v2.6.35-rc3' into next 2010-06-30 15:07:09 -07:00
Xiaolong CHEN 69a4af606e Input: adp5588-keys - support GPI events for ADP5588 devices
A column or row configured as a GPI can be programmed to be part
of the key event table and therefore also capable of generating a
key event interrupt. A key event interrupt caused by a GPI follows
the same process flow as a key event interrupt caused by a key
press. GPIs configured as part of the key event table allow single
key switches and other GPI interrupts to be monitored. As part of
the event table, GPIs are represented by the decimal value 97 (0x61
or 1100001) through the decimal value 114 (0x72 or 1110010). See
table below for GPI event number assignments for rows and columns.

GPI Event Number Assignments for Rows
Row0 Row1 Row2 Row3 Row4 Row5 Row6 Row7
97   98   99   100  101  102  103  104

GPI Event Number Assignments for Cols
Col0 Col1 Col2 Col3 Col4 Col5 Col6 Col7 Col8 Col9
105  106  107  108  109  110  111  112  113  114

Signed-off-by: Xiaolong Chen <xiao-long.chen@motorola.com>
Signed-off-by: Yuanbo Ye <yuan-bo.ye@motorola.com>
Signed-off-by: Tao Hu <taohu@motorola.com>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-06-24 19:13:10 -07:00
Wolfram Sang fbae3fb154 i2c: Remove all i2c_set_clientdata(client, NULL) in drivers
I2C drivers can use the clientdata-pointer to point to private data. As I2C
devices are not really unregistered, but merely detached from their driver, it
used to be the drivers obligation to clear this pointer during remove() or a
failed probe(). As a couple of drivers forgot to do this, it was agreed that it
was cleaner if the i2c-core does this clearance when appropriate, as there is
no guarantee for the lifetime of the clientdata-pointer after remove() anyhow.
This feature was added to the core with commit
e4a7b9b04d to fix the faulty drivers.

As there is no need anymore to clear the clientdata-pointer, remove all current
occurrences in the drivers to simplify the code and prevent confusion.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Acked-by: Richard Purdie <rpurdie@linux.intel.com>
Acked-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2010-06-03 11:33:58 +02:00
Tejun Heo 5a0e3ad6af include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h
percpu.h is included by sched.h and module.h and thus ends up being
included when building most .c files.  percpu.h includes slab.h which
in turn includes gfp.h making everything defined by the two files
universally available and complicating inclusion dependencies.

percpu.h -> slab.h dependency is about to be removed.  Prepare for
this change by updating users of gfp and slab facilities include those
headers directly instead of assuming availability.  As this conversion
needs to touch large number of source files, the following script is
used as the basis of conversion.

  http://userweb.kernel.org/~tj/misc/slabh-sweep.py

The script does the followings.

* Scan files for gfp and slab usages and update includes such that
  only the necessary includes are there.  ie. if only gfp is used,
  gfp.h, if slab is used, slab.h.

* When the script inserts a new include, it looks at the include
  blocks and try to put the new include such that its order conforms
  to its surrounding.  It's put in the include block which contains
  core kernel includes, in the same order that the rest are ordered -
  alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
  doesn't seem to be any matching order.

* If the script can't find a place to put a new include (mostly
  because the file doesn't have fitting include block), it prints out
  an error message indicating which .h file needs to be added to the
  file.

The conversion was done in the following steps.

1. The initial automatic conversion of all .c files updated slightly
   over 4000 files, deleting around 700 includes and adding ~480 gfp.h
   and ~3000 slab.h inclusions.  The script emitted errors for ~400
   files.

2. Each error was manually checked.  Some didn't need the inclusion,
   some needed manual addition while adding it to implementation .h or
   embedding .c file was more appropriate for others.  This step added
   inclusions to around 150 files.

3. The script was run again and the output was compared to the edits
   from #2 to make sure no file was left behind.

4. Several build tests were done and a couple of problems were fixed.
   e.g. lib/decompress_*.c used malloc/free() wrappers around slab
   APIs requiring slab.h to be added manually.

5. The script was run on all .h files but without automatically
   editing them as sprinkling gfp.h and slab.h inclusions around .h
   files could easily lead to inclusion dependency hell.  Most gfp.h
   inclusion directives were ignored as stuff from gfp.h was usually
   wildly available and often used in preprocessor macros.  Each
   slab.h inclusion directive was examined and added manually as
   necessary.

6. percpu.h was updated not to include slab.h.

7. Build test were done on the following configurations and failures
   were fixed.  CONFIG_GCOV_KERNEL was turned off for all tests (as my
   distributed build env didn't work with gcov compiles) and a few
   more options had to be turned off depending on archs to make things
   build (like ipr on powerpc/64 which failed due to missing writeq).

   * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
   * powerpc and powerpc64 SMP allmodconfig
   * sparc and sparc64 SMP allmodconfig
   * ia64 SMP allmodconfig
   * s390 SMP allmodconfig
   * alpha SMP allmodconfig
   * um on x86_64 SMP allmodconfig

8. percpu.h modifications were reverted so that it could be applied as
   a separate patch and serve as bisection point.

Given the fact that I had only a couple of failures from tests on step
6, I'm fairly confident about the coverage of this conversion patch.
If there is a breakage, it's likely to be something in one of the arch
headers which should be easily discoverable easily on most builds of
the specific arch.

Signed-off-by: Tejun Heo <tj@kernel.org>
Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
2010-03-30 22:02:32 +09:00
Dmitry Torokhov 7755726fe9 Merge commit 'v2.6.33-rc5' into next 2010-01-21 23:55:25 -08:00
Michael Hennerich 5a9003db1f Input: ADP5588 - add support for ADP5587 devices
The ADP5587 is quite similar to the ADP5588 but features a greater I/O
voltage range and lacks the Dual Light Sensor Interface.  This new part
is also supported by this driver.

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>
2010-01-19 00:32:17 -08:00
Alexey Dobriyan 471452104b const: constify remaining dev_pm_ops
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-12-15 08:53:25 -08:00
Michael Hennerich 88751dd6ce Input: add driver for ADP5588 QWERTY I2C Keypad
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2009-09-17 23:24:04 -07:00