Commit Graph

5395 Commits

Author SHA1 Message Date
Fenglin Wu
628497e6d9
regulator: qcom-rpmh: Fix index for pmh0101 ldo16
The wrong index is assigned to pmh0101 ldo16, which results incorrect
rpmh resource being used when the regulator device is voted. Fix it.

Fixes: 65efe5404d ("regulator: rpmh-regulator: Add RPMH regulator support for Glymur")
Signed-off-by: Fenglin Wu <fenglin.wu@oss.qualcomm.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Link: https://patch.msgid.link/20260506-fix_pmh0101_ldo16_index-v1-1-cdc8708b01f4@oss.qualcomm.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-05-06 21:26:30 +09:00
Arnd Bergmann
7dfc006302
regulator: rpi-panel-attiny: add back GPIOLIB dependency
This driver provides a gpio chip, which is only possible when GPIOLIB
is enabled, which was previously guaranteed by the CONFIG_OF_GPIO
dependency that is now gone:

ERROR: modpost: "gpiochip_get_data" [drivers/regulator/rpi-panel-attiny-regulator.ko] undefined!
ERROR: modpost: "devm_gpiochip_add_data_with_key" [drivers/regulator/rpi-panel-attiny-regulator.ko] undefined!

Add an explicit GPIOLIB dependency instead.

Fixes: bf017304fc ("regulator: drop unneeded dependencies on OF_GPIO")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Link: https://patch.msgid.link/20260429135812.112514-1-arnd@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-04-30 13:12:29 +09:00
Linus Torvalds
f643998361 regulator: Fix for v7.1
There's just one trivial cleanup of the user visible prompts in Kconfig
 here, standardising how we describe Qualcomm.
 -----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmnrgeEACgkQJNaLcl1U
 h9Co5Af/dejg0MJQrPzOy5Lm2G3xRvj53vkbNJx/93AINnCQdoYSLCyri2Y6pfaj
 9e/Ytz5we7aR0nur6qRtYYnu1q1fBdN7fQDyJq11VyhySytpQA4U6ervDl/rYhXD
 H3WRDAvgoqr9IU8ZZCAcZjgJoiVJXVfg4yOj4sgrEg3gzYE2Cy948HU4+QkAoi1y
 8LArTehvYIcheVh/oZ7XFeXYk3mLvdcNizglLq2UWyTCB2gPmPZlbjahJVz7hVlR
 xenvl9emRips75xZHxz0IcSTfgyHNAefrjHYrXIf04sVj+NomsiP1p6xfUoBuDSd
 vkZfHLlpHEMlm4+J/BA15BwYXUzziw==
 =kg/3
 -----END PGP SIGNATURE-----

Merge tag 'regulator-fix-v7.1-merge-window' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator

Pull regulator fix from Mark Brown:
 "Just one trivial cleanup of the user visible prompts in Kconfig here,
  standardising how we describe Qualcomm"

* tag 'regulator-fix-v7.1-merge-window' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator:
  regulator: qcom: Unify user-visible "Qualcomm" name
2026-04-24 13:06:25 -07:00
Krzysztof Kozlowski
2af72ec297
regulator: qcom: Unify user-visible "Qualcomm" name
Various names for Qualcomm as a company are used in user-visible config
options: QCOM, Qualcomm and Qualcomm Technologies.  Switch to unified
"Qualcomm" so it will be easier for users to identify the options when
for example running menuconfig.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Link: https://patch.msgid.link/20260422083338.84343-2-krzysztof.kozlowski@oss.qualcomm.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-04-22 13:54:21 +01:00
Linus Torvalds
44f7a37953 regulator: Updates for v7.1
This has been a very quiet update for the regulator API, the bulk of the
 diffstat is DT binding conversions and the most promient series in the
 changelog is Johan Hovold cleaning up some leaks of OF nodes.  For some
 reason we have had several different people sending improvements to
 better describe the parent supplies for existing regulators, these look
 to be independent efforts.
 
 The only new hardware support is for some Motorola custom varints of
 cpcap.
 -----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmndBTsACgkQJNaLcl1U
 h9ADHggAhMn3Y2euauiXuf+XBzrO6VlnNSnsX2PLLWFS2vAd4set/y9PHAy5EuhM
 HVoKoyTC7DymWDI+2oNCfp71yekQK5zkM25BDyuQUQws9z6DI4k+XhMTF+A/C5eG
 mq0LTxmBwia1YCuT+++vE3Q4+k8TuftbnIUf/pd8Ogt13zeoVVKiXGtHbZVD6bv8
 Uj3sBludwExM2VhAfqOxsWdcR/8jThbP2k3QMY4AP16C6aVhGFneXGTxiAxJcKfb
 XntfMIy4z9hwdUxacc8WkxetZ0OzifVSnUsk2YN5E1UuvDpHtwFm83jPI6YUCA3V
 7lA8FD62NoY8kMERfKN+DdgXUL47jA==
 =K0DF
 -----END PGP SIGNATURE-----

Merge tag 'regulator-v7.1' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator

Pull regulator updates from Mark Brown:
 "This has been a very quiet update for the regulator API, the bulk of
  the diffstat is DT binding conversions and the most promient series in
  the changelog is Johan Hovold cleaning up some leaks of OF nodes. For
  some reason we have had several different people sending improvements
  to better describe the parent supplies for existing regulators, these
  look to be independent efforts.

  The only new hardware support is for some Motorola custom varints of
  cpcap"

