Commit Graph

8206 Commits

Author SHA1 Message Date
Al Viro
cb787f4ac0 [tree-wide] finally take no_llseek out
no_llseek had been defined to NULL two years ago, in commit 868941b144
("fs: remove no_llseek")

To quote that commit,

  At -rc1 we'll need do a mechanical removal of no_llseek -

  git grep -l -w no_llseek | grep -v porting.rst | while read i; do
	sed -i '/\<no_llseek\>/d' $i
  done

  would do it.

Unfortunately, that hadn't been done.  Linus, could you do that now, so
that we could finally put that thing to rest? All instances are of the
form
	.llseek = no_llseek,
so it's obviously safe.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2024-09-27 08:18:43 -07:00
Linus Torvalds
075dbe9f6e soc: convert ep93xx to devicetree
This concludes a long journey towards replacing the old
 board files with devictree description on the Cirrus Logic
 EP93xx platform.
 
 Nikita Shubin has been working on this for a long time,
 for details see the last post on
 https://lore.kernel.org/lkml/20240909-ep93xx-v12-0-e86ab2423d4b@maquefel.me/
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmb1croACgkQYKtH/8kJ
 UicY0g//XXEXcBgE2CLfKzGimN3gREIElEqFCpd7v32XWGIQNFdS7StiGqNx1MeU
 UYdILm97ldgpx+NnHd3Cb9HbLQ1CTIIvAZ2ngFLDeeZO+wgzBVxWTrdUUp57ZIBn
 5Fq0hNaR1bfqSr+J+ZbgizH5N96EvLr3OPz/eJetY7egVBUID/0OpwssPJxW1Ns0
 f+W+yIc7BomVa71xGgI+RkHrG/5DSaoFtrB+ESt7q1nNUIeMn32JqBYqE0U2iCRN
 ADO8I+WfAjIcO1uN5n3KM3tigZI3GKSrBdllByr8wWNbp9l5rMYfFAPEaI109iyI
 7PFrB6qhAlY9LckXMNhwLyjlnWt6qrI0B+tyg+3tW6+4OwFnpPN0cIhszFPOmrhv
 njsDSvybp0q9V6Mn7f394H6v9sk9RHr68mpu12hO65UBP7Qe7mrdl3snnFcm0FHL
 jCLnvjdmCSqRlV6YFsKDHuDzZOG88sAwH0mySKd3c/CVvgaNDsaJduelPGpuXlXX
 P7op6D8kyKFKfmwK0kz3t+3+2ozgYq3nu4amI7rJ72MOvJKBocTwwqpAesIuegde
 bn3ZN30yZDTbfEFuveOAzx7rqDlZYX/tN0uspL4VBN0rdayxBng5hneV2PypTtW0
 wE9ptz5qIz8AssJ7NInwpgRTDjEut4SY3m3CS2/66V08B4EznAA=
 =Y3Cd
 -----END PGP SIGNATURE-----

Merge tag 'soc-ep93xx-dt-6.12' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc

Pull SoC update from Arnd Bergmann:
 "Convert ep93xx to devicetree

  This concludes a long journey towards replacing the old board files
  with devictree description on the Cirrus Logic EP93xx platform.

  Nikita Shubin has been working on this for a long time, for details
  see the last post on

    https://lore.kernel.org/lkml/20240909-ep93xx-v12-0-e86ab2423d4b@maquefel.me/"

* tag 'soc-ep93xx-dt-6.12' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (47 commits)
  dt-bindings: gpio: ep9301: Add missing "#interrupt-cells" to examples
  MAINTAINERS: Update EP93XX ARM ARCHITECTURE maintainer
  soc: ep93xx: drop reference to removed EP93XX_SOC_COMMON config
  net: cirrus: use u8 for addr to calm down sparse
  dmaengine: cirrus: use snprintf() to calm down gcc 13.3.0
  dmaengine: ep93xx: Fix a NULL vs IS_ERR() check in probe()
  pinctrl: ep93xx: Fix raster pins typo
  spi: ep93xx: update kerneldoc comments for ep93xx_spi
  clk: ep93xx: Fix off by one in ep93xx_div_recalc_rate()
  clk: ep93xx: add module license
  dmaengine: cirrus: remove platform code
  ASoC: cirrus: edb93xx: Delete driver
  ARM: ep93xx: soc: drop defines
  ARM: ep93xx: delete all boardfiles
  ata: pata_ep93xx: remove legacy pinctrl use
  pwm: ep93xx: drop legacy pinctrl
  ARM: ep93xx: DT for the Cirrus ep93xx SoC platforms
  ARM: dts: ep93xx: Add EDB9302 DT
  ARM: dts: ep93xx: add ts7250 board
  ARM: dts: add Cirrus EP93XX SoC .dtsi
  ...
2024-09-26 12:00:25 -07:00
Linus Torvalds
9ae2940cbc Input updates for v6.12-rc0
- support for PixArt PS/2 touchpad
 
 - updates to tsc2004/5, usbtouchscreen, and zforce_ts drivers
 
 - support for GPIO-only mode for ADP55888 controller
 
 - support for touch keys in Zinitix driver
 
 - support for querying density of Synaptics sensors
 
 - sysfs interface for Goodex "Berlin" devices to read and write touch IC
   registers
 
 - more quirks to i8042 to handle various Tuxedo laptops
 
 - a number of drivers have been converted to using "guard" notation
   when acquiring various locks, as well as using other cleanup functions
   to simplify releasing of resources (with more drivers to follow)
 
 - evdev will limit amount of data that can be written into an evdev
   instance at a given time to 4096 bytes (170 input events) to avoid
   holding evdev->mutex for too long and starving other users
 
 - Spitz has been converted to use software nodes/properties to describe
   its matrix keypad and GPIO-connected LEDs
 
 - msc5000_ts, msc_touchkey and keypad-nomadik-ske drivers have been
   removed since noone in mainline have been using them
 
 - other assorted cleanups and fixes.
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQST2eWILY88ieB2DOtAj56VGEWXnAUCZvGnWgAKCRBAj56VGEWX
 nDjGAQCHcRk1icJlyjx3KA85gdILriDB9zMNJnCnbYXrSfGbOQD+LZNjO3po26zB
 wloLEYTKRu3E/oWEI8VcfIN2m89vxw4=
 =bDsb
 -----END PGP SIGNATURE-----

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

Pull input updates from Dmitry Torokhov:

 - support for PixArt PS/2 touchpad

 - updates to tsc2004/5, usbtouchscreen, and zforce_ts drivers

 - support for GPIO-only mode for ADP55888 controller

 - support for touch keys in Zinitix driver

 - support for querying density of Synaptics sensors

 - sysfs interface for Goodex "Berlin" devices to read and write touch
   IC registers

 - more quirks to i8042 to handle various Tuxedo laptops

 - a number of drivers have been converted to using "guard" notation
   when acquiring various locks, as well as using other cleanup
   functions to simplify releasing of resources (with more drivers to
   follow)

 - evdev will limit amount of data that can be written into an evdev
   instance at a given time to 4096 bytes (170 input events) to avoid
   holding evdev->mutex for too long and starving other users

 - Spitz has been converted to use software nodes/properties to describe
   its matrix keypad and GPIO-connected LEDs

 - msc5000_ts, msc_touchkey and keypad-nomadik-ske drivers have been
   removed since noone in mainline have been using them

 - other assorted cleanups and fixes

