Commit Graph

5577 Commits

Author SHA1 Message Date
Al Viro
5f60d5f6bb move asm/unaligned.h to linux/unaligned.h
asm/unaligned.h is always an include of asm-generic/unaligned.h;
might as well move that thing to linux/unaligned.h and include
that - there's nothing arch-specific in that header.

auto-generated by the following:

for i in `git grep -l -w asm/unaligned.h`; do
	sed -i -e "s/asm\/unaligned.h/linux\/unaligned.h/" $i
done
for i in `git grep -l -w asm-generic/unaligned.h`; do
	sed -i -e "s/asm-generic\/unaligned.h/linux\/unaligned.h/" $i
done
git mv include/asm-generic/unaligned.h include/linux/unaligned.h
git mv tools/include/asm-generic/unaligned.h tools/include/linux/unaligned.h
sed -i -e "/unaligned.h/d" include/asm-generic/Kbuild
sed -i -e "s/__ASM_GENERIC/__LINUX/" include/linux/unaligned.h tools/include/linux/unaligned.h
2024-10-02 17:23:23 -04:00
Linus Torvalds
b0a53b4f3f - Added support for the Analog Devices ADP5585 GPIO and PWM functions.
- Added parsing of GPIO hogs for the ADP5585.
 - Fixed module autoloading in the MAX14577 driver.
 - Simplified and cleaned up the CROS_EC driver.
 - Made the Lenovo Yoga Tab 3 X90F DMI match less strict in the INTEL_SOC_PMIC_CHTWC driver.
 - Added support for the RK806 PMIC on the I2C bus.
 - Removed the remaining header file for the DS1WM driver.
 - Added compatible strings for various devices in the device tree bindings.
 - Fixed a comma-related issue in the 88PM860X_CORE driver.
 - Constified read-only regmap structs in various drivers.
 - Used scoped variables with memory allocators to simplify error paths in the MT6360 and SYSCON drivers.
 - Added Intel Arrow Lake-H and Panther Lake LPSS PCI IDs.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEdrbJNaO+IJqU8IdIUa+KL4f8d2EFAmbxjKgACgkQUa+KL4f8
 d2HO3A//Vj7h1R6noTl9Zc3fDzFvoTCnsPsIuH52AQHnk7E2ReCFbRwQeXW/aOTa
 QtvY+0LxYnhd/wUzS9ER4zQo5AP+mAk5OAb7oVnR6nL/RJdbWh+0tFu89YYn2oWi
 YeKxPA/SoD6wRnHFf7x2NXc12nbvNVJ7Yc5C8PALB+K41d2o6hs5dgn9DBe2kExY
 pn1FH/EMv2czg5B5PEDteOXcTEV+Q//hhNfBpeRbmF/qEIAIA/ZTDeKaFe2LOfEq
 z144v8m8TcJBwxXSg1KQhEyYdTcz+DtbIJ6YWr7ehllhXq/QPrlLIj0XBtgmPclm
 PaeOQFT007C/oFERSPA4+szwJFnOjkapE/ui5BwQ8BuXfvtp7IxwU8tHJHqO01bb
 ut/sVNtQcTZ9KplVa1m1JTKPKeoTWlfpo4B/2SMsnvDLKrvPQXtuFAKYSzusZWX0
 oJtXGuSEJMQ/27jyxn209VDhdtAPIgLnFFxnoXoIOW7n2sTfeP4AjTFHUIzD2x/u
 ufxUQCM9hNvAz3nYEtdxSh2EVf0bY+Lzu318ce3Hpa/LgFRLH8lqL1IsO1C9ljF7
 uPauDrDQCGmGEPD9x8bR4zRaEUj5qFTfeJHmbwh7xqjqzH9JKMiV6OMbAw2lHP9B
 D0KmsDEcQiU76uuBwRuqXonOfFqGmPGeYvluXXNbeM8st8H8Y34=
 =WuEO
 -----END PGP SIGNATURE-----

Merge tag 'mfd-next-6.12' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd

Pull MFD updates from Lee Jones:

 - Added support for the Analog Devices ADP5585 GPIO and PWM functions

 - Added parsing of GPIO hogs for the ADP5585

 - Fixed module autoloading in the MAX14577 driver

 - Simplified and cleaned up the CROS_EC driver

 - Made the Lenovo Yoga Tab 3 X90F DMI match less strict in the
   INTEL_SOC_PMIC_CHTWC driver

 - Added support for the RK806 PMIC on the I2C bus

 - Removed the remaining header file for the DS1WM driver

 - Added compatible strings for various devices in the device tree
   bindings

 - Fixed a comma-related issue in the 88PM860X_CORE driver

 - Constified read-only regmap structs in various drivers

 - Used scoped variables with memory allocators to simplify error paths
   in the MT6360 and SYSCON drivers

 - Added Intel Arrow Lake-H and Panther Lake LPSS PCI IDs

* tag 'mfd-next-6.12' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: (44 commits)
  mfd: atc260x: Convert a bunch of commas to semicolons
  dt-bindings: mfd: qcom,tcsr: Add compatible for sa8775p
  mfd: intel-lpss: Add Intel Panther Lake LPSS PCI IDs
  mfd: intel-lpss: Add Intel Arrow Lake-H LPSS PCI IDs
  dt-bindings: mfd: syscon: Add rk3576 QoS register compatible
  dt-bindings: mfd: adp5585: Add parsing of hogs
  mfd: tc3589x: Drop vendorless compatible string from match table
  mfd: qcom-spmi-pmic: Use for_each_child_of_node_scoped()
  mfd: max77620: Use for_each_child_of_node_scoped()
  mfd: intel_soc_pmic_chtwc: Make Lenovo Yoga Tab 3 X90F DMI match less strict
  mfd: cros_ec: Update module description
  mfd: cros_ec: Simplify and clean-up cros_ec_dev_init()
  mfd: max14577: Provide MODULE_DEVICE_TABLE() to fix module autoloading
  mfd: rk8xx: Add support for rk806 on i2c bus
  dt-bindings: mfd: syscon: Add ti,j784s4-acspcie-proxy-ctrl compatible
  mfd: ds1wm: Remove remaining header file
  MAINTAINERS: Repair file entry in MARVELL 88PM886 PMIC DRIVER
  mfd: 88pm860x-core: Convert comma to semicolon
  mfd: syscon: Use scoped variables with memory allocators to simplify error paths
  mfd: mt6360: Use scoped variables with memory allocators to simplify error paths
  ...
2024-09-23 14:17:08 -07:00
Chen Ni
91dba615c3 mfd: atc260x: Convert a bunch of commas to semicolons
Replace a comma between expression statements by a semicolon.

