aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/touchscreen/bu21013_ts.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2022-08-16i2c: Make remove callback return voidUwe Kleine-König1-3/+1
The value returned by an i2c driver's remove function is mostly ignored. (Only an error message is printed if the value is non-zero that the error is ignored.) So change the prototype of the remove function to return no value. This way driver authors are not tempted to assume that passing an error to the upper layer is a good idea. All drivers are adapted accordingly. There is no intended change of behaviour, all callbacks were prepared to return 0 before. Reviewed-by: Peter Senna Tschudin <peter.senna@gmail.com> Reviewed-by: Jeremy Kerr <jk@codeconstruct.com.au> Reviewed-by: Benjamin Mugnier <benjamin.mugnier@foss.st.com> Reviewed-by: Javier Martinez Canillas <javierm@redhat.com> Reviewed-by: Crt Mori <cmo@melexis.com> Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Acked-by: Marek Behún <kabel@kernel.org> # for leds-turris-omnia Acked-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Petr Machata <petrm@nvidia.com> # for mlxsw Reviewed-by: Maximilian Luz <luzmaximilian@gmail.com> # for surface3_power Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> # for bmc150-accel-i2c + kxcjk-1013 Reviewed-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> # for media/* + staging/media/* Acked-by: Miguel Ojeda <ojeda@kernel.org> # for auxdisplay/ht16k33 + auxdisplay/lcd2s Reviewed-by: Luca Ceresoli <luca.ceresoli@bootlin.com> # for versaclock5 Reviewed-by: Ajay Gupta <ajayg@nvidia.com> # for ucsi_ccg Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> # for iio Acked-by: Peter Rosin <peda@axentia.se> # for i2c-mux-*, max9860 Acked-by: Adrien Grassein <adrien.grassein@gmail.com> # for lontium-lt8912b Reviewed-by: Jean Delvare <jdelvare@suse.de> # for hwmon, i2c-core and i2c/muxes Acked-by: Corey Minyard <cminyard@mvista.com> # for IPMI Reviewed-by: Vladimir Oltean <olteanv@gmail.com> Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Acked-by: Sebastian Reichel <sebastian.reichel@collabora.com> # for drivers/power Acked-by: Krzysztof Hałasa <khalasa@piap.pl> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Wolfram Sang <wsa@kernel.org>
2019-09-02Input: bu21013_ts - switch to using standard touchscreen propertiesDmitry Torokhov1-21/+33
This switches the driver over to the standard touchscreen properties for coordinate transformation, while keeping old bindings working as well. Tested-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2019-09-02Input: bu21013_ts - switch to using MT-B (slotted) protocolDmitry Torokhov1-37/+43
MT-B protocol is more efficient and everyone expects it. We use in-kernel tracking to identify contacts. Tested-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2019-09-02Input: bu21013_ts - fix suspend when wake sourceDmitry Torokhov1-24/+24
If the touchscreen is configured as wakeup source we should not be cutting off power to it. Also, now that the driver relies on I2C client to supply IRQ, we do not need to explicitly enable and disable IRQ for wakeup: if device is created as wakeup source, I2C core will mark interrupt as wakeup one. Tested-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2019-09-02Input: bu21013_ts - use interrupt from I2C clientDmitry Torokhov1-16/+19
Instead of trying to map INT GPIO to interrupt, let's use one supplied by I2C client. If there is none - bail. This will also allow us to treat INT GPIO as optional, as per the binding. Tested-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2019-09-02Input: bu21013_ts - remove support for platform dataDmitry Torokhov1-72/+37
There are no current users of the platform data in the tree, and any new users should either use device tree, or static device properties to describe the device. This change drop the platform data definition and handling and moves the driver over to generic device properties API. We also drop support for the external clock. If it is needed we will have to extend the bindings to supply the clock reference and handle it properly in the driver. Also, wakeup setting should be coming from I2C client. Tested-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2019-09-02Input: bu21013_ts - convert to using managed resourcesDmitry Torokhov1-98/+84
This allows trimming error unwinding and device removal handling. Tested-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2019-09-02Input: bu21013_ts - remove useless commentsDmitry Torokhov1-59/+2
The comments for individual functions in the driver do not provide any additional information beyond what function names indicate. Tested-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2019-09-02Input: bu21013_ts - annotate supend/resume methods as __maybe_unusedDmitry Torokhov1-10/+3
Instead if #ifdef-ing out suspend and resume methods, let's mark them as __maybe_unused to get better compile time coverage. Tested-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2019-09-02Input: bu21013_ts - rename some variablesDmitry Torokhov1-186/+190
"bu21013_data" and "struct bu21013_ts_data" are a tad long, let's call them "ts" and "struct bu21013_ts". Also rename retval to error in bu21013_init_chip() and adjust formatting; i2c_smbus_write_byte_data() returns negative on error and 0 on success, so we simply test if whether erro is 0 or not. Tested-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2019-09-02Input: bu21013_ts - convert to use GPIO descriptorsLinus Walleij1-48/+38
This driver can use GPIO descriptors rather than GPIO numbers without any problems, convert it. Name the field variables after the actual pins on the chip rather than the "reset" and "touch" names from the devicetree bindings that are vaguely inaccurate. No in-tree users pass GPIO numbers in platform data so drop this. Descriptor tables can be used to get these GPIOs from a board file if need be. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2019-05-30treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 194Thomas Gleixner1-1/+1
Based on 1 normalized pattern(s): license terms gnu general public license gpl version 2 extracted by the scancode license scanner the SPDX license identifier GPL-2.0-only has been chosen to replace the boilerplate/reference in 161 file(s). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Allison Randal <allison@lohutok.net> Reviewed-by: Alexios Zavras <alexios.zavras@intel.com> Reviewed-by: Steve Winslow <swinslow@gmail.com> Reviewed-by: Richard Fontana <rfontana@redhat.com> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190528170027.447718015@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-01-21Input: touchscreen - drop unnecessary calls to device_init_wakeupGuenter Roeck1-2/+0
Calling device_init_wakeup in the remove function is unnecessary since the device is going away, and thus won't be able to cause any wakeups under any circumstances. Besides, the driver cleanup code already handles the necessary cleanup. Similarly, disabling wakeup in the probe error path is unnecessary, as is disabling wakeup in the probe function in the first place. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-07-17Input: drop owner assignment from i2c_driverKrzysztof Kozlowski1-1/+0
i2c_driver does not need to set an owner because i2c_register_driver() will set it. Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2012-11-27Input: bu21013_ts - add support for Device Tree bootingLee Jones1-4/+46
Now we can register the BU21013_ts touch screen when booting with Device Tree enabled. Here we parse all the necessary components previously expected to be passed from platform data. Acked-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2012-11-27Input: bu21013_ts - move GPIO init and exit functions into the driverLee Jones1-19/+50
These GPIO init and exit functions have no place in platform data, they should be part of the driver instead, Acked-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2012-11-27Input: bu21013_ts - request regulator that actually existsLee Jones1-1/+1
Currently the BU21013 Touch Screen driver requests a regulator by the name of 'V-TOUCH', which doesn't exist anywhere in the kernel. The correct name, as referenced in platform regulator code is 'avdd'. Here, when we request a regulator, we use the correct name instead. Acked-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2012-11-24Input: remove use of __devexitBill Pemberton1-1/+1
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-24Input: remove use of __devinitBill Pemberton1-1/+1
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-24Input: remove use of __devexit_pBill Pemberton1-1/+1
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-07-04Input: request threaded-only IRQs with IRQF_ONESHOTLars-Peter Clausen1-1/+2
Since commit 1c6c69525b ("genirq: Reject bogus threaded irq requests") threaded IRQs without a primary handler need to be requested with IRQF_ONESHOT, otherwise the request will fail. This patch adds the IRQF_ONESHOT to input drivers where it is missing. Not modified by this patch are those drivers where the requested IRQ will always be a nested IRQ (e.g. because it's part of an MFD), since for this special case IRQF_ONESHOT is not required to be specified when requesting the IRQ. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2012-03-16Input: convert I2C drivers to use module_i2c_driver()Axel Lin1-24/+1
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>
2011-10-31drivers/input: Add module.h to modular drivers implicitly using itPaul Gortmaker1-0/+1
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-01-17Input: bu21013_ts - added regulator supportNaveen Kumar Gaddipati1-1/+34
Add regulator support in ROHM BU21013 touch panel driver. Signed-off-by: Naveen Kumar Gaddipati <naveen.gaddipati@stericsson.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-01-17Input: bu21013_ts - remove duplicate resolution parametersNaveen Kumar Gaddipati1-2/+2
Remove duplicate display resolution parameters from platform data as one pair is quite enough. Signed-off-by: Naveen Kumar Gaddipati <naveen.gaddipati@stericsson.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-12-27Input: bu21013_ts - fix misuse of logical operation in place of bitopDavid Sterba1-1/+1
Signed-off-by: David Sterba <dsterba@suse.cz> Acked-by: Linus Walleij <linus.walleij@stericsson.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-10-28Input: bu21013_ts - fix null dereference in error handlingDan Carpenter1-1/+1
bu21013_data could be NULL so better not reference it. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-10-13Input: add ROHM BU21013 touch panel controller supportNaveen Kumar Gaddipati1-0/+648
Add the ROHM BU21013 capacitive touch panel controller support with i2c interface. Acked-by: Linus Walleij <linus.walleij@stericsson.com> Signed-off-by: Naveen Kumar Gaddipati <naveen.gaddipati@stericsson.com> Acked-by: Henrik Rydberg <rydberg@euromail.se> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>