* tag 'input-for-v6.12-rc0' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (98 commits)
  ARM: spitz: fix compile error when matrix keypad driver is enabled
  Input: hynitron_cstxxx - drop explicit initialization of struct i2c_device_id::driver_data to 0
  Input: adp5588-keys - fix check on return code
  Input: Convert comma to semicolon
  Input: i8042 - add TUXEDO Stellaris 15 Slim Gen6 AMD to i8042 quirk table
  Input: i8042 - add another board name for TUXEDO Stellaris Gen5 AMD line
  Input: tegra-kbc - use of_property_read_variable_u32_array() and of_property_present()
  Input: ps2-gpio - use IRQF_NO_AUTOEN flag in request_irq()
  Input: ims-pcu - fix calling interruptible mutex
  Input: zforce_ts - switch to using asynchronous probing
  Input: zforce_ts - remove assert/deassert wrappers
  Input: zforce_ts - do not hardcode interrupt level
  Input: zforce_ts - switch to using devm_regulator_get_enable()
  Input: zforce_ts - stop treating VDD regulator as optional
  Input: zforce_ts - make zforce_idtable constant
  Input: zforce_ts - use dev_err_probe() where appropriate
  Input: zforce_ts - do not ignore errors when acquiring regulator
  Input: zforce_ts - make parsing of contacts less confusing
  Input: zforce_ts - switch to using get_unaligned_le16
  Input: zforce_ts - use guard notation when acquiring mutexes
  ...
2024-09-24 12:42:35 -07:00
Uwe Kleine-König
b2142a22ef Input: hynitron_cstxxx - drop explicit initialization of struct i2c_device_id::driver_data to 0
These drivers don't use the driver_data member of struct i2c_device_id,
so don't explicitly initialize this member.

This prepares putting driver_data in an anonymous union which requires
either no initialization or named designators. But it's also a nice
cleanup on its own.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
Link: https://lore.kernel.org/r/20240920153430.503212-12-u.kleine-koenig@baylibre.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-09-22 01:00:02 -07:00
Linus Torvalds
7856a56541 Many singleton patches - please see the various changelogs for details.
Quite a lot of nilfs2 work this time around.
 
 Notable patch series in this pull request are:
 
 "mul_u64_u64_div_u64: new implementation" by Nicolas Pitre, with
 assistance from Uwe Kleine-König.  Reimplement mul_u64_u64_div_u64() to
 provide (much) more accurate results.  The current implementation was
 causing Uwe some issues in the PWM drivers.
 
 "xz: Updates to license, filters, and compression options" from Lasse
 Collin.  Miscellaneous maintenance and kinor feature work to the xz
 decompressor.
 
 "Fix some GDB command error and add some GDB commands" from Kuan-Ying Lee.
 Fixes and enhancements to the gdb scripts.
 
 "treewide: add missing MODULE_DESCRIPTION() macros" from Jeff Johnson.
 Adds lots of MODULE_DESCRIPTIONs, thus fixing lots of warnings about this.
 
 "nilfs2: add support for some common ioctls" from Ryusuke Konishi.  Adds
 various commonly-available ioctls to nilfs2.
 
 "This series fixes a number of formatting issues in kernel doc comments"
 from Ryusuke Konishi does that.
 
 "nilfs2: prevent unexpected ENOENT propagation" from Ryusuke Konishi.  Fix
 issues where -ENOENT was being unintentionally and inappropriately
 returned to userspace.
 
 "nilfs2: assorted cleanups" from Huang Xiaojia.
 
 "nilfs2: fix potential issues with empty b-tree nodes" from Ryusuke
 Konishi fixes some issues which can occur on corrupted nilfs2 filesystems.
 
 "scripts/decode_stacktrace.sh: improve error reporting and usability" from
 Luca Ceresoli does those things.
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQTTMBEPP41GrTpTJgfdBJ7gKXxAjgUCZu7dpAAKCRDdBJ7gKXxA
 jsPqAPwMDEZyKlfSw7QioEHNHDkmkbP7VYCYR0CbUnppbztwpAD8D37aVbWQ+UzM
 3nnOq3W2Pc2o/20zqi8Upf1mnvUrygQ=
 =/NWE
 -----END PGP SIGNATURE-----

Merge tag 'mm-nonmm-stable-2024-09-21-07-52' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

Pull non-MM updates from Andrew Morton:
 "Many singleton patches - please see the various changelogs for
  details.

  Quite a lot of nilfs2 work this time around.

  Notable patch series in this pull request are:

   - "mul_u64_u64_div_u64: new implementation" by Nicolas Pitre, with
     assistance from Uwe Kleine-König. Reimplement mul_u64_u64_div_u64()
     to provide (much) more accurate results. The current implementation
     was causing Uwe some issues in the PWM drivers.

   - "xz: Updates to license, filters, and compression options" from
     Lasse Collin. Miscellaneous maintenance and kinor feature work to
     the xz decompressor.

   - "Fix some GDB command error and add some GDB commands" from
     Kuan-Ying Lee. Fixes and enhancements to the gdb scripts.

   - "treewide: add missing MODULE_DESCRIPTION() macros" from Jeff
     Johnson. Adds lots of MODULE_DESCRIPTIONs, thus fixing lots of
     warnings about this.

   - "nilfs2: add support for some common ioctls" from Ryusuke Konishi.
     Adds various commonly-available ioctls to nilfs2.

   - "This series fixes a number of formatting issues in kernel doc
     comments" from Ryusuke Konishi does that.

   - "nilfs2: prevent unexpected ENOENT propagation" from Ryusuke
     Konishi. Fix issues where -ENOENT was being unintentionally and
     inappropriately returned to userspace.

   - "nilfs2: assorted cleanups" from Huang Xiaojia.

   - "nilfs2: fix potential issues with empty b-tree nodes" from Ryusuke
     Konishi fixes some issues which can occur on corrupted nilfs2
     filesystems.

   - "scripts/decode_stacktrace.sh: improve error reporting and
     usability" from Luca Ceresoli does those things"

* tag 'mm-nonmm-stable-2024-09-21-07-52' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm: (103 commits)
  list: test: increase coverage of list_test_list_replace*()
  list: test: fix tests for list_cut_position()
  proc: use __auto_type more
  treewide: correct the typo 'retun'
  ocfs2: cleanup return value and mlog in ocfs2_global_read_info()
  nilfs2: remove duplicate 'unlikely()' usage
  nilfs2: fix potential oob read in nilfs_btree_check_delete()
  nilfs2: determine empty node blocks as corrupted
  nilfs2: fix potential null-ptr-deref in nilfs_btree_insert()
  user_namespace: use kmemdup_array() instead of kmemdup() for multiple allocation
  tools/mm: rm thp_swap_allocator_test when make clean
  squashfs: fix percpu address space issues in decompressor_multi_percpu.c
  lib: glob.c: added null check for character class
  nilfs2: refactor nilfs_segctor_thread()
  nilfs2: use kthread_create and kthread_stop for the log writer thread
  nilfs2: remove sc_timer_task
  nilfs2: do not repair reserved inode bitmap in nilfs_new_inode()
  nilfs2: eliminate the shared counter and spinlock for i_generation
  nilfs2: separate inode type information from i_state field
  nilfs2: use the BITS_PER_LONG macro
  ...
