summaryrefslogtreecommitdiffstats
path: root/drivers/input/touchscreen
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | Input: mcs - move header file out of I2C realmWolfram Sang2017-05-221-1/+1
| |_|/ |/| | | | | | | | | | | | | | | | | | | | 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> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* | | Input: ar1021_i2c - use BIT to check for a bitMartin Kepplinger2017-05-011-1/+2
| | | | | | | | | | | | | | | | | | | | | The MSB for the first byte of touch data transmission is always 1. Make it a little more obvious we're testing this bit by using BIT(7). Signed-off-by: Martin Kepplinger <martink@posteo.de> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* | | Input: ar1021_i2c - enable touch mode during openMartin Kepplinger2017-05-011-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | The device could as well be in command mode, in which this driver cannot handle the device. When opening the device, let's make sure the device will be in the mode we expect it to be for this driver. Signed-off-by: Martin Kepplinger <martin.kepplinger@ginzinger.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* | | Input: ar1021_i2c - highlight support for AR1020Martin Kepplinger2017-04-142-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ar1021_i2c also supports the ar1020 device I'm using. This is tested. They also share the same datasheet: http://ww1.microchip.com/downloads/en/DeviceDoc/40001393C.pdf So let users see that they have a compatible in front of them by adding AR1020 to the driver's description. Signed-off-by: Martin Kepplinger <martin.kepplinger@ginzinger.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* | | Input: ar1021_i2c - do not force raising edge IRQ triggerDmitry Torokhov2017-04-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We should not be forcing edge triggered interrupt, but rather let platform decide the kind of trigger it needs to use. Also, the driver is not quite safe with regard to edge-triggered interrupts as it does not try to kick the controller after requesting/enabling IRQ. Reviewed-By: Christian Gmeiner <christian.gmeiner@gmail.com> Tested-by: Martin Kepplinger <martin.kepplinger@ginzinger.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* | | Input: ar1021_i2c - fix too long name in driver's device tableDmitry Torokhov2017-04-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The name field in structure i2c_device_id is 20 characters, and we expect it to be NULL-terminated, however we are trying to stuff it with 21 bytes and thus NULL-terminator is lost. This causes issues when one creates device with name "MICROCHIP_AR1021_I2C" as i2c core cuts off the last "C", and automatic module loading by alias does not work as result. The -I2C suffix in the device name is superfluous, we know what bus we are dealing with, so let's drop it. Also, no other driver uses capitals, and the manufacturer name is normally not included, except in very rare cases of incompatible name collisions. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=116211 Fixes: dd4cae8bf166 ("Input: Add Microchip AR1021 i2c touchscreen") Reviewed-By: Christian Gmeiner <christian.gmeiner@gmail.com> Tested-by: Martin Kepplinger <martin.kepplinger@ginzinger.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* | | Input: ar1021_i2c - coding style fixesMartin Kepplinger2017-04-121-2/+2
| | | | | | | | | | | | | | | | | | | | | Use the common kernel coding style and corrently align parameters with open parenthesis. Signed-off-by: Martin Kepplinger <martin.kepplinger@ginzinger.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* | | Input: lpc32xx_ts - check for clk_prepare_enable() errorFabio Estevam2017-04-121-5/+8
| | | | | | | | | | | | | | | | | | | | | clk_prepare_enable() may fail, so we better check its return value and propagate it in the case of error. Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* | | Input: imx6ul_tsc - fix error handlingFabio Estevam2017-04-121-3/+12
| | | | | | | | | | | | | | | | | | | | | | | | If imx6ul_tsc_init() fails we should not return directly. We should disable the previously acquired clocks in this case. Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* | | Input: sur40 - fix bad endianness handling in sur40_pollMartin Kepplinger2017-04-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | sparse says: sur40.c:372:40: warning: restricted __le32 degrades to integer the header's data is __le32 so we need to convert it before comparing. Signed-off-by: Martin Kepplinger <martink@posteo.de> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* | | Input: eeti_ts - switch to gpiod APIDmitry Torokhov2017-04-051-17/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | gpiod API allows standard way of specifying GPIO polarity and takes it into account when reading or setting GPIO state. It also allows us to switch to common way of obtaining GPIO descriptor and away form legacy platform data. Reviewed-by: Daniel Mack <daniel@zonque.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* | | Input: eeti_ts - expect platform code to set interrupt triggerDmitry Torokhov2017-04-051-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | Instead of keying interrupt trigger off GPIO polarity, let's rely on platform code to set it up properly for us. Reviewed-by: Daniel Mack <daniel@zonque.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* | | Input: eeti_ts - switch to using threaded interruptDmitry Torokhov2017-04-031-43/+36
| | | | | | | | | | | | | | | | | | | | | | | | Instead of having standard interrupt handler and manually firing work item to perform I2C reads, let's switch to threaded interrupts, which were designed specifically for this purpose. Reviewed-by: Daniel Mack <daniel@zonque.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* | | Input: eeti_ts - use gpio_get_value_cansleepDmitry Torokhov2017-04-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | We are reading GPIO state in a non-atomic context (workqueue), so we can use "cansleep" variant, and thus make the driver available on systems where GPIO controllers require sleeping when reading GPIO state. Reviewed-by: Daniel Mack <daniel@zonque.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* | | Input: eeti_ts - respect interrupt set in client structureDmitry Torokhov2017-04-031-7/+6
| | | | | | | | | | | | | | | | | | | | | Instead of expecting that GPIO is always interrupt source, let's use interrupt specified in I2C client. Reviewed-by: Daniel Mack <daniel@zonque.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* | | Input: eeti_ts - switch to using managed resourcesDmitry Torokhov2017-04-031-48/+22
| | | | | | | | | | | | | | | | | | Using devm_* APIs simpifies error handling and device teardown. Reviewed-by: Daniel Mack <daniel@zonque.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* | | Input: eeti_ts - use input_set_capability()Dmitry Torokhov2017-04-031-2/+1
| | | | | | | | | | | | | | | | | | | | | Use input_set_capability() instead of manipulating evbit/keybit masks directly. Reviewed-by: Daniel Mack <daniel@zonque.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* | | Input: eeti_ts - use get_unaligned_be16() to retrieve dataDmitry Torokhov2017-04-031-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | Instead of manually converting big endian data on wire into host endianness, let's use helpers to do that for us. It might save us a few cycles if host endianness matches what's on wire. Reviewed-by: Daniel Mack <daniel@zonque.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* | | Input: eeti_ts - use BIT(n)Dmitry Torokhov2017-04-031-4/+4
| | | | | | | | | | | | | | | | | | Use idiomatic BIT(n) to form single-bit masks. Reviewed-by: Daniel Mack <daniel@zonque.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* | | Input: eeti_ts - rename eeti_ts_priv to eeti_tsDmitry Torokhov2017-04-031-57/+58
| | | | | | | | | | | | | | | | | | Also rename 'priv' variables to eeti. Reviewed-by: Daniel Mack <daniel@zonque.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* | | Merge tag 'v4.11-rc5' into nextDmitry Torokhov2017-04-032-31/+34
|\| | | | | | | | | | | | | | Sync up with mainline to bring in changes to input subsystem merged through other trees.
| * | Merge branch 'for-linus' of ↵Linus Torvalds2017-03-231-0/+3
| |\ \ | | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input Pull input fixes from Dmitry Torokhov: "Fixes to various USB drivers to validate existence of endpoints before trying to use them, fixes to APLS v8 protocol, and a couple of i8042 quirks" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: ALPS - fix trackstick button handling on V8 devices Input: ALPS - fix V8+ protocol handling (73 03 28) Input: sur40 - validate number of endpoints before using them Input: kbtab - validate number of endpoints before using them Input: hanwang - validate number of endpoints before using them Input: yealink - validate number of endpoints before using them Input: ims-pcu - validate number of endpoints before using them Input: cm109 - validate number of endpoints before using them Input: iforce - validate number of endpoints before using them Input: elan_i2c - add ASUS EeeBook X205TA special touchpad fw Input: i8042 - add TUXEDO BU1406 (N24_25BU) to the nomux list Input: synaptics-rmi4 - prevent null pointer dereference in f30 Input: i8042 - add noloop quirk for Dell Embedded Box PC 3000
| | * Input: sur40 - validate number of endpoints before using themJohan Hovold2017-03-161-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make sure to check the number of endpoints to avoid dereferencing a NULL-pointer or accessing memory that lie beyond the end of the endpoint array should a malicious device lack the expected endpoints. Fixes: bdb5c57f209c ("Input: add sur40 driver for Samsung SUR40... ") Signed-off-by: Johan Hovold <johan@kernel.org> Cc: stable@vger.kernel.org # 3.13 Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| * | lib/vsprintf.c: remove %Z supportAlexey Dobriyan2017-02-271-31/+31
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that %z is standartised in C99 there is no reason to support %Z. Unlike %L it doesn't even make format strings smaller. Use BUILD_BUG_ON in a couple ATM drivers. In case anyone didn't notice lib/vsprintf.o is about half of SLUB which is in my opinion is quite an achievement. Hopefully this patch inspires someone else to trim vsprintf.c more. Link: http://lkml.kernel.org/r/20170103230126.GA30170@avx2 Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Cc: Andy Shevchenko <andy.shevchenko@gmail.com> Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
| * Merge branch 'next' into for-linusDmitry Torokhov2017-02-2029-786/+339
| |\ | | | | | | | | | Prepare input updates for 4.11 merge window.
* | | Input: max11801_ts - add missing of_match_tableJagan Teki2017-03-291-0/+7
| | | | | | | | | | | | | | | | | | | | | Added missing of_match_table for max11801_ts driver with compatible as "maxim,max11801_ts" Signed-off-by: Jagan Teki <jagan@amarulasolutions.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* | | Input: melfas_mip4 - ensure that device is presentDmitry Torokhov2017-03-291-0/+11
| | | | | | | | | | | | | | | | | | | | | Try a quick read from the device in mip4_query_device() to make sure that the device is there, as we do not consider failures to retrieve product name or resolution fatal. Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* | | Input: ads7846 - avoid pen up/down when reading hwmonDavid Jander2017-03-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Each time the HWMON devices are read (e.g. battery voltage) while the touchscreen is held pressed, extra pen-up and pen-down events are generated. This is fixed by avoiding the UP event when the touchscreen is stopped. Signed-off-by: David Jander <david@protonic.nl> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* | | Input: silead - add OF device ID tableJavier Martinez Canillas2017-03-231-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The driver doesn't have a struct of_device_id table but supported devices are registered via Device Trees. This is working on the assumption that a I2C device registered via OF will always match a legacy I2C device ID and that the MODALIAS reported will always be of the form i2c:<device>. But this could change in the future so the correct approach is to have an OF device ID table if the devices are registered via OF. As pointed by Hans de Goede, there's no mssl1680 and this is just used in some ACPI systems to identify the gsl1680 chip. So isn't included in the OF device ID table since a DT should use the proper device name instead. Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* | | Input: tps6507x-ts - update to devm_* APIYegor Yefremov2017-03-151-28/+5
| | | | | | | | | | | | | | | | | | | | | Update the code to use devm_* API so that driver core will manage resources. Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* | | Merge branch 'ib/4.10-sparse-keymap-managed' into nextDmitry Torokhov2017-03-091-1/+1
|\| | | | | | | | | | | This brings in version of sparse keymap code that uses managed memory.
| * | Input: wm97xx - make missing platform data non-fatalManuel Lauss2017-01-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 6480af4915d6 ("power_supply: wm97xx_battery: use power_supply_get_drvdata") made wm97xx platform data mandatory, although it's still optional. This patch fixes an oops during driver probe on one of my MIPS boards with a wm9712. Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com> Reviewed-by: Robert Jarzmik <robert.jarzmik@free.fr> Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* | | Input: ad7879 - do not manipulate capability bits directlyDmitry Torokhov2017-03-011-7/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of manipulating capabilities bits of input device directly, let's use input_set_capability() API. Also, stop setting ABS_X/Y bits explicitly as input_set_abs_params() does this for us. Acked-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* | | Input: ad7879 - try parsing properties on non-DT systemsDmitry Torokhov2017-03-011-4/+3
| | | | | | | | | | | | | | | | | | | | | We have switched the driver to use generic device properties API, so there is no need to check for presence of DT node before trying parse properties. Acked-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* | | Input: ad7879 - return plain error code from ad7879_probe()Dmitry Torokhov2017-03-014-30/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With the switch to devm, there is no need for ad7879_probe() to return the touchscreen structure, we can use plain error code. This also fixes issue introduced with devm concersion, where we returned 0 on success (which worked OK since IS_ERR(0) would not trigger, but was not correct regardless). Fixes: 381f688eee3d ("Input: ad7879 - use more devm interfaces") Acked-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* | | Input: ad7879 - make sure we set up drvdataDmitry Torokhov2017-03-012-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | The conversion to devm accidentally removed setting up of I2C client data upon successful probe of the touchscreen. Let's move this setting into the core, so we do not forger about it again. Fixes: 381f688eee3d ("Input: ad7879 - use more devm interfaces") Acked-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* | | Input: ad7879 - add header file to fix ad7879.c build errorsRandy Dunlap2017-02-251-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add header file to fix these build errors: ../drivers/input/touchscreen/ad7879.c: In function 'ad7879_parse_dt': ../drivers/input/touchscreen/ad7879.c:505:2: error: implicit declaration of function 'device_property_read_u32' [-Werror=implicit-function-declaration] err = device_property_read_u32(dev, "adi,resistance-plate-x", &tmp); ^ ../drivers/input/touchscreen/ad7879.c:512:2: error: implicit declaration of function 'device_property_read_u8' [-Werror=implicit-function-declaration] device_property_read_u8(dev, "adi,first-conversion-delay", ^ ../drivers/input/touchscreen/ad7879.c:521:2: error: implicit declaration of function 'device_property_read_bool' [-Werror=implicit-function-declaration] ts->swap_xy = device_property_read_bool(dev, "touchscreen-swapped-x-y"); ^ Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* | | Merge branch 'tsc2007' into nextDmitry Torokhov2017-02-235-70/+285
|\ \ \ | | | | | | | | | | | | Bring in TSC2007 improvements.
| * | | Input: tsc2007 - correctly report pressure and not resistance to user spaceH. Nikolaus Schaller2017-02-221-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, tsc2007 would report as ABS_PRESSURE: 0 for no pressure (resistance infinite) high value for soft pressure (high resistance) low value for firm pressure (lower resistance) This does not matter for most applications (e.g. GUI, Menu, Scrolling etc.) where the ABS_PRESSURE is ignored and only BTN_TOUCH is processed to detect screen taps. Only some special graphics applications read the pressure channel and they will be mixed up by this non-monotonic relation. So we fix it to become: 0 for no pressure (resistance infinite) low value for soft pressure (high resistance) high value for firm pressure (lower resistance) While this patch changes the values reported to userspace, ABS_PRESSURE is used rarely by userspace. Most software only relies on BTN_TOUCH (boolean), which is not affected by this patch. Some graphics software makes use of the interface and does not work correctly with the currently used inverted behaviour. Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com> Reviewed-By: Sebastian Reichel <sre@kernel.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| * | | Input: tsc2007 - rename function tsc2007_calculate_pressureH. Nikolaus Schaller2017-02-223-7/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Rename tsc2007_calculate_pressure to tsc2007_calculate_resistance because that is what it does. Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| * | | Input: tsc2007 - switch to using input_set_capability()Dmitry Torokhov2017-02-221-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | Do not manipulate evbits/keybits directly, use helper for that. Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| * | | Input: tsc2007 - add iio interface to read external ADC input and temperatureH. Nikolaus Schaller2017-02-175-66/+273
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The tsc2007 chip not only has a resistive touch screen controller but also an external AUX adc imput which can be used for an ambient light sensor, battery voltage monitoring or any general purpose. Additionally it can measure the chip temperature. This extension provides an iio interface for these adc channels. Since it is not wasting much resources and is very straightforward, we simply provide all other adc channels as optional iio interfaces as weel. This can be used for debugging or special applications. This patch also splits the tsc2007 driver in several source files: tsc2007.h -- constants, structs and stubs tsc2007_core.c -- functional parts of the original driver tsc2007_iio.c -- the optional iio stuff Makefile magic allows to conditionally link the iio stuff if CONFIG_IIO=y or =m in a way that it works with CONFIG_TOUCHSCREEN_TSC2007=m. Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com> Reviewed-by: Jonathan Cameron <jic23@kernel.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| * | | Input: tsc2007 - check for presence and power down tsc2007 during probeH. Nikolaus Schaller2017-02-171-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. check if chip is really present and don't succeed if it isn't. 2. if it succeeds, power down the chip until accessed Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* | | | Input: ad7879 - update MODULE_AUTHOR email addressMichael Hennerich2017-02-233-3/+3
| | | | | | | | | | | | | | | | Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* | | | Input: ad7879-spi - remove bits_per_word = 16 enforcementMichael Hennerich2017-02-231-8/+0
| | | | | | | | | | | | | | | | | | | | | | | | Using regmap this is no longer required. Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* | | | Input: ad7879 - allow exporting AUX/VBAT/GPIO pin via device propertyDmitry Torokhov2017-02-231-2/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Up until now only platforms using legacy platform data were able to switch AUX/VBAT/GPIO pin in GPIO mode and use it as regular GPIO line. Let's allow platforms using generic device properties to do the same. Reviewed-by: Michael Hennerich <michael.hennerich@analog.com> Tested-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* | | | Input: ad7879 - use more devm interfacesDmitry Torokhov2017-02-234-62/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | gpiochip_add now has a managed version, and we can remove sysfs attribute group via devm_add_action_or_reset (at least until we have devm version of sysfs_create_group). This allows us to get rid of ad7879_remove(). Reviewed-by: Michael Hennerich <michael.hennerich@analog.com> Tested-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* | | | Input: ad7879 - convert to use regmapDmitry Torokhov2017-02-235-156/+64
| |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | Instead of rolling our own infrastructure to provide uniform access to I2C and SPI buses, let's switch to using regmap. Reviewed-by: Michael Hennerich <michael.hennerich@analog.com> Tested-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* | | Input: zet6223 - export OF device ID as module aliasesJavier Martinez Canillas2017-02-201-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The I2C core always reports a MODALIAS of the form i2c:<foo> even if the device was registered via OF, this means that exporting the OF device ID table device aliases in the module is not needed. But in order to change how the core reports modaliases to user-space, it's better to export it. Before this patch: $ modinfo drivers/input/touchscreen/zet6223.ko | grep alias alias: i2c:zet6223 After this patch: $ modinfo drivers/input/touchscreen/zet6223.ko | grep alias alias: of:N*T*Czeitec,zet6223C* alias: of:N*T*Czeitec,zet6223 alias: i2c:zet6223 Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* | | Input: tsc2004/5 - switch to using generic device propertiesDmitry Torokhov2017-02-121-63/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of supporting legacy platform data (of which we have no mainline users) and OF-based properties, let's switch to generic device properties. This will still allow legacy boards to use the driver (by defining property sets and attaching them to the drivers) and will simplify probe and make driver usable on ACPI-based systems as well. Reviewed-By: Sebastian Reichel <sre@kernel.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>