* tag 'regulator-v7.1' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: (35 commits)
  regulator: max77620: drop redundant OF node initialisation
  regulator: bq257xx: Make OTG enable GPIO really optional
  regulator: bq257xx: Remove reference to the parent MFD's dev
  regulator: bd9571mwv: fix OF node reference imbalance
  regulator: act8945a: fix OF node reference imbalance
  regulator: s2dos05: fix OF node reference imbalance
  regulator: mt6357: fix OF node reference imbalance
  regulator: max77650: fix OF node reference imbalance
  regulator: rk808: fix OF node reference imbalance
  regulator: bq257xx: fix OF node reference imbalance
  regulator: dt-bindings: qcom,qca6390-pmu: Document WCN6755 PMU
  regulator: dt-bindings: regulator-max77620: convert to DT schema
  regulator: mt6315: Add regulator supplies
  regulator: dt-bindings: mt6315: Add regulator supplies
  regulator: devres: Use enum regulator_get_type in internal functions
  regulator: dt-bindings: mps,mp8859: convert to DT schema
  regulator: da9121: Allow caching BUCK registers
  regulator: dt-bindings: dlg,da9121: Add dlg,no-gpio-control
  regulator: cros-ec: Add regulator supply
  regulator: dt-bindings: cros-ec: Add regulator supply
  ...
2026-04-15 14:32:12 -07:00
Linus Torvalds
1334d2a3b3 gpio updates for v7.1-rc1
GPIO core:
 - defer probe on software node lookups when the remote software node
   exists but has not been registered as a firmware node yet
 - unify GPIO hog handling by moving code duplicated in OF and ACPI
   modules into GPIO core and allow setting up hogs with software nodes
 - allow matching GPIO controllers by secondary firmware node if matching
   by primary does not succeed
 - demote deferral warnings to debug level as they are quite normal when
   using software nodes which don't support fw_devlink yet
 - disable the legacy GPIO character device uAPI v1 supprt in Kconfig by
   default
 - rework several core functions in preparation for the upcoming Revocable
   helper library for protecting resources against sudden removal, this
   reduces the number of SRCU dereferences in GPIO core
 - simplify file descriptor logic in GPIO character device code by using
   FD_PREPARE()
 - introduce a header defining symbols used by both GPIO consumers and
   providers to avoid having to include provider-specific headers from
   drivers which only consume GPIOs
 - replace snprintf() with strscpy() where formatting is not required
 
 New drivers:
 - add the gpio-by-pinctrl generic driver using the ARM SCMI protocol to
   control GPIOs (along with SCMI changes pulled from the pinctrl tree)
 - add a driver providing support for handling of platform events via
   GPIO-signalled ACPI events (used on Intel Nova Lake and later platforms)
 
 Driver changes:
 - extend the gpio-kempld driver with support for more recent models,
   interrupts and setting/getting multiple values at once
 - improve interrupt handling in gpio-brcmstb
 - add support for multi-SoC systems in gpio-tegra186
 - make sure we return correct values from the .get() callbacks in several
   GPIO drivers by normalizing any values other than 0, 1 or negative error
   numbers
 - use flexible arrays in several drivers to reduce the number of required
   memory allocations
 - simplify synchronous waiting for virtual drivers to probe and remove the
   dedicated, a bit overengineered helper library dev-sync-probe
 - remove unneeded Kconfig dependencies on OF_GPIO in several drivers and
   subsystems
 - convert the two remaining users of of_get_named_gpio() to using GPIO
   descriptors and remove the (no longer used) function along with the
   header that declares it
 - add missing includes in gpio-mmio
 - shrink and simplify code in gpio-max732x by using guard(mutex)
 - remove duplicated code handling the 'ngpios' property from gpio-ts4800,
   it's already handled in GPIO core
 - use correct variable type in gpio-aspeed
 - add support for a new model in gpio-realtek-otto
 - allow to specify the active-low setting of simulated hogs over the
   configfs interface (in addition to existing devicetree support) in
   gpio-sim
 
 Bug fixes:
 - clear the OF_POPULATED flag on hog nodes in GPIO chip remove path on
   OF systems
 - fix resource leaks in error path in gpiochip_add_data_with_key()
 - drop redundant device reference in gpio-mpsse
 
 Tests:
 - add selftests for use-after-free cases in GPIO character device code
 
 DT bindings:
 - add a DT binding document for SCMI based, gpio-over-pinctrl devices
 - fix interrupt description in microchip,mpfs-gpio
 - add new compatible for gpio-realtek-otto
 - describe the resets of the mpfs-gpio controller
 - fix maintainer's email in gpio-delay bindings
 - remove the binding document for cavium,thunder-8890 as the corresponding
   device is bound over PCI and not firmware nodes
 
 Documentation:
 - update the recommended way of converting legacy boards to using software
   nodes for GPIO description
 - describe GPIO line value semantics
 - misc updates to kerneldocs
 
 Misc:
 - convert OMAP1 ams-delta board to using GPIO hogs described with software
   nodes
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEkeUTLeW1Rh17omX8BZ0uy/82hMMFAmnYsngACgkQBZ0uy/82
 hMO+Tw/+N8eX1GOWkEdZBZRzd6QW+2qjmeMgvizMUu2CzfYpcuO9kpOqiSjguj2S
 6hODOajwU6EDdrxEHy7zJrAc6Tw1xIQeCnmSsFjC+4OePsCP6bU0QBgdb0V5waIx
 3kEdBsM3Msw48SCDFTUQJ0XyUD/VP4TZXzhDmU0X1OJsGYDSMchiBytNpZrFt18q
 qTq/NJm6mT6h5XlTeTCmfBcf/TG7MZhAPzXw8YZp+ZIgDsTRtD/P6CAZgJ0OU9f4
 MQwJO5+JFkTO7XhL+qOfJcnKnC2lRHaa7mJiSQ+XS43NOqO7NGeGH2l7hU/Lx/fR
 NIIZk27uBRV1akpnMGtgbqL2A8SFeH5yj3/o6S4rp9IzDwOouN+1seaL2RUHpTns
 TgIm037MNIZI8eQ2lSA9/+f4vwF1bml8mA/6lVBGHI9ZcaZbcUyWjXPcsuVIyiqY
 HlV+A3sVjchpaH9Eie78nbVm2X7Wm5slEazXAl3zVjlekQut+Fp+xoBWwulEjp+H
 7PZXqLP2hV/Xw4C2mn/zwwokzj+1S1DPW5Inn5Y7Qi6/j4GmvdVmI1zBculrf7jj
 GE6UUz+Vm9v6oE+q19jsksudVrDPapASYV/TLGQZk48IXhy+KxB8lep6L2rEAQtS
 YgBltnjJlbrx99u1sZkPECzgCRYSgm59Lt0aOv93CL2fURI1Seg=
 =VknJ
 -----END PGP SIGNATURE-----