Signed-off-by: Chen Ni <nichen@iscas.ac.cn>
Reviewed-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
Link: https://lore.kernel.org/r/20240902085019.4111445-1-nichen@iscas.ac.cn
Signed-off-by: Lee Jones <lee@kernel.org>
2024-09-23 16:20:55 +01:00
Ilpo Järvinen
db6a186505 mfd: intel-lpss: Add Intel Panther Lake LPSS PCI IDs
Add Intel Panther Lake-H/P PCI IDs.

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20240829095719.1557-3-ilpo.jarvinen@linux.intel.com
Signed-off-by: Lee Jones <lee@kernel.org>
2024-09-23 16:20:54 +01:00
Ilpo Järvinen
6112597f5b mfd: intel-lpss: Add Intel Arrow Lake-H LPSS PCI IDs
Add Intel Arrow Lake-H PCI IDs.

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20240829095719.1557-2-ilpo.jarvinen@linux.intel.com
Signed-off-by: Lee Jones <lee@kernel.org>
2024-09-23 16:20:54 +01:00
Rob Herring (Arm)
04bb1800e6 mfd: tc3589x: Drop vendorless compatible string from match table
There's no need to list "tc3589x" in the DT match table. The I2C core
will strip any vendor prefix and match against the i2c_device_id table
which has an "tc3589x" entry.

