Commit graph

2573 commits

Author SHA1 Message Date
Linus Torvalds
bf4afc53b7 Convert 'alloc_obj' family to use the new default GFP_KERNEL argument
This was done entirely with mindless brute force, using

    git grep -l '\<k[vmz]*alloc_objs*(.*, GFP_KERNEL)' |
        xargs sed -i 's/\(alloc_objs*(.*\), GFP_KERNEL)/\1)/'

to convert the new alloc_obj() users that had a simple GFP_KERNEL
argument to just drop that argument.

Note that due to the extreme simplicity of the scripting, any slightly
more complex cases spread over multiple lines would not be triggered:
they definitely exist, but this covers the vast bulk of the cases, and
the resulting diff is also then easier to check automatically.

For the same reason the 'flex' versions will be done as a separate
conversion.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2026-02-21 17:09:51 -08:00
Kees Cook
69050f8d6d treewide: Replace kmalloc with kmalloc_obj for non-scalar types
This is the result of running the Coccinelle script from
scripts/coccinelle/api/kmalloc_objs.cocci. The script is designed to
avoid scalar types (which need careful case-by-case checking), and
instead replace kmalloc-family calls that allocate struct or union
object instances:

Single allocations:	kmalloc(sizeof(TYPE), ...)
are replaced with:	kmalloc_obj(TYPE, ...)

Array allocations:	kmalloc_array(COUNT, sizeof(TYPE), ...)
are replaced with:	kmalloc_objs(TYPE, COUNT, ...)

Flex array allocations:	kmalloc(struct_size(PTR, FAM, COUNT), ...)
are replaced with:	kmalloc_flex(*PTR, FAM, COUNT, ...)

(where TYPE may also be *VAR)

The resulting allocations no longer return "void *", instead returning
"TYPE *".

Signed-off-by: Kees Cook <kees@kernel.org>
2026-02-21 01:02:28 -08:00
Linus Torvalds
348e77b814 Input updates for v7.0-rc0
- support for FocalTech FT8112 added to i2c-hid driver
 
 - support for FocalTech FT3518 added to edt-ft5x06 driver
 
 - support for power buttons in TWL603x chips added to twl4030-pwrbutton
   driver
 
 - an update to gpio-decoder driver to make it usable on non-OF
   platforms and to clean up the code
 
 - an update to synaptics_i2c driver switching it to use managed
   resources and a fix to restarting polling after resume
 
 - an update to gpio-keys driver to fall back to getting IRQ from
   resources if not specified using other means
 
 - an update to ili210x driver to support polling mode
 
 - a number of input drivers switched to scnprintf() to suppress
   truncation warnings
 
 - a number of updates and conversions of device tree bindings to yaml
   format
 
 - fixes to spelling in comments and messages in several drivers
 
 - other assorted fixups.
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYKAB0WIQST2eWILY88ieB2DOtAj56VGEWXnAUCaZDuRwAKCRBAj56VGEWX
 nMDgAQDru/JJP8OzAOzkBVBKv4gq2/Sgcd9gnIWdbLmOgk/vyQD9FkurIYZeiPOJ
 8F/q0bhQPh72TlWF5mmD9A8PB48BFgs=
 =0l6r
 -----END PGP SIGNATURE-----

Merge tag 'input-for-v7.0-rc0' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input

Pull input updates from Dmitry Torokhov:

 - support for FocalTech FT8112 added to i2c-hid driver

 - support for FocalTech FT3518 added to edt-ft5x06 driver

 - support for power buttons in TWL603x chips added to twl4030-pwrbutton
   driver

 - an update to gpio-decoder driver to make it usable on non-OF
   platforms and to clean up the code

 - an update to synaptics_i2c driver switching it to use managed
   resources and a fix to restarting polling after resume

 - an update to gpio-keys driver to fall back to getting IRQ from
   resources if not specified using other means

 - an update to ili210x driver to support polling mode

 - a number of input drivers switched to scnprintf() to suppress
   truncation warnings

 - a number of updates and conversions of device tree bindings to yaml
   format

 - fixes to spelling in comments and messages in several drivers

 - other assorted fixups