Merge tag 'gpio-updates-for-v7.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux

Pull gpio updates from Bartosz Golaszewski:
 "For this merge window we have two new drivers: support for
  GPIO-signalled ACPI events on Intel platforms and a generic
  GPIO-over-pinctrl driver using the ARM SCMI protocol for
  controlling pins.

  Several things have been reworked in GPIO core: we unduplicated GPIO
  hog handling, reduced the number of SRCU locks and dereferences,
  improved support for software-node-based lookup and removed more
  legacy code after converting remaining users to modern alternatives.

  There's also a number of driver reworks and refactoring, documentation
  updates, some bug-fixes and new tests.

  GPIO core:
   - defer probe on software node lookups when the remote software node
     exists but has not been registered as a firmware node yet
   - unify GPIO hog handling by moving code duplicated in OF and ACPI
     modules into GPIO core and allow setting up hogs with software
     nodes
   - allow matching GPIO controllers by secondary firmware node if
     matching by primary does not succeed
   - demote deferral warnings to debug level as they are quite normal
     when using software nodes which don't support fw_devlink yet
   - disable the legacy GPIO character device uAPI v1 supprt in Kconfig
     by default
   - rework several core functions in preparation for the upcoming
     Revocable helper library for protecting resources against sudden
     removal, this reduces the number of SRCU dereferences in GPIO core
   - simplify file descriptor logic in GPIO character device code by
     using FD_PREPARE()
   - introduce a header defining symbols used by both GPIO consumers and
     providers to avoid having to include provider-specific headers from
     drivers which only consume GPIOs
   - replace snprintf() with strscpy() where formatting is not required

  New drivers:
   - add the gpio-by-pinctrl generic driver using the ARM SCMI protocol
     to control GPIOs (along with SCMI changes pulled from the pinctrl
     tree)
   - add a driver providing support for handling of platform events via
     GPIO-signalled ACPI events (used on Intel Nova Lake and later
     platforms)

  Driver changes:
   - extend the gpio-kempld driver with support for more recent models,
     interrupts and setting/getting multiple values at once
   - improve interrupt handling in gpio-brcmstb
   - add support for multi-SoC systems in gpio-tegra186
   - make sure we return correct values from the .get() callbacks in
     several GPIO drivers by normalizing any values other than 0, 1 or
     negative error numbers
   - use flexible arrays in several drivers to reduce the number of
     required memory allocations
   - simplify synchronous waiting for virtual drivers to probe and
     remove the dedicated, a bit overengineered helper library
     dev-sync-probe
   - remove unneeded Kconfig dependencies on OF_GPIO in several drivers
     and subsystems
   - convert the two remaining users of of_get_named_gpio() to using
     GPIO descriptors and remove the (no longer used) function along
     with the header that declares it
   - add missing includes in gpio-mmio
   - shrink and simplify code in gpio-max732x by using guard(mutex)
   - remove duplicated code handling the 'ngpios' property from
     gpio-ts4800, it's already handled in GPIO core
   - use correct variable type in gpio-aspeed
   - add support for a new model in gpio-realtek-otto
   - allow to specify the active-low setting of simulated hogs over the
     configfs interface (in addition to existing devicetree support) in
     gpio-sim

  Bug fixes:
   - clear the OF_POPULATED flag on hog nodes in GPIO chip remove path
     on OF systems
   - fix resource leaks in error path in gpiochip_add_data_with_key()
   - drop redundant device reference in gpio-mpsse

  Tests:
   - add selftests for use-after-free cases in GPIO character device
     code

  DT bindings:
   - add a DT binding document for SCMI based, gpio-over-pinctrl devices
   - fix interrupt description in microchip,mpfs-gpio
   - add new compatible for gpio-realtek-otto
   - describe the resets of the mpfs-gpio controller
   - fix maintainer's email in gpio-delay bindings
   - remove the binding document for cavium,thunder-8890 as the
     corresponding device is bound over PCI and not firmware nodes

  Documentation:
   - update the recommended way of converting legacy boards to using
     software nodes for GPIO description
   - describe GPIO line value semantics
   - misc updates to kerneldocs

  Misc:
   - convert OMAP1 ams-delta board to using GPIO hogs described with
     software nodes"

