aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2016-03-22staging: delete STE RMI4 hackish driverLinus Walleij1-1137/+0
As of commit 62d5bdf972ebcfc99f72f734ae979713e4ca6450 "Merge branch 'synaptics-rmi4' into next" the input subsystem has a proper RMI4 infrastructure and touchscreen driver. The ST Ux500 platform has been converted to use the new driver and its devicetree bindings. Delete this ancient hack. Cc: Andrew Duggan <aduggan@synaptics.com> Cc: Christopher Heiny <cheiny@synaptics.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-11staging: ste_rmi4: simplify NULL testsEva Rachel Retuya1-1/+1
Replace direct comparisons to NULL i.e. 'x == NULL' with '!x' for consistency. Coccinelle semantic patch used: @@ identifier func; expression x; statement Z; @@ x = func(...); if ( ( + ! x - == NULL | + ! - NULL == x ) ) Z Signed-off-by: Eva Rachel Retuya <eraretuya@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-11Staging: ste_rmi4: Add space around '/'Dilek Uzulmez1-3/+3
Add space around operator '/'. Problem found using checkpatch.pl CHECK: spaces preferred around that '/' (ctx:VxV) Signed-off-by: Dilek Uzulmez <dilekuzulmez@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07staging: ste_rmi4: avoid unused function warningsArnd Bergmann1-5/+2
The rmi4 touchscreen driver encloses the power-management functions in #ifdef CONFIG_PM, but the smtcfb_pci_suspend/resume functions are only really used when CONFIG_PM_SLEEP is also set, as a frequent gcc warning shows: ste_rmi4/synaptics_i2c_rmi4.c:1050:12: warning: 'synaptics_rmi4_suspend' defined but not used ste_rmi4/synaptics_i2c_rmi4.c:1084:12: warning: 'synaptics_rmi4_resume' defined but not used This changes the driver to remove the #ifdef and instead mark the functions as __maybe_unused, which is a nicer anyway, as it provides build testing for all the code in all configurations and is harder to get wrong. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07Staging: ste_rmi4: constify synaptics_rmi4_platform_data structuresJulia Lawall1-1/+1
This synaptics_rmi4_platform_data structure is never modified, so declare it as const. Others are already const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-12Staging: ste_rmi4: Remove unnecessary MODULE_ALIAS()Javier Martinez Canillas1-1/+0
The driver has a I2C device id table that is used to create the modaliases which already contains "synaptics_rmi4_ts". So the alias is not needed. Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-14staging: 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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-20Staging: ste_rmi4: Use SIMPLE_DEV_PM_OPS() macroVaishali Thakkar1-6/+3
Macro SIMPLE_DEV_PM_OPS() can be used when same suspend and resume callbacks are used for suspend to RAM and hibernation. So, here use SIMPLE_DEV_PM_OPS to make code shorter and cleaner. Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-06Staging: ste_rmi4: clean dev_err loggingHaneen Mohammed1-6/+6
This patch removes __func__ from dev_err. dev_err includes information about: (devcice, driver, specific instance of device, etc) in the log printout. This was done using Coccinelle, with the following semantic patch: @a@ expression E, R; expression msg; @@ dev_err(E, msg, __func__, R); @script:python b@ e << a.msg; y; @@ if(e.find("%s: ") == True): m = e.replace("%s: ", "", 1); coccinelle.y = m; elif(e.find("%s ") == True): m = e.replace("%s ", "", 1); coccinelle.y = m; elif(e.find("%s:") == True): m = e.replace("%s:", "", 1); coccinelle.y = m; else: m = e.replace("%s", "",1); coccinelle.y = m; @c@ expression a.E, a.msg, a.R; identifier b.y; @@ - dev_err(E, msg, __func__, R); + dev_err(E, y, R); Signed-off-by: Haneen Mohammed <hamohammed.sa@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23Staging: ste_rmi4: add new line after declarationsTapasweni Pathak1-0/+2
This patch fixes checkpatch.pl warning in synaptics_i2c_rmi4.c file WARNING : Missing a blank line after declarations Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-29staging: Remove OOM message after input_allocate_deviceJoe Perches1-2/+0
Emitting an OOM message isn't necessary after input_allocate_device as there's a generic OOM and a dump_stack already done. Signed-off-by: Joe Perches <joe@perches.com> Acked-by: Jonathan Cameron <jic23@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-16staging: ste_rmi4: Suppress 'ignoring return value of ‘regulator_enable()' warningLee Jones1-1/+5
drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c: In function ‘synaptics_rmi4_resume’: drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c:1090:18: warning: ignoring return value of ‘regulator_enable’, declared with attribute warn_unused_result [-Wunused-result Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: devel@driverdev.osuosl.org Acked-by: Srinidhi Kasagar <srinidhi.kasagar@stericsson.com> Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-02Merge tag 'multiplatform-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-socLinus Torvalds1-13/+18
Pull ARM SoC multiplatform updates from Olof Johansson: "More multiplatform enablement for ARM platforms. The ones converted in this branch are: - bcm2835 - cns3xxx - sirf - nomadik - msx - spear - tegra - ux500 We're getting close to having most of them converted! One of the larger platforms remaining is Samsung Exynos, and there are a bunch of supporting patches in this merge window for it. There was a patch in this branch to a early version of multiplatform conversion, but it ended up being reverted due to need of more bake time. The revert commit is part of the branch since it would have required rebasing multiple dependent branches and they were stable by then" * tag 'multiplatform-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (70 commits) mmc: sdhci-s3c: Fix operation on non-single image Samsung platforms clocksource: nomadik-mtu: fix up clocksource/timer Revert "ARM: exynos: enable multiplatform support" ARM: SPEAr13xx: Fix typo "ARCH_HAVE_CPUFREQ" ARM: exynos: enable multiplatform support rtc: s3c: make header file local mtd: onenand/samsung: make regs-onenand.h file local thermal/exynos: remove unnecessary header inclusions mmc: sdhci-s3c: remove platform dependencies ARM: samsung: move mfc device definition to s5p-dev-mfc.c ARM: exynos: move debug-macro.S to include/debug/ ARM: exynos: prepare for sparse IRQ ARM: exynos: introduce EXYNOS_ATAGS symbol ARM: tegra: build assembly files with -march=armv7-a ARM: Push selects for TWD/SCU into machine entries ARM: ux500: build hotplug.o for ARMv7-a ARM: ux500: move to multiplatform ARM: ux500: make remaining headers local ARM: ux500: make irqs.h local to platform ARM: ux500: get rid of <mach/[hardware|db8500-regs].h> ...
2013-04-08staging: ste_rmi4: kill platform_data hackArnd Bergmann1-13/+18
There is only one instance of the platform data for synaptics_i2c_rmi4 in the mainline kernel, so there is no point of pretending its variable here. The only member that has a dependency on the platform is actually the interrupt number, and there is a field in the i2c_client structure that gets initialized from the board info, so we can trivially move the board_into into the platform without knowledge of the platform_data structure. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2013-03-25staging: ste_rmi4: Make synaptics_rmi4_touchpad_config symbol staticSachin Kamat1-1/+1
'synaptics_rmi4_touchpad_config' is used only in this file. Make it static. Silences the following sparse warning: drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c:652:5: warning: symbol 'synaptics_rmi4_touchpad_config' was not declared. Should it be static? Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Cc: Naveen Kumar G <naveen.gaddipati@stericsson.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-02-11staging: Remove unnecessary OOM messagesJoe Perches1-12/+6
alloc failures already get standardized OOM messages and a dump_stack. For the affected mallocs around these OOM messages: Converted kzallocs with multiplies to kcalloc. Converted kmallocs with multiplies to kmalloc_array. Converted a kmalloc/strlen/strncpy to kstrdup. Moved a spin_lock below a removed OOM message and removed a now unnecessary spin_unlock. Neatened alignment and whitespace. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-21staging: ste_rmi4: 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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-21staging: ste_rmi4: 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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-21staging: ste_rmi4: 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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-16staging: ste_rmi4: Convert to Type-B supportAlexandra Chin1-43/+33
Convert to MT-B because Synaptics touch devices are capable of tracking identifiable fingers. Signed-off-by: Alexandra Chin <alexandra.chin@tw.synaptics.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-22staging: ste_rmi4: use module_i2c_driver to simplify the codeWei Yongjun1-23/+1
Use the module_i2c_driver() macro to make the code smaller and a bit simpler. dpatch engine is used to auto generate this patch. (https://github.com/weiyj/dpatch) Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Acked-by: Linus Walleij <linus.walleij@linaro.org> Acked-by: Henrik Rydberg <rydberg@euromail.se> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-07-16staging: ste_rmi4: Fix typosJustin P. Mattock1-4/+4
Signed-off-by: Justin P. Mattock <justinmattock@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2011-08-25staging: Add module.h to drivers/staging usersPaul Gortmaker1-0/+1
Lots of people expect module.h to just "be there" without any #include effort. But we are crushing that. So fix those files in staging relying on implicit module.h presence. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-06-28staging: synaptics: Implement error handling for rmi4 touch regulatorNaveen Kumar Gaddipati1-23/+20
Implement the error handling for regulator in synaptics rmi4 touch screen Signed-off-by: Naveen Kumar Gaddipati <naveen.gaddipati@stericsson.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-03-31Fix common misspellingsLucas De Marchi1-10/+10
Fixes generated by 'codespell' and manually reviewed. Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
2011-03-14staging: ste_rmi4: fix memory leaksAlexander Beregalov1-1/+3
Free resources before exit. Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-02Staging: Merge branch 'staging-next' into 2.6.38-rc3Greg Kroah-Hartman1-9/+8
This was done to resolve conflicts in the following files due to patches in Linus's tree and in the staging-next tree: drivers/staging/brcm80211/brcmsmac/wl_mac80211.c drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-01-25staging/ste_rmi4: Remove obsolete cleanup for clientdataWolfram Sang1-3/+1
A few new i2c-drivers came into the kernel which clear the clientdata-pointer on exit or error. This is obsolete meanwhile, the core will do it. Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Cc: Naveen Kumar Gaddipati <naveen.gaddipati@stericsson.com> Cc: Linus Walleij <linus.walleij@stericsson.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-01-21staging: synaptics: Update with the kernel object name of touch deviceNaveen Kumar Gaddipati1-4/+2
Update with the kernel object name of touch device for getting the regulator of the synaptics rmi4 touch device. Signed-off-by: Naveen Kumar Gaddipati <naveen.gaddipati@stericsson.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-01-20Staging: ste_rmi4: use after input_unregister_device()Dan Carpenter1-10/+9
The original code called input_free_device(rmi4_data->input_dev) after input_unregister_device(rmi4_data->input_dev) and that's a double free. This is described in the comments to input_unregister_device(). The normal way to handle this is to make input_register_device() the last function in the probe which can fail. That way you can avoid the call to input_unregister_device() entirely. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-09Staging: add Synaptics RMI4 touchpad driver supportNaveen Kumar Gaddipati1-0/+1179
Added the Synaptics RMI4 touchpad driver support. Acked-by: Linus Walleij <linus.walleij@stericsson.com> Signed-off-by: Naveen Kumar Gaddipati <naveen.gaddipati@stericsson.com> Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Cc: Christopher Heiny <cheiny@synaptics.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>