2024-09-21 08:20:50 -07:00
Dmitry Torokhov
36ec807b62 Merge branch 'next' into for-linus
Prepare input updates for 6.12 merge window.
2024-09-20 01:24:24 -07:00
Nuno Sa
eb017f4ea1 Input: adp5588-keys - fix check on return code
During adp5588_setup(), we read all the events to clear the event FIFO.
However, adp5588_read() just calls i2c_smbus_read_byte_data() which
returns the byte read in case everything goes well. Hence, we need to
explicitly check for a negative error code instead of checking for
something different than 0.

Fixes: e960309ce3 ("Input: adp5588-keys - bail out on returned error")
Cc: stable@vger.kernel.org
Signed-off-by: Nuno Sa <nuno.sa@analog.com>
Link: https://lore.kernel.org/r/20240920-fix-adp5588-err-check-v1-1-81f6e957ef24@analog.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-09-20 01:21:56 -07:00
Shen Lichuan
55bef83509 Input: Convert comma to semicolon
To ensure code clarity and prevent potential errors, it's advisable
to employ the ';' as a statement separator, except when ',' are
intentionally used for specific purposes.

Signed-off-by: Shen Lichuan <shenlichuan@vivo.com>
Link: https://lore.kernel.org/r/20240918032246.9147-1-shenlichuan@vivo.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-09-18 03:48:00 -07:00
Linus Torvalds
b8979c6b4d soc: driver updates for 6.12
The driver updates seem larger this time around, with changes
 is many of the SoC specific drivers, both the custom drivers/soc
 ones and the closely related subsystems (memory, bus, firmware,
 reset, ...).
 
 The at91 platform gains support for sam9x7 chips in the soc and
 power management code. This is the latest variant of one of the
 oldest still supported SoC families, using the ARM9 (ARMv5) core.
 
 As usual, the qualcomm snapdragon platform gets a ton of updates in many
 of their drivers to add more features and additional SoC support. Most
 of these are somewhat firmware related as the platform has a number of
 firmware based interfaces to the kernel. A notable addition here is the
 inclusion of trace events to two of these drivers.
 
 Herve Codina and Christophe Leroy are now sending updates for
 drivers/soc/fsl/ code through the SoC tree, this contains both PowerPC
 and Arm specific platforms and has previously been problematic to
 maintain. The first update here contains support for newer PowerPC
 variants and some cleanups.
 
 The turris mox firmware driver has a number of updates, mostly cleanups.
 
 The Arm SCMI firmware driver gets a major rework to modularize
 the existing code into separately loadable drivers for the various
 transports, the addition of custom NXP i.MX9 interfaces and a
 number of smaller updates.
 
 The Arm FF-A firmware driver gets a feature update to support
 the v1.2 version of the specification.
 
 The reset controller drivers have some smaller cleanups and a newly
 added driver for the Intel/Mobileye EyeQ5/EyeQ6 MIPS SoCs.
 
 The memory controller drivers get some cleanups and refactoring
 for Tegra, TI, Freescale/NXP and a couple more platforms.
 
 Finally there are lots of minor updates to firmware (raspberry pi,
 tegra, imx), bus (sunxi, omap, tegra) and soc (rockchips, tegra, amlogic,
 mediatek) drivers and their DT bindings.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmboJicACgkQYKtH/8kJ
 Uicc+RAAlc6lY0CKqZhAKzyGsjEHzPYcTN5axNf1WrTdgv3assF+yEeiQtkd+Re7
 IIbtrWYWmLouOazRm5y7OjOUUy78FRThgRaVlZLPiCZze3rlZjIHj2XJx7R1hdjv
 aXBSe13i1KfmOsIDVNxAJbFa5UveeAvKKxRb6SJtSwl46KGhhgI3Jwq347sR7bYY
 QpiVMRVZTkH7++hlE9KE5qv+I6QVlbhneU1ErHjy0g4av+UycQe0eJFOtZV+Y5Aj
 7k65D3GC33eOAK56iDCUH9OfYLFu7k3LF7V0zdLIhel1tFuoYUbjkC5iQr4VAMjc
 Ysw0vwXdnUoG3oDiGLOIK4u56flWqT7I8gSQwRhtp6Ikc47gdlA2zJLE4MNN/4Yh
 fMP9LUxzr0sJ67LUq4urtnRfVtgKRRZ44v6A+CHY0l3x6rqeNbkJd38mXeVMMIWo
 gW8cf/fJsEdNE+1neGXq7lRrUmCwvkYUAd7y3gt1BiUq/Abas6ityvzk9Xig87I2
 uq3p5nASgrl+o8OlmIBT770BeS2jY8tAGJm1ocCtYN2ZWGh37LeES4Bo/58BPTGE
 tydBhlBK41h2dUCYQRZFNUt/2/xCELQ2X4mUiOaL2gqmiJq3Q6fdR1d+DAOB+4a5
 KL1yt5yIrBl0XMQ76kir3VmqTeKNka7aS23yefgTZfQAVb+JDw4=
 =EauF
 -----END PGP SIGNATURE-----

Merge tag 'soc-drivers-6.12' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc

Pull SoC driver updates from Arnd Bergmann:
 "The driver updates seem larger this time around, with changes is many
  of the SoC specific drivers, both the custom drivers/soc ones and the
  closely related subsystems (memory, bus, firmware, reset, ...).

  The at91 platform gains support for sam9x7 chips in the soc and power
  management code. This is the latest variant of one of the oldest still
  supported SoC families, using the ARM9 (ARMv5) core.

  As usual, the qualcomm snapdragon platform gets a ton of updates in
  many of their drivers to add more features and additional SoC support.
  Most of these are somewhat firmware related as the platform has a
  number of firmware based interfaces to the kernel. A notable addition
  here is the inclusion of trace events to two of these drivers.

  Herve Codina and Christophe Leroy are now sending updates for
  drivers/soc/fsl/ code through the SoC tree, this contains both PowerPC
  and Arm specific platforms and has previously been problematic to
  maintain. The first update here contains support for newer PowerPC
  variants and some cleanups.

  The turris mox firmware driver has a number of updates, mostly
  cleanups.

  The Arm SCMI firmware driver gets a major rework to modularize the
  existing code into separately loadable drivers for the various
  transports, the addition of custom NXP i.MX9 interfaces and a number
  of smaller updates.

  The Arm FF-A firmware driver gets a feature update to support the v1.2
  version of the specification.

  The reset controller drivers have some smaller cleanups and a newly
  added driver for the Intel/Mobileye EyeQ5/EyeQ6 MIPS SoCs.

  The memory controller drivers get some cleanups and refactoring for
  Tegra, TI, Freescale/NXP and a couple more platforms.

  Finally there are lots of minor updates to firmware (raspberry pi,
  tegra, imx), bus (sunxi, omap, tegra) and soc (rockchips, tegra,
  amlogic, mediatek) drivers and their DT bindings"