* tag 'gpio-updates-for-v7.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux: (79 commits)
  gpio: swnode: defer probe on references to unregistered software nodes
  dt-bindings: gpio: cavium,thunder-8890: Remove DT binding
  Documentation: gpio: update the preferred method for using software node lookup
  gpio: gpio-by-pinctrl: s/used to do/is used to do/
  gpio: aspeed: fix unsigned long int declaration
  gpio: rockchip: convert to dynamic GPIO base allocation
  gpio: remove dev-sync-probe
  gpio: virtuser: stop using dev-sync-probe
  gpio: aggregator: stop using dev-sync-probe
  gpio: sim: stop using dev-sync-probe
  gpio: Add Intel Nova Lake ACPI GPIO events driver
  gpiolib: Make deferral warnings debug messages
  gpiolib: fix hogs with multiple lines
  gpio: fix up CONFIG_OF dependencies
  gpio: gpio-by-pinctrl: add pinctrl based generic GPIO driver
  gpio: dt-bindings: Add GPIO on top of generic pin control
  firmware: arm_scmi: Allow PINCTRL_REQUEST to return EOPNOTSUPP
  pinctrl: scmi: ignore PIN_CONFIG_PERSIST_STATE
  pinctrl: scmi: Delete PIN_CONFIG_OUTPUT_IMPEDANCE_OHMS support
  pinctrl: scmi: Add SCMI_PIN_INPUT_VALUE
  ...
2026-04-13 20:10:58 -07:00
Johan Hovold
606c780b88
regulator: max77620: drop redundant OF node initialisation
The platform device OF node is set unconditionally since commit
6f55c5dd11 ("regulator: max77620: Use device_set_of_node_from_dev()")
so drop the earlier redundant conditional initialisation.

Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://patch.msgid.link/20260407121405.2663004-1-johan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-04-10 13:56:21 +01:00
Alexey Charkov
de76a76380
regulator: bq257xx: Make OTG enable GPIO really optional
The bindings describe the OTG enable GPIO as optional, but the driver
gets upset if it's not provided in the device tree.

Make the driver accept the absence of the GPIO, and just use register
writes to handle OTG mode in that case, skipping the error message for
-ENOENT.

Acked-by: Mark Brown <broonie@kernel.org>
Tested-by: Chris Morgan <macromorgan@hotmail.com>
Signed-off-by: Alexey Charkov <alchark@flipper.net>
Link: https://patch.msgid.link/20260331-bq25792-v6-4-0278fba33eb9@flipper.net
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-04-10 11:52:40 +01:00
Alexey Charkov
aef4d87f2c
regulator: bq257xx: Remove reference to the parent MFD's dev
Drop the ->bq field from the platform data of the bq257xx regulator driver,
which was only used to get the regmap of the parent MFD device, and use the
regmap from the regulator_dev instead, slimming down the code a bit.

Acked-by: Mark Brown <broonie@kernel.org>
Tested-by: Chris Morgan <macromorgan@hotmail.com>
Signed-off-by: Alexey Charkov <alchark@flipper.net>
Link: https://patch.msgid.link/20260331-bq25792-v6-2-0278fba33eb9@flipper.net
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-04-10 11:52:40 +01:00
Mark Brown
e7ef5ec6d1
regulator: fix OF node imbalance on reuse
Johan Hovold <johan@kernel.org> says:

These drivers reuse the OF node of their parent multi-function device
but fail to take another reference to balance the one dropped by the
platform bus code when unbinding the MFD and deregistering the child
devices.

Fix this by using the intended helper for reusing OF nodes.

Note that the first two patches will cause a trivial conflict with Doug's
series adding accessor functions for struct device flags which has now been
merged to the driver-core tree:

	https://lore.kernel.org/r/20260406232444.3117516-1-dianders@chromium.org

Link: https://patch.msgid.link/20260408073055.5183-1-johan@kernel.org
2026-04-09 20:19:36 +01:00
Johan Hovold
8498100ee1
regulator: bd9571mwv: fix OF node reference imbalance
The driver reuses the OF node of the parent multi-function device but
fails to take another reference to balance the one dropped by the
platform bus code when unbinding the MFD and deregistering the child
devices.

Fix this by using the intended helper for reusing OF nodes.

Fixes: e85c5a153f ("regulator: Add ROHM BD9571MWV-M PMIC regulator driver")
Cc: stable@vger.kernel.org	# 4.12
Cc: Marek Vasut <marek.vasut@gmail.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://patch.msgid.link/20260408073055.5183-8-johan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-04-09 20:19:35 +01:00
Johan Hovold
0d15ce3137
regulator: act8945a: fix OF node reference imbalance
The driver reuses the OF node of the parent multi-function device but
fails to take another reference to balance the one dropped by the
platform bus code when unbinding the MFD and deregistering the child
devices.

Fix this by using the intended helper for reusing OF nodes.

Fixes: 38c0996104 ("regulator: act8945a: add regulator driver for ACT8945A")
Cc: stable@vger.kernel.org	# 4.6
Cc: Wenyou Yang <wenyou.yang@atmel.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://patch.msgid.link/20260408073055.5183-7-johan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-04-09 20:19:34 +01:00
Johan Hovold
ebe694d67f
regulator: s2dos05: fix OF node reference imbalance
The driver reuses the OF node of the parent multi-function device but
fails to take another reference to balance the one dropped by the
platform bus code when unbinding the MFD and deregistering the child
devices.

Fix this by using the intended helper for reusing OF nodes.

Fixes: bb24414023 ("regulator: add s2dos05 regulator support")
Cc: stable@vger.kernel.org	# 6.18
Cc: Dzmitry Sankouski <dsankouski@gmail.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://patch.msgid.link/20260408073055.5183-6-johan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-04-09 20:19:33 +01:00
Johan Hovold
2f38e96c27
regulator: mt6357: fix OF node reference imbalance
The driver reuses the OF node of the parent multi-function device but
fails to take another reference to balance the one dropped by the
platform bus code when unbinding the MFD and deregistering the child
devices.

Fix this by using the intended helper for reusing OF nodes.

Fixes: dafc7cde23 ("regulator: add mt6357 regulator")
Cc: stable@vger.kernel.org	# 6.2
Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://patch.msgid.link/20260408073055.5183-5-johan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-04-09 20:19:32 +01:00
Johan Hovold
2edaf5f7ad
regulator: max77650: fix OF node reference imbalance
The driver reuses the OF node of the parent multi-function device but
fails to take another reference to balance the one dropped by the
platform bus code when unbinding the MFD and deregistering the child
devices.