Probably "tc3589x" and TC3589X_UNKNOWN could be removed altogether.
Use of that compatible was only on some STE platforms and was dropped
in 2013. There were ABI breaks in 2014 claiming no DTs in the wild. See
commit 1637d480f8 ("pinctrl: nomadik: force-convert to generic config
bindings").

Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
Link: https://lore.kernel.org/r/20240826191300.1410222-1-robh@kernel.org
Signed-off-by: Lee Jones <lee@kernel.org>
2024-09-23 16:20:54 +01:00
Jinjie Ruan
015d188002 mfd: qcom-spmi-pmic: Use for_each_child_of_node_scoped()
Avoids the need for manual cleanup of_node_put() in early exits
from the loop.

Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com>
Link: https://lore.kernel.org/r/20240826092734.2899562-3-ruanjinjie@huawei.com
Signed-off-by: Lee Jones <lee@kernel.org>
2024-09-23 16:20:54 +01:00
Jinjie Ruan
0db28e963a mfd: max77620: Use for_each_child_of_node_scoped()
Avoids the need for manual cleanup of_node_put() in early exits
from the loop.

Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com>
Link: https://lore.kernel.org/r/20240826092734.2899562-2-ruanjinjie@huawei.com
Signed-off-by: Lee Jones <lee@kernel.org>
2024-09-23 16:20:54 +01:00
Hans de Goede
ae7eee56cd mfd: intel_soc_pmic_chtwc: Make Lenovo Yoga Tab 3 X90F DMI match less strict
There are 2G and 4G RAM versions of the Lenovo Yoga Tab 3 X90F and it
turns out that the 2G version has a DMI product name of
"CHERRYVIEW D1 PLATFORM" where as the 4G version has
"CHERRYVIEW C0 PLATFORM". The sys-vendor + product-version check are
unique enough that the product-name check is not necessary.

Drop the product-name check so that the existing DMI match for the 4G
RAM version also matches the 2G RAM version.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Andy Shevchenko <andy@kernel.org>
Link: https://lore.kernel.org/r/20240825132617.8809-1-hdegoede@redhat.com
Signed-off-by: Lee Jones <lee@kernel.org>
2024-09-23 16:20:54 +01:00
Tzung-Bi Shih
fd0fec405d mfd: cros_ec: Update module description
The module description can be backtracked to commit e7c256fbfb
("platform/chrome: Add Chrome OS EC userspace device interface").

The description became out-of-date after a bunch of changes e.g:

- commit 5668bfdd90 ("platform/chrome: cros_ec_dev - Register cros-ec sensors").
- commit ea01a31b90 ("cros_ec: Split cros_ec_devs module").
- commit 5e0115581b ("cros_ec: Move cros_ec_dev module to drivers/mfd").

Update the description.

Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
Link: https://lore.kernel.org/r/20240822121539.4265-1-tzungbi@kernel.org
Signed-off-by: Lee Jones <lee@kernel.org>
2024-09-23 16:20:53 +01:00
Tzung-Bi Shih
dc98e25bc3 mfd: cros_ec: Simplify and clean-up cros_ec_dev_init()
Simplify cros_ec_dev_init() by the following changes:
- Get rid of label `failed_devreg`.
- Remove a redundant space and comment.
- Use `if (ret)` instead of `if (ret < 0)`.

Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
Link: https://lore.kernel.org/r/20240819102326.5235-1-tzungbi@kernel.org
Signed-off-by: Lee Jones <lee@kernel.org>
2024-09-23 16:20:53 +01:00
Liao Chen
607638b73c mfd: max14577: Provide MODULE_DEVICE_TABLE() to fix module autoloading
Add MODULE_DEVICE_TABLE(), so modules could be properly autoloaded
based on the alias from of_device_id table.

Signed-off-by: Liao Chen <liaochen4@huawei.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20240814025710.3875859-1-liaochen4@huawei.com
Signed-off-by: Lee Jones <lee@kernel.org>
2024-09-23 16:20:53 +01:00
Detlev Casanova
6fc9bb82a3 mfd: rk8xx: Add support for rk806 on i2c bus
The ArmSoM Sige 5 board connects the rk806 PMIC on an i2c bus.

Signed-off-by: Detlev Casanova <detlev.casanova@collabora.com>
Link: https://lore.kernel.org/r/20240802134736.283851-1-detlev.casanova@collabora.com
Signed-off-by: Lee Jones <lee@kernel.org>
2024-09-23 16:20:53 +01:00
Linus Torvalds
84bbfe6b64 platform-drivers-x86 for v6.12-1
Highlights:
  -  asus-wmi: Add support for vivobook fan profiles
  -  dell-laptop: Add knobs to change battery charge settings
  -  lg-laptop: Add operation region support
  -  intel-uncore-freq: Add support for efficiency latency control
  -  intel/ifs: Add SBAF test support
  -  intel/pmc: Ignore all LTRs during suspend
  -  platform/surface: Support for arm64 based Surface devices
  -  wmi: Pass event data directly to legacy notify handlers
  -  x86/platform/geode: switch GPIO buttons and LEDs to software properties
  -  bunch of small cleanups, fixes, hw-id additions, etc.
 
 The following is an automated git shortlog grouped by driver:
 
 Documentation:
  -  admin-guide: pm: Add efficiency vs. latency tradeoff to uncore documentation
 
 ISST:
  -  Simplify isst_misc_reg() and isst_misc_unreg()
 
 MAINTAINERS:
  -  adjust file entry in INTEL MID PLATFORM
  -  Add Intel MID section
 
 Merge tag 'hwmon-for-v6.11-rc7' into review-hans:
  - Merge tag 'hwmon-for-v6.11-rc7' into review-hans
 
 Merge tag 'platform-drivers-x86-v6.11-3' into review-hans:
  - Merge tag 'platform-drivers-x86-v6.11-3' into review-hans
 
 acer-wmi:
  -  Use backlight power constants
 
 asus-laptop:
  -  Use backlight power constants
 
 asus-nb-wmi:
  -  Use backlight power constants
 
 asus-wmi:
  -  don't fail if platform_profile already registered
  -  add debug print in more key places
  -  Use backlight power constants
  -  add support for vivobook fan profiles
 
 dell-laptop:
  -  remove duplicate code w/ battery function
  -  Add knobs to change battery charge settings
 
 dt-bindings:
  -  platform: Add Surface System Aggregator Module
  -  serial: Allow embedded-controller as child node
 
 eeepc-laptop:
  -  Use backlight power constants
 
 eeepc-wmi:
  -  Use backlight power constants
 
 fujitsu-laptop:
  -  Use backlight power constants
 
 hid-asus:
  -  use hid for brightness control on keyboard
 
 ideapad-laptop:
  -  Make the scope_guard() clear of its scope
  -  move ACPI helpers from header to source file
  -  Use backlight power constants
 
 int3472:
  -  Use str_high_low()
  -  Use GPIO_LOOKUP() macro
  -  make common part a separate module
 
 intel-hid:
  -  Use string_choices API instead of ternary operator
 
 intel/pmc:
  -  Ignore all LTRs during suspend
  -  Remove unused param idx from pmc_for_each_mode()
 
 intel_scu_ipc:
  -  Move intel_scu_ipc.h out of arch/x86/include/asm
 
 intel_scu_wdt:
  -  Move intel_scu_wdt.h to x86 subfolder
 
 lenovo-ymc:
  -  Ignore the 0x0 state
 
 lg-laptop:
  -  Add operation region support
 
 oaktrail:
  -  Use backlight power constants
 
 panasonic-laptop:
  -  Add support for programmable buttons
 
 platform/mellanox:
  -  mlxbf-pmc: fix lockdep warning
 
 platform/olpc:
  -  Remove redundant null pointer checks in olpc_ec_setup_debugfs()
 
 platform/surface:
  -  Add OF support
 
 platform/x86/amd:
  -  pmf: Add quirk for TUF Gaming A14
 
 platform/x86/amd/pmf:
  -  Update SMU metrics table for 1AH family series
  -  Relocate CPU ID macros to the PMF header
  -  Add support for notifying Smart PC Solution updates
 
 platform/x86/intel-uncore-freq:
  -  Add efficiency latency control to sysfs interface
  -  Add support for efficiency latency control
  -  Do not present separate package-die domain
 
 platform/x86/intel/ifs:
  -  Fix SBAF title underline length
  -  Add SBAF test support
  -  Add SBAF test image loading support
  -  Refactor MSR usage in IFS test code
 
 platform/x86/intel/pmc:
  -  Show live substate requirements
 
 platform/x86/intel/pmt:
  -  Use PMT callbacks
 
 platform/x86/intel/vsec:
  -  Add PMT read callbacks
 
 platform/x86/intel/vsec.h:
  -  Move to include/linux
 
 samsung-laptop:
  -  Use backlight power constants
 
 serial-multi-instantiate:
  -  Don't require both I2C and SPI
 
 thinkpad_acpi:
  -  Fix uninitialized symbol 's' warning
  -  Add Thinkpad Edge E531 fan support
 
 touchscreen_dmi:
  -  add nanote-next quirk
 
 trace:
  -  platform/x86/intel/ifs: Add SBAF trace support
 
 wmi:
  -  Call both legacy and WMI driver notify handlers
  -  Merge get_event_data() with wmi_get_notify_data()
  -  Remove wmi_get_event_data()
  -  Pass event data directly to legacy notify handlers
 
 x86-android-tablets:
  -  Adjust Xiaomi Pad 2 bottom bezel touch buttons LED
  -  Fix spelling in the comments
 
 x86/platform/geode:
  -  switch GPIO buttons and LEDs to software properties
 -----BEGIN PGP SIGNATURE-----
 
 iQFIBAABCAAyFiEEuvA7XScYQRpenhd+kuxHeUQDJ9wFAmbq2tYUHGhkZWdvZWRl
 QHJlZGhhdC5jb20ACgkQkuxHeUQDJ9xKYAgAoXZt1MjBDA1mP813i4bj8CYQHWO+
 YnugVhEccucxgC6sBGzQeRLBNuG/VaBN6tyJ1pKYMpWV5gSthq1Iop+DZbno2ciM
 QAnSSzioHB/dhYBXuKmZatkMsKLjLjtfcexUed9DfwKapqFl3XQMb6cEYasM37hH
 197K4yAFF3oqQImlACwQDxN1q3eCG6bdIbEAByZW7yH644IC5zH8/CiFjTCwUx/F
 aFIHQlLLzt1kjhD8AbRHhRcsGbzG2ejHsC3yrQddEJSOkInDO8baR0aDyhBTUFPE
 lztuekFfaJ1Xcyoc/Zf4pi3ab1Djt+Htck3CHLO/xcl0YYMlM5vcs1QlhQ==
 =sAk7
 -----END PGP SIGNATURE-----

Merge tag 'platform-drivers-x86-v6.12-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86

Pull x86 platform drivers updates from Hans de Goede:

 - asus-wmi: Add support for vivobook fan profiles

 - dell-laptop: Add knobs to change battery charge settings

 - lg-laptop: Add operation region support

 - intel-uncore-freq: Add support for efficiency latency control

 - intel/ifs: Add SBAF test support

 - intel/pmc: Ignore all LTRs during suspend

 - platform/surface: Support for arm64 based Surface devices

 - wmi: Pass event data directly to legacy notify handlers

 - x86/platform/geode: switch GPIO buttons and LEDs to software
   properties

 - bunch of small cleanups, fixes, hw-id additions, etc.

* tag 'platform-drivers-x86-v6.12-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86: (65 commits)
  MAINTAINERS: adjust file entry in INTEL MID PLATFORM
  platform/x86: x86-android-tablets: Adjust Xiaomi Pad 2 bottom bezel touch buttons LED
  platform/mellanox: mlxbf-pmc: fix lockdep warning
  platform/x86/amd: pmf: Add quirk for TUF Gaming A14
  platform/x86: touchscreen_dmi: add nanote-next quirk
  platform/x86: asus-wmi: don't fail if platform_profile already registered
  platform/x86: asus-wmi: add debug print in more key places
  platform/x86: intel_scu_wdt: Move intel_scu_wdt.h to x86 subfolder
  platform/x86: intel_scu_ipc: Move intel_scu_ipc.h out of arch/x86/include/asm
  MAINTAINERS: Add Intel MID section
  platform/x86: panasonic-laptop: Add support for programmable buttons
  platform/olpc: Remove redundant null pointer checks in olpc_ec_setup_debugfs()
  platform/x86: intel/pmc: Ignore all LTRs during suspend
  platform/x86: wmi: Call both legacy and WMI driver notify handlers
  platform/x86: wmi: Merge get_event_data() with wmi_get_notify_data()
  platform/x86: wmi: Remove wmi_get_event_data()
  platform/x86: wmi: Pass event data directly to legacy notify handlers
  platform/x86: thinkpad_acpi: Fix uninitialized symbol 's' warning
  platform/x86: x86-android-tablets: Fix spelling in the comments
  platform/x86: ideapad-laptop: Make the scope_guard() clear of its scope
  ...
2024-09-19 09:16:04 +02:00
Linus Torvalds
cc52dc2fe3 pwm: Changes for v6.12-rc1
This pull request contains some cleanups to the core and some mostly
 minor updates to a bunch of drivers and device tree bindings. One thing
 worth pointing out is that it contains an immutable branch containing
 support for a new mfd chip (Analog Devices ADP5585) with several sub
 drivers. So expect to get the four affected commits also from my fellow
 MFD and GPIO maintainers.
 
 Thanks go to Andrew Kreimer, Clark Wang, Conor Dooley, David Lechner,
 Dmitry Rokosov, Frank Li, Geert Uytterhoeven, George Stark, Jiapeng
 Chong, Krzysztof Kozlowski, Laurent Pinchart, Liao Chen, Liu Ying, Rob
 Herring and Wolfram Sang for code contributions and reviews and to Lee
 Jones for preparing the above mentioned immutable branch.
 -----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCgAdFiEEP4GsaTp6HlmJrf7Tj4D7WH0S/k4FAmboM3AACgkQj4D7WH0S
 /k6IzQgAj+3B4F4UKPPI8jcQqRQGOWfjA365nIQmr1oeFYSGDILv4btU1TNV1MfH
 WLXMRXLQb4dng21J8IwIJ/qyndL+GjRj3KWxLHJa3+/gxf8YuGwWJlNjlxtrGXM/
 3JQ/aWqfgCf4KTRG3MoCTKc5fxtbHHWZ71kGdi6cchk1HggyBUH/7g85h/VkhCuc
 JpOC7CvDVmzTkTIltCbiVJQ4xO3zmsV2WgnsWUzN+41PUjqJmMLmhKjI6UdAYWlI
 B3qgCMXik153oYgaIw/BMtxFWa9e2ZxZ6hV+gx4tVQWbOtBPUxEqHpX2dt1fp5+h
 7PQoKVWJycykdxmlOSGnjOl3RHVX5A==
 =VjPD
 -----END PGP SIGNATURE-----

Merge tag 'pwm/for-6.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/ukleinek/linux

Pull pwm updates from Uwe Kleine-König:
 "This contains some cleanups to the core and some mostly minor updates
  to a bunch of drivers and device tree bindings. One thing worth
  pointing out is that it contains an immutable branch containing
  support for a new mfd chip (Analog Devices ADP5585) with several sub
  drivers.

  Thanks go to Andrew Kreimer, Clark Wang, Conor Dooley, David Lechner,
  Dmitry Rokosov, Frank Li, Geert Uytterhoeven, George Stark, Jiapeng
  Chong, Krzysztof Kozlowski, Laurent Pinchart, Liao Chen, Liu Ying, Rob
  Herring and Wolfram Sang for code contributions and reviews and to Lee
  Jones for preparing the above mentioned immutable branch"

* tag 'pwm/for-6.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/ukleinek/linux: (21 commits)
  pwm: stm32: Fix a typo
  dt-bindings: pwm: amlogic: Add new bindings for meson A1 PWM
  dt-bindings: pwm: amlogic: Add optional power-domains
  pwm: Switch back to struct platform_driver::remove()
  dt-bindings: pwm: allwinner,sun4i-a10-pwm: add top-level constraints
  pwm: axi-pwmgen: use shared macro for version reg
  pwm: atmel-hlcdc: Drop trailing comma
  pwm: atmel-hlcdc: Enable module autoloading
  pwm: omap-dmtimer: Use of_property_read_bool()
  pwm: adp5585: Set OSC_EN bit to 1 when PWM state is enabled
  pwm: lp3943: Fix an incorrect type in lp3943_pwm_parse_dt()
  pwm: Simplify pwm_capture()
  pwm: lp3943: Use of_property_count_u32_elems() to get property length
  pwm: Don't export pwm_capture()
  pwm: Make info in traces about affected pwm more useful
  dt-bindings: pwm: renesas,tpu: Add r8a779h0 support
  dt-bindings: pwm: renesas,pwm-rcar: Add r8a779h0 support
  pwm: adp5585: Add Analog Devices ADP5585 support
  gpio: adp5585: Add Analog Devices ADP5585 support
  mfd: adp5585: Add Analog Devices ADP5585 core support
  ...
2024-09-18 10:39:35 +02:00
Mika Westerberg
c912ac66b3 platform/x86: intel_scu_ipc: Move intel_scu_ipc.h out of arch/x86/include/asm
This is a platform/x86 library that is mostly being used by other
drivers not directly under arch/x86 anyway (with the exception of the
Intel MID setup code) so it makes sense that it lives under the
platform_data/x86/ directory instead.

No functional changes intended.

Suggested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20240909124952.1152017-3-andriy.shevchenko@linux.intel.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2024-09-11 14:26:03 +02:00
Chen Ni
62432c2b2e mfd: 88pm860x-core: Convert comma to semicolon
Replace a comma between expression statements by a semicolon.

Signed-off-by: Chen Ni <nichen@iscas.ac.cn>
Link: https://lore.kernel.org/r/20240709031824.585922-1-nichen@iscas.ac.cn
Signed-off-by: Lee Jones <lee@kernel.org>
2024-08-30 09:40:13 +01:00
Krzysztof Kozlowski
82f898f471 mfd: syscon: Use scoped variables with memory allocators to simplify error paths
Allocate the memory with scoped/cleanup.h to reduce error handling and
make the code a bit simpler.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20240707114823.9175-2-krzysztof.kozlowski@linaro.org
Signed-off-by: Lee Jones <lee@kernel.org>
2024-08-30 09:40:13 +01:00
Krzysztof Kozlowski
4194783812 mfd: mt6360: Use scoped variables with memory allocators to simplify error paths
Allocate the memory with scoped/cleanup.h to reduce error handling and
make the code a bit simpler.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20240707114823.9175-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Lee Jones <lee@kernel.org>
2024-08-30 09:40:13 +01:00
Javier Carrasco
691277c90c mfd: sprd-sc27xx-spi: Constify struct regmap_bus
`sprd_pmic_regmap` is not modified and can be declared as const to
move its data to a read-only section.

Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
Reviewed-by: Baolin Wang <baolin.wang@linux.alibaba.com>
Link: https://lore.kernel.org/r/20240704-mfd-const-regmap_config-v2-24-0c8785b1331d@gmail.com
Signed-off-by: Lee Jones <lee@kernel.org>
2024-08-30 09:40:13 +01:00
Javier Carrasco
ef29932370 mfd: mc13xxx-spi: Constify struct regmap_bus
`regmap_mc13xxx_bus` is not modified and can be declared as const to
move its data to a read-only section.

Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
Link: https://lore.kernel.org/r/20240704-mfd-const-regmap_config-v2-23-0c8785b1331d@gmail.com
Signed-off-by: Lee Jones <lee@kernel.org>
2024-08-30 09:40:13 +01:00
Javier Carrasco
9bc6a6bb9f mfd: gateworks-gsc: Constify struct regmap_bus
`gsc_regmap_bus` is not modified and can be declared as const to
move its data to a read-only section.

Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
Link: https://lore.kernel.org/r/20240704-mfd-const-regmap_config-v2-22-0c8785b1331d@gmail.com
Signed-off-by: Lee Jones <lee@kernel.org>
2024-08-30 09:40:13 +01:00
Javier Carrasco
3062ba3a4e mfd: twl6040: Constify struct regmap_irq_chip
`twl6040_irq_chip` is not modified and can be declared as const to
move its data to a read-only section.

Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
Link: https://lore.kernel.org/r/20240704-mfd-const-regmap_config-v2-21-0c8785b1331d@gmail.com
Signed-off-by: Lee Jones <lee@kernel.org>
2024-08-30 09:40:12 +01:00
Javier Carrasco
339a3bade9 mfd: tps65912: Constify struct regmap_irq_chip
`tps65912_irq_chip` is not modified and can be declared as const to
move its data to a read-only section.

Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
Link: https://lore.kernel.org/r/20240704-mfd-const-regmap_config-v2-20-0c8785b1331d@gmail.com
Signed-off-by: Lee Jones <lee@kernel.org>
2024-08-30 09:40:12 +01:00
Javier Carrasco
9544cc6552 mfd: tps65910: Constify struct regmap_irq_chip
`tps65910_irq_chip` and `tps65911_irq_chip` are not modified and can be
declared as const to move their data to a read-only section.

The pointer used to reference those structs has also been converted to
const.

Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
Link: https://lore.kernel.org/r/20240704-mfd-const-regmap_config-v2-19-0c8785b1331d@gmail.com
Signed-off-by: Lee Jones <lee@kernel.org>
2024-08-30 09:40:12 +01:00
Javier Carrasco
36b6675f78 mfd: tps65219: Constify read-only regmap structs
`tps65219_irqs` and `tps65219_irq_chip` are not modified and can
be declared as const to move their data to a read-only section.

Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
Link: https://lore.kernel.org/r/20240704-mfd-const-regmap_config-v2-18-0c8785b1331d@gmail.com
Signed-off-by: Lee Jones <lee@kernel.org>
2024-08-30 09:40:12 +01:00
Javier Carrasco
687d1a4c0d mfd: tps65218: Constify struct regmap_irq_chip
`tps65218_irq_chip` is not modified and can be declared as const to
move its data to a read-only section.

Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
Link: https://lore.kernel.org/r/20240704-mfd-const-regmap_config-v2-17-0c8785b1331d@gmail.com
Signed-off-by: Lee Jones <lee@kernel.org>
2024-08-30 09:40:12 +01:00
Javier Carrasco
ee96750749 mfd: tps65090: Constify struct regmap_irq_chip
`tps65090_irq_chip` is not modified and can be declared as const to
move its data to a read-only section.

Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
Link: https://lore.kernel.org/r/20240704-mfd-const-regmap_config-v2-16-0c8785b1331d@gmail.com
Signed-off-by: Lee Jones <lee@kernel.org>
2024-08-30 09:40:12 +01:00
Javier Carrasco
d6357e2d1d mfd: tps65086: Constify struct regmap_irq_chip
`tps65086_irq_chip` is not modified and can be declared as const to
move its data to a read-only section.

Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
Link: https://lore.kernel.org/r/20240704-mfd-const-regmap_config-v2-15-0c8785b1331d@gmail.com
Signed-off-by: Lee Jones <lee@kernel.org>
2024-08-30 09:40:12 +01:00
Javier Carrasco
7206d72109 mfd: rohm-bd718x7: Constify struct regmap_irq_chip
`bd718xx_irq_chip` is not modified and can be declared as const to
move its data to a read-only section.

Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
Reviewed-by: Matti Vaittinen <mazziesaccount@gmail.com>
Link: https://lore.kernel.org/r/20240704-mfd-const-regmap_config-v2-14-0c8785b1331d@gmail.com
Signed-off-by: Lee Jones <lee@kernel.org>
2024-08-30 09:40:12 +01:00
Javier Carrasco
a8c4b0c469 mfd: rohm-bd71828: Constify read-only regmap structs
The regmap_irq and regmap_irq_chip structs are not modified and can be
declared as const to move their data to a read-only section.

Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
Reviewed-by: Matti Vaittinen <mazziesaccount@gmail.com>
Link: https://lore.kernel.org/r/20240704-mfd-const-regmap_config-v2-13-0c8785b1331d@gmail.com
Signed-off-by: Lee Jones <lee@kernel.org>
2024-08-30 09:40:12 +01:00
Javier Carrasco
6e2a75bdf8 mfd: rk8xx-core: Constify struct regmap_irq_chip
The regmap_irq_chip structs are not modified and can be declared as
const to move their data to a read-only section.

Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
Link: https://lore.kernel.org/r/20240704-mfd-const-regmap_config-v2-12-0c8785b1331d@gmail.com
Signed-off-by: Lee Jones <lee@kernel.org>
2024-08-30 09:40:12 +01:00
Javier Carrasco
5af1a4caa7 mfd: retu: Constify read-only regmap structs
The regmap_bus, regmap_irq and regmap_irq_chip structs are not modified
and can be declared as const to move their data to a read-only section.

The pointer to reference the regmap_irq_chip structs has been converted
to const.

Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
Link: https://lore.kernel.org/r/20240704-mfd-const-regmap_config-v2-11-0c8785b1331d@gmail.com
Signed-off-by: Lee Jones <lee@kernel.org>
2024-08-30 09:40:12 +01:00
Javier Carrasco
a3cf8baf24 mfd: intel_soc_pmic_bxtwc: Constify struct regmap_irq_chip
The regmap_irq_chip structs are not modified and can be declared as
const to move their data to a read-only section.

Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
Link: https://lore.kernel.org/r/20240704-mfd-const-regmap_config-v2-10-0c8785b1331d@gmail.com
Signed-off-by: Lee Jones <lee@kernel.org>
2024-08-30 09:40:11 +01:00
Javier Carrasco
657eb79a1c mfd: bd9571mwv: Constify struct regmap_irq_chip
`bd9571mwv_irq_chip` and `bd9574mwf_irq_chip` are not modified and can
be declared as const to move their data to a read-only section.

Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
Reviewed-by: Matti Vaittinen <mazziesaccount@gmail.com>
Link: https://lore.kernel.org/r/20240704-mfd-const-regmap_config-v2-9-0c8785b1331d@gmail.com
Signed-off-by: Lee Jones <lee@kernel.org>
2024-08-30 09:40:11 +01:00
Javier Carrasco
2a9f8995f7 mfd: 88pm80x: Constify read-only regmap structs
`pm800_irq`, `pm805_irq` and `pm805_irq_chip` are not modified and can
be declared as const to move their data to a read-only section.

In order to keep the const modifier for the regmap_irq_chip structures,
the pointer used to reference them must be converted to const as well.

Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
Link: https://lore.kernel.org/r/20240704-mfd-const-regmap_config-v2-8-0c8785b1331d@gmail.com
Signed-off-by: Lee Jones <lee@kernel.org>
2024-08-30 09:40:11 +01:00
Javier Carrasco
9842c62162 mfd: intel-m10-bmc: Constify struct regmap_config
`m10bmc_pmci_regmap_config` and `intel_m10bmc_regmap_config` are not
modified and can be declared as const to move their data to a
read-only section.

Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
Link: https://lore.kernel.org/r/20240704-mfd-const-regmap_config-v2-7-0c8785b1331d@gmail.com
Signed-off-by: Lee Jones <lee@kernel.org>
2024-08-30 09:40:11 +01:00
Javier Carrasco
c3bd9a0fb6 mfd: rohm-bd9576: Constify read-only regmap structs
`bd957x_regmap`, `bd9576_irqs` and `bd9576_irq_chip` are not modified
and can be declared as const to move its data to a read-only section.

Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
Reviewed-by: Matti Vaittinen <mazziesaccount@gmail.com>
Link: https://lore.kernel.org/r/20240704-mfd-const-regmap_config-v2-6-0c8785b1331d@gmail.com
Signed-off-by: Lee Jones <lee@kernel.org>
2024-08-30 09:40:11 +01:00
Javier Carrasco
9a17090de5 mfd: tps6105x: Constify struct regmap_config
`tps6105x_regmap_config` is not modified and can be declared as const
to move its data to a read-only section.

Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
Link: https://lore.kernel.org/r/20240704-mfd-const-regmap_config-v2-5-0c8785b1331d@gmail.com
Signed-off-by: Lee Jones <lee@kernel.org>
2024-08-30 09:40:11 +01:00
Javier Carrasco
e8b4dd69cf mfd: wcd934x: Constify struct regmap_config
`wcd934x_regmap_config` is not modified and can be declared as const
to move its data to a read-only section.

Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
Link: https://lore.kernel.org/r/20240704-mfd-const-regmap_config-v2-4-0c8785b1331d@gmail.com
Signed-off-by: Lee Jones <lee@kernel.org>
2024-08-30 09:40:11 +01:00
Javier Carrasco
2f6a45c6ab mfd: hi655x-pmic: Constify struct regmap_config
`hi655x_regmap_config` is not modified and can be declared as const
to move its data to a read-only section.

Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
Link: https://lore.kernel.org/r/20240704-mfd-const-regmap_config-v2-3-0c8785b1331d@gmail.com
Signed-off-by: Lee Jones <lee@kernel.org>
2024-08-30 09:40:11 +01:00
Javier Carrasco
6a68c7d0a6 mfd: fsl-imx25-tsadc: Constify struct regmap_config
`mx25_tsadc_regmap_config` is not modified and can be declared as const
to move its data to a read-only section.

Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
Link: https://lore.kernel.org/r/20240704-mfd-const-regmap_config-v2-2-0c8785b1331d@gmail.com
Signed-off-by: Lee Jones <lee@kernel.org>
2024-08-30 09:40:11 +01:00
Javier Carrasco
c5416d4b6a mfd: da9062-core: Constify read-only regmap structs
`da9061_regmap_{config,irq,irq_chip}` and `da9062_{config,irq,irq_chip}`
are not modified and can be declared as const to move their data to a
read-only section.

Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
Link: https://lore.kernel.org/r/20240704-mfd-const-regmap_config-v2-1-0c8785b1331d@gmail.com
Signed-off-by: Lee Jones <lee@kernel.org>
2024-08-30 09:40:11 +01:00
Lee Jones
03bd36838e Merge branches 'ib-mfd-for-iio-power-6.12' and 'ib-mfd-gpio-pwm-6.12' into ibs-for-mfd-merged 2024-08-30 09:35:11 +01:00
Chris Morgan
2e1a57d5b0 mfd: axp20x: Add ADC, BAT, and USB cells for AXP717
Add support for the AXP717 PMIC to utilize the ADC (for reading
voltage, current, and temperature information from the PMIC) as well
as the USB charger and battery.

Signed-off-by: Chris Morgan <macromorgan@hotmail.com>
Link: https://lore.kernel.org/r/20240821215456.962564-12-macroalpha82@gmail.com
Signed-off-by: Lee Jones <lee@kernel.org>
2024-08-29 13:16:24 +01:00
Haibo Chen
480a8ad683 mfd: adp5585: Add Analog Devices ADP5585 core support
The ADP5585 is a 10/11 input/output port expander with a built in keypad
matrix decoder, programmable logic, reset generator, and PWM generator.
This driver supports the chip by modelling it as an MFD device, with two
child devices for the GPIO and PWM functions.

The driver is derived from an initial implementation from NXP, available
in commit 8059835bee19 ("MLK-25917-1 mfd: adp5585: add ADI adp5585 core
support") in their BSP kernel tree. It has been extensively rewritten.

Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Link: https://lore.kernel.org/r/20240722121100.2855-3-laurent.pinchart@ideasonboard.com
Signed-off-by: Lee Jones <lee@kernel.org>
2024-08-01 14:09:28 +01:00
Linus Torvalds
bf80f1391a Devicetree fixes for 6.11, part 1
- Treewide conversion of of_property_for_each_u32() to drop internal
   arguments making struct property opaque
 
 - Add binding for Amlogic A4 SoC watchdog
 
 - Fix constraints for AD7192 'single-channel' property
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEktVUI4SxYhzZyEuo+vtdtY28YcMFAmaj8ncACgkQ+vtdtY28
 YcMwZRAAh618Xfw+J8pxv62PMw11r0hgMNYoHPYDMt47D7g9Wwa71xdR6OpfIpf+
 EyHUXrnXJT6f5sm8mVe9Gsni0MZfgdkwchxlCQej0rJKchdLdAFNXbg4GbhF+0Ht
 tA3Y6bPB9FYKHExd87flnt4AO3ypF+1ihjSAAoy4EyEZUfyKgQVPyebDGwlPYlkH
 dmhF+q9d94LVw3lj/C7htWGELProogsU3i498ey7m/w8jwiJav2DVJ0cRuld/aPG
 7VwGQhJzdndlH1MPcl9slzIPadUrZ0S3/7V4c9cC0E22XpHJzp4RSdGmzsXJ7adp
 Q+OlQYiyZLLhEA/alVO/j5SJtfxt+T6+lrpbbu1wcJMFoukXusvL+0KbxxbExEn0
 /3MrZuxEq3F+jcKtMR/1PFcO7o1uEzzyTZcdufV3siABjZqmG4AFzBhHWP4Xh2Uw
 6hs7R/Ktf2lmacCK9fawfJF6Qq4RtFIakUuI6S3Q3oHHTRw6kr1Lsw+Wko/K20mO
 BEdfhocxEk5vf/kGxcBfM+GTybhagbBh0GxYB/Lm8vATfLHzhunipbc0ZwozDfPu
 IWiY+Nv+hGeGhfvSfNFUcsknF+QwtSjGis7hQjHkJc/siahaXJVAaf+tvtL1xm/p
 0CGPIJFZgzkcbjCT3iPVaJjfyRlMe9l7HJ6XiBSrMpiFpZPTgT8=
 =Nn/d
 -----END PGP SIGNATURE-----

Merge tag 'devicetree-fixes-for-6.11-1' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux

Pull more devicetree updates from Rob Herring:
 "Most of this is a treewide change to of_property_for_each_u32() which
  was small enough to do in one go before rc1 and avoids the need to
  create of_property_for_each_u32_some_new_name().

   - Treewide conversion of of_property_for_each_u32() to drop internal
     arguments making struct property opaque

   - Add binding for Amlogic A4 SoC watchdog

   - Fix constraints for AD7192 'single-channel' property"

* tag 'devicetree-fixes-for-6.11-1' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux:
  dt-bindings: iio: adc: ad7192: Fix 'single-channel' constraints
  of: remove internal arguments from of_property_for_each_u32()
  dt-bindings: watchdog: add support for Amlogic A4 SoCs
2024-07-27 12:46:16 -07:00
Linus Torvalds
c2a96b7f18 Driver core changes for 6.11-rc1
Here is the big set of driver core changes for 6.11-rc1.
 
 Lots of stuff in here, with not a huge diffstat, but apis are evolving
 which required lots of files to be touched.  Highlights of the changes
 in here are:
   - platform remove callback api final fixups (Uwe took many releases to
     get here, finally!)
   - Rust bindings for basic firmware apis and initial driver-core
     interactions.  It's not all that useful for a "write a whole driver
     in rust" type of thing, but the firmware bindings do help out the
     phy rust drivers, and the driver core bindings give a solid base on
     which others can start their work.  There is still a long way to go
     here before we have a multitude of rust drivers being added, but
     it's a great first step.
   - driver core const api changes.  This reached across all bus types,
     and there are some fix-ups for some not-common bus types that
     linux-next and 0-day testing shook out.  This work is being done to
     help make the rust bindings more safe, as well as the C code, moving
     toward the end-goal of allowing us to put driver structures into
     read-only memory.  We aren't there yet, but are getting closer.
   - minor devres cleanups and fixes found by code inspection
   - arch_topology minor changes
   - other minor driver core cleanups
 
 All of these have been in linux-next for a very long time with no
 reported problems.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 
 iG0EABECAC0WIQT0tgzFv3jCIUoxPcsxR9QN2y37KQUCZqH+aQ8cZ3JlZ0Brcm9h
 aC5jb20ACgkQMUfUDdst+ymoOQCfVBdLcBjEDAGh3L8qHRGMPy4rV2EAoL/r+zKm
 cJEYtJpGtWX6aAtugm9E
 =ZyJV
 -----END PGP SIGNATURE-----

Merge tag 'driver-core-6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core

Pull driver core updates from Greg KH:
 "Here is the big set of driver core changes for 6.11-rc1.

  Lots of stuff in here, with not a huge diffstat, but apis are evolving
  which required lots of files to be touched. Highlights of the changes
  in here are:

   - platform remove callback api final fixups (Uwe took many releases
     to get here, finally!)

   - Rust bindings for basic firmware apis and initial driver-core
     interactions.

     It's not all that useful for a "write a whole driver in rust" type
     of thing, but the firmware bindings do help out the phy rust
     drivers, and the driver core bindings give a solid base on which
     others can start their work.

     There is still a long way to go here before we have a multitude of
     rust drivers being added, but it's a great first step.

   - driver core const api changes.

     This reached across all bus types, and there are some fix-ups for
     some not-common bus types that linux-next and 0-day testing shook
     out.

     This work is being done to help make the rust bindings more safe,
     as well as the C code, moving toward the end-goal of allowing us to
     put driver structures into read-only memory. We aren't there yet,
     but are getting closer.

   - minor devres cleanups and fixes found by code inspection

   - arch_topology minor changes

   - other minor driver core cleanups

  All of these have been in linux-next for a very long time with no
  reported problems"

* tag 'driver-core-6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (55 commits)
  ARM: sa1100: make match function take a const pointer
  sysfs/cpu: Make crash_hotplug attribute world-readable
  dio: Have dio_bus_match() callback take a const *
  zorro: make match function take a const pointer
  driver core: module: make module_[add|remove]_driver take a const *
  driver core: make driver_find_device() take a const *
  driver core: make driver_[create|remove]_file take a const *
  firmware_loader: fix soundness issue in `request_internal`
  firmware_loader: annotate doctests as `no_run`
  devres: Correct code style for functions that return a pointer type
  devres: Initialize an uninitialized struct member
  devres: Fix memory leakage caused by driver API devm_free_percpu()
  devres: Fix devm_krealloc() wasting memory
  driver core: platform: Switch to use kmemdup_array()
  driver core: have match() callback in struct bus_type take a const *
  MAINTAINERS: add Rust device abstractions to DRIVER CORE
  device: rust: improve safety comments
  MAINTAINERS: add Danilo as FIRMWARE LOADER maintainer
  MAINTAINERS: add Rust FW abstractions to FIRMWARE LOADER
  firmware: rust: improve safety comments
  ...
2024-07-25 10:42:22 -07:00
Luca Ceresoli
9722c3b66e of: remove internal arguments from of_property_for_each_u32()
The of_property_for_each_u32() macro needs five parameters, two of which
are primarily meant as internal variables for the macro itself (in the
for() clause). Yet these two parameters are used by a few drivers, and this
can be considered misuse or at least bad practice.

Now that the kernel uses C11 to build, these two parameters can be avoided
by declaring them internally, thus changing this pattern:

  struct property *prop;
  const __be32 *p;
  u32 val;

  of_property_for_each_u32(np, "xyz", prop, p, val) { ... }

to this:

  u32 val;

  of_property_for_each_u32(np, "xyz", val) { ... }

However two variables cannot be declared in the for clause even with C11,
so declare one struct that contain the two variables we actually need. As
the variables inside this struct are not meant to be used by users of this
macro, give the struct instance the noticeable name "_it" so it is visible
during code reviews, helping to avoid new code to use it directly.

Most usages are trivially converted as they do not use those two
parameters, as expected. The non-trivial cases are:

 - drivers/clk/clk.c, of_clk_get_parent_name(): easily doable anyway
 - drivers/clk/clk-si5351.c, si5351_dt_parse(): this is more complex as the
   checks had to be replicated in a different way, making code more verbose
   and somewhat uglier, but I refrained from a full rework to keep as much
   of the original code untouched having no hardware to test my changes

All the changes have been build tested. The few for which I have the
hardware have been runtime-tested too.

Reviewed-by: Andre Przywara <andre.przywara@arm.com> # drivers/clk/sunxi/clk-simple-gates.c, drivers/clk/sunxi/clk-sun8i-bus-gates.c
Acked-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> # drivers/gpio/gpio-brcmstb.c
Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com> # drivers/irqchip/irq-atmel-aic-common.c
Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> # drivers/iio/adc/ti_am335x_adc.c
Acked-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com> # drivers/pwm/pwm-samsung.c
Acked-by: Richard Leitner <richard.leitner@linux.dev> # drivers/usb/misc/usb251xb.c
Acked-by: Mark Brown <broonie@kernel.org> # sound/soc/codecs/arizona.c
Reviewed-by: Richard Fitzgerald <rf@opensource.cirrus.com> # sound/soc/codecs/arizona.c
Acked-by: Michael Ellerman <mpe@ellerman.id.au> # arch/powerpc/sysdev/xive/spapr.c
Acked-by: Stephen Boyd <sboyd@kernel.org> # clk
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Acked-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20240724-of_property_for_each_u32-v3-1-bea82ce429e2@bootlin.com
Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
2024-07-25 06:53:47 -05:00
Linus Torvalds
1200af3ac1 - New Drivers
- Add support for ROHM BD96801 Power Management IC
    - Add support for Cirrus Logic CS40L50 Haptic Driver with Waveform Memory
    - Add support for Marvell 88PM886 Power Management IC
 
  - New Device Support
    - Add support for Keyboard Backlight to ChromeOS Embedded Controller
    - Add support for LEDs to ChromeOS Embedded Controller
    - Add support for Charge Control to ChromeOS Embedded Controller
    - Add support for the HW Monitoring Service to ChromeOS Embedded Controller
    - Add support for AUXADCs to MediaTek MT635{7,8,9} Power Management ICs
 
  - New Functionality
    - Allow Syscon consumers to supply their own Regmaps on registration
 
  - Fix-ups
    - Constify/staticise applicable data structures
    - Remove superfluous/duplicated/unused sections
    - Device Tree binding adaptions/conversions/creation
    - Trivial; spelling, whitespace, coding-style adaptions
    - Utilise centrally provided helpers and macros to aid simplicity/duplication
    - Drop i2c_device_id::driver_data where the value is unused
    - Replace ACPI/DT firmware helpers with agnostic variants
    - Move over to GPIOD (descriptor-based) APIs
    - Annotate a bunch of __counted_by() cases
    - Straighten out some includes
 
  - Bug Fixes
    - Ensure potentially asserted recent lines are deasserted during initialisation
    - Avoid "<module>.ko is added to multiple modules" warnings
    - Supply a bunch of MODULE_DESCRIPTIONs to silence modpost warnings
    - Fix Wvoid-pointer-to-enum-cast warnings
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEdrbJNaO+IJqU8IdIUa+KL4f8d2EFAmaWf6sACgkQUa+KL4f8
 d2HhAw//UMujhKk/IfzGck3RoaKH3H22oVpd98BpzJCZBKSpl9pGsumHCicBMVAK
 gp8SuwKNCAX+Fa/TubHz0xH6FWxLFXezh5DvO1t1DrPNokG+u4QPTfgMJ1IfBMHO
 w7aL74rtJEyWBeod4+qNVoq6KNDaWjiWQlxGQ+9IoSNmxSTL6pkYMqo935RnqhRr
 nm2TfSOIshk4tiO9tVA1ecCgjVwsG51803hypmd1AH6qBb7JsY6k1HWukLGaqUiV
 +57oQzCTPIRYJhYdca06xi4ZmPg2kmoYKlxqW5ExyM7Mxs9aZZzwwZ7929LKXC6o
 ebAPDc3auoww7B5mHbbVuBj0gDZKtfXpBRKSHLNtmhi0xmjnwZxQIumkpVGQALkI
 0TQffgYVU4O7IXsAZG9w5igyMzEo9SZJMyrfFaQ0iB3rx5bXuh4b6btfewAkyI1H
 +o3Yjymf4CR1trY9qnWCGWM/COQLIiGRhsk/RqGjy0xtpQo1Skx+AIkc6QD2zl6Y
 ohC0JzEWTQe7c1DOM3SLpNoCb/GbFpVi0RrXRVfRltPHpVb/r54Zlbo+PrCaC8FB
 EkU+86XbxGMh7hLtz5yhmnNCWKHQ6jbaFESwtZLo4d42CKvZaobL4xVCL56OntsH
 ikmTNG+X0mUAZiCwGgK5OhEVCAtCcjRtz1U93wgDBaz7Y39z+yM=
 =DSjk
 -----END PGP SIGNATURE-----

Merge tag 'mfd-next-6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd

Pull MFD updates from Lee Jones:
 "New Drivers:
   - ROHM BD96801 Power Management IC
   - Cirrus Logic CS40L50 Haptic Driver with Waveform Memory
   - Marvell 88PM886 Power Management IC

  New Device Support:
   - Keyboard Backlight to ChromeOS Embedded Controller
   - LEDs to ChromeOS Embedded Controller
   - Charge Control to ChromeOS Embedded Controller
   - HW Monitoring Service to ChromeOS Embedded Controller
   - AUXADCs to MediaTek MT635{7,8,9} Power Management ICs

  New Functionality:
   - Allow Syscon consumers to supply their own Regmaps on registration

  Fix-ups:
   - Constify/staticise applicable data structures
   - Remove superfluous/duplicated/unused sections
   - Device Tree binding adaptions/conversions/creation
   - Trivial; spelling, whitespace, coding-style adaptions
   - Utilise centrally provided helpers and macros to aid
     simplicity/duplication
   - Drop i2c_device_id::driver_data where the value is unused
   - Replace ACPI/DT firmware helpers with agnostic variants
   - Move over to GPIOD (descriptor-based) APIs
   - Annotate a bunch of __counted_by() cases
   - Straighten out some includes

  Bug Fixes:
   - Ensure potentially asserted recent lines are deasserted during
     initialisation
   - Avoid "<module>.ko is added to multiple modules" warnings
   - Supply a bunch of MODULE_DESCRIPTIONs to silence modpost warnings
   - Fix Wvoid-pointer-to-enum-cast warnings"

* tag 'mfd-next-6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: (87 commits)
  mfd: timberdale: Attach device properties to TSC2007 board info
  mfd: tmio: Move header to platform_data
  mfd: tmio: Sanitize comments
  mfd: tmio: Update include files
  mmc: tmio/sdhi: Fix includes
  mfd: tmio: Remove obsolete io accessors
  mfd: tmio: Remove obsolete platform_data
  watchdog: bd96801_wdt: Add missing include for FIELD_*()
  dt-bindings: mfd: syscon: Add APM poweroff mailbox
  dt-bindings: mfd: syscon: Split and enforce documenting MFD children
  dt-bindings: mfd: rk817: Merge support for RK809
  dt-bindings: mfd: rk817: Fixup clocks and reference dai-common
  dt-bindings: mfd: syscon: Add TI's opp table compatible
  mfd: omap-usb-tll: Use struct_size to allocate tll
  dt-bindings: mfd: Explain lack of child dependency in simple-mfd
  dt-bindings: mfd: Dual licensing for st,stpmic1 bindings
  mfd: omap-usb-tll: Annotate struct usbtll_omap with __counted_by
  mfd: tps6594-core: Remove unneeded semicolon in tps6594_check_crc_mode()
  mfd: lm3533: Move to new GPIO descriptor-based APIs
  mfd: tps65912: Use devm helper functions to simplify probe
  ...
2024-07-17 17:42:20 -07:00