* tag 'soc-drivers-6.12' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (212 commits)
  firmware: imx: remove duplicate scmi_imx_misc_ctrl_get()
  platform: cznic: turris-omnia-mcu: Fix error check in omnia_mcu_register_trng()
  bus: sunxi-rsb: Simplify code with dev_err_probe()
  soc: fsl: qe: ucc: Export ucc_mux_set_grant_tsa_bkpt
  soc: fsl: cpm1: qmc: Fix dependency on fsl_soc.h
  dt-bindings: arm: rockchip: Add rk3576 compatible string to pmu.yaml
  soc: fsl: qbman: Remove redundant warnings
  soc: fsl: qbman: Use iommu_paging_domain_alloc()
  MAINTAINERS: Add QE files related to the Freescale QMC controller
  soc: fsl: cpm1: qmc: Handle QUICC Engine (QE) soft-qmc firmware
  soc: fsl: cpm1: qmc: Add support for QUICC Engine (QE) implementation
  soc: fsl: qe: Add missing PUSHSCHED command
  soc: fsl: qe: Add resource-managed muram allocators
  soc: fsl: cpm1: qmc: Introduce qmc_version
  soc: fsl: cpm1: qmc: Rename SCC_GSMRL_MODE_QMC
  soc: fsl: cpm1: qmc: Handle RPACK initialization
  soc: fsl: cpm1: qmc: Rename qmc_chan_command()
  soc: fsl: cpm1: qmc: Introduce qmc_{init,exit}_xcc() and their CPM1 version
  soc: fsl: cpm1: qmc: Introduce qmc_init_resource() and its CPM1 version
  soc: fsl: cpm1: qmc: Re-order probe() operations
  ...
2024-09-17 10:48:09 +02:00
Linus Torvalds
3352633ce6 vfs-6.12.file
-----BEGIN PGP SIGNATURE-----
 
 iHUEABYKAB0WIQRAhzRXHqcMeLMyaSiRxhvAZXjcogUCZuQEwAAKCRCRxhvAZXjc
 osS0AQCgIpvey9oW5DMyMw6Bv0hFMRv95gbNQZfHy09iK+NMNAD9GALhb/4cMIVB
 7YrZGXEz454lpgcs8AnrOVjVNfctOQg=
 =e9s9
 -----END PGP SIGNATURE-----

Merge tag 'vfs-6.12.file' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs

Pull vfs file updates from Christian Brauner:
 "This is the work to cleanup and shrink struct file significantly.

  Right now, (focusing on x86) struct file is 232 bytes. After this
  series struct file will be 184 bytes aka 3 cacheline and a spare 8
  bytes for future extensions at the end of the struct.

  With struct file being as ubiquitous as it is this should make a
  difference for file heavy workloads and allow further optimizations in
  the future.

   - struct fown_struct was embedded into struct file letting it take up
     32 bytes in total when really it shouldn't even be embedded in
     struct file in the first place. Instead, actual users of struct
     fown_struct now allocate the struct on demand. This frees up 24
     bytes.

   - Move struct file_ra_state into the union containg the cleanup hooks
     and move f_iocb_flags out of the union. This closes a 4 byte hole
     we created earlier and brings struct file to 192 bytes. Which means
     struct file is 3 cachelines and we managed to shrink it by 40
     bytes.

   - Reorder struct file so that nothing crosses a cacheline.

     I suspect that in the future we will end up reordering some members
     to mitigate false sharing issues or just because someone does
     actually provide really good perf data.

   - Shrinking struct file to 192 bytes is only part of the work.

     Files use a slab that is SLAB_TYPESAFE_BY_RCU and when a kmem cache
     is created with SLAB_TYPESAFE_BY_RCU the free pointer must be
     located outside of the object because the cache doesn't know what
     part of the memory can safely be overwritten as it may be needed to
     prevent object recycling.

     That has the consequence that SLAB_TYPESAFE_BY_RCU may end up
     adding a new cacheline.

     So this also contains work to add a new kmem_cache_create_rcu()
     function that allows the caller to specify an offset where the
     freelist pointer is supposed to be placed. Thus avoiding the
     implicit addition of a fourth cacheline.

   - And finally this removes the f_version member in struct file.

     The f_version member isn't particularly well-defined. It is mainly
     used as a cookie to detect concurrent seeks when iterating
     directories. But it is also abused by some subsystems for
     completely unrelated things.

     It is mostly a directory and filesystem specific thing that doesn't
     really need to live in struct file and with its wonky semantics it
     really lacks a specific function.

     For pipes, f_version is (ab)used to defer poll notifications until
     a write has happened. And struct pipe_inode_info is used by
     multiple struct files in their ->private_data so there's no chance
     of pushing that down into file->private_data without introducing
     another pointer indirection.

     But pipes don't rely on f_pos_lock so this adds a union into struct
     file encompassing f_pos_lock and a pipe specific f_pipe member that
     pipes can use. This union of course can be extended to other file
     types and is similar to what we do in struct inode already"

* tag 'vfs-6.12.file' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs: (26 commits)
  fs: remove f_version
  pipe: use f_pipe
  fs: add f_pipe
  ubifs: store cookie in private data
  ufs: store cookie in private data
  udf: store cookie in private data
  proc: store cookie in private data
  ocfs2: store cookie in private data
  input: remove f_version abuse
  ext4: store cookie in private data
  ext2: store cookie in private data
  affs: store cookie in private data
  fs: add generic_llseek_cookie()
  fs: use must_set_pos()
  fs: add must_set_pos()
  fs: add vfs_setpos_cookie()
  s390: remove unused f_version
  ceph: remove unused f_version
  adi: remove unused f_version
  mm: Removed @freeptr_offset to prevent doc warning
  ...
2024-09-16 09:14:02 +02:00
Werner Sembach
3870e2850b Input: i8042 - add TUXEDO Stellaris 15 Slim Gen6 AMD to i8042 quirk table
The Gen6 devices have the same problem and the same Solution as the Gen5
ones.

Some TongFang barebones have touchpad and/or keyboard issues after
suspend, fixable with nomux + reset + noloop + nopnp. Luckily, none of
them have an external PS/2 port so this can safely be set for all of
them.

I'm not entirely sure if every device listed really needs all four quirks,
but after testing and production use, no negative effects could be
observed when setting all four.

Signed-off-by: Werner Sembach <wse@tuxedocomputers.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20240910094008.1601230-3-wse@tuxedocomputers.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-09-13 23:20:18 -07:00
Werner Sembach
01eed86d50 Input: i8042 - add another board name for TUXEDO Stellaris Gen5 AMD line
There might be devices out in the wild where the board name is GMxXGxx
instead of GMxXGxX.

