summaryrefslogtreecommitdiff
path: root/drivers/input/touchscreen/cy8ctmg110_ts.c
AgeCommit message (Collapse)AuthorFilesLines
2023-05-17Input: Switch i2c drivers back to use .probe()Uwe Kleine-König1-1/+1
After commit b8a1a4cd5a98 ("i2c: Provide a temporary .probe_new() call-back type"), all drivers being converted to .probe_new() and then 03c835f498b5 ("i2c: Switch .probe() to not take an id parameter") convert back to (the new) .probe() to be able to eventually drop .probe_new() from struct i2c_driver. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Link: https://lore.kernel.org/r/20230517164645.162294-1-u.kleine-koenig@pengutronix.de Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2023-01-10Input: cy8ctmg110_ts - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr()Jonathan Cameron1-4/+5
SIMPLE_DEV_PM_OPS() is deprecated as it requires explicit protection against unused function warnings. The new combination of pm_sleep_ptr() and DEFINE_SIMPLE_DEV_PM_OPS() allows the compiler to see the functions, thus suppressing the warning, but still allowing the unused code to be removed. Thus also drop the __maybe_unused markings. Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Cc: Linus Walleij <linus.walleij@linaro.org> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/20230102181842.718010-41-jic23@kernel.org Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2022-12-03Input: cy8ctmg110_ts - Convert to i2c's .probe_new()Uwe Kleine-König1-3/+2
The probe function doesn't make use of the i2c_device_id * parameter so it can be trivially converted. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Link: https://lore.kernel.org/r/20221118224540.619276-234-uwe@kleine-koenig.org Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2021-06-06Input: cy8ctmg110_ts - switch to using gpiod APIDmitry Torokhov1-27/+18
Instead of legacy gpio API let's use newer gpiod API. This also allows us to get rid of platform data. Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/20210603043726.3793876-7-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2021-06-06Input: cy8ctmg110_ts - switch to using managed resourcesDmitry Torokhov1-46/+28
This simplifies error handling paths and allows to get rid of cy8ctmg110_remove() method. Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/20210603043726.3793876-6-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2021-06-06Input: cy8ctmg110_ts - use endian helpers when converting data on wireDmitry Torokhov1-6/+5
Switch to using be16_to_cpup() instead of shifting and combining data by hand. Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/20210603043726.3793876-5-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2021-06-06Input: cy8ctmg110_ts - let I2C core configure wake interruptDmitry Torokhov1-6/+4
I2C core already configures interrupt as wakeup source when device is registered using I2C_CLIENT_WAKE flag, so let's rely on it instead of configuring it ourselves. Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/20210603043726.3793876-4-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2021-06-06Input: cy8ctmg110_ts - do not hardcode as wakeup sourceDmitry Torokhov1-1/+1
Let platform specify whether the controller should be a wakeup source by registering as I2C_CLIENT_WAKE. Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/20210603043726.3793876-3-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2021-06-06Input: cy8ctmg110_ts - do not hard code interrupt triggerDmitry Torokhov1-2/+1
Rely on the platform to set up interrupt polarity/type properly instead of hard-coding falling edge. Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/20210603043726.3793876-2-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2021-06-06Input: cy8ctmg110_ts - rely on platform code to supply interruptDmitry Torokhov1-31/+1
Instead of using platform data to specify GPIO that is used as interrupt source, rely on the platform and I2C core to set it up properly. Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/20210603043726.3793876-1-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2019-05-30treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 176Thomas Gleixner1-13/+1
Based on 1 normalized pattern(s): this program is free software you can redistribute it and or modify it under the terms of the gnu general public license version 2 as published by the free software foundation this program is distributed in the hope that it will be useful but without any warranty without even the implied warranty of merchantability or fitness for a particular purpose see the gnu general public license for more details you should have received a copy of the gnu general public license along with this program if not write to the free software foundation inc 675 mass ave cambridge ma 02139 usa extracted by the scancode license scanner the SPDX license identifier GPL-2.0-only has been chosen to replace the boilerplate/reference in 44 file(s). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Allison Randal <allison@lohutok.net> Reviewed-by: Steve Winslow <swinslow@gmail.com> Reviewed-by: Alexios Zavras <alexios.zavras@intel.com> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190528170025.980374610@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-18Input: 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>
2014-11-02Input: touchscreen - use __maybe_unused instead of ifdef around suspend/resumeJingoo Han1-4/+2
Use __maybe_unused instead of ifdef guards around suspend/resume functions, in order to increase build coverage and fix build warnings. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-12-06Input: use dev_get_platdata()Jingoo Han1-1/+1
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-08-13Input: cy8ctmg110_ts - add CONFIG_PM_SLEEP to suspend/resumeJingoo Han1-4/+2
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>
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-10-11Input: cy8ctmg110_ts - use C99-style structure initializatorsShubhrajyoti Datta1-2/+11
Convert the struct i2c_msg initialization to C99 format. This makes maintaining and editing the code simpler. Also helps once other fields like transferred are added in future. Thanks to Julia Lawall <julia.lawall@lip6.fr> for automating the conversion. Signed-off-by: Shubhrajyoti D <shubhrajyoti@ti.com> Acked-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2012-07-05Input: 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-17Input: convert I2C drivers to use module_i2c_driver()Axel Lin1-12/+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-07-19Input: cy8ctmg110_ts - set reset_pin and irq_pin from platform dataAxel Lin1-0/+2
The implementation in cy8ctmg110_probe() does not properly set reset_pin and irq_pin from platform data. Let's fix it. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-07-13Input: cy8ctmg110_ts - constify i2c_device_id tableAxel Lin1-1/+1
Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-07-13Input: cy8ctmg110_ts - fix checking return value of i2c_master_sendAxel Lin1-2/+2
i2c_master_send returns negative errno, or else the number of bytes written. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-01-07Input: cy8ctmg110_ts - Convert to dev_pm_opsMark Brown1-6/+9
There is a general move towards the use of dev_pm_ops rather than bus specific suspend APIs as this simplifies both the bus and PM core implementations. Convert the cy8ctmg110_ts driver over. Compile tested only. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-09-06Input: cy8ctmg110 - add fuzz to ABS_X and ABS_Y to remove jitterJames Ketrenos1-2/+2
Without this the jitter on the touchscreen makes it hard to use for most GUI toolkits. Signed-off-by: James Ketrenos<jketreno@linux.intel.com> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-08-10Input: cy8ctmg100_ts - signedness bugDan Carpenter1-3/+3
"ret" should be signed here or the error handling doesn't work. Signed-off-by: Dan Carpenter <error27@gmail.com> Acked-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-07-31Input: cy8ctmg110 - capacitive touchscreen supportSamuli Konttila1-0/+363
Add support for the cy8ctmg110 capacitive touchscreen used on some embedded devices. (Some clean up by Alan Cox) Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>