* tag 'input-for-v7.0-rc0' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (57 commits)
  dt-bindings: input: qcom,pm8941-pwrkey: Document PMM8654AU
  dt-bindings: input: touchscreen: imagis: allow linux,keycodes for ist3038
  Input: apbps2 - fix comment style and typos
  Input: gpio_keys - fall back to platform_get_irq() for interrupt-only keys
  Input: novatek-nvt-ts - drop wake_type check
  dt-bindings: input: touchscreen: tsc2007: document '#io-channel-cells'
  Input: ili210x - add support for polling mode
  dt-bindings: touchscreen: trivial-touch: Drop 'interrupts' requirement for old Ilitek
  Input: appletouch - fix potential race between resume and open
  HID: i2c-hid: Add FocalTech FT8112
  dt-bindings: input: i2c-hid: Introduce FocalTech FT8112
  Input: synaptics_i2c - switch to using managed resources
  Input: synaptics_i2c - guard polling restart in resume
  Input: gpio_decoder - don't use "proxy" headers
  Input: gpio_decoder - make use of the macros from bits.h
  Input: gpio_decoder - replace custom loop by gpiod_get_array_value_cansleep()
  Input: gpio_decoder - unify messages with help of dev_err_probe()
  Input: gpio_decoder - make use of device properties
  Input: serio - complete sizeof(*pointer) conversions
  Input: wdt87xx_i2c - switch to use dev_err_probe()
  ...
2026-02-15 08:24:19 -08:00
Dmitry Torokhov
273a171dee Merge branch 'next' into for-linus
Prepare input updates for 7.0 merge window.
2026-02-14 13:06:51 -08:00
Gianluca Boiano
7ff5745994 Input: novatek-nvt-ts - drop wake_type check
The wake_type parameter from touchscreen registers is not used for
anything functional - the driver only validates that it matches a
hard-coded expected value per chip variant. This causes probe to fail
on touchscreens that report a different wake_type despite being
otherwise compatible.

Drop the wake_type check and the associated chip data member to allow
the existing compatibles to work with more touchscreen variants.

Signed-off-by: Gianluca Boiano <morf3089@gmail.com>
Suggested-by: Hans de Goede <hansg@kernel.org>
Link: https://patch.msgid.link/20260122001040.76869-1-morf3089@gmail.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2026-01-24 21:42:31 -08:00
Marek Vasut
a007721712 Input: ili210x - add support for polling mode
There are designs incorporating Ilitek ILI2xxx touch controller that
do not connect interrupt pin, for example Waveshare 13.3" DSI display.
To support such systems use polling mode for the input device when I2C
client does not have interrupt assigned to it.

Factor out ili210x_firmware_update_noirq() to allow conditional scoped
guard around this code. The scoped guard has to be applied only in case
the IRQ line is connected, and not applied otherwise.

Reviewed-by: Frank Li <Frank.Li@nxp.com>
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Link: https://patch.msgid.link/20260121230736.114623-2-marek.vasut+renesas@mailbox.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2026-01-21 16:17:51 -08:00
Randy Dunlap
24c776355f kernel.h: drop hex.h and update all hex.h users
Remove <linux/hex.h> from <linux/kernel.h> and update all users/callers of
hex.h interfaces to directly #include <linux/hex.h> as part of the process
of putting kernel.h on a diet.

Removing hex.h from kernel.h means that 36K C source files don't have to
pay the price of parsing hex.h for the roughly 120 C source files that
need it.