Fix this by using the intended helper for reusing OF nodes.

Fixes: bcc61f1c44 ("regulator: max77650: add regulator support")
Cc: stable@vger.kernel.org	# 5.1
Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://patch.msgid.link/20260408073055.5183-4-johan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-04-09 20:19:32 +01:00
Johan Hovold
65290b24d8
regulator: rk808: fix OF node reference imbalance
The driver reuses the OF node of the parent multi-function device but
fails to take another reference to balance the one dropped by the
platform bus code when unbinding the MFD and deregistering the child
devices.

Fix this by using the intended helper for reusing OF nodes.

Fixes: 647e57351f ("regulator: rk808: reduce 'struct rk808' usage")
Cc: stable@vger.kernel.org	# 6.2
Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://patch.msgid.link/20260408073055.5183-3-johan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-04-09 20:19:31 +01:00
Johan Hovold
7ea07bc030
regulator: bq257xx: fix OF node reference imbalance
The driver reuses the OF node of the parent multi-function device but
fails to take another reference to balance the one dropped by the
platform bus code when unbinding the MFD and deregistering the child
devices.

Fix this by using the intended helper for reusing OF nodes.

Fixes: 981dd162b6 ("regulator: bq257xx: Add bq257xx boost regulator driver")
Cc: stable@vger.kernel.org	# 6.18
Cc: Chris Morgan <macromorgan@hotmail.com>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://patch.msgid.link/20260408073055.5183-2-johan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-04-09 20:19:30 +01:00
Matti Vaittinen
b1baaff4e5
regulator: bd71828-regulator.c: Fix LDON-HEAD mode
The ROHM BD72720 supports so called LDON-HEAD -mode, in which the buck10
is expected to be supplying power for an LDO. In this mode, the buck10
voltage will follow what is set for the LDO, on order to lower the
power-loss in the LDO.

This hardware configuration can be adverticed via the device-tree. When
this is done, the Linux driver should omit registering the voltage
control operations for the buck10, because the voltage control is now
done by the hardware.

This is done by modifying the buck10 regulator descriptor, before
passing it to the regulator registration functions. There is an
off-by-one error when the regulator descriptor array is indexed, and
wrong descriptor is modified causing the LDO1 operations to be modified
instead of the BUCK10 operations.

Fix this by correcting the indexing.

Signed-off-by: Matti Vaittinen <mazziesaccount@gmail.com>
Fixes: f16a9d76a7 ("regulator: bd71828: Support ROHM BD72720")
Link: https://patch.msgid.link/e7eef0bd407522ae5d9b7d0c4ec43f40b1dba833.1775565148.git.mazziesaccount@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-04-07 15:24:11 +01:00
Mark Brown
922b9937db
regulator: mt6315: add regulator supplies
Chen-Yu Tsai <wenst@chromium.org> says:

This series is part of a broader collection of regulator related
cleanups for MediaTek Chromebooks. This one covers the MT6315 PMIC.

Patch 1 adds the names of the power supply inputs to the binding.

Patch 2 adds the supply names from the DT binding change in patch 1
to the regulator descriptions in the driver. This patch has a
checkpatch.pl warnings, but I wonder if it's because the context size
for checking complex macros is not large enough.

Device tree changes will be sent separately. The goal is to get the
regulator tree as complete as possible. This includes adding supply
names to other regulator DT bindings, and adding all the supply links
to the existing DTs.
2026-03-30 15:45:39 +01:00
Chen-Yu Tsai
292d64fb98
regulator: mt6315: Add regulator supplies
The MT6315 family of PMICs has 4 buck regulators. Each regulator has a
separate supply.

Add these supplies to the driver.

Signed-off-by: Chen-Yu Tsai <wenst@chromium.org>
Link: https://patch.msgid.link/20260326081050.1115201-3-wenst@chromium.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-03-30 15:45:37 +01:00
Luca Weiss
5a623ef758
regulator: devres: Use enum regulator_get_type in internal functions
The enum regulator_get_type has been available since 2017, so use that
enum instead of an "untyped" int in the three functions where "get_type"
is used.

No functional change intended.

Suggested-by: Griffin Kroah-Hartman <griffin.kroah@fairphone.com>
Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
Link: https://patch.msgid.link/20260330-regulator-devres-type-v1-1-d2c244576845@fairphone.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-03-30 15:44:06 +01:00
Mark Brown
3dacdda5e6
regulator: da91xx: Allow caching of buck registers when no GPIO input control is configured
André Svensson <andre.svensson@axis.com> says:

This series introduces a boolean DT property, dlg,no-gpio-control, for
the DA91xx regulators. Use this property to indicate that GPIO control
is not configured with the functions DVC/RELOAD/EN, allowing buck
registers to be cached.

The DA9121 driver checks dlg,no-gpio-control and updates regmap_config's
volatile_table if the property is present. Buck registers are removed
from the volatile_table if the property is present, enabling caching of
the registers, which removes I2C reads when performing an I2C write to
the buck registers.

Link: https://patch.msgid.link/20260320-no-gpio-control-v2-0-dbc938e462cb@axis.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-03-24 19:37:47 +00:00
André Svensson
6c2505e185
regulator: da9121: Allow caching BUCK registers
Some BUCK registers may change without software writes when GPIO pins
are configured for functions DVC/RELOAD/EN. If the board does
not use these pin-controlled features, caching is possible.

Caching BUCK registers removes unnecessary I2C reads when performing
register updates. For example, updating regulator mode can result in
two I2C reads, one from the regulator core regulator_set_mode() and one
from the DA9121 driver, where da9121_buck_set_mode() uses
regmap_update_bits() (read/modify/write).