Adding both to be on the safe side.

Signed-off-by: Werner Sembach <wse@tuxedocomputers.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20240910094008.1601230-2-wse@tuxedocomputers.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-09-13 23:20:11 -07:00
Rob Herring (Arm)
c7c878ff32 Input: tegra-kbc - use of_property_read_variable_u32_array() and of_property_present()
There's no need to get the length of an DT array property before
parsing the array. of_property_read_variable_u32_array() takes a
minimum and maximum length and returns the actual length (or error
code).

This is part of a larger effort to remove callers of of_get_property()
and similar functions. of_get_property() leaks the DT property data
pointer which is a problem for dynamically allocated nodes which may
be freed.

Acked-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
Link: https://lore.kernel.org/r/20240913200827.546649-1-robh@kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-09-13 23:16:23 -07:00
Jinjie Ruan
dcd18a3fb1 Input: ps2-gpio - use IRQF_NO_AUTOEN flag in request_irq()
disable_irq() after request_irq() still has a time gap in which
interrupts can come. request_irq() with IRQF_NO_AUTOEN flag will
disable IRQ auto-enable when request IRQ.

Fixes: 9ee0a05588 ("Input: PS/2 gpio bit banging driver for serio bus")
Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com>
Acked-by: Danilo Krummrich <dakr@kernel.org>
Link: https://lore.kernel.org/r/20240912033013.2610949-1-ruanjinjie@huawei.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-09-13 10:20:48 -07:00
Nikita Shubin
b3ab5787e7 input: keypad: ep93xx: add DT support for Cirrus EP93xx
- drop flags, they were not used anyway
- add OF ID match table
- process "autorepeat", "debounce-delay-ms", prescale from device tree
- drop platform data usage and it's header
- keymap goes from device tree now on

Signed-off-by: Nikita Shubin <nikita.shubin@maquefel.me>
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Acked-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2024-09-12 14:33:11 +00:00
Christian Brauner
7a7ce8b3ba
input: remove f_version abuse
f_version is removed from struct file. Make input stop abusing f_version
for stashing information for poll. Move the input state counter into
input_seq_state and allocate it via seq_private_open() and free via
seq_release_private().

Link: https://lore.kernel.org/r/20240830-vfs-file-f_version-v1-12-6d3e4816aa7b@kernel.org
Reviewed-by: Jan Kara <jack@suse.cz>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Christian Brauner <brauner@kernel.org>
2024-09-12 11:56:07 +02:00
David Lechner
82abef590e Input: ims-pcu - fix calling interruptible mutex
Fix calling scoped_cond_guard() with mutex instead of mutex_intr.

scoped_cond_guard(mutex, ...) will call mutex_lock() instead of
mutex_lock_interruptible().

Fixes: 703f12672e ("Input: ims-pcu - switch to using cleanup functions")
Signed-off-by: David Lechner <dlechner@baylibre.com>
Link: https://lore.kernel.org/r/20240910-input-misc-ims-pcu-fix-mutex-intr-v1-1-bdd983685c43@baylibre.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-09-10 16:13:44 -07:00
WangYuli
dab2214fec treewide: correct the typo 'retun'
There are some spelling mistakes of 'retun' in comments which
should be instead of 'return'.

Link: https://lkml.kernel.org/r/63D0F870EE8E87A0+20240906054008.390188-1-wangyuli@uniontech.com
Signed-off-by: WangYuli <wangyuli@uniontech.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2024-09-09 16:47:43 -07:00
Dmitry Torokhov
4172a64ef2 Input: zforce_ts - switch to using asynchronous probing
The driver waits for the device to boot, which can be a lengthy
process. Switch it to asynchronous probing to allow more devices
to be probed simultaneously.

Tested-by: Andreas Kemnade <andreas@kemnade.info> # Tolino Shine2HD
Link: https://lore.kernel.org/r/20240824055047.1706392-19-dmitry.torokhov@gmail.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-09-05 22:56:47 -07:00
Dmitry Torokhov
6a5180c619 Input: zforce_ts - remove assert/deassert wrappers
The wrappers are extremely simple, used once, and do not bring much
value. Remove them.

Tested-by: Andreas Kemnade <andreas@kemnade.info> # Tolino Shine2HD
Link: https://lore.kernel.org/r/20240824055047.1706392-18-dmitry.torokhov@gmail.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-09-05 22:56:47 -07:00
Dmitry Torokhov
7846bd8b8d Input: zforce_ts - do not hardcode interrupt level
Stop forcing interrupt to be low level triggered and instead rely on the
platform to define proper trigger to allow flexibility in board designs.

Tested-by: Andreas Kemnade <andreas@kemnade.info> # Tolino Shine2HD
Link: https://lore.kernel.org/r/20240824055047.1706392-17-dmitry.torokhov@gmail.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-09-05 22:56:47 -07:00
Dmitry Torokhov
8f2ef2610f Input: zforce_ts - switch to using devm_regulator_get_enable()
The driver does not actively manage regulator state past probe() time,
so we can use devm_regulator_get_enable() to simplify the code.

Tested-by: Andreas Kemnade <andreas@kemnade.info> # Tolino Shine2HD
Link: https://lore.kernel.org/r/20240824055047.1706392-16-dmitry.torokhov@gmail.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-09-05 22:56:47 -07:00
Dmitry Torokhov
16ff0224d8 Input: zforce_ts - stop treating VDD regulator as optional
This regulator is not optional from the controller point of view,
so stop treating it as such. For hard-wired designs that omit the
regulator from their device trees regulator subsystem will create
a dummy instance.

This may introduce unnecessary delay of 100us in case of dummy
regulator, but if it is important the driver should be marked as
using asynchronous probing to avoid even longer delays waiting for
the command completions.

Also use usleep_range() instead of udelay() to avoid spinning.

Tested-by: Andreas Kemnade <andreas@kemnade.info> # Tolino Shine2HD
Link: https://lore.kernel.org/r/20240824055047.1706392-15-dmitry.torokhov@gmail.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-09-05 22:56:46 -07:00
Dmitry Torokhov
b5ed81cc7b Input: zforce_ts - make zforce_idtable constant
The I2C ID table is not supposed to change; mark it as const.

Tested-by: Andreas Kemnade <andreas@kemnade.info> # Tolino Shine2HD
Link: https://lore.kernel.org/r/20240824055047.1706392-14-dmitry.torokhov@gmail.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-09-05 22:56:46 -07:00
Dmitry Torokhov
7e168b81e6 Input: zforce_ts - use dev_err_probe() where appropriate
Use dev_err_probe() helper to log deferrals in the devices_deferred
debugfs file and avoid extra messages in the logs.

Also rename "ret" variables holding error codes only to "error".

