Nathan Chancellor
a02dcde595
Input: touchscreen - avoid bitwise vs logical OR warning
...
A new warning in clang points out a few places in this driver where a
bitwise OR is being used with boolean types:
drivers/input/touchscreen.c:81:17: warning: use of bitwise '|' with boolean operands [-Wbitwise-instead-of-logical]
data_present = touchscreen_get_prop_u32(dev, "touchscreen-min-x",
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This use of a bitwise OR is intentional, as bitwise operations do not
short circuit, which allows all the calls to touchscreen_get_prop_u32()
to happen so that the last parameter is initialized while coalescing the
results of the calls to make a decision after they are all evaluated.
To make this clearer to the compiler, use the '|=' operator to assign
the result of each touchscreen_get_prop_u32() call to data_present,
which keeps the meaning of the code the same but makes it obvious that
every one of these calls is expected to happen.
Signed-off-by: Nathan Chancellor <nathan@kernel.org >
Reported-by: Nick Desaulniers <ndesaulniers@google.com >
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com >
Link: https://lore.kernel.org/r/20211014205757.3474635-1-nathan@kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com >
2021-10-15 22:22:54 -07:00
Michael Cullen
3378a07daa
Input: xpad - add support for another USB ID of Nacon GC-100
...
The Nacon GX100XF is already mapped, but it seems there is a Nacon
GC-100 (identified as NC5136Wht PCGC-100WHITE though I believe other
colours exist) with a different USB ID when in XInput mode.
Signed-off-by: Michael Cullen <michael@michaelcullen.name >
Link: https://lore.kernel.org/r/20211015192051.5196-1-michael@michaelcullen.name
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com >
2021-10-15 22:11:04 -07:00
Oleksij Rempel
fe0a7e3d01
Input: resistive-adc-touch - fix division by zero error on z1 == 0
...
For proper pressure calculation we need at least x and z1 to be non
zero. Even worse, in case z1 we may run in to division by zero
error.
Fixes: 60b7db914d ("Input: resistive-adc-touch - rework mapping of channels")
Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de >
Link: https://lore.kernel.org/r/20211007095727.29579-1-o.rempel@pengutronix.de
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com >
2021-10-15 22:11:03 -07:00
Uwe Kleine-König
d997cc1715
Input: snvs_pwrkey - add clk handling
...
On i.MX7S and i.MX8M* (but not i.MX6*) the pwrkey device has an
associated clock. Accessing the registers requires that this clock is
enabled. Binding the driver on at least i.MX7S and i.MX8MP while not
having the clock enabled results in a complete hang of the machine.
(This usually only happens if snvs_pwrkey is built as a module and the
rtc-snvs driver isn't already bound because at bootup the required clk
is on and only gets disabled when the clk framework disables unused clks
late during boot.)
This completes the fix in commit 135be16d35 ("ARM: dts: imx7s: add
snvs clock to pwrkey").
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de >
Link: https://lore.kernel.org/r/20211013062848.2667192-1-u.kleine-koenig@pengutronix.de
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com >
2021-10-15 22:11:01 -07:00
Guenter Roeck
0c5483a577
Input: analog - always use ktime functions
...
m68k, mips, s390, and sparc allmodconfig images fail to build with the
following error.
drivers/input/joystick/analog.c:160:2: error:
#warning Precise timer not defined for this architecture.
Remove architecture specific time handling code and always use ktime
functions to determine time deltas. Also remove the now useless use_ktime
kernel parameter.
Signed-off-by: Guenter Roeck <linux@roeck-us.net >
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be >
Acked-by: Randy Dunlap <rdunlap@infradead.org > # build-tested
Link: https://lore.kernel.org/r/20210907123734.21520-1-linux@roeck-us.net
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com >
2021-09-08 23:39:47 -07:00
Linus Walleij
ab10867819
Input: mms114 - support MMS134S
...
The MMS134S like the MMS136 has an event size of 6 bytes.
After this patch, the touchscreen on the Samsung SGH-I407
works fine with PostmarketOS.
Signed-off-by: Linus Walleij <linus.walleij@linaro.org >
Link: https://lore.kernel.org/r/20210706235951.189289-1-linus.walleij@linaro.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com >
2021-09-06 23:33:26 -07:00
jingle.wu
d198b8273e
Input: elan_i2c - reduce the resume time for controller in Whitebox
...
Similar to controllers found Voxel, Delbin, Magpie and Bobba, the one found
in Whitebox does not need to be reset after issuing power-on command, and
skipping reset saves resume time.
Signed-off-by: Jingle Wu <jingle.wu@emc.com.tw >
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20210907012924.11391-1-jingle.wu@emc.com.tw
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com >
2021-09-06 22:30:34 -07:00
Oliver Graute
146ea9b679
Input: edt-ft5x06 - added case for EDT EP0110M09
...
Add Support for EP011M09 Firmware
Signed-off-by: Oliver Graute <oliver.graute@kococonnector.com >
Reviewed-by: Marco Felsch <m.felsch@pengutronix.de >
Link: https://lore.kernel.org/r/20210813062110.13950-1-oliver.graute@kococonnector.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com >
2021-09-05 19:10:11 -07:00
Dmitry Torokhov
8be98d2f2a
Merge branch 'next' into for-linus
...
Prepare input updates for 5.15 merge window.
2021-09-05 18:58:05 -07:00
Geert Uytterhoeven
3e204d6b76
Input: adc-keys - drop bogus __refdata annotation
...
As the ADC ladder input driver does not have any code or data located in
initmem, there is no need to annotate the adc_keys_driver structure with
__refdata. Drop the annotation, to avoid suppressing future section
warnings.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be >
Acked-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
Link: https://lore.kernel.org/r/7091e8213602be64826fd689a7337246d218f3b1.1626255421.git.geert+renesas@glider.be
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com >
2021-09-03 23:49:58 -07:00
Colin Ian King
7ec7c72fbf
Input: Fix spelling mistake in Kconfig "useable" -> "usable"
...
There is a spelling mistake in the Kconfig text. Fix it.
Signed-off-by: Colin Ian King <colin.king@canonical.com >
Link: https://lore.kernel.org/r/20210705100230.7583-1-colin.king@canonical.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com >
2021-09-03 23:49:57 -07:00
Colin Ian King
ca595ac271
Input: Fix spelling mistake in Kconfig "Modul" -> "Module"
...
There is a spelling mistake in the Kconfig text. Fix it.
Signed-off-by: Colin Ian King <colin.king@canonical.com >
Link: https://lore.kernel.org/r/20210704095702.37567-1-colin.king@canonical.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com >
2021-09-03 23:49:55 -07:00
Lukas Bulwahn
927c1e56cc
Input: remove dead CSR Prima2 PWRC driver
...
Commit f3a732843a ("ARM: remove sirf prima2/atlas platforms") removes
the config ARCH_SIRF in ./arch/arm/mach-prima2/Kconfig.
Hence, since then, the corresponding CSR Prima2 PWRC Driver is dead code.
Remove this dead driver.
Signed-off-by: Lukas Bulwahn <lukas.bulwahn@gmail.com >
Acked-by: Arnd Bergmann <arnd@arndb.de >
Link: https://lore.kernel.org/r/20210817072842.8640-1-lukas.bulwahn@gmail.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com >
2021-08-30 15:55:19 -07:00
Linus Walleij
1c6aacecea
Input: adp5589-keys - use the right header
...
This keyboard driver is implementing a GPIO driver, so it need
to include <linux/gpio/driver.h> and not the legacy <linux/gpio.h>
header.
Signed-off-by: Linus Walleij <linus.walleij@linaro.org >
Acked-by: Michael Hennerich <michael.hennerich@analog.com >
Link: https://lore.kernel.org/r/20210816232707.485031-1-linus.walleij@linaro.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com >
2021-08-30 15:55:18 -07:00
Linus Walleij
9d9bfd180c
Input: adp5588-keys - use the right header
...
This keyboard driver is implementing a GPIO driver, so it need
to include <linux/gpio/driver.h> and not the legacy <linux/gpio.h>
header.
Signed-off-by: Linus Walleij <linus.walleij@linaro.org >
Link: https://lore.kernel.org/r/20210820222958.57238-1-linus.walleij@linaro.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com >
2021-08-30 15:55:15 -07:00
Alexander Sverdlin
62e4fe9f60
Input: ep93xx_keypad - prepare clock before using it
...
Use clk_prepare_enable()/clk_disable_unprepare() in preparation for switch
to Common Clock Framework.
Signed-off-by: Alexander Sverdlin <alexander.sverdlin@gmail.com >
Link: https://lore.kernel.org/r/20210613233041.128961-4-alexander.sverdlin@gmail.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com >
2021-08-29 19:15:30 -07:00
Dmitry Torokhov
5af9f79b41
Input: pm8941-pwrkey - fix comma vs semicolon issue
...
There is absolutely no reason to use comma operator in this code, 2
separate statements make much more sense.
Reviewed-by: Stephen Boyd <swboyd@chromium.org >
Link: https://lore.kernel.org/r/YPsa1qCBn/SAmE5x@google.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com >
2021-07-23 17:37:14 -07:00
Dmitry Torokhov
7d3370e506
Revert "Input: serio - make write method mandatory"
...
This reverts commit 81c7c0a350 . The idea
to make write method mandatory was flawed as several client drivers
(such as atkbd) check for presence of write() method to adjust behavior
of the driver.
Reported-by: Nathan Chancellor <nathan@kernel.org >
Reported-by: Michael Kelley <mikelley@microsoft.com >
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com >
2021-07-20 21:48:35 -07:00
Andy Shevchenko
133b6558c7
Input: parkbd - switch to use module_parport_driver()
...
Switch to use module_parport_driver() to reduce boilerplate code.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com >
Link: https://lore.kernel.org/r/20210616140432.39406-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com >
2021-07-19 14:59:36 -07:00
Dmitry Torokhov
81c7c0a350
Input: serio - make write method mandatory
...
Given that all serio drivers except one implement write() method
let's make it mandatory to avoid testing for its presence whenever
we attempt to use it.
Link: https://lore.kernel.org/r/YFgUxG/TljMuVeQ3@google.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com >
2021-07-19 14:35:21 -07:00
Linus Walleij
9aa75914e5
Input: ixp4xx-beeper - delete driver
...
The NSLU2 has been migrated to devicetree and there we use
the gpio-beeper.c driver instead, the boardfile will be deleted
for kernel v5.15 so drop this custom and now unneeded driver.
Signed-off-by: Linus Walleij <linus.walleij@linaro.org >
Link: https://lore.kernel.org/r/20210714115028.916360-1-linus.walleij@linaro.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com >
2021-07-19 14:32:10 -07:00
Dmitry Torokhov
320424c7d4
Merge tag 'v5.13' into next
...
Sync up with the mainline to get the latest parport API.
2021-07-18 18:56:58 -07:00
Dmitry Torokhov
818b265889
Merge branch 'next' into for-linus
...
Prepare input updates for 5.14 merge window.
2021-07-04 23:05:31 -07:00
Alexander Larkin
f8f84af5da
Input: joydev - prevent use of not validated data in JSIOCSBTNMAP ioctl
...
Even though we validate user-provided inputs we then traverse past
validated data when applying the new map. The issue was originally
discovered by Murray McAllister with this simple POC (if the following
is executed by an unprivileged user it will instantly panic the system):
int main(void) {
int fd, ret;
unsigned int buffer[10000];
fd = open("/dev/input/js0", O_RDONLY);
if (fd == -1)
printf("Error opening file\n");
ret = ioctl(fd, JSIOCSBTNMAP & ~IOCSIZE_MASK, &buffer);
printf("%d\n", ret);
}
The solution is to traverse internal buffer which is guaranteed to only
contain valid date when constructing the map.
Fixes: 182d679b22 ("Input: joydev - prevent potential read overflow in ioctl")
Fixes: 999b874f4a ("Input: joydev - validate axis/button maps before clobbering current ones")
Reported-by: Murray McAllister <murray.mcallister@gmail.com >
Suggested-by: Linus Torvalds <torvalds@linux-foundation.org >
Signed-off-by: Alexander Larkin <avlarkin82@gmail.com >
Link: https://lore.kernel.org/r/20210620120030.1513655-1-avlarkin82@gmail.com
Cc: stable@vger.kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com >
2021-07-04 23:02:10 -07:00
Yizhuo Zhai
cac7100d4c
Input: hideep - fix the uninitialized use in hideep_nvm_unlock()
...
Inside function hideep_nvm_unlock(), variable "unmask_code" could
be uninitialized if hideep_pgm_r_reg() returns error, however, it
is used in the later if statement after an "and" operation, which
is potentially unsafe.
Signed-off-by: Yizhuo <yzhai003@ucr.edu >
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com >
2021-06-19 22:36:28 -07:00
YueHaibing
eacacdb5fc
Input: trackpoint - use kobj_to_dev()
...
Use kobj_to_dev() instead of container_of()
Generated by: scripts/coccinelle/api/kobj_to_dev.cocci
Signed-off-by: YueHaibing <yuehaibing@huawei.com >
Link: https://lore.kernel.org/r/20210607122722.36736-1-yuehaibing@huawei.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com >
2021-06-19 22:36:26 -07:00
YueHaibing
50221b0b68
Input: atkbd - use kobj_to_dev()
...
Use kobj_to_dev() instead of container_of()
Generated by: scripts/coccinelle/api/kobj_to_dev.cocci
Signed-off-by: YueHaibing <yuehaibing@huawei.com >
Link: https://lore.kernel.org/r/20210607122653.33784-1-yuehaibing@huawei.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com >
2021-06-19 22:36:25 -07:00
YueHaibing
6ffd4c7964
Input: tsc200x-core - use kobj_to_dev()
...
Use kobj_to_dev() instead of container_of()
Generated by: scripts/coccinelle/api/kobj_to_dev.cocci
Signed-off-by: YueHaibing <yuehaibing@huawei.com >
Link: https://lore.kernel.org/r/20210607122451.36708-1-yuehaibing@huawei.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com >
2021-06-19 22:36:23 -07:00
YueHaibing
f519f78c7e
Input: ims-pcu - use kobj_to_dev()
...
Use kobj_to_dev() instead of container_of()
Generated by: scripts/coccinelle/api/kobj_to_dev.cocci
Signed-off-by: YueHaibing <yuehaibing@huawei.com >
Link: https://lore.kernel.org/r/20210607122533.10608-1-yuehaibing@huawei.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com >
2021-06-19 22:36:21 -07:00
zhouchuangao
25531d612b
Input: cros_ec_keyb - use kobj_to_dev() API
...
Use kobj_to_dev() API instead of container_of().
Signed-off-by: zhouchuangao <zhouchuangao@vivo.com >
Reviewed-by: Stephen Boyd <swboyd@chromium.org >
Link: https://lore.kernel.org/r/1624025283-56360-1-git-send-email-zhouchuangao@vivo.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com >
2021-06-19 22:36:19 -07:00
Tyson Moore
c2d7ed9d68
Input: i8042 - fix typos in comments
...
This trivial patch fixes two spelling typos in i8042.c:
- 'i8042_unlock_ship()' to 'i8042_unlock_chip()'
- 'i8042_controller init' to 'i8042_controller_init'
Signed-off-by: Tyson Moore <tyson@tyson.me >
Link: https://lore.kernel.org/r/20210612060753.28968-1-tyson@tyson.me
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com >
2021-06-18 21:28:22 -07:00
Oleh Kravchenko
552e4047f3
Input: add SparkFun Qwiic Joystick driver
...
A simple analog joystick built on Low Power ATtiny85 Microcontroller.
Directional movements are measured with two 10 kΩ potentiometers
connected with a gimbal mechanism that separates the horizontal and
vertical movements. This joystick also has a select button that is actuated
when the joystick is pressed down.
Input events polled over the I2C bus.
Product page:
https://www.sparkfun.com/products/15168
Firmware and hardware sources:
https://github.com/sparkfun/Qwiic_Joystick
Tested on RPi4B and O4-iMX-NANO boards.
Signed-off-by: Oleh Kravchenko <oleg@kaa.org.ua >
Reviewed-by: Jeff LaBundy <jeff@labundy.com >
Link: https://lore.kernel.org/r/20210608223130.16830-2-oleg@kaa.org.ua
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com >
2021-06-18 21:28:20 -07:00
Dmitry Torokhov
83b41248ed
Input: cy8ctmg110_ts - switch to using gpiod API
...
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-05 20:34:16 -07:00
Dmitry Torokhov
4e5220cb8e
Input: cy8ctmg110_ts - switch to using managed resources
...
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-05 20:34:14 -07:00
Dmitry Torokhov
1c68b7cfd1
Input: cy8ctmg110_ts - use endian helpers when converting data on wire
...
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-05 20:34:12 -07:00
Dmitry Torokhov
172b07a6ea
Input: cy8ctmg110_ts - let I2C core configure wake interrupt
...
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-05 20:34:11 -07:00
Dmitry Torokhov
2a15cebb8b
Input: cy8ctmg110_ts - do not hardcode as wakeup source
...
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-05 20:34:09 -07:00
Dmitry Torokhov
9a9b1a7b2b
Input: cy8ctmg110_ts - do not hard code interrupt trigger
...
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-05 20:34:08 -07:00
Dmitry Torokhov
6abee58203
Input: cy8ctmg110_ts - rely on platform code to supply interrupt
...
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 >
2021-06-05 20:34:06 -07:00
Colin Ian King
6cdc1ef84e
Input: resistive-adc-touch - fix uninitialized variable 'press'
...
In the case where st->ch_map[GRTS_CH_PRESSURE] < GRTS_MAX_CHANNELS is false
and also st->ch_map[GRTS_CH_Z1] < GRTS_MAX_CHANNELS is false the variable
press is not initialized and contains garbage. In this situation
st->pressure is also false, so we do not actually use press value, but
it is impossible for the compiler to realize this, and it emits
"uninitialized variable" warning. Fix this by initializing press
to 0 and allows us to also remove an else clause that sets press to 0.
Addresses-Coverity: ("Uninitialized scalar variable")
Fixes: 60b7db914d ("Input: resistive-adc-touch - rework mapping of channels")
Signed-off-by: Colin Ian King <colin.king@canonical.com >
Link: https://lore.kernel.org/r/20210603220809.155118-1-colin.king@canonical.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com >
2021-06-05 16:41:08 -07:00
David Collins
2fcbda9a82
Input: pm8941-pwrkey - add support for PMK8350 PON_HLOS PMIC peripheral
...
On Qualcomm Technologies, Inc. PMIC PMK8350, the PON peripheral
is split into two peripherals: PON_HLOS and PON_PBS. The
application processor only has write access to PON_HLOS which
limits it to only receiving PON interrupts.
Add support for the PMK8350 PON_HLOS peripheral so that its
KPDPWR_N and RESIN_N interrupts can be used to detect key
presses.
Signed-off-by: David Collins <collinsd@codeaurora.org >
Signed-off-by: satya priya <skakit@codeaurora.org >
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org >
Link: https://lore.kernel.org/r/1620630064-16354-2-git-send-email-skakit@codeaurora.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com >
2021-06-01 21:35:27 -07:00
Stephan Gerhold
df4c40f484
Input: edt-ft5x06 - add support for iovcc-supply
...
At the moment, the edt-ft5x06 driver can control a single regulator
("vcc"). However, some FocalTech touch controllers have an additional
IOVCC pin that should be supplied with the digital I/O voltage.
The I/O voltage might be provided by another regulator that should also
be kept on. Otherwise, the touchscreen can randomly stop functioning if
the regulator is turned off because no other components still require it.
Implement (optional) support for also enabling an "iovcc-supply".
The datasheet specifies a delay of ~ 10us before enabling VDD/VCC
after IOVCC is enabled, so make sure to enable IOVCC first.
Signed-off-by: Stephan Gerhold <stephan@gerhold.net >
Link: https://lore.kernel.org/r/20210510193108.50178-2-stephan@gerhold.net
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com >
2021-06-01 21:35:24 -07:00
Dmitry Torokhov
d27ac0fba7
Input: cyttsp - remove public header
...
There is nothing in include/linux/input/cyttsp.h that might be of interes
to the kernel at large, so let's move this information into the driver
code and remove the header.
Reviewed-by: Linus Walleij <linus.walleij@linaro.org >
Link: https://lore.kernel.org/r/20210531052307.1433979-2-dmitry.torokhov@gmail.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com >
2021-06-01 21:13:11 -07:00
Dmitry Torokhov
60b7db914d
Input: resistive-adc-touch - rework mapping of channels
...
Instead of iterating over channels establish and use channel map to
retrieve data. As a side effect this will silence "uninitialized variable"
warnings.
Tested-by: Oleksij Rempel <o.rempel@pengutronix.de >
Link: https://lore.kernel.org/r/YLXR2brkc4H54xtK@google.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com >
2021-06-01 15:19:52 -07:00
Andy Shevchenko
08729298c4
Input: resistive-adc-touch - replace OF headers with proper ones
...
The driver is actually OF independent and doesn't need anything from OF (*).
Replace OF headers with mod_devicetable.h and property.h.
*) use of of_match_ptr() is actually wrong here, since it may provoke
a compiler to warn about unused variable.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com >
Link: https://lore.kernel.org/r/20210528151113.85943-2-andriy.shevchenko@linux.intel.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com >
2021-05-31 22:52:33 -07:00
Andy Shevchenko
02e28cf7dc
Input: resistive-adc-touch - describe parameters in kernel doc
...
Validation script is not happy:
resistive-adc-touch.c:53: warning: Function parameter or member 'x_plate_ohms' not described in 'grts_state'
resistive-adc-touch.c:53: warning: Function parameter or member 'ch' not described in 'grts_state'
Describe parameters in kernel doc to make it happy.
Fixes: fb082cd59a ("Input: resistive-adc-touch - add support for z1 and z2 channels")
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com >
Link: https://lore.kernel.org/r/20210528151113.85943-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com >
2021-05-31 22:52:31 -07:00
Dmitry Torokhov
c9d2939dda
Input: cyttsp - do not force interrupt trigger
...
Instead of forcing interrupt trigger to be "falling edge" let's rely on the
platform to set it up according to how it is set up on a given board based
on data in device tree or ACPI tables.
Reviewed-by: Linus Walleij <linus.walleij@linaro.org >
Link: https://lore.kernel.org/r/YK7iO96g+7yIC0l1@google.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com >
2021-05-30 21:54:51 -07:00
Takashi Iwai
45a4b68354
Input: elants_i2c - switch to probe_new
...
Now that we get rid of the usage of id argument at probe again, let's
switch to the new i2c probe method; this will avoid for people
misusing the possibly unassigned id pointer again.
Signed-off-by: Takashi Iwai <tiwai@suse.de >
Link: https://lore.kernel.org/r/20210528071024.26450-2-tiwai@suse.de
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com >
2021-05-30 21:53:50 -07:00
Takashi Iwai
b9c0ebb867
Input: elants_i2c - fix NULL dereference at probing
...
The recent change in elants_i2c driver to support more chips
introduced a regression leading to Oops at probing. The driver reads
id->driver_data, but the id may be NULL depending on the device type
the driver gets bound.
Replace the driver data extraction with the device_get_match_data()
helper, and define the driver data in OF table, too.
Fixes: 9517b95bdc ("Input: elants_i2c - add support for eKTF3624")
BugLink: https://bugzilla.suse.com/show_bug.cgi?id=1186454
Signed-off-by: Takashi Iwai <tiwai@suse.de >
Cc: <stable@vger.kernel.org >
Link: https://lore.kernel.org/r/20210528071024.26450-1-tiwai@suse.de
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com >
2021-05-30 21:53:48 -07:00
Linus Walleij
6cf3b3abbf
Input: cyttsp - obtain regulators
...
The CYTTSP TMA340 chips have two supplies: VCPIN and
VDD for analog and digital voltage respectively.
Add some minimal code to obtain and enable these
regulators if need be.
Reviewed-by: Javier Martinez Canillas <javier@dowhile0.org >
Signed-off-by: Linus Walleij <linus.walleij@linaro.org >
Link: https://lore.kernel.org/r/20210526230352.1433537-3-linus.walleij@linaro.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com >
2021-05-26 16:59:00 -07:00