Check for the optional DT property dlg,no-gpio-control. When present,
select the regmap configuration that does not mark the BUCK1 register
block (DA9121_REG_BUCK_BUCK1_0..DA9121_REG_BUCK_BUCK1_6) as volatile, so
that regmap can cache BUCK1 registers and avoid unnecessary I2C reads.
The property dlg,no-gpio-control is required to ensure that BUCK1
registers can be cached, as the absence of relevant GPIO DT properties
does not imply that the RELOAD/DVC/EN GPIO functions are unused. These
functions are provided by DA91xx GPIO pins and may be controlled by
external hardware without corresponding GPIO DT properties. The
dlg,no-gpio-control property explicitly indicates that none of these
GPIO functions are used.

The dlg,no-gpio-control property is mutually exclusive with
enable-gpios, regardless of whether the referenced GPIO is connected to
a GPIO pin or the IC_EN pin, since pulling IC_EN low powers down the
regulator and registers are reinitialized at startup, leaving cached
values stale.

Co-developed-by: Waqar Hameed <waqar.hameed@axis.com>
Signed-off-by: Waqar Hameed <waqar.hameed@axis.com>
Signed-off-by: André Svensson <andre.svensson@axis.com>
Link: https://patch.msgid.link/20260320-no-gpio-control-v2-2-dbc938e462cb@axis.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-03-24 19:37:45 +00:00
Mark Brown
57fca3a8ed
regulator: cros-ec: cleanup and add supplies
Chen-Yu Tsai <wenst@chromium.org> says:

This series is part of a broader collection of regulator related
cleanups for MediaTek Chromebooks. This one covers the regulators
exposed by the ChromeOS Embedded Controller.

Patch 1 adds the names of the power supply inputs to the binding.

Patch 2 adds the supply names from the DT binding change in patch 1
to the regulator descriptions in the driver. This patch has a
checkpatch.pl warnings, but I wonder if it's because the context size
for checking complex macros is not large enough.

Device tree changes will be sent separately. The goal is to get the
regulator tree as complete as possible. This includes adding supply
names to other regulator DT bindings, and adding all the supply links
to the existing DTs.
2026-03-23 22:38:56 +00:00
Chen-Yu Tsai
411eb30f13
regulator: cros-ec: Add regulator supply
Even a regulator remotely controlled by the EC will have a power supply
input.

Add the supply property name from the device tree binding to the
regulator description.

Signed-off-by: Chen-Yu Tsai <wenst@chromium.org>
Link: https://patch.msgid.link/20260320083135.2455444-3-wenst@chromium.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-03-23 22:38:55 +00:00
Hugo Villeneuve
9150d79c7a
regulator: fixed: remove unused macro
The macro was added in commit ecb6f1f456
("regulator: fixed: add support for under-voltage IRQ") but it was never used.

Signed-off-by: Hugo Villeneuve <hvilleneuve@dimonoff.com>
Link: https://patch.msgid.link/20260323140206.104908-1-hugo@hugovil.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-03-23 16:19:53 +00:00
Hugo Villeneuve
09a1361db3
regulator: core: fix typo in comments
Replace another->other so that the sentence makes sense.

Signed-off-by: Hugo Villeneuve <hvilleneuve@dimonoff.com>
Link: https://patch.msgid.link/20260323140340.105362-1-hugo@hugovil.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-03-23 16:03:25 +00:00
Mark Brown
c8d0beedf0
regulator: fp9931: Make vin-supply mandatory
Robby Cai <robby.cai@nxp.com> says:

The FP9931 regulator requires a valid "vin" supply to operate correctly.
Therefore, the driver should treat "vin" as a mandatory supply.

This patchset updates the binding documentation to mark vin-supply as a
required property, and modifies the driver accordingly. As suggested in
the reviews from Andreas and Mark, v2 switches to using
devm_regulator_get() since the supply is mandatory.
2026-03-17 18:07:38 +00:00
Robby Cai
5806893240
regulator: fp9931: Fix handling of mandatory "vin" supply
The FP9931 requires a mandatory "vin" power supply to operate.
Replace devm_regulator_get_optional() with devm_regulator_get() to
enforce this mandatory dependency.

Fixes: 12d821bd13 ("regulator: Add FP9931/JD9930 driver")
Signed-off-by: Robby Cai <robby.cai@nxp.com>
Link: https://patch.msgid.link/20260313133102.2749890-3-robby.cai@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-03-17 18:07:36 +00:00
Hugo Villeneuve
9d4189e68e
regulator: fixed: remove unused reboot.h include
The include was added in commit ecb6f1f456
("regulator: fixed: add support for under-voltage IRQ") but it was never used.

Signed-off-by: Hugo Villeneuve <hvilleneuve@dimonoff.com>
Link: https://patch.msgid.link/20260317152215.3473489-1-hugo@hugovil.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-03-17 15:49:44 +00:00
Bartosz Golaszewski
bf017304fc regulator: drop unneeded dependencies on OF_GPIO
OF_GPIO is selected automatically on all OF systems. Any symbols it
controls also provide stubs so there's really no reason to select it
explicitly.

Acked-by: Mark Brown <broonie@kernel.org>
Link: https://patch.msgid.link/20260304-gpio-of-kconfig-v1-5-d597916e79e7@oss.qualcomm.com
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
2026-03-13 14:42:53 +01:00
Rosen Penev
cf4812898b
regulator: da9063: kzalloc + kcalloc to kzalloc
Reduce main allocation to a single kzalloc call by using a flexible
array member.

