summaryrefslogtreecommitdiff
path: root/drivers/input
AgeCommit message (Collapse)AuthorFilesLines
2023-02-27Merge tag 'soc-drivers-6.3' of ↵Linus Torvalds1-0/+17
git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc Pull ARM SoC driver updates from Arnd Bergmann: "As usual, there are lots of minor driver changes across SoC platforms from NXP, Amlogic, AMD Zynq, Mediatek, Qualcomm, Apple and Samsung. These usually add support for additional chip variations in existing drivers, but also add features or bugfixes. The SCMI firmware subsystem gains a unified raw userspace interface through debugfs, which can be used for validation purposes. Newly added drivers include: - New power management drivers for StarFive JH7110, Allwinner D1 and Renesas RZ/V2M - A driver for Qualcomm battery and power supply status - A SoC device driver for identifying Nuvoton WPCM450 chips - A regulator coupler driver for Mediatek MT81xxv" * tag 'soc-drivers-6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (165 commits) power: supply: Introduce Qualcomm PMIC GLINK power supply soc: apple: rtkit: Do not copy the reg state structure to the stack soc: sunxi: SUN20I_PPU should depend on PM memory: renesas-rpc-if: Remove redundant division of dummy soc: qcom: socinfo: Add IDs for IPQ5332 and its variant dt-bindings: arm: qcom,ids: Add IDs for IPQ5332 and its variant dt-bindings: power: qcom,rpmpd: add RPMH_REGULATOR_LEVEL_LOW_SVS_L1 firmware: qcom_scm: Move qcom_scm.h to include/linux/firmware/qcom/ MAINTAINERS: Update qcom CPR maintainer entry dt-bindings: firmware: document Qualcomm SM8550 SCM dt-bindings: firmware: qcom,scm: add qcom,scm-sa8775p compatible soc: qcom: socinfo: Add Soc IDs for IPQ8064 and variants dt-bindings: arm: qcom,ids: Add Soc IDs for IPQ8064 and variants soc: qcom: socinfo: Add support for new field in revision 17 soc: qcom: smd-rpm: Add IPQ9574 compatible soc: qcom: pmic_glink: remove redundant calculation of svid soc: qcom: stats: Populate all subsystem debugfs files dt-bindings: soc: qcom,rpmh-rsc: Update to allow for generic nodes soc: qcom: pmic_glink: add CONFIG_NET/CONFIG_OF dependencies soc: qcom: pmic_glink: Introduce altmode support ...
2023-02-26Merge tag 'input-for-v6.3-rc0' of ↵Linus Torvalds111-815/+665
git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input Pull input updates from Dmitry Torokhov: - a set of tweaks to iqs269a touch controller driver - a fix for ads7846 driver to properly handle 7845 chip - cap11xx driver will support cap1203, cap1293 and cap1298 models - xpad driver will support 8BitDo Pro 2 Wired Controller - input drivers have been switched to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() - other miscellaneous fixes and tweaks * tag 'input-for-v6.3-rc0' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (113 commits) dt-bindings: input: iqs626a: Redefine trackpad property types Input: iqs626a - drop unused device node references dt-bindings: input: touchscreen: st,stmfts: convert to dtschema Input: cyttsp5 - fix bitmask for touch buttons Input: exc3000 - properly stop timer on shutdown Input: synaptics-rmi4 - fix SPI device ID Input: cap11xx - add support for cap1203, cap1293 and cap1298 dt-bindings: input: microchip,cap11xx: add cap1203, cap1293 and cap1298 Input: pmic8xxx-keypad - fix a Kconfig spelling mistake & hyphenation Input: edt-ft5x06 - fix typo in a comment Input: tegra-kbc - use devm_platform_get_and_ioremap_resource() Input: st-keyscan - use devm_platform_get_and_ioremap_resource() Input: spear-keyboard - use devm_platform_get_and_ioremap_resource() Input: olpc_apsp - use devm_platform_get_and_ioremap_resource() Input: arc_ps2 - use devm_platform_get_and_ioremap_resource() Input: apbps2 - use devm_platform_get_and_ioremap_resource() Input: altera_ps2 - use devm_platform_get_and_ioremap_resource() Input: ads7846 - don't check penirq immediately for 7845 Input: ads7846 - always set last command to PWRDOWN Input: ads7846 - don't report pressure for ads7845 ...
2023-02-24Merge tag 'driver-core-6.3-rc1' of ↵Linus Torvalds2-10/+10
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core Pull driver core updates from Greg KH: "Here is the large set of driver core changes for 6.3-rc1. There's a lot of changes this development cycle, most of the work falls into two different categories: - fw_devlink fixes and updates. This has gone through numerous review cycles and lots of review and testing by lots of different devices. Hopefully all should be good now, and Saravana will be keeping a watch for any potential regression on odd embedded systems. - driver core changes to work to make struct bus_type able to be moved into read-only memory (i.e. const) The recent work with Rust has pointed out a number of areas in the driver core where we are passing around and working with structures that really do not have to be dynamic at all, and they should be able to be read-only making things safer overall. This is the contuation of that work (started last release with kobject changes) in moving struct bus_type to be constant. We didn't quite make it for this release, but the remaining patches will be finished up for the release after this one, but the groundwork has been laid for this effort. Other than that we have in here: - debugfs memory leak fixes in some subsystems - error path cleanups and fixes for some never-able-to-be-hit codepaths. - cacheinfo rework and fixes - Other tiny fixes, full details are in the shortlog All of these have been in linux-next for a while with no reported problems" [ Geert Uytterhoeven points out that that last sentence isn't true, and that there's a pending report that has a fix that is queued up - Linus ] * tag 'driver-core-6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (124 commits) debugfs: drop inline constant formatting for ERR_PTR(-ERROR) OPP: fix error checking in opp_migrate_dentry() debugfs: update comment of debugfs_rename() i3c: fix device.h kernel-doc warnings dma-mapping: no need to pass a bus_type into get_arch_dma_ops() driver core: class: move EXPORT_SYMBOL_GPL() lines to the correct place Revert "driver core: add error handling for devtmpfs_create_node()" Revert "devtmpfs: add debug info to handle()" Revert "devtmpfs: remove return value of devtmpfs_delete_node()" driver core: cpu: don't hand-override the uevent bus_type callback. devtmpfs: remove return value of devtmpfs_delete_node() devtmpfs: add debug info to handle() driver core: add error handling for devtmpfs_create_node() driver core: bus: update my copyright notice driver core: bus: add bus_get_dev_root() function driver core: bus: constify bus_unregister() driver core: bus: constify some internal functions driver core: bus: constify bus_get_kset() driver core: bus: constify bus_register/unregister_notifier() driver core: remove private pointer from struct bus_type ...
2023-02-22Merge tag 'hyperv-next-signed-20230220' of ↵Linus Torvalds1-3/+1
git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux Pull hyperv updates from Wei Liu: - allow Linux to run as the nested root partition for Microsoft Hypervisor (Jinank Jain and Nuno Das Neves) - clean up the return type of callback functions (Dawei Li) * tag 'hyperv-next-signed-20230220' of git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux: x86/hyperv: Fix hv_get/set_register for nested bringup Drivers: hv: Make remove callback of hyperv driver void returned Drivers: hv: Enable vmbus driver for nested root partition x86/hyperv: Add an interface to do nested hypercalls Drivers: hv: Setup synic registers in case of nested root partition x86/hyperv: Add support for detecting nested hypervisor
2023-02-21Merge branch 'next' into for-linusDmitry Torokhov120-1077/+834
Prepare input updates for 6.3 merge window.
2023-02-21Merge tag 'arm-boardfile-remove-6.3' of ↵Linus Torvalds13-1985/+0
git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc Pull ARM SoC boardfile updates from Arnd Bergmann "Unused boardfile removal for 6.3 This is a follow-up to the deprecation of most of the old-style board files that was merged in linux-6.0, removing them for good. This branch is almost exclusively dead code removal based on those annotations. Some device driver removals went through separate subsystem trees, but the majority is in the same branch, in order to better handle dependencies between the patches and avoid breaking bisection. Unfortunately that leads to merge conflicts against other changes in the subsystem trees, but they should all be trivial to resolve by removing the files. See commit 7d0d3fa7339e ("Merge tag 'arm-boardfiles-6.0' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc") for the description of which machines were marked unused and are now removed. The only removals that got postponed are Terastation WXL (mv78xx0) and Jornada720 (StrongARM1100), which turned out to still have potential users" * tag 'arm-boardfile-remove-6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (91 commits) mmc: omap: drop TPS65010 dependency ARM: pxa: restore mfp-pxa320.h usb: ohci-omap: avoid unused-variable warning ARM: debug: remove references in DEBUG_UART_8250_SHIFT to removed configs ARM: s3c: remove obsolete s3c-cpu-freq header MAINTAINERS: adjust SAMSUNG SOC CLOCK DRIVERS after s3c24xx support removal MAINTAINERS: update file entries after arm multi-platform rework and mach-pxa removal ARM: remove CONFIG_UNUSED_BOARD_FILES mfd: remove htc-pasic3 driver w1: remove ds1wm driver usb: remove ohci-tmio driver fbdev: remove w100fb driver fbdev: remove tmiofb driver mmc: remove tmio_mmc driver mfd: remove ucb1400 support mfd: remove toshiba tmio drivers rtc: remove v3020 driver power: remove pda_power supply driver ASoC: pxa: remove unused board support pcmcia: remove unused pxa/sa1100 drivers ...
2023-02-04Input: iqs626a - drop unused device node referencesJeff LaBundy1-83/+73
Each call to device/fwnode_get_named_child_node() must be matched with a call to fwnode_handle_put() once the corresponding node is no longer in use. This ensures a reference count remains balanced in the case of dynamic device tree support. Currently, the driver never calls fwnode_handle_put(); this patch adds the missing calls. Because fwnode_handle_put() does not take a const *fwnode_handle, the const qualifier is removed across all corresponding *fwnode_handle instances. As part of this change, trackpad channel touch thresholds and ATI base values are now specified under single trackpad channel child nodes. This enhancement moves both properties to scalar values as opposed to arrays, making their types consistent across bindings. Fixes: f1d2809de97a ("Input: Add support for Azoteq IQS626A") Signed-off-by: Jeff LaBundy <jeff@labundy.com> Link: https://lore.kernel.org/r/Y9RQVe/V1Hnw1oly@nixie71 Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2023-02-04Input: cyttsp5 - fix bitmask for touch buttonsRichard Kjerstadius1-1/+1
Prior to this patch, the bitmask ends up being 0x3, as opposed to 0x1 which likely was the intention. The erroneous bit results in the driver reporting 2 different button activations in designs with 2 or more buttons. To detect which button has been pressed, cyttsp5_btn_attention() uses a for loop to iterate through the input buffer, while shifting and applying a bitmask to determine the state for each button. Unfortunately, when the bitmask is 0x3 and there are multiple buttons, this procedure falls apart. Consider a design with 3 buttons. Pressing the third button will result in a call to cyttsp5_btn_attention() with the input buffer containing 0x4 (binary 0100). In the first iteration of the for loop cur_btn_state will be: (0x4 >> 0 * 1) & 0x3 = 0x4 & 0x3 = 0x0 This is correct. However, in the next iteration this happens: (0x4 >> 1 * 1) & 0x3 = 0x2 & 0x3 = 0x2 Which means that a key event for key 1 is generated, even though it's not really active. In the third iteration, the loop detects the button that was actually pressed: (0x4 >> 2 * 1) & 0x3 = 0x1 & 0x3 = 0x1 This key event is the only one that should have been detected, but it is accompanied by the preceding key. Ensuring the applied mask is 0x1 solves this problem. Signed-off-by: Richard Kjerstadius <richard.kjerstadius@teledyne.com> Reviewed-by: Alistair Francis <alistair@alistair23.me> Link: https://lore.kernel.org/r/20230127102903.3317089-1-richard.kjerstadius@teledyne.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2023-02-04Input: exc3000 - properly stop timer on shutdownDmitry Torokhov1-0/+10
We need to stop the timer on driver unbind or probe failures, otherwise we get UAF/Oops. Fixes: 7e577a17f2ee ("Input: add I2C attached EETI EXC3000 multi touch driver") Reported-by: "Stahl, Michael" <mstahl@moba.de> Link: https://lore.kernel.org/r/Y9dK57BFqtlf8NmN@google.com Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2023-02-04Input: synaptics-rmi4 - fix SPI device IDRayyan Ansari1-1/+1
Currently, the ID being set to "rmi4_spi" causes this warning: "SPI driver rmi4_spi has no spi_device_id for syna,rmi4-spi" Change the ID to rmi4-spi to stop this warning. Signed-off-by: Rayyan Ansari <rayyan@ansari.sh> Link: https://lore.kernel.org/r/20221219133717.1638496-1-rayyan@ansari.sh Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2023-02-04Input: cap11xx - add support for cap1203, cap1293 and cap1298Jiri Valek - 2N1-2/+17
Add basic support for more CAP1xxx sensors. All models from CAP1xxx family are register-compatible. Some advanced features are not used and disabled by default. Reported-by: kernel test robot <lkp@xxxxxxxxx> Signed-off-by: Jiri Valek - 2N <jiriv@axis.com> Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> Link: https://lore.kernel.org/r/20230111131111.475270-3-jiriv@axis.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2023-02-01mfd: remove ucb1400 supportArnd Bergmann3-475/+0
The ucb1400 MFD driver and its gpio and touchscreen child drivers were only used on a few PXA machines that were unused for a while and are now removed. Removing these leaves the AC97 support as ALSA specific, no other drivers are now connected through this interface. Cc: Linus Walleij <linus.walleij@linaro.org> Cc: Bartosz Golaszewski <brgl@bgdev.pl> Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com> Cc: Lee Jones <lee@kernel.org> Cc: Jaroslav Kysela <perex@perex.cz> Cc: Takashi Iwai <tiwai@suse.com> Cc: Marek Vasut <marex@denx.de> Cc: linux-kernel@vger.kernel.org Cc: linux-gpio@vger.kernel.org Cc: linux-input@vger.kernel.org Cc: alsa-devel@alsa-project.org Acked-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-02-01input: remove zylonite touchscreen driverArnd Bergmann3-235/+0
The PXA zylonite platform was removed, so this driver has no remaining users. Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com> Cc: Mark Brown <broonie@kernel.org> Cc: linux-input@vger.kernel.org Acked-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-02-01input: remove pxa930_rotary keyboard driverArnd Bergmann3-205/+0
The pxa930 platform is getting removed and no upstream machine ever defined a rotary keyboard device. Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com> Cc: linux-input@vger.kernel.org Acked-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-02-01input: remove pxa930_trkball driverArnd Bergmann3-257/+0
The pxa930 SoC support is getting removed, and no upstream board ever provided the trkball device that this driver relies on. Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com> Cc: Arnd Bergmann <arnd@arndb.de> Cc: linux-input@vger.kernel.org Acked-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-01-30Input: pmic8xxx-keypad - fix a Kconfig spelling mistake & hyphenationRandy Dunlap1-1/+1
Correct a spelling mistake (reported by codespell). Also hyphenate "matrix-based". Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Link: https://lore.kernel.org/r/20230124233453.22893-1-rdunlap@infradead.org Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2023-01-30Input: edt-ft5x06 - fix typo in a commentDario Binacchi1-1/+1
Replace 'firmares' with 'firmwares'. Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com> Link: https://lore.kernel.org/r/20230128162325.64467-1-dario.binacchi@amarulasolutions.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2023-01-30Input: tegra-kbc - use devm_platform_get_and_ioremap_resource()ye xingchen1-3/+1
Convert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_get_and_ioremap_resource(), as this is exactly what this function does. Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn> Link: https://lore.kernel.org/r/202301281613032191431@zte.com.cn Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2023-01-30Input: st-keyscan - use devm_platform_get_and_ioremap_resource()ye xingchen1-3/+1
Convert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_get_and_ioremap_resource(), as this is exactly what this function does. Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn> Link: https://lore.kernel.org/r/202301281611305841413@zte.com.cn Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2023-01-30Input: spear-keyboard - use devm_platform_get_and_ioremap_resource()ye xingchen1-3/+1
Convert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_get_and_ioremap_resource(), as this is exactly what this function does. Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn> Link: https://lore.kernel.org/r/202301281609576851394@zte.com.cn Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2023-01-30Input: olpc_apsp - use devm_platform_get_and_ioremap_resource()ye xingchen1-3/+1
Convert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_get_and_ioremap_resource(), as this is exactly what this function does. Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn> Link: https://lore.kernel.org/r/202301281608287301370@zte.com.cn Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2023-01-30Input: arc_ps2 - use devm_platform_get_and_ioremap_resource()ye xingchen1-3/+1
Convert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_get_and_ioremap_resource(), as this is exactly what this function does. Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn> Link: https://lore.kernel.org/r/202301281606309671328@zte.com.cn Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2023-01-30Input: apbps2 - use devm_platform_get_and_ioremap_resource()ye xingchen1-3/+1
Convert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_get_and_ioremap_resource(), as this is exactly what this function does. Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn> Link: https://lore.kernel.org/r/202301281604596831304@zte.com.cn Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2023-01-30Input: altera_ps2 - use devm_platform_get_and_ioremap_resource()ye xingchen1-3/+1
Convert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_get_and_ioremap_resource(), as this is exactly what this function does. Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn> Link: https://lore.kernel.org/r/202301281603290601283@zte.com.cn Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2023-01-30Input: ads7846 - don't check penirq immediately for 7845Luca Ellero1-7/+1
To discard false readings, one should use "ti,penirq-recheck-delay-usecs". Checking get_pendown_state() at the beginning, most of the time fails causing malfunctioning. Fixes: ffa458c1bd9b ("spi: ads7846 driver") Signed-off-by: Luca Ellero <l.ellero@asem.it> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20230126105227.47648-4-l.ellero@asem.it Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2023-01-30Input: ads7846 - always set last command to PWRDOWNLuca Ellero1-1/+9
Controllers that report pressure (e.g. ADS7846) use 5 commands and the correct sequence is READ_X, READ_Y, READ_Z1, READ_Z2, PWRDOWN. Controllers that don't report pressure (e.g. ADS7845/ADS7843) use only 3 commands and the correct sequence should be READ_X, READ_Y, PWRDOWN. But the sequence sent was incorrect: READ_X, READ_Y, READ_Z1. Fix this by setting the third (and last) command to PWRDOWN. Fixes: ffa458c1bd9b ("spi: ads7846 driver") Signed-off-by: Luca Ellero <l.ellero@asem.it> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20230126105227.47648-3-l.ellero@asem.it Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2023-01-30Input: ads7846 - don't report pressure for ads7845Luca Ellero1-2/+3
ADS7845 doesn't support pressure. Avoid the following error reported by libinput-list-devices: "ADS7845 Touchscreen: kernel bug: device has min == max on ABS_PRESSURE". Fixes: ffa458c1bd9b ("spi: ads7846 driver") Signed-off-by: Luca Ellero <l.ellero@asem.it> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20230126105227.47648-2-l.ellero@asem.it Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2023-01-29Merge tag 'input-for-v6.2-rc5' of ↵Linus Torvalds2-1/+7
git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input Pull input fixes from Dmitry Torokhov: - touchpads on HP 15-* laptops switched back to PS/2 emulation mode - a quirk for Clevo PCX0DX/TUXEDO XP1511 to make sure keyboard is responding after resume * tag 'input-for-v6.2-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: i8042 - add Clevo PCX0DX to i8042 quirk table Revert "Input: synaptics - switch touchpad on HP Laptop 15-da3001TU to RMI mode"
2023-01-28Input: xpad - add 8BitDo Pro 2 Wired Controller supportJohn Butler1-0/+2
Add VID and PID to the xpad_device table to allow driver to use the 8BitDo Pro 2 Wired Controller, which is XTYPE_XBOX360 compatible by default. Signed-off-by: John Butler <radon86dev@gmail.com> Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> Link: https://lore.kernel.org/r/20230124005206.80706-1-radon86dev@gmail.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2023-01-28Input: ipaq-micro-ts - fix DEFINE_SIMPLE_DEV_PM_OPS typoArnd Bergmann1-2/+2
The previous change was not properly build tested and needs a trivial spelling change: ipaq-micro-ts.c:146:8: error: type defaults to 'int' in declaration of 'DEFINE_SIMPLE_DEV_PM' [-Werror=implicit-int] Fixes: 144ff5e03d74 ("Input: ipaq-micro-ts - use DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr()") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Link: https://lore.kernel.org/r/20230117164539.1631336-1-arnd@kernel.org Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2023-01-28Input: wistron_btns - use pm_sleep_ptr() to allow removal of ifdef CONFIG_PM ↵Jonathan Cameron1-5/+1
guards As the guards only apply to suspend and resume, #ifdef CONFIG_PM_SLEEP would have been a tighter protection. As pm_sleep_ptr() lets the compiler see the protected ops structure and callbacks but also lets the compiler remove it as unused code if !CONFIG_PM_SLEEP this allows the #ifdef guards to be removed, slightly simplifying the resulting code. -- It seems likely that DEFINE_SIMPLE_DEV_PM_OPS() would work here but I'd prefer not to make that change unless someone can confirm that the extra callbacks registered will have no unwanted side effects in this driver. Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Link: https://lore.kernel.org/r/20230114171620.42891-17-jic23@kernel.org Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2023-01-28Input: cma3000 - use pm_sleep_ptr() to allow removal of ifdef CONFIG_PM guardsJonathan Cameron1-5/+1
As the guards only apply to suspend and resume, #ifdef CONFIG_PM_SLEEP would have been a tighter protection. As pm_sleep_ptr() lets the compiler see the protected ops structure and callbacks but also lets the compiler remove it as unused code if !CONFIG_PM_SLEEP this allows the #ifdef guards to be removed, slightly simplifying the resulting code. Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> -- It seems likely that DEFINE_SIMPLE_DEV_PM_OPS() would work here but I'd prefer not to make that change unless someone can confirm that the extra callbacks registered will have no unwanted side effects in this driver. Link: https://lore.kernel.org/r/20230114171620.42891-16-jic23@kernel.org Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2023-01-28Input: Use pm_sleep_ptr() to avoid need for ifdef CONFIG_PM_SLEEPJonathan Cameron1-5/+2
As the new pm_sleep_ptr() macro lets the compiler see the code, but then remove it if !CONFIG_PM_SLEEP it can be used to avoid the need for #ifdef guards. Use that in the input core to simplify the code a little. Note pm_sleep_ptr() has not been applied to each callback in the ops structure because the pm_sleep_ptr() at the usage site is sufficient. Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Link: https://lore.kernel.org/r/20230114171620.42891-15-jic23@kernel.org Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2023-01-28Input: omap4-keyad - use pm_ptr() and RUNTIME_DEV_PM_OPS()Jonathan Cameron1-3/+3
SET_RUNTIME_DEV_PM_OPS() is deprecated as it requires explicit protection against unused function warnings. The new combination of pm_ptr() and RUNTIME_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. Note that DEFINE_RUNTIME_DEV_PM_OPS() is not used because that adds additional callbacks for suspend and resume and would need testing. Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Link: https://lore.kernel.org/r/20230114171620.42891-14-jic23@kernel.org Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2023-01-28Input: applespi - use pm_sleep_ptr() and SYSTEM_SLEEP_PM_OPS()Jonathan Cameron1-5/+5
SET_SYSTEM_SLEEP_PM_OPS() is deprecated as it requires explicit protection against unused function warnings. The new combination of pm_sleep_ptr() and SYSTEM_SLEEP_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. In this case we also have a .poweroff_late() callback. Whilst not strictly necessary, to future proof against relaxation of the protection of the main driver.pm = pm_sleep_ptr() protect this pointer with pm_sleep_ptr() as would be done if the LATE_SYSTEM_SLEEP_PM_OPS() macro were used to set it. Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Link: https://lore.kernel.org/r/20230114171620.42891-13-jic23@kernel.org Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2023-01-28Input: cyttsp - use EXPORT_GPL_SIMPLE_DEV_PM_OPS()Jonathan Cameron3-6/+5
SIMPLE_DEV_PM_OPS() is deprecated as it requires explicit protection against unused function warnings. The new combination of pm_sleep_ptr() and EXPORT_GPL_SIMPLE_DEV_PMU_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. It also rolls in the EXPORT_SYMBOL() so that we only export it if CONFIG_PM_SLEEP. Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Cc: Javier Martinez Canillas <javier@dowhile0.org> Cc: Linus Walleij <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/20230114171620.42891-12-jic23@kernel.org Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2023-01-28Input: cyttsp4 - use EXPORT_GPL_RUNTIME_DEV_PM_OPS()Jonathan Cameron3-9/+4
SET_SYSTEM_SLEEP_PM_OPS() and RUNTIME_PM_OPS() are deprecated as they requires explicit protection against unused function warnings. The new combination of pm_ptr() EXPORT_GPL_RUNTIME_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 #ifdef guards. Note that we are replacing an unconditional call to the suspend and resume functions for sleep use cases with one via pm_runtime_force_suspend() / pm_runtime_force_resume() that only do anything to the device if we are not already in the appropriate runtime suspended state. Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> -- I 'think' this should be fine in that it can only reduce the number of unnecessary suspends. If anyone can test that would be great. Link: https://lore.kernel.org/r/20230114171620.42891-11-jic23@kernel.org Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2023-01-28Input: tsc200x - use EXPORT_GPL_SIMPLE_DEV_PM_OPS()Jonathan Cameron3-6/+5
SIMPLE_DEV_PM_OPS() is deprecated as it requires explicit protection against unused function warnings. The new combination of pm_sleep_ptr() and EXPORT_GPL_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. This function also removes the need for separate EXPORT_SYMBOL_GPL() Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Link: https://lore.kernel.org/r/20230114171620.42891-10-jic23@kernel.org Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2023-01-28Input: adxl34x - unify dev_pm_ops using EXPORT_SIMPLE_DEV_PM_OPS()Jonathan Cameron4-54/+16
The I2C and SPI PM callbacks were identical (though wrapped in some bouncing out to the bus specific container of the struct device and then back again to get the drvdata). As such rather than just moving these to SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() take the opportunity to unify the struct dev_pm_ops and use the new EXPORT_SIMPLE_DEV_PM_OPS() macro so that we can drop the unused suspend and resume callbacks as well as the structure if !CONFIG_PM_SLEEP without needing to mark the callbacks __maybe_unused. Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Cc: Michael Hennerich <michael.hennerich@analog.com> Link: https://lore.kernel.org/r/20230114171620.42891-9-jic23@kernel.org Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2023-01-28Input: ad714x - unify dev_pm_ops using EXPORT_SIMPLE_DEV_PM_OPS()Jonathan Cameron4-34/+10
The I2C and SPI PM callbacks were identical (though wrapped in some bouncing out to the bus specific container of the struct device and then back again to get the drvdata). As such rather than just moving these to SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() take the opportunity to unify the struct dev_pm_ops and use the new EXPORT_SIMPLE_DEV_PM_OPS() macro so that we can drop the unused suspend and resume callbacks as well as the structure if !CONFIG_PM_SLEEP without needing to mark the callbacks __maybe_unused. Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Cc: Michael Hennerich <michael.hennerich@analog.com> Link: https://lore.kernel.org/r/20230114171620.42891-8-jic23@kernel.org Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2023-01-28Input: stmfts - switch to SYSTEM_SLEEP_/RUNTIME_PM_OPS() and pm_ptr()Jonathan Cameron1-7/+7
SET_SYSTEM_SLEEP_PM_OPS() and SET_RUNTIME_PM_OPS() are deprecated as they require explicit protection against unused function warnings. The new combination of pm_ptr() and SYSTEM_SLEEP_PM_OPS()/ RUNTIME_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: Andi Shyti <andi@etezian.org> Link: https://lore.kernel.org/r/20230114171620.42891-7-jic23@kernel.org Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2023-01-28Input: rmi4 - switch to SYSTEM_SLEEP/RUNTIME_PM_OPS() and pm_ptr()Jonathan Cameron3-24/+13
SET_SYSTEM_SLEEP_PM_OPS() and SET_RUNTIME_PM_OPS() are deprecated as they requires explicit protection against unused function warnings. The new combination of pm_ptr() and SYSTEM_SLEEP_PM_OPS() / RUNTIME_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 #ifdef guards. Whilst all 3 sets of callbacks are similar, there are small differences that make it challenging to use a single pm_dev_ops structure - hence leave the duplication as it stands. Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Cc: Matthias Schiffer <matthias.schiffer@ew.tq-group.com> Cc: Lyude Paul <lyude@redhat.com> Cc: Andrew Duggan <aduggan@synaptics.com> Link: https://lore.kernel.org/r/20230114171620.42891-6-jic23@kernel.org Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2023-01-28Input: s6sy761 - switch to SYSTEM_SLEEP_/RUNTIME_PM_OPS() and pm_ptr()Jonathan Cameron1-8/+7
SET_SYSTEM_SLEEP_PM_OPS() and SET_RUNTIME_PM_OPS() are deprecated as they require explicit protection against unused function warnings. The new combination of pm_ptr() and SYSTEM_SLEEP_PM_OPS()/ RUNTIME_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: Caleb Connolly <caleb@connolly.tech> Cc: Andi Shyti <andi@etezian.org> Tested-by: Caleb Connolly <caleb@connolly.tech> # oneplus-guacamole Link: https://lore.kernel.org/r/20230114171620.42891-5-jic23@kernel.org Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2023-01-28Input: samsung-keypad - switch to pm_ptr() and SYSTEM_SLEEP/RUNTIME_PM_OPS()Jonathan Cameron1-8/+4
The SET_ variants are deprecated as they require explicit protection against unused function warnings. The new combination of pm_ptr() and SYSTEM_SLEEP/RUNTIME_DEV_PM_OPS() allow the compiler to see the functions, thus suppressing the warning, but still allowing the unused code to be removed. Thus also drop the #ifdef guards. Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Link: https://lore.kernel.org/r/20230114171620.42891-4-jic23@kernel.org Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2023-01-28Input: axp20x-pek - switch to SYSTEM_SLEEP_PM_OPS() and pm_sleep_ptr()Jonathan Cameron1-7/+5
SET_SYSTEM_SLEEP_PM_OPS() is deprecated as it requires explicit protection against unused function warnings. The new combination of pm_sleep_ptr() and SYSTEM_SLEEP_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. Here the additional .resume_noirq callback is protected with pm_sleep_ptr(). This isn't strictly necessary but is done for consistency with the other callbacks. Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Cc: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20230114171620.42891-3-jic23@kernel.org Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2023-01-28Input: cyapa - switch to SYSTEM_SLEEP/RUNTIME_PM_OPS() and pm_ptr()Jonathan Cameron1-7/+7
SET_SYSTEM_SLEEP_PM_OPS() and SET_RUNTIME_PM_OPS() are deprecated as they require explicit protection against unused function warnings. The new combination of pm_ptr() and SYSTEM_SLEEP_PM_OPS()/ RUNTIME_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> Link: https://lore.kernel.org/r/20230114171620.42891-2-jic23@kernel.org Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2023-01-27driver core: make struct bus_type.uevent() take a const *Greg Kroah-Hartman1-2/+2
The uevent() callback in struct bus_type should not be modifying the device that is passed into it, so mark it as a const * and propagate the function signature changes out into all relevant subsystems that use this callback. Acked-by: Rafael J. Wysocki <rafael@kernel.org> Acked-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20230111113018.459199-16-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-01-27driver core: make struct device_type.uevent() take a const *Greg Kroah-Hartman1-8/+8
The uevent() callback in struct device_type should not be modifying the device that is passed into it, so mark it as a const * and propagate the function signature changes out into all relevant subsystems that use this callback. Cc: Alan Stern <stern@rowland.harvard.edu> Cc: Andreas Noever <andreas.noever@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Bard Liao <yung-chuan.liao@linux.intel.com> Cc: Chaitanya Kulkarni <kch@nvidia.com> Cc: Dan Williams <dan.j.williams@intel.com> Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com> Cc: Frank Rowand <frowand.list@gmail.com> Cc: Ira Weiny <ira.weiny@intel.com> Cc: Jason Gunthorpe <jgg@ziepe.ca> Cc: Jens Axboe <axboe@kernel.dk> Cc: Jilin Yuan <yuanjilin@cdjrlc.com> Cc: Jiri Slaby <jirislaby@kernel.org> Cc: Len Brown <lenb@kernel.org> Cc: Mark Gross <markgross@kernel.org> Cc: "Martin K. Petersen" <martin.petersen@oracle.com> Cc: "Matthew Wilcox (Oracle)" <willy@infradead.org> Cc: Maximilian Luz <luzmaximilian@gmail.com> Cc: Michael Jamet <michael.jamet@intel.com> Cc: Ming Lei <ming.lei@redhat.com> Cc: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Cc: Rob Herring <robh+dt@kernel.org> Cc: Sakari Ailus <sakari.ailus@linux.intel.com> Cc: Sanyog Kale <sanyog.r.kale@intel.com> Cc: Sean Young <sean@mess.org> Cc: Stefan Richter <stefanr@s5r6.in-berlin.de> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Won Chung <wonchung@google.com> Cc: Yehezkel Bernat <YehezkelShB@gmail.com> Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com> # for Thunderbolt Acked-by: Mauro Carvalho Chehab <mchehab@kernel.org> Acked-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Acked-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Acked-by: Wolfram Sang <wsa@kernel.org> Acked-by: Vinod Koul <vkoul@kernel.org> Acked-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20230111113018.459199-6-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-01-20Input: cros_ec_keyb - add 3 buttons for monitor functionjoewu (吳仲振)1-0/+15
Add 3 extra buttons: 'brightness up', 'brightness down' and 'screen lock' to support monitor manipulating function. Signed-off-by: Joe Wu <joewu@msi.com> Link: https://lore.kernel.org/r/e23628e2cb464d238eb1c33a9e1e516b@msi.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2023-01-20ARM: pxa: remove unused board filesArnd Bergmann1-10/+0
The majority of all pxa board files has not been touched in a long time, and no users have spoken up in favor of keeping them around. This leaves only support for the platforms that were already converted to DT, as well as the gumstix and spitz/akita/borzoi machines that work in qemu and can still be converted to DT later. Cc: Ales Bardorfer <ales@i-tech.si> Cc: Ales Snuparek <snuparek@atlas.cz> Cc: Alex Osborne <ato@meshy.org> Cc: Alex Osborne <bobofdoom@gmail.com> Cc: Dirk Opfer <dirk@opfer-online.de> Cc: Ian Molton <spyro@f2s.com> Cc: Lennert Buytenhek <kernel@wantstofly.org> Cc: Marek Vasut <marek.vasut@gmail.com> Cc: Michael Petchkovsky <mkpetch@internode.on.net> Cc: Nick Bane <nick@cecomputing.co.uk> Cc: Paul Parsons <lost.distance@yahoo.com> Cc: Philipp Zabel <philipp.zabel@gmail.com> Cc: Richard Purdie <rpurdie@rpsys.net> Cc: Sergey Lapin <slapin@ossfans.org> Cc: Tomas Cech <sleep_walker@suse.cz> Acked-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Acked-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Arnd Bergmann <arnd@arndb.de>