Tested-by: Andreas Kemnade <andreas@kemnade.info> # Tolino Shine2HD
Link: https://lore.kernel.org/r/20240824055047.1706392-13-dmitry.torokhov@gmail.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-09-05 22:56:46 -07:00
Dmitry Torokhov
c4a8349262 Input: zforce_ts - do not ignore errors when acquiring regulator
We should abort probe on any error besides -ENOENT which signifies that
the regulator is not defined in device tree or elsewhere, not only
when we see -EPROBE_DEFER.

Tested-by: Andreas Kemnade <andreas@kemnade.info> # Tolino Shine2HD
Link: https://lore.kernel.org/r/20240824055047.1706392-12-dmitry.torokhov@gmail.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-09-05 22:56:46 -07:00
Dmitry Torokhov
43a48ec581 Input: zforce_ts - make parsing of contacts less confusing
Zforce touch data packet consists of a byte representing number of
contacts followed by several chunks with length of 9 bytes representing
each contact. Instead of accounting for the leading byte by increasing
offset of each field in contacts by one introduce a pointer to contact
data and point it appropriately. This avoids awkward constructs like:

	point.prblty = payload[9 * i + 9];

which makes it seem like there is off-by-one error, in favor of more
straightforward:

	point.prblty = p[8];

Tested-by: Andreas Kemnade <andreas@kemnade.info> # Tolino Shine2HD
Link: https://lore.kernel.org/r/20240824055047.1706392-11-dmitry.torokhov@gmail.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-09-05 22:56:46 -07:00
Dmitry Torokhov
83b6549ee1 Input: zforce_ts - switch to using get_unaligned_le16
Instead of doing conversion from little-endian data to CPU endianness
by hand use existing helpers.

Tested-by: Andreas Kemnade <andreas@kemnade.info> # Tolino Shine2HD
Link: https://lore.kernel.org/r/20240824055047.1706392-10-dmitry.torokhov@gmail.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-09-05 22:56:46 -07:00
Dmitry Torokhov
5c2002677e Input: zforce_ts - use guard notation when acquiring mutexes
Guard notation allows for simpler code and ensures that mutexes are
automatically released in all code paths.

Tested-by: Andreas Kemnade <andreas@kemnade.info> # Tolino Shine2HD
Link: https://lore.kernel.org/r/20240824055047.1706392-9-dmitry.torokhov@gmail.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-09-05 22:56:46 -07:00
Dmitry Torokhov
9ba33f6145 Input: zforce_ts - ensure that pm_stay_awake() and pm_relax() are balanced
There is a small chance that ts->suspending flag may change while the
interrupt handler is running. To make sure call to pm_relax() is not
skipped on accident use a temporary to hold the original value at the
beginning of interrupt. Use READ_ONCE() so that the value is actually
fetched at the right time.

Tested-by: Andreas Kemnade <andreas@kemnade.info> # Tolino Shine2HD
Link: https://lore.kernel.org/r/20240824055047.1706392-8-dmitry.torokhov@gmail.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-09-05 22:56:45 -07:00
Dmitry Torokhov
f388412f70 Input: zforce_ts - remove unneeded locking
There is no need to have a lock around calls to i2c_master_send() and
i2c_master_recv() as they are not issued concurrently and they are not
sharing any buffers. Also there is no need for command_mutex as all
commands are issued sequentially.

Remove both.

Tested-by: Andreas Kemnade <andreas@kemnade.info> # Tolino Shine2HD
Link: https://lore.kernel.org/r/20240824055047.1706392-7-dmitry.torokhov@gmail.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-09-05 22:56:45 -07:00
Dmitry Torokhov
6244559410 Input: zforce_ts - handle errors from input_mt_init_sots()
input_mt_init_slots() can potentially return error which needs to be
handled.

Tested-by: Andreas Kemnade <andreas@kemnade.info> # Tolino Shine2HD
Link: https://lore.kernel.org/r/20240824055047.1706392-6-dmitry.torokhov@gmail.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-09-05 22:56:45 -07:00
Dmitry Torokhov
a9d59c206c Input: zforce_ts - do not explicitly set EV_SYN, etc bits
Input core and various helpers already do that for us, so drop the code
setting these bits explicitly.

Tested-by: Andreas Kemnade <andreas@kemnade.info> # Tolino Shine2HD
Link: https://lore.kernel.org/r/20240824055047.1706392-5-dmitry.torokhov@gmail.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-09-05 22:56:45 -07:00
Dmitry Torokhov
f820b43754 Input: zforce_ts - remove support for platfrom data
There are no in-tree users of platform data and any new ones should
either use device tree or static device properties, so let's remove
platform data support.

Tested-by: Andreas Kemnade <andreas@kemnade.info> # Tolino Shine2HD
Link: https://lore.kernel.org/r/20240824055047.1706392-4-dmitry.torokhov@gmail.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-09-05 22:56:45 -07:00
Dmitry Torokhov
5e091a49da Input: zforce_ts - simplify reporting of slot state
input_mt_report_slot_state() returns true if slot is active, so we can
combine checks for point.state != STATE_UP.

Tested-by: Andreas Kemnade <andreas@kemnade.info> # Tolino Shine2HD
Link: https://lore.kernel.org/r/20240824055047.1706392-3-dmitry.torokhov@gmail.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-09-05 22:56:45 -07:00
Sudip Mukherjee
4a0467ed73 Input: zforce_ts - use devm_add_action_or_reset()
If devm_add_action() fails we are explicitly calling the cleanup to free
the resources allocated. Lets use the helper devm_add_action_or_reset()
and return directly in case of error, as we know that the cleanup
function has been already called by the helper if there was any error.

Signed-off-by: Sudip Mukherjee <sudip.mukherjee@codethink.co.uk>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Tested-by: Andreas Kemnade <andreas@kemnade.info> # Tolino Shine2HD
Link: https://lore.kernel.org/r/20240824055047.1706392-2-dmitry.torokhov@gmail.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-09-05 22:56:45 -07:00
Dmitry Torokhov
78af00d893 Input: tegra-kbc - use guard notation when acquiring mutex and spinlock
This makes the code more compact and error handling more robust
by ensuring that locks are released in all code paths when control
leaves critical section.

Acked-by: Thierry Reding <treding@nvidia.com>
Link: https://lore.kernel.org/r/20240825051627.2848495-18-dmitry.torokhov@gmail.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-09-05 22:53:34 -07:00
Dmitry Torokhov
22df24590f Input: iqs62x-keys - use cleanup facility for fwnodes
Use __free(fwnode_handle) cleanup facility to ensure that references
to acquired fwnodes are dropped at appropriate times automatically.

Reviewed-by: Jeff LaBundy <jeff@labundy.com>
Link: https://lore.kernel.org/r/20240825051627.2848495-9-dmitry.torokhov@gmail.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-09-05 22:53:28 -07:00
Dmitry Torokhov
43a365abaf Input: gpio-keys - switch to using cleanup functions
Start using __free() and guard() primitives to simplify the code
and error handling. This makes the code more compact and error
handling more robust by ensuring that locks are released in all
code paths when control leaves critical section and all allocated
memory is freed.

Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20240825051627.2848495-6-dmitry.torokhov@gmail.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-09-05 22:53:20 -07:00
Dmitry Torokhov
934976f61e Input: atkbd - use guard notation when acquiring mutex
This makes the code more compact and error handling more robust
by ensuring that mutexes are released in all code paths when control
leaves critical section.

Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20240825051627.2848495-4-dmitry.torokhov@gmail.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-09-05 22:53:11 -07:00
Dmitry Torokhov
d5322d537c Input: alps - use guard notation when acquiring mutex
This makes the code more compact and error handling more robust
by ensuring that mutexes are released in all code paths when control
leaves critical section.