Allows using __counted_by for extra runtime analysis.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://patch.msgid.link/20260311004159.32374-1-rosenp@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-03-12 23:16:17 +00:00
Felix Gu
e80c626ae0
regulator: pf1550: Remove redundant regmap assignment
The config.regmap is already correctly initialized using dev_get_regmap()
on the parent device. Remove the redundant second assignment that was
overwriting it with pf1550->regmap.

Signed-off-by: Felix Gu <ustc.gu@gmail.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Link: https://patch.msgid.link/20260312-1550-v1-1-5a84b886ccfe@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-03-12 16:31:57 +00:00
Peng Fan
21b3fb7dc1
regulator: pca9450: Correct probed name for PCA9452
An incorrect device name was logged for PCA9452 because the dev_info()
ternary omitted PCA9452 and fell through to "pca9450bc". Introduce a
type_name and set it per device type so the probed message matches the
actual PMIC. While here, make the PCA9451A case explicit.

No functional changes.

Fixes: 017b76fb8e ("regulator: pca9450: Add PMIC pca9452 support")
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Link: https://patch.msgid.link/20260310-pca9450-irq-v1-2-36adf52c2c55@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-03-10 14:52:42 +00:00
Peng Fan
5d0efaf47e
regulator: pca9450: Correct interrupt type
Kernel warning on i.MX8MP-EVK when doing module test:
irq: type mismatch, failed to map hwirq-3 for gpio@30200000!

Per PCA945[X] specification: The IRQ_B pin is pulled low when any unmasked
interrupt bit status is changed and it is released high once application
processor read INT1 register.

So the interrupt should be configured as IRQF_TRIGGER_LOW, not
IRQF_TRIGGER_FALLING.

Fixes: 0935ff5f1f ("regulator: pca9450: add pca9450 pmic driver")
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Link: https://patch.msgid.link/20260310-pca9450-irq-v1-1-36adf52c2c55@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-03-10 14:52:42 +00:00
Ben Dooks
aa3d0c93a3
regulator: max20411: show failure on register
It is easy to use %pe to print a error-pointer so add this
to the dev_err() if the devm_regulator_register() fails.

Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
Link: https://patch.msgid.link/20260305184623.2603269-1-ben.dooks@codethink.co.uk
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-03-05 19:03:51 +00:00
Mark Brown
4d4becffe4
regulator: pf9453: Fix IRQ trigger and allow
Merge series from Franz Schnyder <franz.schnyder@toradex.com>:

The IRQ_B pin is an open-drain output. The datasheet specifies, that the
IRQ_B pin is pulled low when any unmasked interrupt bit status
is changed, and it is released high once the application processor reads
the INT1 register. As it specifies a level-low behavior, it should not
force a falling-edge interrupt.

Remove the IRQF_TRIGGER_FALLING to not force the falling-edge interrupt
and instead rely on the flag from the device tree.
Set the IRQF_SHARED to be able to share the interrupt line with
other devices. If the interrupt has not been triggered by the PMIC,
return IRQ_NONE.
2026-03-02 23:11:58 +00:00
Franz Schnyder
e84141846d
regulator: pf9453: Allow shared IRQ
The PF9453 datasheet specifies the IRQ_B pin as an open drain output
with level-low behavior. This makes it capable to share the interrupt
line. To allow shared interrupts, the driver must handle the case
if the interrupt has been triggered by another device.

Set IRQF_SHARED to be able to share the interrupt line.
If the interrupt has not been triggered by the PMIC, return IRQ_NONE.

Signed-off-by: Franz Schnyder <franz.schnyder@toradex.com>
Link: https://patch.msgid.link/20260302165357.1797803-3-fra.schnyder@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-03-02 16:56:59 +00:00
Franz Schnyder
2d85ecd6fb
regulator: pf9453: Respect IRQ trigger settings from firmware
The datasheet specifies, that the IRQ_B pin is pulled low when any
unmasked interrupt bit status is changed, and it is released high once
the application processor reads the INT1 register. As it specifies a
level-low behavior, it should not force a falling-edge interrupt.

Remove the IRQF_TRIGGER_FALLING to not force the falling-edge interrupt
and instead rely on the flag from the device tree.

Fixes: 0959b67063 ("regulator: pf9453: add PMIC PF9453 support")
Cc: stable@vger.kernel.org
Signed-off-by: Franz Schnyder <franz.schnyder@toradex.com>
Link: https://patch.msgid.link/20260218102518.238943-2-fra.schnyder@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-03-02 14:46:28 +00:00
Felix Gu
23942b71f0
regulator: mt6363: Fix incorrect and redundant IRQ disposal in probe
In mt6363_regulator_probe(), devm_add_action_or_reset() is used to
automatically dispose of the IRQ mapping if the probe fails or the
device is removed.

The manual call to irq_dispose_mapping() in the error path was redundant
as the reset action already triggers mt6363_irq_remove(). Furthermore,
the manual call incorrectly passed the hardware IRQ number (info->hwirq)
instead of the virtual IRQ mapping (info->virq).

Remove the redundant and incorrect manual disposal.

Fixes: 3c36965df8 ("regulator: Add support for MediaTek MT6363 SPMI PMIC Regulators")
Signed-off-by: Felix Gu <ustc.gu@gmail.com>
Link: https://patch.msgid.link/20260223-mt6363-v1-1-c99a2e8ac621@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-03-01 23:48:17 +00:00
Mark Brown
4add09ab35
mfd: cpcap: convert documentation to schema and add
Merge series from Svyatoslav Ryhel <clamor95@gmail.com>:

The initial goal was only to add support for the CPCAP used in the Mot
Tegra20 board; however, since the documentation was already partially
converted, I decided to complete the conversion to schema too.
2026-02-26 21:36:20 +00:00
Svyatoslav Ryhel
d90c0f7837
regulator: cpcap-regulator: add support for Mot regulators
Add support for regulator set used in Motorola Mot board, used as a base
for Atrix 4G and Droid X2 smartphones.

Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
Link: https://patch.msgid.link/20260223063858.12208-4-clamor95@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-02-26 18:55:37 +00:00
Felix Gu
bfd7db781e
regulator: Kconfig: fix a typo
Fixes a typo in Kconfig, HWWON -> HWMON