This change has been build-tested with allmodconfig on most ARCHes.  Also,
all users/callers of <linux/hex.h> in the entire source tree have been
updated if needed (if not already #included).

Link: https://lkml.kernel.org/r/20251215005206.2362276-1-rdunlap@infradead.org
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Yury Norov (NVIDIA) <yury.norov@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2026-01-20 19:44:19 -08:00
Andy Shevchenko
3033da61dc Input: wdt87xx_i2c - switch to use dev_err_probe()
Switch to use dev_err_probe() to simplify the error path and
unify a message template. With that being done, drop the now no-op
message for -ENOMEM as allocator will print a big warning anyway
and remove duplicate message for devm_request_threaded_irq().

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://patch.msgid.link/20260113082445.44186-3-andriy.shevchenko@linux.intel.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2026-01-20 12:37:52 -08:00
Andy Shevchenko
b58a2c1a91 Input: tsc40 - switch to use scnprintf() to suppress truncation warning
Switch the driver to use scnprintf() to avoid warnings about potential
truncation of "phys" field which we can tolerate.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://patch.msgid.link/20260113082941.90006-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2026-01-20 12:18:02 -08:00
Andy Shevchenko
9f18271c58 Input: touchwin - switch to use scnprintf() to suppress truncation warning
Switch the driver to use scnprintf() to avoid warnings about potential
truncation of "phys" field which we can tolerate.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://patch.msgid.link/20260113082938.89437-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2026-01-20 12:18:02 -08:00
Andy Shevchenko
2d3bb7165a Input: touchright - switch to use scnprintf() to suppress truncation warning
Switch the driver to use scnprintf() to avoid warnings about potential
truncation of "phys" field which we can tolerate.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://patch.msgid.link/20260113082935.88801-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2026-01-20 12:18:01 -08:00
Andy Shevchenko
b2c767ef3b Input: touchit213 - switch to use scnprintf() to suppress truncation warning
Switch the driver to use scnprintf() to avoid warnings about potential
truncation of "phys" field which we can tolerate.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://patch.msgid.link/20260113082931.88083-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2026-01-20 12:18:00 -08:00
Andy Shevchenko
1828b52063 Input: penmount - switch to use scnprintf() to suppress truncation warning
Switch the driver to use scnprintf() to avoid warnings about potential
truncation of "phys" field which we can tolerate.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://patch.msgid.link/20260113082926.87049-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2026-01-20 12:17:59 -08:00
Andy Shevchenko
597c12d9f5 Input: mtouch - switch to use scnprintf() to suppress truncation warning
Switch the driver to use scnprintf() to avoid warnings about potential
truncation of "phys" field which we can tolerate.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://patch.msgid.link/20260113082921.86167-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2026-01-20 12:17:59 -08:00
Andy Shevchenko
6dd774d527 Input: inexio - switch to use scnprintf() to suppress truncation warning
Switch the driver to use scnprintf() to avoid warnings about potential
truncation of "phys" field which we can tolerate.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://patch.msgid.link/20260113082917.85109-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2026-01-20 12:17:58 -08:00
Andy Shevchenko
7cf2d84021 Input: fujitsu_ts - switch to use scnprintf() to suppress truncation warning
Switch the driver to use scnprintf() to avoid warnings about potential
truncation of "phys" field which we can tolerate.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://patch.msgid.link/20260113082912.84123-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2026-01-20 12:16:48 -08:00
Andy Shevchenko
c2f24e91c9 Input: hampshire - switch to use scnprintf() to suppress truncation warning
Switch the driver to use scnprintf() to avoid warnings about potential
truncation of "phys" field which we can tolerate.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://patch.msgid.link/20260113082905.83718-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2026-01-20 12:16:47 -08:00
Andy Shevchenko
ed9b2fc10d Input: gunze - switch to use scnprintf() to suppress truncation warning
Switch the driver to use scnprintf() to avoid warnings about potential
truncation of "phys" field which we can tolerate.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://patch.msgid.link/20260113082901.83668-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2026-01-20 12:16:46 -08:00
Andy Shevchenko
be1735de10 Input: elo - switch to use scnprintf() to suppress truncation warning
Switch the driver to use scnprintf() to avoid warnings about potential
truncation of "phys" field which we can tolerate.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://patch.msgid.link/20260113082856.83617-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2026-01-20 12:16:45 -08:00
Andy Shevchenko
6b88bc3f0a Input: egalax_ts_serial - switch to use scnprintf() to suppress truncation warning
Switch the driver to use scnprintf() to avoid warnings about potential
truncation of "phys" field which we can tolerate.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://patch.msgid.link/20260113082851.83584-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2026-01-20 12:16:44 -08:00
Andy Shevchenko
572ffd4f44 Input: dynapro - switch to use scnprintf() to suppress truncation warning
Switch the driver to use scnprintf() to avoid warnings about potential
truncation of "phys" field which we can tolerate.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://patch.msgid.link/20260113082845.83550-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2026-01-20 12:16:43 -08:00
Yedaya Katsman
5383e76483 Input: edt-ft5x06 - add support for FocalTech FT3518
The driver also works with FT3518, which supports up to 10 touch points.
Add compatible data for it.

Co-developed-by: Kamil Gołda <kamil.golda@protonmail.com>
Signed-off-by: Kamil Gołda <kamil.golda@protonmail.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Signed-off-by: Yedaya Katsman <yedaya.ka@gmail.com>
Link: https://patch.msgid.link/20260118-touchscreen-patches-v3-2-1c6a729c5eb4@gmail.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2026-01-20 10:34:19 -08:00
Marek Vasut
05c7f348f6 Input: ili210x - convert to dev_err_probe()
Simplify error return handling, use dev_err_probe() where possible.
No functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Link: https://patch.msgid.link/20260117001215.59272-2-marek.vasut+renesas@mailbox.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2026-01-20 10:24:17 -08:00
Junjie Cao
248d3a73a0 Input: ti_am335x_tsc - fix off-by-one error in wire_order validation
The current validation 'wire_order[i] > ARRAY_SIZE(config_pins)' allows
wire_order[i] to equal ARRAY_SIZE(config_pins), which causes out-of-bounds
access when used as index in 'config_pins[wire_order[i]]'.

Since config_pins has 4 elements (indices 0-3), the valid range for
wire_order should be 0-3. Fix the off-by-one error by using >= instead
of > in the validation check.

Signed-off-by: Junjie Cao <junjie.cao@intel.com>
Link: https://patch.msgid.link/20251114062817.852698-1-junjie.cao@intel.com
Fixes: bb76dc09dd ("input: ti_am33x_tsc: Order of TSC wires, made configurable")
Cc: stable@vger.kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2025-12-18 22:00:07 -08:00
Dmitry Torokhov
eeb2ea4b59 Input: ilitek_ts_i2c - switch mdelay() to fsleep()
The mdelay() is called in sleeping context and it should be OK to delay
slightly longer than requested, so switch the code to use fsleep() to
avoid spinning.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2025-12-18 21:46:55 -08:00
Josua Mayer
a2c5ea4235 Input: ilitek_ts_i2c - fix warning with gpio controllers that sleep
The ilitek touchscreen driver uses the non-sleeping gpiod_set_value
function for reset.

Switch to using gpiod_set_value_cansleep() when controlling reset_gpio to
support GPIO providers that may sleep, such as I2C GPIO expanders.

Further switch the mdelay calls on the reset path to fsleep (preferred
in non-atomic contexts).

This fixes noisy complaints in kernel log for gpio providers that do
sleep.

Signed-off-by: Josua Mayer <josua@solid-run.com>
Link: https://patch.msgid.link/20251201-imx8mp-hb-iiot-v4-2-53a4cd6c21bf@solid-run.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2025-12-18 21:46:55 -08:00
Sasha Finkelstein
d579478cee Input: apple_z2 - fix reading incorrect reports after exiting sleep
Under certain conditions (more prevalent after a suspend/resume cycle),
the touchscreen controller can send the "boot complete" interrupt before
it actually finished booting. In those cases, attempting to read touch
data resuls in a stream of "not ready" messages being read and
interpreted as a touch report. Check that the response is in fact a
touch report and discard it otherwise.

Reported-by: pitust <piotr@stelmaszek.com>
Closes: https://oftc.catirclogs.org/asahi/2025-12-17#34878715;
Fixes: 471a92f8a2 ("Input: apple_z2 - add a driver for Apple Z2 touchscreens")
Signed-off-by: Sasha Finkelstein <fnkl.kernel@gmail.com>
Link: https://patch.msgid.link/20251218-z2-init-fix-v1-1-48e3aa239caf@gmail.com
Cc: stable@vger.kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2025-12-18 12:17:10 -08:00
Petr Hodina
995186145d Input: stmfts - use sysfs_emit() instead of sprintf()
Follow the advice in Documentation/filesystems/sysfs.rst:
show() should only use sysfs_emit() or sysfs_emit_at() when formatting
the value to be returned to user space.

Signed-off-by: Petr Hodina <petr.hodina@protonmail.com>
Signed-off-by: David Heidelberg <david@ixit.cz>
Link: https://patch.msgid.link/20251215-fts-fixes-v1-3-8c1e3a63ebf1@ixit.cz
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2025-12-15 21:57:02 -08:00
Petr Hodina
f5c3c77b86 Input: stmfts - make comments correct
No functional change.

Fixes: 78bcac7b2a ("Input: add support for the STMicroelectronics FingerTip touchscreen")
Signed-off-by: Petr Hodina <petr.hodina@protonmail.com>
Signed-off-by: David Heidelberg <david@ixit.cz>
Link: https://patch.msgid.link/20251215-fts-fixes-v1-2-8c1e3a63ebf1@ixit.cz
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2025-12-15 21:51:16 -08:00
David Heidelberg
385a53867b Input: stmfts - correct wording for the warning message
We're trying to enable regulator, not disable it.

Fixes: 78bcac7b2a ("Input: add support for the STMicroelectronics FingerTip touchscreen")
Suggested-by: Petr Hodina <petr.hodina@protonmail.com>
Signed-off-by: David Heidelberg <david@ixit.cz>
Link: https://patch.msgid.link/20251215-fts-fixes-v1-1-8c1e3a63ebf1@ixit.cz
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2025-12-15 21:51:01 -08:00
Dmitry Torokhov
a4a508df2a Linux 6.18
-----BEGIN PGP SIGNATURE-----
 
 iQFSBAABCgA8FiEEq68RxlopcLEwq+PEeb4+QwBBGIYFAmksyEIeHHRvcnZhbGRz
 QGxpbnV4LWZvdW5kYXRpb24ub3JnAAoJEHm+PkMAQRiGuRUH/i5oyGqw5tJmyAKa
 N+RZ1zU/d9NnuYVhHylRFXxIQY+ZqjQMF82meEJP3zZn7c73LDQEtcSuygrmtbmm
 66TpfU3KJSK5YCYFT9kL9D3IAMpHoOk5smyp1KxVNIfLO5qT7fiWFlEvvWjjb+7/
 oJAa3iX6uFtoeBHuGBUU/r6etoL8rE6H3uGZloA09+AMc+CF36vHloW5Mq7++51p
 HFfge8mAqKXF5ZayCG9+I+6nwK277MfVmgcz4PIvHQQhPUa9CMvy96CWnObQo8lP
 GpNlLf92A/C5S5DsMgVjFDf4MBSsE1hiFLxu3kKPzl8L41uvg/aiMIJqc1BIeZjw
 /Okl7wo=
 =lz6b
 -----END PGP SIGNATURE-----

Merge tag 'v6.18' into next

Sync up with the mainline to bring in the latest APIs.
2025-12-13 01:18:20 -08:00
Dmitry Torokhov
429c472701 Merge branch 'next' into for-linus
Prepare input updates for 6.19 merge window.
2025-12-08 17:52:57 -08:00
Junjie Cao
70f62e5217 Input: ti_am335x_tsc - clamp coordinate_readouts to DT maximum (6)
DT binding (ti,am3359-tsc.yaml) sets ti,coordinate-readouts to a
maximum of 6. The MFD parent also enforces that
(readouts * 2 + 2) + adc_channels <= 16 and fails probe if this
is violated, so the touchscreen subdriver will not even probe
in those cases.

Clamp coordinate_readouts > 6 to 6 in the subdriver to align with the
binding and keep behavior sane if invalid platform data bypasses schema
checks. Keep the existing default to 5 for non-positive values.

No functional change with valid DT.

Signed-off-by: Junjie Cao <junjie.cao@intel.com>
Link: https://patch.msgid.link/20251117032358.891822-1-junjie.cao@intel.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2025-11-18 11:19:38 -08:00
Dmitry Torokhov
f39b6c468c Linux 6.18-rc6
-----BEGIN PGP SIGNATURE-----
 
 iQFSBAABCgA8FiEEq68RxlopcLEwq+PEeb4+QwBBGIYFAmkaT2IeHHRvcnZhbGRz
 QGxpbnV4LWZvdW5kYXRpb24ub3JnAAoJEHm+PkMAQRiGnakIAIq6O35+abAlDGe7
 n8IwX/4hwDJ9Ol2vddg6jTdio3szSlvcXRAyijkG35etLap+i+Q78Q9H1fRcQ8CF
 5t9kfs5oCVWEDlsHMI+Q38vYB3tWikaIUIuao6pH5U50fsA0KM/287TLYdzvmBsK
 gy0BHoZhl++xdMsD2HNwt08RrK/IyY+Zp9i7pKhcsxJiJCgy8nq5ZxhmRPbqTKNc
 IqIBPzG+UYcOd88Iz377Ax+TnzWaTpwyvfaiU8DVFMN0FeENdk1FY8ClYfpYxCDH
 Pm5NzL/f54VtdZ3aL1fKmYwWN7WFJT4FH3l6DOvtCc+Gx3KW1a3Y508CbqYBXvgY
 QV4oH4Y=
 =iSoY
 -----END PGP SIGNATURE-----

Merge tag 'v6.18-rc6' into for-linus

Sync up with the mainline to bring in definition of
INPUT_PROP_HAPTIC_TOUCHPAD.
2025-11-17 23:16:55 -08:00
Xichao Zhao
3c297278a6 Input: zforce_ts - omit error message when memory allocation fails
The dev_err_probe() doesn't do anything when error is '-ENOMEM'.
Therefore, remove the useless call to dev_err_probe(), and just
return the value instead.

Signed-off-by: Xichao Zhao <zhao.xichao@vivo.com>
Link: https://patch.msgid.link/20250822034751.244248-3-zhao.xichao@vivo.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2025-10-17 21:43:06 -07:00
Ricardo Ribalda
295e3beead Input: cyttsp5 - use %pe format specifier
The %pe format specifier is designed to print error pointers. It prints
a symbolic error name (eg. -EINVAL) and it makes the code simpler by
omitting PTR_ERR()

This patch fixes this cocci report:
./cyttsp5.c:927:3-10: WARNING: Consider using %pe to print PTR_ERR()

Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
Link: https://patch.msgid.link/20251013-ptr_err-v1-1-2c5efbd82952@chromium.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2025-10-16 22:01:46 -07:00
Martyn Welch
7363096a5a Input: goodix - remove setting of RST pin to input
The reset line is being set to input on non-ACPI devices apparently to
save power. This isn't being done on ACPI devices as it's been found
that some ACPI devices don't have a pull-up resistor fitted. This can
also be the case for non-ACPI devices, resulting in:

[  941.672207] Goodix-TS 1-0014: Error reading 10 bytes from 0x814e: -110
[  942.696168] Goodix-TS 1-0014: Error reading 10 bytes from 0x814e: -110
[  945.832208] Goodix-TS 1-0014: Error reading 10 bytes from 0x814e: -110

This behaviour appears to have been initialing introduced in
ec6e1b4082. This doesn't seem to be based on information in either the
GT911 or GT9271 datasheets cited as sources of information for this
change. Thus it seems likely that it is based on functionality in the
Android driver which it also lists. This behaviour may be viable in very
specific instances where the hardware is well known, but seems unwise in
the upstream kernel where such hardware requirements can't be
guaranteed.

Remove this over optimisation to improve reliability on non-ACPI
devices.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>
Reviewed-by: Hans de Goede <hansg@kernel.org>
Link: https://lore.kernel.org/r/20251009134138.686215-1-martyn.welch@collabora.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2025-10-13 09:35:26 -07:00
Hans de Goede
c6d99e4881 Input: goodix - add support for ACPI ID GDIX1003
Some newer devices use an ACPI hardware ID of GDIX1003 for their Goodix
touchscreen controller, instead of GDIX1001 / GDIX1002. Add GDIX1003
to the goodix_acpi_match[] table.

Reported-by: Weikang Guo <guoweikang.kernel@gmail.com>
Closes: https://lore.kernel.org/linux-input/20250225024409.1467040-1-guoweikang.kernel@gmail.com/
Tested-by: Weikang Guo <guoweikang.kernel@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20251013121022.44333-1-hansg@kernel.org
Cc: stable@vger.kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2025-10-13 09:16:11 -07:00
Linus Torvalds
99cedb6b8f Input updates for v6.18-rc0
- a number of conversions to yaml/json schema and fixes for
   input-related device tree bindings
 
 - a new driver for Awinic AW86927 haptic chip
 
 - a new driver for Hynitron CST816x series controller
 
 - a new driver for add Himax HX852x(ES) touchscreen controller
 
 - a fix to uinput to not leak kernel memory via a gap in
   uinput_ff_upload_compat structure
 
 - a fix to prevent overflow in pressure calculation in tsc2007 driver
   causing phantom touches
 
 - a change to Atmel maxTouch driver to support generic touchscreen
   configuration (flip, rotate, etc.)
 
 - support for platform data was dropped in tca8418_keypad,
   pxa27x-keypad, spear-keyboard and twl4030_keypad drivers, they all
   now rely on generic device properties for configuration
 
 - other assorted changes and fixes.
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYKAB0WIQST2eWILY88ieB2DOtAj56VGEWXnAUCaOX1HQAKCRBAj56VGEWX
 nC29AQCsDm6HBKXJZl6nAI8WHQiSvASFvyFlF6scVnfueX54mQEA6eE428+Cr1Sn
 mDiwL38Es+PlZbdsi0J2q0vYzpr4yQU=
 =JZIn
 -----END PGP SIGNATURE-----

Merge tag 'input-for-v6.18-rc0' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input

Pull input updates from Dmitry Torokhov:

 - Conversions to yaml/json schema and fixes for input-related device
   tree bindings

 - New drivers:
     - Awinic AW86927 haptic chip
     - Hynitron CST816x series controller
     - Himax HX852x(ES) touchscreen controller

 - Fix uinput to not leak kernel memory via a gap in
   uinput_ff_upload_compat structure

 - Prevent overflow in pressure calculation in tsc2007 driver causing
   phantom touches

 - Make the Atmel maxTouch driver support generic touchscreen
   configuration (flip, rotate, etc)

 - Drop support for platform data in tca8418_keypad, pxa27x-keypad,
   spear-keyboard and twl4030_keypad drivers, they all now rely on
   generic device properties for configuration

 - Other assorted changes and fixes

* tag 'input-for-v6.18-rc0' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (50 commits)
  Input: atmel_mxt_ts - allow reset GPIO to sleep
  Input: aw86927 - fix error code in probe()
  Input: psxpad-spi - add a check for the return value of spi_setup()
  Input: uinput - zero-initialize uinput_ff_upload_compat to avoid info leak
  Input: aw86927 - add driver for Awinic AW86927
  dt-bindings: input: Add Awinic AW86927
  dt-bindings: touchscreen: remove touchscreen.txt
  dt-bindings: arm: bcm: raspberrypi,bcm2835-firmware: Add touchscreen child node
  dt-bindings: touchscreen: convert eeti bindings to json schema
  Input: pm8941-pwrkey - disable wakeup for resin by default
  dt-bindings: input: pm8941-pwrkey: Document wakeup-source property
  Input: add driver for Hynitron CST816x series
  dt-bindings: input: touchscreen: add hynitron cst816x series
  Input: imx6ul_tsc - set glitch threshold by DTS property
  dt-bindings: touchscreen: fsl,imx6ul-tsc: support glitch thresold
  dt-bindings: touchscreen: add debounce-delay-us property
  Input: ps2-gpio - fix typo
  Input: atmel_mxt_ts - add support for generic touchscreen configurations
  dt-bindings: input: maxtouch: add common touchscreen properties
  dt-bindings: touchscreen: convert zet6223 bindings to json schema
  ...
2025-10-08 09:44:38 -07:00
Marek Vasut
c7866ee0a9 Input: atmel_mxt_ts - allow reset GPIO to sleep
The reset GPIO is not toggled in any critical section where it couldn't
sleep, allow the reset GPIO to sleep. This allows the driver to operate
reset GPIOs connected to I2C GPIO expanders.

Signed-off-by: Marek Vasut <marek.vasut@mailbox.org>
Link: https://lore.kernel.org/r/20251005023335.166483-1-marek.vasut@mailbox.org
Cc: stable@vger.kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2025-10-07 21:51:31 -07:00
Oleh Kuzhylnyi
c87a819bec Input: add driver for Hynitron CST816x series
Introduce support for the Hynitron CST816x series touchscreen controller
used for 240×240 1.28-inch Round LCD Display Module manufactured
by Waveshare Electronics. The driver is designed based on an Arduino
implementation marked as under MIT License. This driver is written
for a particular round display based on the CST816S controller, which
is not compatiable with existing driver for Hynitron controllers.

Signed-off-by: Oleh Kuzhylnyi <kuzhylol@gmail.com>
Link: https://lore.kernel.org/r/20250921125939.249788-2-kuzhylol@gmail.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2025-09-24 22:36:50 -07:00
Dario Binacchi
5042e57d39 Input: imx6ul_tsc - set glitch threshold by DTS property
Set the glitch threshold by DTS property and keep the existing default
behavior if the 'debounce-delay-us' is not present.

Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Link: https://lore.kernel.org/r/20250923143746.2857292-7-dario.binacchi@amarulasolutions.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2025-09-24 14:21:13 -07:00
Svyatoslav Ryhel
fd321a861f Input: atmel_mxt_ts - add support for generic touchscreen configurations
This provides support for generic touchscreen configuration options like
swapped-x-y, min-x, min-y, size-x, size-y, etc.

Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
Link: https://lore.kernel.org/r/20250909054903.11519-3-clamor95@gmail.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2025-09-19 11:23:15 -07:00
Dario Binacchi
05fcd78bcb Input: imx6ul_tsc - use BIT, FIELD_{GET,PREP} and GENMASK macros
Replace opencoded masking and shifting, with BIT(), GENMASK(),
FIELD_GET() and FIELD_PREP() macros.

Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Link: https://lore.kernel.org/r/20250917080534.1772202-3-dario.binacchi@amarulasolutions.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2025-09-17 22:38:40 -07:00
Michael Trimarchi
6c521885da Input: imx6ul_tsc - fix typo in register name
Replace 'SETING' with 'SETTING'.

Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Link: https://lore.kernel.org/r/20250917080534.1772202-2-dario.binacchi@amarulasolutions.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2025-09-17 22:38:34 -07:00
Stephan Gerhold
09fd8626cf Input: add Himax HX852x(ES) touchscreen driver
Add a simple driver for the Himax HX852x(ES) touch panel controller,
with support for multi-touch and capacitive touch keys.

The driver is somewhat based on sample code from Himax. However, that
code was rather confusing, so that we spent a significant amount of
time just trying to understand the packet format and register commands.
In this driver they are described with clean structs and defines rather
than magic numbers and offset calculations.

Co-developed-by: Jonathan Albrieux <jonathan.albrieux@gmail.com>
Signed-off-by: Jonathan Albrieux <jonathan.albrieux@gmail.com>
Reviewed-by: Jeff LaBundy <jeff@labundy.com>
Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
Link: https://lore.kernel.org/r/20250915-hx852x-v5-2-b938182f1056@linaro.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2025-09-17 14:44:02 -07:00
Alexander Kurz
f0addd325e mfd: input: rtc: mc13783: Remove deprecated mc13xxx_irq_ack()
mc13xxx_irq_ack() got deprecated and became dead code with commit
10f9edaeaa ("mfd: mc13xxx: Use regmap irq framework for interrupts").
It should be safe to remove it now.

Signed-off-by: Alexander Kurz <akurz@blala.de>
Acked-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Acked-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> # for input
Link: https://lore.kernel.org/r/20250811064358.1659-1-akurz@blala.de
Signed-off-by: Lee Jones <lee@kernel.org>
2025-09-11 11:39:31 +01:00
Johannes Kirchmair
9a12e2fb3f Input: tsc2007 - prevent overflow in pressure calculation
The touch resistance calculation in the tsc2007 driver is prone to
overflow if (z2 - z1) is large and also x is reasonably big. This
overflow results in the driver emitting input events when very little
touch pressure is applied. In these events the x and y coordinates can
be substantially off.

Avoid the overflow by using u64 when calculating resistance value.

Signed-off-by: Johannes Kirchmair <johannes.kirchmair@skidata.com>
Link: https://lore.kernel.org/r/20250129-fix_tsc_calculation_overflow-v2-1-9e51333496ad@skidata.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2025-09-03 07:44:00 -07:00
Svyatoslav Ryhel
d504bbda8c Input: tsc2007 - make interrupt optional
In case tsc2007 is used as an ADC sensor there will be no interrupt
provided at all, so set up an interrupt only if one is present.

Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
Link: https://lore.kernel.org/r/20250824091927.105121-3-clamor95@gmail.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2025-09-03 06:59:13 -07:00
Svyatoslav Ryhel
b0e109a242 Input: tsc2007 - change warning to debug message if pen GPIO is not defined
Since pen GPIO request is optional, there is no reason to throw dev_warn if
such GPIO is not defined.

Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
Link: https://lore.kernel.org/r/20250824091927.105121-2-clamor95@gmail.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2025-09-03 06:59:04 -07:00