Acked-by: Pali Rohár <pali@kernel.org>
Link: https://lore.kernel.org/r/ZsrBkWIpyEqzClUG@google.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-09-05 22:52:37 -07:00
Werner Sembach
e06edf96de Input: i8042 - add TUXEDO Stellaris 16 Gen5 AMD to i8042 quirk table
Some TongFang barebones have touchpad and/or keyboard issues after
suspend, fixable with nomux + reset + noloop + nopnp. Luckily, none of
them have an external PS/2 port so this can safely be set for all of
them.

I'm not entirely sure if every device listed really needs all four quirks,
but after testing and production use, no negative effects could be
observed when setting all four.

Signed-off-by: Werner Sembach <wse@tuxedocomputers.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20240905164851.771578-1-wse@tuxedocomputers.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-09-05 22:34:20 -07:00
Dmitry Torokhov
f057b57270 Merge branch 'ib/6.11-rc6-matrix-keypad-spitz' into next
Bring in changes removing support for platform data from matrix-keypad
driver.
2024-09-05 21:49:07 -07:00
Dmitry Torokhov
de35996d4b Input: matrix_keypad - remove support for platform data
There are no more users of struct matrix_keypad_platform_data in the
kernel, remove support for it from the driver.

Acked-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20240805014710.1961677-6-dmitry.torokhov@gmail.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-09-05 21:43:42 -07:00
Dmitry Torokhov
584bf366f8 Input: matrix_keypad - switch to gpiod API and generic device properties
gpiod API and generic device properties work with software nodes and
static properties, which will allow removing platform data support
from the driver, simplifying and streamlining the code.

Acked-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20240805014710.1961677-3-dmitry.torokhov@gmail.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-09-05 21:43:42 -07:00
Dmitry Torokhov
5080f62adb Input: matrix_keypad - remove support for clustered interrupt
There are no users of this functionality in the mainline kernel (it was
only available to boards using platform data and not device tree).
Remove it to simplify the code.

Acked-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20240805014710.1961677-2-dmitry.torokhov@gmail.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-09-05 21:43:42 -07:00
Dmitry Torokhov
a790df272a Input: synaptics-rmi4 - fix crash when DPM query is not supported
Stop clobbering "item" variable when checking if the device supports
querying DPM values because its original value is still needed in
case when we need to fall back to the old way of figuring sensor size.

Reported-by: Richard Acayan <mailingradian@gmail.com>
Tested-by: Richard Acayan <mailingradian@gmail.com>
Fixes: 14d650fcb7 ("Input: synaptics-rmi4 - add support for querying DPM value (F12)")
Link: https://lore.kernel.org/r/ZtdQW7nqAOEJDNBN@radian
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-09-03 15:01:11 -07:00
Arnd Bergmann
cdcf626314 Arm SCMI updates for v6.12
Few main features include:
 
 1. SCMI transport as stand-alone drivers
 
     Currently the SCMI transport layer is being built embedded into in
     the core SCMI stack. Some of these transports, despite being currently
     part of the main SCMI module, are indeed also registered with different
     subsystems like optee or virtio, and actively probed also by those.
     This leads to a few awkward and convoluted tricks to properly handle
     such interactions at boot time in the SCMI stack.
 
     This change adds the new logic to the core SCMI stack so that each
     existing transport is transitioned to be a standi-alone driver. With
     that all the probe deferral and awkward retries between the SCMI
     core stack and the transports has been removed, since no more needed.
 
 2. Support for obtaining transport descriptors from the devicetree
 
     SCMI platform firmwares might have different designs depending on
     the platform. Some of the transport descriptors rely on such design.
     E.g. the maximum receive channel timeout value might vary depending
     on the specific underlying hardware and firmware design choices.
 
     This change adds support for max-rx-timeout-ms property to describe
     the transport needs of a specific platform design. It will be extended
     in the future to obtain other such hardware/firmware dependent
     transport related descriptors.
 
 3. NXP i.MX95 specific SCMI vendor protocol extensions
 
     SCMI specification allows vendor or platform-specific extensions to
     the interface. NXP i.MX95 System Manager(SM) that implements SCMI
     extends the interface to implement couple of vendor/platform specific
     protocol, namely:
     a. Battery Backed Module(BBM) Protocol
 
        This protocol is intended provide access to the battery-backed
        module. This contains persistent storage (GPR), an RTC, and the
        ON/OFF button. The protocol can also provide access to similar
        functions implemented via external board components.
 
     b. MISC Protocol for misc settings
 
         This includes controls that are misc settings/actions that must
 	be exposed from the SM to agents. They are device specific and
 	are usually define to access bit fields in various mix block
 	control modules, IOMUX_GPR, and other GPR/CSR owned by the SM.
 
 4. SCMI debug/tracking metrics
 
     Since SCMI involves interaction with the entity(software, firmware
     and/or hardware) providing services or features, it is quite useful
     to track certain metrics(for pure debugging purposes) like how many
     messages were sent or received, were there any failures, what kind
     of failures, ..etc. This feature adds support for the same via debugfs.
 
 Apart from these main features, there are some miscellaneous updates, fixes
 and cleanups.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEunHlEgbzHrJD3ZPhAEG6vDF+4pgFAmbRy5cACgkQAEG6vDF+
 4pimmRAAy+JMVqmgw33e9zvQ6mXsncTO2YXWYVgM3g+IypwpIwdPryUt9NA9xR8w
 BHc0hlsCVsLmww4epb5fnztqN7YmvP5NUQhe4ZNRE72Bak5fidThdsNhCOBtlt25
 WwK0447UglHU/aF8VT2ufRhnMYIJDixazsvz0vp7wJpIPbfuS7r2WZXzw8fBXizH
 oXiYZLsgcv2WAKY5Q9DQhfYzosYhp9BPNYSV2luyYPZNPUbal2WNoAp1tLOQaLNY
 a+vtgOiyZPvltFewWVTNk2q6EhSyuiA/qHlM2Lp3aVuscA+h7Wa+RjHFN1YQHw/b
 +hNmljDyUGDBsbNLR9EdmV2dutsLE3Sk0/4H5V+sXEuB+q2gaOUVfpsDW52o7LLW
 s6DCDX47/9t+7y0uaApQnzUlskJonEBGq1Qm1siNiCpRR6SbABjcXFl654Tu61dr
 bv31uEOjxYzqQXXsYdQvAIDAg1VSlUcyr4ITHMifj9mBZrQMvrizjlbpRGSOQsJv
 NNIxPcvEsCq07tHvD0sQqaNLZN/5VEVCqdNqGBDBsLCPDVKIqc2DxK2udUt8exVE
 WCHLJb+DT1Gd6eQ00KQKx8umJeXPLehtBCvBdlDTHPKZWrFenQFPkKZsnqeNuneS
 IDIdyfbWrMgalwzDTgOZWxDcydkxXKNhpn7k2x/BzWGGhwtfHSI=
 =fUHS
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmbVkXIACgkQYKtH/8kJ
 UicZlA//eDFRRTxL5MOHhVY5hpn8Sn0a59Wz0S1x+xy5WnGxxh6EMnyLGr8vxmGp
 FREvraghX0/ftPIvDMRD2WgR93R96Q0d10tmLf9Es7iG9WskXqNsWBkTijCdvst4
 1iEC/wSu8ab2HGhtoUIM1Wt9R+RlkS7UE0TPRzchGQTM9FdytVv9qECtX9JGi7Wn
 CvCgcFGifKyOzigm3a4kf3FPtB8Y/ggPLOoDyIHOlM8lrdGmDh5PXuzbeKMxwSt1
 YBZS4T5QaWvwaT8ZOraAMYjNN+PmiL587JbY9L+H+VwPV5VpoxlNmNo3wjkAb1q/
 hg4huRJlN7BvN1wTQtsnDpzt4VgnIDOh+RXJ/ulUKSGLQ3TosV88FFIGfAO+KTBP
 PaQI4taxcyhsnhl4ab040jumfUbeK8DHwCc1P/HsejYy6H9bmjwFV8WCbSZTNH6g
 if6fcGRYIzw8MzeqtTH1qjLwhqYt/iXUahHzzONWzskvzR/kPV1x/mSPQNVcJ51e
 rL6D485CjZh85pY7Pvn4+Ylur9uIe9wealipfSFzWlAgo57sTY6xrilO20UHnR6t
 n+202dPG8TAoDrpomLsF04rbuV4uhv0gWhtIyCzaJHYfgCUgAQvzniR2T6IaOTM3
 ks/SZ0j+sv65/KJd8rO1tZHwgEVwmDElRzO9CPF3pQxMrzKG5iw=
 =28qZ
 -----END PGP SIGNATURE-----