Signed-off-by: Felix Gu <ustc.gu@gmail.com>
Link: https://patch.msgid.link/20260224-kconfig-v1-1-b0c5459ed7a0@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-02-24 17:31:56 +00:00
Felix Gu
4baaddaa44
regulator: bq257xx: Fix device node reference leak in bq257xx_reg_dt_parse_gpio()
In bq257xx_reg_dt_parse_gpio(), if fails to get subchild, it returns
without calling of_node_put(child), causing the device node reference
leak.

Fixes: 981dd162b6 ("regulator: bq257xx: Add bq257xx boost regulator driver")
Signed-off-by: Felix Gu <ustc.gu@gmail.com>
Link: https://patch.msgid.link/20260224-bq257-v1-1-8ebbc731c1c3@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-02-24 17:31:55 +00:00
Felix Gu
0902010c8d
regulator: fp9931: Fix PM runtime reference leak in fp9931_hwmon_read()
In fp9931_hwmon_read(), if regmap_read() failed, the function returned
the error code without calling pm_runtime_put_autosuspend(), causing
a PM reference leak.

Fixes: 12d821bd13 ("regulator: Add FP9931/JD9930 driver")
Signed-off-by: Felix Gu <ustc.gu@gmail.com>
Reviewed-by: Andreas Kemnade <andreas@kemnade.info>
Link: https://patch.msgid.link/20260224-fp9931-v1-1-1cf05cabef4a@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-02-24 17:31:54 +00:00
Yufan Chen
4b73231b2a
regulator: tps65185: check devm_kzalloc() result in probe
tps65185_probe() dereferences the allocation result immediately by using data->regmap. If devm_kzalloc() returns NULL under memory pressure, this leads to a NULL pointer dereference.

Add the missing allocation check and return -ENOMEM on failure.

Signed-off-by: Yufan Chen <ericterminal@gmail.com>
Link: https://patch.msgid.link/20260222104035.90790-1-ericterminal@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-02-23 14:52:16 +00:00
Mark Brown
f308205e3b
regulator: spacemit-p1: Support board power tree
Merge series from Guodong Xu <guodong@riscstar.com>:

Patch 1, 2 and 3 (previously 2-4) enable flexible power tree
configurations for the SpacemiT P1 PMIC. Hardcoded supply assumptions
are replaced with explicit devicetree properties. PMIC supply connections
are board-design decisions. Moving this to DT allows supporting varied
topologies without driver modifications.

The supply binding change is an ABI change. The breakage is acceptable:
Yixun Lan checked the DTS tree queued for v6.20 and found no consumers
of the P1/PMIC regulator yet [1]. For the two K1 boards in-tree
(BPI-F3 and Jupiter), initial power settings come from boot firmware and
a probe failure of pmic node "spacemit,p1" has minimal impact.

In v4, the old "vin-supply" property is dropped from the binding
document as the updated driver no longer parses it and there is no
fallback logic. Only the per-rail names ("vin1-supply", "vin2-supply",
...) are supported going forward.

Intermittent dtbs_check warnings are expected while the binding and DTS
changes land through different trees, but will resolve once both are
merged.

Link: https://lore.kernel.org/lkml/20260125110333-GYD71302@gentoo.org/ [1]
2026-02-23 14:49:44 +00:00
Krzysztof Kozlowski
0556bb42a8
regulator: pf0900: Make regu_irqs variable static const
File-scope 'regu_irqs' is not used outside of this unit and is not
modified anywhere, so make it static const to silence sparse warning:

  pf0900-regulator.c:774:29: warning: symbol 'regu_irqs' was not declared. Should it be static?

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Link: https://patch.msgid.link/20260216085804.69102-2-krzysztof.kozlowski@oss.qualcomm.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-02-22 23:53:49 +00:00
Guodong Xu
fbb4c52ccd
regulator: spacemit-p1: Update supply names
Update supply names to match the P1 PMIC's actual hardware pinout where
each buck has an individual VIN pin (vin1-vin6) and LDO groups have
dedicated input pins (aldoin, dldoin1, dldoin2).

This is an ABI change from the original "vin" and "buck5" supplies.
The P1/PMIC regulator has no consumers in the DTS tree yet. For the two
K1 boards in-tree (BPI-F3 and Jupiter), power settings come from
boot firmware, so a probe failure has minimal impact.

Signed-off-by: Guodong Xu <guodong@riscstar.com>
Link: https://developer.spacemit.com/documentation?token=T1Btw2BdiiSlSXkAdibcoMetnag
[1]
Reviewed-by: Alex Elder <elder@riscstar.com>
Link: https://patch.msgid.link/20260206-spacemit-p1-v4-2-8f695d93811e@riscstar.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-02-22 23:53:44 +00:00
Linus Torvalds
32a92f8c89 Convert more 'alloc_obj' cases to default GFP_KERNEL arguments
This converts some of the visually simpler cases that have been split
over multiple lines.  I only did the ones that are easy to verify the
resulting diff by having just that final GFP_KERNEL argument on the next
line.

Somebody should probably do a proper coccinelle script for this, but for
me the trivial script actually resulted in an assertion failure in the
middle of the script.  I probably had made it a bit _too_ trivial.

So after fighting that far a while I decided to just do some of the
syntactically simpler cases with variations of the previous 'sed'
scripts.

The more syntactically complex multi-line cases would mostly really want
whitespace cleanup anyway.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2026-02-21 20:03:00 -08:00