Merge tag 'scmi-updates-6.12' of https://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux into soc/drivers

Arm SCMI updates for v6.12

Few main features include:

1. SCMI transport as stand-alone drivers

    Currently the SCMI transport layer is being built embedded into in
    the core SCMI stack. Some of these transports, despite being currently
    part of the main SCMI module, are indeed also registered with different
    subsystems like optee or virtio, and actively probed also by those.
    This leads to a few awkward and convoluted tricks to properly handle
    such interactions at boot time in the SCMI stack.

    This change adds the new logic to the core SCMI stack so that each
    existing transport is transitioned to be a standi-alone driver. With
    that all the probe deferral and awkward retries between the SCMI
    core stack and the transports has been removed, since no more needed.

2. Support for obtaining transport descriptors from the devicetree

    SCMI platform firmwares might have different designs depending on
    the platform. Some of the transport descriptors rely on such design.
    E.g. the maximum receive channel timeout value might vary depending
    on the specific underlying hardware and firmware design choices.

    This change adds support for max-rx-timeout-ms property to describe
    the transport needs of a specific platform design. It will be extended
    in the future to obtain other such hardware/firmware dependent
    transport related descriptors.

3. NXP i.MX95 specific SCMI vendor protocol extensions

    SCMI specification allows vendor or platform-specific extensions to
    the interface. NXP i.MX95 System Manager(SM) that implements SCMI
    extends the interface to implement couple of vendor/platform specific
    protocol, namely:
    a. Battery Backed Module(BBM) Protocol

       This protocol is intended provide access to the battery-backed
       module. This contains persistent storage (GPR), an RTC, and the
       ON/OFF button. The protocol can also provide access to similar
       functions implemented via external board components.

    b. MISC Protocol for misc settings

        This includes controls that are misc settings/actions that must
	be exposed from the SM to agents. They are device specific and
	are usually define to access bit fields in various mix block
	control modules, IOMUX_GPR, and other GPR/CSR owned by the SM.

4. SCMI debug/tracking metrics

    Since SCMI involves interaction with the entity(software, firmware
    and/or hardware) providing services or features, it is quite useful
    to track certain metrics(for pure debugging purposes) like how many
    messages were sent or received, were there any failures, what kind
    of failures, ..etc. This feature adds support for the same via debugfs.

Apart from these main features, there are some miscellaneous updates, fixes
and cleanups.

* tag 'scmi-updates-6.12' of https://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux: (31 commits)
  rtc: support i.MX95 BBM RTC
  input: keyboard: support i.MX95 BBM module
  firmware: imx: Add i.MX95 MISC driver
  firmware: arm_scmi: Add initial support for i.MX MISC protocol
  firmware: arm_scmi: Add initial support for i.MX BBM protocol
  firmware: arm_scmi: Add NXP i.MX95 SCMI documentation
  dt-bindings: firmware: Add i.MX95 SCMI Extension protocol
  firmware: arm_scmi: Replace comma with the semicolon
  firmware: arm_scmi: Replace the use of of_node_put() to __free(device_node)
  firmware: arm_scmi: Fix trivial whitespace/coding style issues
  firmware: arm_scmi: Use max-rx-timeout-ms from devicetree
  dt-bindings: firmware: arm,scmi: Introduce property max-rx-timeout-ms
  firmware: arm_scmi: Remove const from transport descriptors
  firmware: arm_scmi: Simplify with scoped for each OF child loop
  firmware: arm_scmi: Update various protocols versions
  firmware: arm_scmi: Remove legacy transport-layer code
  firmware: arm_scmi: Make VirtIO transport a standalone driver
  firmware: arm_scmi: Make OPTEE transport a standalone driver
  firmware: arm_scmi: Make SMC transport a standalone driver
  firmware: arm_scmi: Make MBOX transport a standalone driver
  ...

Link: https://lore.kernel.org/r/20240830135918.2383664-1-sudeep.holla@arm.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2024-09-02 10:20:34 +00:00
Linus Walleij
dac973838b Input: zinitix - varying icon status registers
The different revisions of the Zinitix BTXXX touchscreens place
the icon status register (to read out touchkey status) in
different places. Use the chip revision bits to discern
between the different versions at runtime.

This makes touchkeys work on the BT404 on the Samsung Codina
GT-I8160 mobile phone.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20240830-zinitix-tk-versions-v2-2-90eae6817eda@linaro.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-08-31 19:12:26 -07:00
Linus Walleij
5278bb4cd6 Input: zinitix - read and cache device version numbers
The chip hardware revision, firmware version and regdata
revision is needed to discern because for example touchkeys
are handled by different registers on different versions of
the chip. Example output from BT404:

Zinitix-TS 3-0020: chip revision 4040 firmware version 0088
  regdata version 0004

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20240830-zinitix-tk-versions-v2-1-90eae6817eda@linaro.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-08-31 19:05:47 -07:00