Commit Graph

2490 Commits

Author SHA1 Message Date
Linus Torvalds
24e5c3241a MFD for v6.17
- New Support & Features
   * Add extensive support for the Analog Devices ADP5589 I/O expander, including
     core MFD, GPIO, PWM, and a new keypad matrix input driver. This also adds
     support for handling various events including GPI, keypad, reset and unlock
     ev ents.
   * Add support for the TI TPS652G1 PMIC, a stripped-down version of the TPS65224,
     including core MFD, PFSM, pinctrl, and GPIO support.
   * Add support for the Apple Silicon System Management Controller (SMC), including
     the core MFD driver which handles the RTKit-based protocol, a new GPIO driver
     for PMU GPIOs, and a new reboot/power-off driver.
 
 - Improvements & Fixes
   * Dynamically add ADP5585 sub-devices based on device tree properties.
   * Move ADP5585 oscillator control from the child PWM driver to the main MFD
     driver to better handle shared resources.
   * Add support for a hardware reset pin and VDD regulator to the ADP5585 driver.
   * Update the TPS65219 MFD cell's GPIO compatible string for the TPS65214 to
     reflect hardware capabilities correctly.
   * Separate the ChromeOS EC charge-control probing from the USB-PD subsystem,
     allowing it to probe independently based on the dedicated EC_FEATURE_CHARGER.
   * Fix an interrupt naming typo in the MT6370 driver.
   * Fix RK806 PMIC reset behavior by allowing the reset mode to be customized via a
     new device tree property.
   * Fix AXP20X regulator cell ID conflicts for secondary PMICs on boards without an
     IRQ line connected.
   * Fix MT6397 keypad sub-device creation to use specific names instead of a
     generic one, ensuring correct driver binding.
   * Fix a build warning in the stm32-timers driver by adding a missing include for
     export.h.
 
 - Cleanups & Refactoring
   * Refactor the ADP5585 driver to simplify how regmap defaults are handled, making
     it easier to add new chip variants.
   * Introduce per-chip register map structures for the ADP5585/ADP5589 family to
     handle differences between the devices.
   * Convert several drivers to use dev_fwnode() instead of of_fwnode_handle().
   * Make various static structures const in the cs40l50, rohm-bd71828, tps65219,
     and twl6040 drivers.
   * Remove redundant pm_runtime_mark_last_busy() calls from several drivers.
   * Alphabetize Kconfig entries for Cirrus Logic and Maxim drivers.
   * Remove unused fields from the 'tps65219' struct.
   * Update several MFD-related headers to follow the 'Include What You Use' (IWYU)
     principle.
 
 - Removals
   * Remove the old, platform-data-based adp5589-keys input driver, which is now
     superseded by the new MFD-based adp5585-keys driver.
   * Remove the unused twl6030_mmc_card_detect() functions and associated header
     declarations.
   * Remove the now unused pcf50633/core.h header file.
   * Remove the fsl,imx8qxp-csr device tree binding, which was being used
     incorrectly.
 
 - Device Tree Bindings Updates
   * Add support for the Analog Devices ADP5589 I/O expander to the adi,adp5585.yaml
     binding.
   * Add new properties to the adi,adp5585.yaml binding for input events, including
     keypad pins, unlock events, and reset events.
   * Add a reset-gpios property to the adi,adp5585.yaml binding.
   * Add the TI TPS652G1 PMIC to the ti,tps6594.yaml binding.
   * Add new bindings for the Apple Mac System Management Controller (SMC) and its
     sub-devices: apple,smc.yaml, apple,smc-gpio.yaml, and apple,smc-reboot.yaml.
   * Convert the Freescale MXS LRADC binding (mxs-lradc) to YAML schema format.
   * Convert and combine the NXP LPC1850 CREG, DMAMUX, and USB OTG PHY bindings into
     a single YAML schema file.
   * Convert the TI TPS65910 binding to YAML schema format.
   * Add a comment to the samsung,s2mps11.yaml binding to clarify the use of 'oneOf'
     for interrupt properties.
   * Add the rockchip,reset-mode property to the rockchip,rk806.yaml binding to
     allow customization of the PMIC's reset behavior.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEdrbJNaO+IJqU8IdIUa+KL4f8d2EFAmiKNQgACgkQUa+KL4f8
 d2HXOw//bquorwKRgOmi85ZMFNVowywRiUfEYUmKKkjlaK/mfUwmiPxlzREWmR0p
 paAvlL2bKHYsEt/3gh8l8Q8cIo3ELlhSHmECG22Pz8+msq06n7vZ/fpzXhjqdHLR
 PIyA7oJv2kBE+glmRiDL2yRGQU42i/Mmq5vo9eJD49aOL8nOzNk17N7fFp9aDGQ6
 C+MDrvaFV4jYjMH8/A/pBh9KaPwzvuIvNvMFeC4F5Zjpym6X1gClDEVgQvSHsyz0
 NyT2qpHG6KkUVNhm8dBcYUxdAbpZLjWiPpqfe4KzWflZ9kUjAow5z2NhiwtDxZuG
 DVICs64O1YvoqZXIazptYEIHLmDks1URdADd/efJDbBKm12G2DgRJtbLVFW/hWUz
 g7itYgJk3cpRoFUVjiniLvy+Nlp67XfN5qADNiHnRJpk4DCW5sNqPp5AHFhhD8hC
 5t6EyOYaO7U1I+0ZgWvsSaCv+D/r4pjcUBalUB1Wh7QcEWOXVJgFmkggbXEPEzob
 FtM6GCFcIr+yrrqGL3o6DNgQmuiAenuIjGs9jk6on+0zUmDvgvwbERpktweEofki
 anW4jtm0tDKSP9qBFEhGC8dOygFU/jnXqaHGsXeEHOv5zb5mSk/dL+W/QHqmG2QO
 08UEh02sfWiUE8hwL3vZ/cXvR7SfgK00nBC3g8QfEWF1AHplGE0=
 =YYgL
 -----END PGP SIGNATURE-----

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

Pull MFD updates from Lee Jones:
 "New Support & Features:

   - Add extensive support for the Analog Devices ADP5589 I/O expander,
     including core MFD, GPIO, PWM, and a new keypad matrix input
     driver. This also adds support for handling various events
     including GPI, keypad, reset and unlock ev ents

   - Add support for the TI TPS652G1 PMIC, a stripped-down version of
     the TPS65224, including core MFD, PFSM, pinctrl, and GPIO support

   - Add support for the Apple Silicon System Management Controller
     (SMC), including the core MFD driver which handles the RTKit-based
     protocol, a new GPIO driver for PMU GPIOs, and a new
     reboot/power-off driver.

  Improvements & Fixes:

   - Dynamically add ADP5585 sub-devices based on device tree properties

   - Move ADP5585 oscillator control from the child PWM driver to the
     main MFD driver to better handle shared resources

   - Add support for a hardware reset pin and VDD regulator to the
     ADP5585 driver

   - Update the TPS65219 MFD cell's GPIO compatible string for the
     TPS65214 to reflect hardware capabilities correctly

   - Separate the ChromeOS EC charge-control probing from the USB-PD
     subsystem, allowing it to probe independently based on the
     dedicated EC_FEATURE_CHARGER

   - Fix an interrupt naming typo in the MT6370 driver

   - Fix RK806 PMIC reset behavior by allowing the reset mode to be
     customized via a new device tree property

   - Fix AXP20X regulator cell ID conflicts for secondary PMICs on
     boards without an IRQ line connected

   - Fix MT6397 keypad sub-device creation to use specific names instead
     of a generic one, ensuring correct driver binding

   - Fix a build warning in the stm32-timers driver by adding a missing
     include for export.h.

  Cleanups & Refactoring:

   - Refactor the ADP5585 driver to simplify how regmap defaults are
     handled, making it easier to add new chip variants

   - Introduce per-chip register map structures for the ADP5585/ADP5589
     family to handle differences between the devices

   - Convert several drivers to use dev_fwnode() instead of
     of_fwnode_handle()

   - Make various static structures const in the cs40l50, rohm-bd71828,
     tps65219, and twl6040 drivers

   - Remove redundant pm_runtime_mark_last_busy() calls from several
     drivers

   - Alphabetize Kconfig entries for Cirrus Logic and Maxim drivers

   - Remove unused fields from the 'tps65219' struct

   - Update several MFD-related headers to follow the 'Include What You
     Use' (IWYU) principle.

  Removals:

   - Remove the old, platform-data-based adp5589-keys input driver,
     which is now superseded by the new MFD-based adp5585-keys driver

   - Remove the unused twl6030_mmc_card_detect() functions and
     associated header declarations

   - Remove the now unused pcf50633/core.h header file

   - Remove the fsl,imx8qxp-csr device tree binding, which was being
     used incorrectly.

  Device Tree Bindings Updates:

   - Add support for the Analog Devices ADP5589 I/O expander to the
     adi,adp5585.yaml binding

   - Add new properties to the adi,adp5585.yaml binding for input
     events, including keypad pins, unlock events, and reset events

   - Add a reset-gpios property to the adi,adp5585.yaml binding

   - Add the TI TPS652G1 PMIC to the ti,tps6594.yaml binding

   - Add new bindings for the Apple Mac System Management Controller
     (SMC) and its sub-devices: apple,smc.yaml, apple,smc-gpio.yaml, and
     apple,smc-reboot.yaml

   - Convert the Freescale MXS LRADC binding (mxs-lradc) to YAML schema
     format

   - Convert and combine the NXP LPC1850 CREG, DMAMUX, and USB OTG PHY
     bindings into a single YAML schema file

   - Convert the TI TPS65910 binding to YAML schema format

   - Add a comment to the samsung,s2mps11.yaml binding to clarify the
     use of 'oneOf' for interrupt properties

   - Add the rockchip,reset-mode property to the rockchip,rk806.yaml
     binding to allow customization of the PMIC's reset behavior"

* tag 'mfd-next-6.17' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: (28 commits)
  mfd: dt-bindings: Convert TPS65910 to DT schema
  mfd: Minor Cirrus/Maxim Kconfig order fixes
  mfd: Remove redundant pm_runtime_mark_last_busy() calls
  mfd: mt6397: Do not use generic name for keypad sub-devices
  mfd: axp20x: Set explicit ID for regulator cell if no IRQ line is present
  mfd: mt6370: Fix the interrupt naming typo
  mfd: rk8xx-core: Allow to customize RK806 reset mode
  dt-bindings: mfd: rk806: Allow to customize PMIC reset mode
  mfd: syscon: atmel-smc: Don't use "proxy" headers
  mfd: madera: Don't use "proxy" headers
  mfd: wm8350-core: Don't use "proxy" headers
  dt-bindings: mfd: samsung,s2mps11: Add comment about interrupts properties
  mfd: davinci_voicecodec: Don't use "proxy" headers
  mfd: pcf50633: Remove the header file core.h
  mfd: tps65219: Remove another unused field from 'struct tps65219'
  mfd: tps65219: Remove an unused field from 'struct tps65219'
  mfd: tps65219: Constify struct regmap_irq_sub_irq_map and tps65219_chip_data
  mfd: rohm-bd71828: Constify some structures
  dt-bindings: mfd: fsl,imx8qxp-csr: Remove binding documentation
  mfd: axp20x: Set explicit ID for AXP313 regulator
  ...
2025-07-31 11:50:25 -07:00
Linus Torvalds
bf977a9ad3 regulator: Updates for v6.17
The big change in this release is the addition of Rust bindings from
 Daniel Almeida, allowing fairly basic consumer use with support for
 enable and voltage setting operations.  This should be good for the vast
 majority of consumers.  Otherwise it's been quite quiet, a few new
 devices supported, plus some cleanups and fixes.
 
  - Basic Rust bindings.
  - A fix for making large voltage changes on regulators where we limit
    the size of voltage change we will do in one step, previously we just
    got as close as we could in one step.
  - Cleanups of our usage of the PM autosuspend functions, this pulls in
    some PM core changes on a shared tag.
  - Mode setting support for PCA9450.
  - Support for Mediatek MT6893 and MT8196 DVFSRC, Qualcomm PM7550 and
    PMR735B, Raspberry Pi displays and TI TPS652G1.
 
 The TI driver pulls in the MFD portion of the support for the device and
 the pinctrl driver which was in the same tag.
 -----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmiHaHcACgkQJNaLcl1U
 h9Dw7Af9HSpY+r/dZzBN1wGky4Yd40tRKP5u5HzHc9T+gG8716wr/KE4SrMIWHax
 8SIiKZDC/Bu2kj3D4xaJrb6a8M0AIpRS3IwAbLWqkJ9jPF2082tp+GwbJqI045Ix
 ZAWJVUEYQyJ3wwyD0ZG/peCAGvKBgCCn0NGn7KUnAk9QrsiTq8GqDgZPWcKRzXPV
 t9twib6J/NAL6I8PKfXnuQNwA9Td79SBySKRY4UgceQtUJgzyBo8UbqMrBuZOY7j
 FvxfkYSryDDdEpRMRsczYk+jYjwQVzIa8g4B1C9EF2g5pvWg61PXNX+G2qDkeUbL
 XR1gloyJExnlyAXoVY2bg+cSzd2ffQ==
 =GAr4
 -----END PGP SIGNATURE-----

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

Pull regulator updates from Mark Brown:
 "The big change in this release is the addition of Rust bindings from
  Daniel Almeida, allowing fairly basic consumer use with support for
  enable and voltage setting operations. This should be good for the
  vast majority of consumers.

  Otherwise it's been quite quiet, a few new devices supported, plus
  some cleanups and fixes.

  Summary:

   - Basic Rust bindings

   - A fix for making large voltage changes on regulators where we limit
     the size of voltage change we will do in one step, previously we
     just got as close as we could in one step

   - Cleanups of our usage of the PM autosuspend functions, this pulls
     in some PM core changes on a shared tag

   - Mode setting support for PCA9450

   - Support for Mediatek MT6893 and MT8196 DVFSRC, Qualcomm PM7550 and
     PMR735B, Raspberry Pi displays and TI TPS652G1

  The TI driver pulls in the MFD portion of the support for the device
  and the pinctrl driver which was in the same tag"

* tag 'regulator-v6.17' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: (40 commits)
  regulator: mt6370: Fix spelling mistake in mt6370_regualtor_register
  regulator: Kconfig: Fix spelling mistake "regualtor" -> "regulator"
  regulator: core: repeat voltage setting request for stepped regulators
  regulator: rt6160: Add rt6166 vout min_uV setting for compatible
  MAINTAINERS: add regulator.rs to the regulator API entry
  rust: regulator: add a bare minimum regulator abstraction
  regulator: tps6286x-regulator: Fix a copy & paste error
  regulator: qcom-rpmh: add support for pm7550 regulators
  regulator: qcom-rpmh: add support for pmr735b regulators
  regulator: dt-bindings: qcom,rpmh: Add PMR735B compatible
  regulator: dt-bindings: qcom,rpmh: Add PM7550 compatible
  regulator: tps6594-regulator: Add TI TPS652G1 PMIC regulators
  regulator: tps6594-regulator: refactor variant descriptions
  regulator: tps6594-regulator: remove hardcoded buck config
  regulator: tps6594-regulator: remove interrupt_count
  dt-bindings: mfd: ti,tps6594: Add TI TPS652G1 PMIC
  pinctrl: pinctrl-tps6594: Add TPS652G1 PMIC pinctrl and GPIO
  misc: tps6594-pfsm: Add TI TPS652G1 PMIC PFSM
  mfd: tps6594: Add TI TPS652G1 support
  regulator: sy8827n: make enable gpio NONEXCLUSIVE
  ...
2025-07-28 22:52:02 -07:00
Linus Torvalds
fcb117e075 gpio updates for v6.17-rc1
GPIOLIB core:
 - introduce a parallel, limited sysfs user ABI that doesn't expose the
   global GPIO numbers to user-space while maintaining backward
   compatibility with the end goal of it completely replacing the existing
   interface, allowing us to remove it
 - remove the legacy devm_gpio_request() routine which has no more users
 - start the process of allowing to compile-out the legacy parts of the
   GPIO core for users who don't need it by introducing a new Kconfig
   option: GPIOLIB_LEGACY
 - don't use global GPIO numbers in debugfs output from the core code
   (drivers still do it, the work is ongoing)
 - start the process of moving the fields specific to the gpio-mmio helper
   out of the core struct gpio_chip into their own structure that wraps
   it: create a new header with modern interfaces and convert several
   drivers to using it
 - remove the platform data structure associated with the gpio-mmio helper
   from the kernel after having converted all remaining users to generic
   device properties
 - remove legacy struct gpio definition as it has no more users
 
 New drivers:
 - add the GPIO driver for the Apple System Management Controller
 
 Driver improvements:
 - add support for new models to gpio-adp5585, gpio-tps65219 and
   gpio-pca953x
 - extend the interrupt support in gpio-loongson-64bit
 - allow to mark the simulated GPIO lines as invalid in gpio-sim
 - convert all remaining GPIO drivers to using the new GPIO value setter
   callbacks
 - convert gpio-rcar to using simple device power management ops callbacks
 - don't check if current direction of a line is output before setting
   the value in gpio-pisosr and ti-fpc202: the GPIO core already handles
   that
 - also drop unneeded GPIO range checks in drivers, the core already makes
   sure we're within bounds when calling driver callbacks
 - use dev_fwnode() where applicable across GPIO drivers
 - set line value in gpio-zynqmp-modepin and gpio-twl6040 when the user
   wants to change direction of the pin to output even though these
   drivers don't need to do anything else to actually set the direction,
   otherwise a call like gpiod_direction_output(d, 1) will not result in
   the line driver high
 - remove the reduntant call to pm_runtime_mark_last_busy() from
   gpio-arizona
 - use lock guards in gpio-cadence and gpio-mxc
 - check the return values of regmap functions in gpio-wcd934x and
   gpio-tps65912
 - use better regmap interfaces in gpio-wcove and gpio-pca953x
 - remove dummy GPIO chip callbacks from several drivers in cases where
   the GPIO core can already handle their absence
 - allow building gpio-palmas as a module
 
 Fixes:
 - use correct bit widths (according to the documentation) in gpio-virtio
 
 Device-tree bindings:
 - convert several of the legacy .txt documents for many different devices
   to YAML, improving automatic validation
 - create a "trivial" GPIO DT schema that covers a wide range of simple
   hardware that share a set of basic GPIO properties
 - document new HW: Apple MAC SMC GPIO block and adp5589 I/O expander
 - document a new model for pca95xx
 - add and/or remove properties in YAML documents for gpio-rockchip,
   fsl,qoriq-gpio, arm,pl061 and gpio-xilinx
 
 Misc:
 - some minor refactoring in several places, adding/removing forward
   declarations, moving defines to better places, constify the arguments
   in some functions, remove duplicate includes, etc.
 - documentation updates
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEFp3rbAvDxGAT0sefEacuoBRx13IFAmiHQsUACgkQEacuoBRx
 13LNDxAAsHxVqBjdCSzmnOCteIRrRWv8yCzeuPzFWekxGPJNEx/tC83cqdLF2yN/
 MFrlQLx4ZksCBWOmcoC9aQE5c8ZXfnugF2rztxeDIRtSwC0ED97K9Z798RrgLJUF
 M6HyaWgsEcMBDk0jXG2w3JESnPbx74VnGtPixv8+QeiM2DA5XRsLPaPbQEkatBVo
 9T7Ls/vfS6AK9fSqMg2ZjKi3bXpXMsmU4PXrhh/mCGSBU/TO3fF1IPig5SsKUpNL
 C2nm3e4XIaXCNIBqgGSpppbzCrwDBlDTb029QtoStXgsiMbppXI532NjuCfDlj80
 1Vlmwot4O91SJoC9XvmSM6KBWrBqX2zL3bYtpkLymEPPS8+25gwQ3HxteIzl1V4S
 Up8KZ+9EmNxxhfKYzhdWG0Puyam4sHiP1MlkeyEKgHJen4/07Pg4WdOthyuH72tg
 /U5wS+zDhhDpibHFYdQ5F04ubMfVxipvf0JHhbjuDAuXKqGohjJNUiE2/M7yBnyd
 n0IS9Bw95lOLepbAHkm/JneFvSJYJfOrLz+d981664tfrY7A99RLtSOluzQKSrzz
 dpqc+yn+x/TKaZeYV22mhIri5o9oupT7JqPHqXYe//iWzJt3m2EavzTRoR2JeJQq
 p7Quytgfj4FcR2v6GyldXWwFhRK0397kOLcNUQ7HVMaOAMMi5Y8=
 =tUPm
 -----END PGP SIGNATURE-----

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

Pull gpio updates from Bartosz Golaszewski:
 "There's one new driver (Apple SMC) and extensions to existing drivers
  for supporting new HW models. A lot of different impovements across
  drivers and in core GPIO code. Details on that are in the signed tag
  as usual.

  We managed to remove some of the legacy APIs. Arnd Bergmann started to
  work on making the legacy bits optional so that we may compile them
  only for older platforms that still really need them.

  Rob Herring has done a lot of work to convert legacy .txt dt-bindings
  for GPIO controllers to YAML. There are only a few left now in the
  GPIO tree.

  A big part of the commits in this PR concern the conversion of GPIO
  drivers to using the new line value setter callbacks. This conversion
  is now complete treewide (unless I've missed something) and once all
  the changes from different trees land in mainline, I'll send you
  another PR containing a commit dropping the legacy callbacks from the
  tree.

  As the quest to pay back technical dept never really ends, we're
  starting another set of interface conversions, this time it's about
  moving fields specific to only a handful of drivers using the
  gpio-mmio helper out of the core gpio_chip structure that every
  controller implements and uses. This cycle we introduce a new set of
  APIs and convert a few drivers under drivers/gpio/, next cycle we'll
  convert remaining modules treewide (in gpio, pinctrl and mfd trees)
  and finally remove the old interfaces and move the gpio-mmio fields
  into their own structure wrapping gpio_chip.

  One last change I should mention here is the rework of the sysfs
  interface. In 2016, we introduced the GPIO character device as the
  preferred alternative to the sysfs class under /sys/class/gpio. While
  it has seen a wide adoption with the help of its user-space
  counterpart - libgpiod - there are still users who prefer the
  simplicity of sysfs.

  As far as the GPIO subsystem is concerned, the problem is not the
  existince of the GPIO class as such but rather the fact that it
  exposes the global GPIO numbers to the user-space, stopping us from
  ever being able to remove the numberspace from the kernel. To that
  end, this release we introduced a parallel, limited sysfs interface
  that doesn't expose these numbers and only implements a subset of
  features that are relevant to the existing users. This is a result of
  several discussions over the course of last year and should allow us
  to remove the legacy part some time in the future.

  Summary:

  GPIOLIB core:
   - introduce a parallel, limited sysfs user ABI that doesn't expose
     the global GPIO numbers to user-space while maintaining backward
     compatibility with the end goal of it completely replacing the
     existing interface, allowing us to remove it
   - remove the legacy devm_gpio_request() routine which has no more
     users
   - start the process of allowing to compile-out the legacy parts of
     the GPIO core for users who don't need it by introducing a new
     Kconfig option: GPIOLIB_LEGACY
   - don't use global GPIO numbers in debugfs output from the core code
     (drivers still do it, the work is ongoing)
   - start the process of moving the fields specific to the gpio-mmio
     helper out of the core struct gpio_chip into their own structure
     that wraps it: create a new header with modern interfaces and
     convert several drivers to using it
   - remove the platform data structure associated with the gpio-mmio
     helper from the kernel after having converted all remaining users
     to generic device properties
   - remove legacy struct gpio definition as it has no more users

  New drivers:
   - add the GPIO driver for the Apple System Management Controller

  Driver improvements:
   - add support for new models to gpio-adp5585, gpio-tps65219 and
     gpio-pca953x
   - extend the interrupt support in gpio-loongson-64bit
   - allow to mark the simulated GPIO lines as invalid in gpio-sim
   - convert all remaining GPIO drivers to using the new GPIO value
     setter callbacks
   - convert gpio-rcar to using simple device power management ops
     callbacks
   - don't check if current direction of a line is output before setting
     the value in gpio-pisosr and ti-fpc202: the GPIO core already
     handles that
   - also drop unneeded GPIO range checks in drivers, the core already
     makes sure we're within bounds when calling driver callbacks
   - use dev_fwnode() where applicable across GPIO drivers
   - set line value in gpio-zynqmp-modepin and gpio-twl6040 when the
     user wants to change direction of the pin to output even though
     these drivers don't need to do anything else to actually set the
     direction, otherwise a call like gpiod_direction_output(d, 1) will
     not result in the line driver high
   - remove the reduntant call to pm_runtime_mark_last_busy() from
     gpio-arizona
   - use lock guards in gpio-cadence and gpio-mxc
   - check the return values of regmap functions in gpio-wcd934x and
     gpio-tps65912
   - use better regmap interfaces in gpio-wcove and gpio-pca953x
   - remove dummy GPIO chip callbacks from several drivers in cases
     where the GPIO core can already handle their absence
   - allow building gpio-palmas as a module

  Fixes:
   - use correct bit widths (according to the documentation) in
     gpio-virtio

  Device-tree bindings:
   - convert several of the legacy .txt documents for many different
     devices to YAML, improving automatic validation
   - create a "trivial" GPIO DT schema that covers a wide range of
     simple hardware that share a set of basic GPIO properties
   - document new HW: Apple MAC SMC GPIO block and adp5589 I/O expander
   - document a new model for pca95xx
   - add and/or remove properties in YAML documents for gpio-rockchip,
     fsl,qoriq-gpio, arm,pl061 and gpio-xilinx

  Misc:
   - some minor refactoring in several places, adding/removing forward
     declarations, moving defines to better places, constify the
     arguments in some functions, remove duplicate includes, etc.
   - documentation updates"

* tag 'gpio-updates-for-v6.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux: (202 commits)
  MIPS: alchemy: gpio: use new GPIO line value setter callbacks for the remaining chips
  gpiolib: enable CONFIG_GPIOLIB_LEGACY even for !GPIOLIB
  gpio: virtio: Fix config space reading.
  gpiolib: make legacy interfaces optional
  dt-bindings: gpio: rockchip: Allow use of a power-domain
  gpiolib: of: add forward declaration for struct device_node
  power: reset: macsmc-reboot: Add driver for rebooting via Apple SMC
  gpio: Add new gpio-macsmc driver for Apple Macs
  mfd: Add Apple Silicon System Management Controller
  soc: apple: rtkit: Make shmem_destroy optional
  dt-bindings: mfd: Add Apple Mac System Management Controller
  dt-bindings: power: reboot: Add Apple Mac SMC Reboot Controller
  dt-bindings: gpio: Add Apple Mac SMC GPIO block
  gpio: cadence: Remove duplicated include in gpio-cadence.c
  gpio: tps65219: Add support for TI TPS65214 PMIC
  gpio: tps65219: Update _IDX & _OFFSET macro prefix
  gpio: sysfs: Fix an end of loop test in gpiod_unexport()
  dt-bindings: gpio: Convert qca,ar7100-gpio to DT schema
  dt-bindings: gpio: Convert maxim,max3191x to DT schema
  dt-bindings: gpio: fsl,qoriq-gpio: Add missing mpc8xxx compatibles
  ...
2025-07-28 21:58:46 -07:00
Bartosz Golaszewski
8c7a86088a Immutable branch between MFD, GPIO, Power and SoC due for the v6.17 merge window
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEdrbJNaO+IJqU8IdIUa+KL4f8d2EFAmiCCbUACgkQUa+KL4f8
 d2H+ZA//Zy+DBrMj9q+5EWoNCfwEtPY2/FFCDxNPIQyV24xF2DywthvmP3/Hbqlu
 JE1I5DURclOz5RRNaoyYLSmBlHU+jlYpjvhGDSAx4tA1aynh+DYy7eW62FdWnqhy
 yxD/wRSiIegrqt26HrPfjqlToevbyrHp4Tk8f90cr/g2YJnS84L/myHTmm0dZw3G
 I4WdFYmkxm4KZQXa2l7d1PzFCIRq6P2nWH8rRUbGCuGKAaDyykdgrAzZdbcdWKoY
 TinYa41Aag6w19rIpqgoIo9ycGRyBCj1Bg4kPtr9C1OelAMqAIdyB3WDwNgl14vX
 RGAp+J3XYDFIMY/WA1r7t+CEOBkYhvYmbrsGcNBMpe4jdUr9QsqADIHd+nwXydow
 SsG6K57L3qAH/CRbiqji3tV2NLxuJwE2HE/1WEuUCtPwjAGdzmd3tFdzrdxewwWb
 8fSHncstlTXwzQoveUbuCPjQi7iAlatzWqAhcc18G7XlTq4f2tFwRGrc6tK/iOug
 6RqlqTy4utetYiS8mScz3VLezHrKNWJoy0c/oKkBP8ZUQRGv9mmYoulkesZ4SJ/v
 uXtiqNYrioWbULTOHRbrXqL9ukD6GdnesWdaRLCTGcyRs8UwA9Dj1NqpNV5VEbAE
 V04jH0Uj/KI5X1l3c+QQBdooIRs9Tt7gRr0Re8mBaW6CGVAedOU=
 =bazF
 -----END PGP SIGNATURE-----

Merge tag 'ib-mfd-gpio-power-soc-v6.17' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd into gpio/for-next

Immutable branch between MFD, GPIO, Power and SoC due for the v6.17 merge window
2025-07-24 13:27:21 +02:00
Quentin Schulz
db8db85cff mfd: rk8xx-core: Allow to customize RK806 reset mode
The RK806 PMIC has a bitfield for configuring the restart/reset behavior
(which I assume Rockchip calls "function") whenever the PMIC is reset
either programmatically (c.f. DEV_RST in the datasheet) or via PWRCTRL
or RESETB pins.

For RK806, the following values are possible for RST_FUN:

0b00 means "Restart PMU"
0b01 means "Reset all the power off reset registers, forcing
	the state to switch to ACTIVE mode"
0b10 means "Reset all the power off reset registers, forcing
	the state to switch to ACTIVE mode, and simultaneously
	pull down the RESETB PIN for 5mS before releasing"
0b11 means the same as for 0b10 just above.

This adds the appropriate logic in the driver to parse the new
rockchip,reset-mode DT property to pass this information. It just
happens that the values in the binding match the values to write in the
bitfield so no mapping is necessary.

If it is missing, the register is left untouched and relies either on
the silicon default or on whatever was set earlier in the boot stages
(e.g. the bootloader).

Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
Link: https://lore.kernel.org/r/20250627-rk8xx-rst-fun-v4-2-ce05d041b45f@cherry.de
Signed-off-by: Lee Jones <lee@kernel.org>
2025-07-24 11:27:17 +01:00
Andy Shevchenko
b9ec71fbd5 mfd: syscon: atmel-smc: Don't use "proxy" headers
Update header inclusions to follow IWYU (Include What You Use)
principle.

Note that kernel.h is discouraged to be included as it's written
at the top of that file.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20250627164414.1043434-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Lee Jones <lee@kernel.org>
2025-07-24 11:27:15 +01:00
Andy Shevchenko
dd394515d1 mfd: madera: Don't use "proxy" headers
Update header inclusions to follow IWYU (Include What You Use)
principle.

Note that kernel.h is discouraged to be included as it's written
at the top of that file.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20250626154544.324724-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Lee Jones <lee@kernel.org>
2025-07-24 11:27:14 +01:00
Andy Shevchenko
dd1902b6e9 mfd: wm8350-core: Don't use "proxy" headers
Update header inclusions to follow IWYU (Include What You Use)
principle.

Note that kernel.h is discouraged to be included as it's written
at the top of that file.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20250626155951.325683-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Lee Jones <lee@kernel.org>
2025-07-24 11:27:13 +01:00
Andy Shevchenko
c371040f31 mfd: davinci_voicecodec: Don't use "proxy" headers
Update header inclusions to follow IWYU (Include What You Use)
principle.

Note that kernel.h is discouraged to be included as it's written
at the top of that file.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20250626154354.324439-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Lee Jones <lee@kernel.org>
2025-07-24 11:27:11 +01:00
Dr. David Alan Gilbert
e403cdf070 mfd: pcf50633: Remove the header file core.h
The patches to remove all of the pieces of the pcf50633
have gone in and we're left with the header.

Remove it.

The pcf50633 was used as part of the OpenMoko devices but
the support for its main chip was recently removed in:
commit 61b7f8920b ("ARM: s3c: remove all s3c24xx support")

See https://lore.kernel.org/all/Z8z236h4B5A6Ki3D@gallifrey/

Signed-off-by: "Dr. David Alan Gilbert" <linux@treblig.org>
Link: https://lore.kernel.org/r/20250701145625.204048-1-linux@treblig.org
Signed-off-by: Lee Jones <lee@kernel.org>
2025-07-24 11:27:10 +01:00
Christophe JAILLET
83f9afe468 mfd: tps65219: Remove another unused field from 'struct tps65219'
The 'chip_id' field from 'struct tps65219' is unused.
Remove it.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/r/f20443e6e13b0b101648a41010a19ee56589fa0b.1750530460.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Lee Jones <lee@kernel.org>
2025-07-24 11:27:09 +01:00
Christophe JAILLET
ea39dd2638 mfd: tps65219: Remove an unused field from 'struct tps65219'
Since commit 3df4c63675 ("mfd: tps65219: Add support for soft shutdown
via sys-off API"), the 'nb' field from 'struct tps65219' is unused.
Remove it.

Also remove the now useless #include <linux/notifier.h> for the same
reason.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/r/8a264c3a92b8e62c1dadd374f2685030e042eb08.1750530460.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Lee Jones <lee@kernel.org>
2025-07-24 11:27:08 +01:00
Dr. David Alan Gilbert
fe473fba64 mfd: twl6030-irq: Remove unused twl6030_mmc_card_detect*
twl6030_mmc_card_detect() and twl6030_mmc_card_detect_config() have been
unused since 2013's commit b2ff479061 ("ARM: OMAP2+: Remove legacy
omap4_twl6030_hsmmc_init")

Remove them.

Signed-off-by: "Dr. David Alan Gilbert" <linux@treblig.org>
Link: https://lore.kernel.org/r/20250607202232.265344-1-linux@treblig.org
Signed-off-by: Lee Jones <lee@kernel.org>
2025-07-24 11:27:00 +01:00
Lee Jones
f3e332d963 Merge branches 'ib-mfd-gpio-input-pwm-6.17', 'ib-mfd-gpio-power-soc-6.17' and 'ib-mfd-misc-pinctrl-6.17' into ibs-for-mfd-merged 2025-07-24 11:26:13 +01:00
Sven Peter
e038d985c9 mfd: Add Apple Silicon System Management Controller
The System Management Controller (SMC) on Apple Silicon machines is a
piece of hardware that exposes various functionalities such as
temperature sensors, voltage/power meters, shutdown/reboot handling,
GPIOs and more.

Communication happens via a shared mailbox using the RTKit protocol
which is also used for other co-processors. The SMC protocol then allows
reading and writing many different keys which implement the various
features. The MFD core device handles this protocol and exposes it
to the sub-devices.

Some of the sub-devices are potentially also useful on pre-M1 Apple
machines and support for SMCs on these machines can be added at a later
time.

Co-developed-by: Hector Martin <marcan@marcan.st>
Signed-off-by: Hector Martin <marcan@marcan.st>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Neal Gompa <neal@gompa.dev>
Signed-off-by: Sven Peter <sven@kernel.org>
Link: https://lore.kernel.org/r/20250610-smc-6-15-v7-5-556cafd771d3@kernel.org
Signed-off-by: Lee Jones <lee@kernel.org>
2025-07-24 09:47:33 +01:00
Kees Cook
2424fe1cac arm: Handle KCOV __init vs inline mismatches
When KCOV is enabled all functions get instrumented, unless
the __no_sanitize_coverage attribute is used. To prepare for
__no_sanitize_coverage being applied to __init functions, we have to
handle differences in how GCC's inline optimizations get resolved. For
arm this exposed several places where __init annotations were missing
but ended up being "accidentally correct". Fix these cases and force
several functions to be inline with __always_inline.

Acked-by: Nishanth Menon <nm@ti.com>
Acked-by: Lee Jones <lee@kernel.org>
Reviewed-by: Nishanth Menon <nm@ti.com>
Link: https://lore.kernel.org/r/20250717232519.2984886-5-kees@kernel.org
Signed-off-by: Kees Cook <kees@kernel.org>
2025-07-21 21:43:39 -07:00
Michael Walle
626bb0a455 mfd: tps6594: Add TI TPS652G1 support
The TPS652G1 is a stripped down version of the TPS65224. From a software
point of view, it lacks any voltage monitoring, the watchdog, the ESM
and the ADC.

Signed-off-by: Michael Walle <mwalle@kernel.org>
Link: https://lore.kernel.org/r/20250613114518.1772109-2-mwalle@kernel.org
Signed-off-by: Lee Jones <lee@kernel.org>
2025-07-10 09:58:01 +01:00
Nuno Sá
988b28a83b gpio: adp5585: support gpi events
Add support for adding GPIs to the event FIFO. This is done by adding
irq_chip support. Like this, one can use the input gpio_keys driver as a
"frontend" device and input handler.

As part of this change, we now implement .request() and .free() as we can't
blindly consume all available pins as GPIOs (example: some pins can be
used for forming a keymap matrix).

Also note that the number of pins can now be obtained from the parent,
top level device. Hence the 'max_gpio' variable can be removed.

Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Signed-off-by: Nuno Sá <nuno.sa@analog.com>
Link: https://lore.kernel.org/r/20250701-dev-adp5589-fw-v7-15-b1fcfe9e9826@analog.com
Signed-off-by: Lee Jones <lee@kernel.org>
2025-07-01 21:50:51 +01:00
Nuno Sá
bd113a13e1 mfd: adp5585: Add support for input devices
The ADP558x family supports a built in keypad matrix decoder which can
be added as an Input device. In order to both support the Input and the
GPIO device, we need to create a bitmap of the supported pins and track
their usage since they can either be used as GPIOs (GPIs) or as part of
the keymap.

We also need to mark special pins busy in case some features are being
used (ex: pwm or reset events).

Signed-off-by: Nuno Sá <nuno.sa@analog.com>
Link: https://lore.kernel.org/r/20250701-dev-adp5589-fw-v7-14-b1fcfe9e9826@analog.com
Signed-off-by: Lee Jones <lee@kernel.org>
2025-07-01 21:50:51 +01:00
Nuno Sá
333812da70 mfd: adp5585: Support reset and unlock events
The ADP558x family of devices can be programmed to respond to some
especial events, In case of the unlock events, one can lock the keypad
and use KEYS or GPIs events to unlock it. For the reset events, one can
again use a combinations of GPIs/KEYs in order to generate an event that
will trigger the device to generate an output reset pulse.

Signed-off-by: Nuno Sá <nuno.sa@analog.com>
Link: https://lore.kernel.org/r/20250701-dev-adp5589-fw-v7-13-b1fcfe9e9826@analog.com
Signed-off-by: Lee Jones <lee@kernel.org>
2025-07-01 21:50:51 +01:00
Nuno Sá
47a1f759b7 mfd: adp5585: Add support for event handling
These devices are capable of generate FIFO based events based on KEY or
GPI presses. Add support for handling these events. This is in
preparation of adding full support for keymap and gpis based events.

Reviewed-by: Lee Jones <lee@kernel.org>
Signed-off-by: Nuno Sá <nuno.sa@analog.com>
Link: https://lore.kernel.org/r/20250701-dev-adp5589-fw-v7-12-b1fcfe9e9826@analog.com
Signed-off-by: Lee Jones <lee@kernel.org>
2025-07-01 21:50:51 +01:00
Nuno Sá
75024f97e8 pwm: adp5585: add support for adp5589
Add support for the adp5589 I/O expander. From a PWM point of view it is
pretty similar to adp5585. Main difference is the address
of registers meaningful for configuring the PWM.

Acked-by: Uwe Kleine-König <ukleinek@kernel.org>
Signed-off-by: Nuno Sá <nuno.sa@analog.com>
Link: https://lore.kernel.org/r/20250701-dev-adp5589-fw-v7-10-b1fcfe9e9826@analog.com
Signed-off-by: Lee Jones <lee@kernel.org>
2025-07-01 21:50:51 +01:00
Nuno Sá
9f425bf713 gpio: adp5585: add support for the adp5589 expander
Support the adp5589 I/O expander which supports up to 19 pins. We need
to add a chip_info based struct since accessing register "banks"
and "bits" differs between devices.

Also some register addresses are different.

While at it move ADP558X_GPIO_MAX defines to the main header file and
rename them. That information will be needed by the top level device in
a following change.

Acked-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Signed-off-by: Nuno Sá <nuno.sa@analog.com>
Link: https://lore.kernel.org/r/20250701-dev-adp5589-fw-v7-9-b1fcfe9e9826@analog.com
Signed-off-by: Lee Jones <lee@kernel.org>
2025-07-01 21:50:51 +01:00
Nuno Sá
7077fb501b mfd: adp5585: Add a per chip reg struture
There are some differences in the register map between the devices.
Hence, add a register structure per device. This will be needed in
following patches.

On top of that adp5585_fill_regmap_config() is renamed and reworked so
that the current struct adp5585_info act as template (they indeed
contain all the different data between variants) which can then be
complemented depending on the device (as identified by the id register).
This is done like this since a lot of the data is pretty much the same
between variants of the same device.

Reviewed-by: Lee Jones <lee@kernel.org>
Signed-off-by: Nuno Sá <nuno.sa@analog.com>
Link: https://lore.kernel.org/r/20250701-dev-adp5589-fw-v7-8-b1fcfe9e9826@analog.com
Signed-off-by: Lee Jones <lee@kernel.org>
2025-07-01 21:50:51 +01:00
Nuno Sá
0190a72f28 mfd: adp5585: Add support for adp5589
The ADP5589 is a 19 I/O port expander with built-in keypad matrix decoder,
programmable logic, reset generator, and PWM generator.

Signed-off-by: Nuno Sá <nuno.sa@analog.com>
Link: https://lore.kernel.org/r/20250701-dev-adp5589-fw-v7-7-b1fcfe9e9826@analog.com
Signed-off-by: Lee Jones <lee@kernel.org>
2025-07-01 21:50:51 +01:00
Nuno Sá
1a4eabf662 mfd: adp5585: Refactor how regmap defaults are handled
The only thing changing between variants is the regmap default
registers. Hence, instead of having a regmap configuration for every
variant (duplicating lots of fields), add a chip info type of structure
with a regmap ID to identify which defaults to use and populate
regmap_config at runtime given a template plus the id. Also note that
between variants, the defaults can be the same which means the chip info
structure can be used in more than one compatible.

This will also make it simpler adding new chips with more variants.

Also note that the chip info structures are deliberately not const as
they will also contain lots of members that are the same between the
different devices variants and so we will fill those at runtime.

Signed-off-by: Nuno Sá <nuno.sa@analog.com>
Link: https://lore.kernel.org/r/20250701-dev-adp5589-fw-v7-6-b1fcfe9e9826@analog.com
Signed-off-by: Lee Jones <lee@kernel.org>
2025-07-01 21:50:50 +01:00
Sumanth Gavini
ffb006aa43 mfd: maxim: Correct Samsung "Electronics" spelling in copyright headers
Fix the misspelling of 'Electronics' in MFD driver copyright headers.

Link: https://lore.kernel.org/lkml/3aa30119-60e5-4dcb-b13a-1753966ca775@sirena.org.uk/#t
Link: https://lore.kernel.org/r/20250519232025.152769-1-sumanth.gavini@yahoo.com
Signed-off-by: Sumanth Gavini <sumanth.gavini@yahoo.com>
Signed-off-by: Lee Jones <lee@kernel.org>
2025-06-03 09:46:41 +01:00
Sumanth Gavini
b862837995 mfd: maxim: Correct Samsung "Electronics" spelling in headers
Fix the misspelling of 'Electronics' in MFD driver headers.

Link: https://lore.kernel.org/lkml/3aa30119-60e5-4dcb-b13a-1753966ca775@sirena.org.uk/#t
Link: https://lore.kernel.org/r/20250520020808.159586-1-sumanth.gavini@yahoo.com
Signed-off-by: Sumanth Gavini <sumanth.gavini@yahoo.com>
Signed-off-by: Lee Jones <lee@kernel.org>
2025-06-03 09:46:40 +01:00
André Draszik
adf91d9e19 mfd: sec: Change device_type to int
Now that sec-i2c doesn't match device type by pointer casting anymore,
we can switch the device type from unsigned long to int easily.

This saves a few bytes in struct sec_pmic_dev due to member alignment.

Signed-off-by: André Draszik <andre.draszik@linaro.org>
Link: https://lore.kernel.org/r/20250409-s2mpg10-v4-18-d66d5f39b6bf@linaro.org
Signed-off-by: Lee Jones <lee@kernel.org>
2025-05-23 08:48:44 +01:00
André Draszik
5338709089 mfd: sec: Add support for S2MPG10 PMIC
Add support for Samsung's S2MPG10 PMIC, which is a Power Management IC
for mobile applications with buck converters, various LDOs, power
meters, RTC, clock outputs, and additional GPIOs interfaces.

Contrary to existing Samsung S2M series PMICs supported, communication
is not via I2C, but via the Samsung ACPM firmware.

This commit adds the core driver.

Signed-off-by: André Draszik <andre.draszik@linaro.org>
Link: https://lore.kernel.org/r/20250409-s2mpg10-v4-9-d66d5f39b6bf@linaro.org
Signed-off-by: Lee Jones <lee@kernel.org>
2025-05-23 08:48:27 +01:00
André Draszik
8b88b5e4d5 mfd: sec: Move private internal API to internal header
sec_irq_init() is an internal API for the core driver, and doesn't
belong into the public header.

Due to an upcoming split of the driver into a core and i2c driver,
we'll also be adding more internal APIs, which again shouldn't be in
the public header.

Move it into a new internal include.

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: André Draszik <andre.draszik@linaro.org>
Link: https://lore.kernel.org/r/20250409-s2mpg10-v4-7-d66d5f39b6bf@linaro.org
Signed-off-by: Lee Jones <lee@kernel.org>
2025-05-23 08:48:22 +01:00
André Draszik
b3379422b4 mfd: sec-core: Drop non-existing forward declarations
sec_irq_resume() was removed in commit 6445b84abf ("mfd: Add s2mps11
irq driver") and sec_irq_exit() in commit 3dc6f4aaaf ("mfd: sec: Use
devm_mfd_add_devices and devm_regmap_add_irq_chip") while the
prototypes were left. They should be removed.

Do so.

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: André Draszik <andre.draszik@linaro.org>
Link: https://lore.kernel.org/r/20250409-s2mpg10-v4-4-d66d5f39b6bf@linaro.org
Signed-off-by: Lee Jones <lee@kernel.org>
2025-05-23 08:48:18 +01:00
Artur Weber
ba1a455393 mfd: bcm590xx: Drop unused "id" member of bcm590xx struct
The "id" member of the bcm590xx struct is unused and will be confusing
once we add an actual PMU ID storage value. Drop it; a replacement
will be introduced in a future commit.

Signed-off-by: Artur Weber <aweber.kernel@gmail.com>
Reviewed-by: "Rob Herring (Arm)" <robh@kernel.org>
Link: https://lore.kernel.org/r/20250316-bcm59054-v7-4-4281126be1b8@gmail.com
Signed-off-by: Lee Jones <lee@kernel.org>
2025-05-23 08:48:08 +01:00
Wolfram Sang
1d2aeee6dd mfd: aat2870: Use per-client debugfs directory
The I2C core now provides a debugfs entry for each client. Let this
driver use it instead of the custom directory in debugfs root. Further
improvements by this change: automatic clean up on removal, support of
multiple instances.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Link: https://lore.kernel.org/r/20250318091426.22258-2-wsa+renesas@sang-engineering.com
Signed-off-by: Lee Jones <lee@kernel.org>
2025-05-22 15:49:58 +01:00
Lee Jones
18e6c1d2a7 Merge branches 'ib-firmware-mfd-6.16', 'ib-mfd-clocksource-pwm-6.16', 'ib-mfd-gpio-nvmem-6.16', 'ib-mfd-regulator-6.16' and 'ib-mfd-regulator-6.16-1' into ibs-for-mfd-merged 2025-05-22 15:49:34 +01:00
Artur Weber
75dc12b445 regulator: bcm590xx: Store regulator descriptions in table
Instead of filling in the regulator description programatically,
store the data in a struct. This will make it a bit nicer to
introduce support for other BCM590xx chips besides the BCM59056.

To do this, add a new struct type, bcm590xx_reg_data, to store
all of the necessary information. Drop the old IS_LDO, IS_GPLDO...
macros in favor of the "type" field in this struct. Adapt the
old bcm590xx_reg struct to the new types.

Signed-off-by: Artur Weber <aweber.kernel@gmail.com>
Reviewed-by: Stanislav Jakubek <stano.jakubek@gmail.com>
Reviewed-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20250515-bcm59054-v9-6-14ba0ea2ea5b@gmail.com
Signed-off-by: Lee Jones <lee@kernel.org>
2025-05-22 10:57:26 +01:00
Artur Weber
d310cdbb4e mfd: bcm590xx: Add PMU ID/revision parsing function
The BCM590xx PMUs have two I2C registers for reading the PMU ID
and revision. The revision is useful for subdevice drivers, since
different revisions may have slight differences in behavior (for
example - BCM59054 has different regulator configurations for
revision A0 and A1).

Check the PMU ID register and make sure it matches the DT compatible.
Fetch the digital and analog revision from the PMUREV register
so that it can be used in subdevice drivers.

Also add some known revision values to bcm590xx.h, for convenience
when writing subdevice drivers.

Signed-off-by: Artur Weber <aweber.kernel@gmail.com>
Reviewed-by: Stanislav Jakubek <stano.jakubek@gmail.com>
Link: https://lore.kernel.org/r/20250515-bcm59054-v9-4-14ba0ea2ea5b@gmail.com
Signed-off-by: Lee Jones <lee@kernel.org>
2025-05-22 10:57:00 +01:00
Artur Weber
6adf48a3aa mfd: bcm590xx: Add support for multiple device types + BCM59054 compatible
The BCM59054 is another chip from the BCM590xx line of PMUs, commonly
used on devices with the BCM21664/BCM23550 chipsets.

Prepare the BCM590xx driver for supporting other devices by adding the
PMUID register values for supported chip types and store them in the
MFD data struct as "pmu_id". (These will be checked against the actual
PMUID register values in a later commit.)

Then, add a DT compatible for the BCM59054, and provide the PMU ID as
OF match data.

Signed-off-by: Artur Weber <aweber.kernel@gmail.com>
Reviewed-by: Stanislav Jakubek <stano.jakubek@gmail.com>
Link: https://lore.kernel.org/r/20250515-bcm59054-v9-3-14ba0ea2ea5b@gmail.com
Signed-off-by: Lee Jones <lee@kernel.org>
2025-05-22 10:56:49 +01:00
Fabrice Gasnier
4f8ceb0302 mfd: stm32-lptimer: Add support for stm32mp25
Add support for STM32MP25 SoC.
A new hardware configuration register (HWCFGR2) has been added, to gather
number of capture/compare channels, autonomous mode and input capture
capability. The full feature set is implemented in LPTIM1/2/3/4. LPTIM5
supports a smaller set of features. This can now be read from HWCFGR
registers.

Add new registers to the stm32-lptimer.h: CCMR1, CCR2, HWCFGR1/2 and VERR.
Update the stm32_lptimer data struct so signal the number of
capture/compare channels to the child devices.
Also Remove some unused bit masks (CMPOK_ARROK / CMPOKCF_ARROKCF).

Signed-off-by: Fabrice Gasnier <fabrice.gasnier@foss.st.com>
Link: https://lore.kernel.org/r/20250429125133.1574167-3-fabrice.gasnier@foss.st.com
Signed-off-by: Lee Jones <lee@kernel.org>
2025-05-13 11:12:52 +01:00
André Draszik
bb71e40db1 mfd: max77759: Add Maxim MAX77759 core driver
The Maxim MAX77759 is a companion PMIC for USB Type-C applications and
includes Battery Charger, Fuel Gauge, temperature sensors, USB Type-C
Port Controller (TCPC), NVMEM, and a GPIO expander.

Fuel Gauge and TCPC have separate and independent I2C addresses,
register maps, and interrupt lines and are therefore excluded from the
MFD core device driver here.

The GPIO and NVMEM interfaces are accessed via specific commands to the
built-in microprocessor. This driver implements an API that client
drivers can use for accessing those.

Signed-off-by: André Draszik <andre.draszik@linaro.org>
Acked-by: Peter Griffin <peter.griffin@linaro.org>
Link: https://lore.kernel.org/r/20250509-max77759-mfd-v10-1-962ac15ee3ef@linaro.org
Signed-off-by: Lee Jones <lee@kernel.org>
2025-05-09 15:22:30 +01:00
Matti Vaittinen
fecc18a9f5 mfd: bd96801: Support ROHM BD96806
The ROHM BD96806 is from the software perspective almost identical to
the ROHM BD96802. The main difference is different voltage tuning
ranges. Add support differentiating these PMICs based on the compatible,
and invoking the regulator driver with correct IC type.

Signed-off-by: Matti Vaittinen <mazziesaccount@gmail.com>
Acked-by: Conor Dooley <conor.dooley@microchip.com>
Link: https://lore.kernel.org/r/ccc95ae33613648fdcba08915777d945412ac5c4.1744090658.git.mazziesaccount@gmail.com
Signed-off-by: Lee Jones <lee@kernel.org>
2025-04-24 14:53:13 +01:00
Matti Vaittinen
6a309b4892 mfd: bd96801: Support ROHM BD96805
The ROHM BD96805 is from the software perspective almost identical to
the ROHM BD96801. The main difference is different voltage tuning
ranges. Add support differentiating these PMICs based on the compatible,
and invoking the regulator driver with correct IC type.

Signed-off-by: Matti Vaittinen <mazziesaccount@gmail.com>
Acked-by: Conor Dooley <conor.dooley@microchip.com>
Link: https://lore.kernel.org/r/8680097dc083f191bea56d3ac7c6fe5c005644ec.1744090658.git.mazziesaccount@gmail.com
Signed-off-by: Lee Jones <lee@kernel.org>
2025-04-24 14:53:06 +01:00
Matti Vaittinen
4094040b1a mfd: rohm-bd96801: Support ROHM BD96802
The ROHM BD96802 PMIC looks from software point of view a lot like ROHM
BD96801 PMIC. Just with reduced number of voltage rails. Both PMICs
provide two physical IRQ lines referred as INTB and ERRB and contain
blocks implementing regulator controls and a weatchdog. Hence it makes
sense to use same MFD core for both PMICs.

Add support for ROHM BD96802 scalable companion PMIC to the BD96801
core driver.

Signed-off-by: Matti Vaittinen <mazziesaccount@gmail.com>
Acked-by: Conor Dooley <conor.dooley@microchip.com>
Link: https://lore.kernel.org/r/05957d194425a79a4f35f287695c3d9ca2ed1ae2.1744090658.git.mazziesaccount@gmail.com
Signed-off-by: Lee Jones <lee@kernel.org>
2025-04-24 14:52:57 +01:00
Linus Torvalds
5916a6fbc0 RTC for 6.15
Core:
  - setdate is removed as it has better replacements
  - skip alarms with a second resolution when we know the RTC doesn't support
    those.
 
 Subsystem:
  - remove unnecessary private struct members
  - use devm_pm_set_wake_irq were relevant
 
 Drivers:
  - ds1307: stop disabling alarms on probe for DS1337, DS1339, DS1341 and DS3231
  - max31335: add max31331 support
  - pcf50633 is removed as support for the related SoC has been removed
  - pcf85063: properly handle POR failures
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEBqsFVZXh8s/0O5JiY6TcMGxwOjIFAmftwMgACgkQY6TcMGxw
 OjKk1g//dwDeinPyXC8+isDYCf07U6xy1OmvZcQSqG1qL64rONY1KoUKVq92mQUs
 1+rijwIJMi4MNJqaCwYHAEhvXxYJNoQLcV3uHkqVjrRfGQY0Mgl4/pLALGNp6P4U
 QixG8qJiVzAMolTVUozqp/amTc0zztFT6Fnr1EbrLkx0JZX5D09Na5pgdbvoBFX3
 pH5kxYQotpBD8x8CUHFU0oz8dEeSAbISEVJKX1Ct9xTqhYX9/OB92jQvvg46STPU
 2J6n9Yl9eH77itX8GmaDyNyKIIzAZktWuZofiPkni090W/H+uVIdSo0/pHRinvsA
 hoZBLc9CjUDFfqK9uuFOszl1lW/zpVkLdz3VR9OYxjIFzDk5KKnAK9g669VIBm3P
 yPlYQL9TzW+uacpzdN7YhUW0Oy5opRcYjjCrTg5znTtFFplxrMucveyXb8wAP3DG
 m68C1LJzCOxzYAqnfzh59UYSr+JexDJgEH1u79d0GYFrTXZ4mY6i94yva4lIOofX
 uaUuTOsUyQY4ZxMEXw2FlUzvSmQBaALj7ycMFmSBWYa5efI7UWZ2r2HZ0jX30HQU
 m+bG/+eMMZq9gYsiCrYxo0J+afpZ0lTRmyecnuCqP79rYPTCrOui/2n3fZryGfjV
 cDUYbFl5VbsYpwT/sBUrsKU8e9YYb85ACep3WbRlnS7YI5qkM+Y=
 =QJeg
 -----END PGP SIGNATURE-----

Merge tag 'rtc-6.15' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux

Pull RTC updates from Alexandre Belloni:
 "We see a net reduction of the number of lines of code thanks to the
  removal of a now unused driver and a testing tool that is not used
  anymore. Apart from this, the max31335 driver gets support for a new
  part number and pm8xxx gets UEFI support.

  Core:

   - setdate is removed as it has better replacements

   - skip alarms with a second resolution when we know the RTC doesn't
     support those.

  Subsystem:

   - remove unnecessary private struct members

   - use devm_pm_set_wake_irq were relevant

  Drivers:

   - ds1307: stop disabling alarms on probe for DS1337, DS1339, DS1341
     and DS3231

   - max31335: add max31331 support

   - pcf50633 is removed as support for the related SoC has been removed

   - pcf85063: properly handle POR failures"

* tag 'rtc-6.15' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux: (50 commits)
  rtc: remove 'setdate' test program
  selftest: rtc: skip some tests if the alarm only supports minutes
  rtc: mt6397: drop unused defines
  rtc: pcf85063: replace dev_err+return with return dev_err_probe
  rtc: pcf85063: do a SW reset if POR failed
  rtc: max31335: Add driver support for max31331
  dt-bindings: rtc: max31335: Add max31331 support
  rtc: cros-ec: Avoid a couple of -Wflex-array-member-not-at-end warnings
  dt-bindings: rtc: pcf2127: Reference spi-peripheral-props.yaml
  rtc: rzn1: implement one-second accuracy for alarms
  rtc: pcf50633: Remove
  rtc: pm8xxx: implement qcom,no-alarm flag for non-HLOS owned alarm
  rtc: pm8xxx: mitigate flash wear
  rtc: pm8xxx: add support for uefi offset
  dt-bindings: rtc: qcom-pm8xxx: document qcom,no-alarm flag
  rtc: rv3032: drop WADA
  rtc: rv3032: fix EERD location
  rtc: pm8xxx: switch to devm_device_init_wakeup
  rtc: pm8xxx: fix possible race condition
  rtc: mpfs: switch to devm_device_init_wakeup
  ...
2025-04-03 15:31:14 -07:00
Alexandre Belloni
c2004b6efb rtc: mt6397: drop unused defines
RTC_NUM_YEARS has never been used, the other defines are not used since
commit 34bbdc12d0 ("rtc: mt6359: Add RTC hardware range and add support
for start-year")

Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20250303223637.1135362-1-alexandre.belloni@bootlin.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2025-04-01 12:03:39 +02:00
Linus Torvalds
93d5228867 * Apple DWI Backlight:
* Added devicetree bindings for backlight controllers on Apple's
     DWI interface.
   * Added a new driver (apple_dwi_bl) for these controllers found
     on some Apple mobile devices.
   * Added MAINTAINERS entries for the new driver.
 
   * led_bl: Fixed a locking issue by holding the led_access lock
     when calling led_sysfs_disable() during device removal to
     prevent potential warnings.
 
   * Removed unnecessary <linux/fb.h> includes from a bunch of
     drivers.
   * tdo24m: Removed redundant whitespace in Kconfig description.
 
   * pcf50633-backlight: Removed the driver as the underlying
     pcf50633 MFD and s3c24xx platform support were removed.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEdrbJNaO+IJqU8IdIUa+KL4f8d2EFAmfmqtsACgkQUa+KL4f8
 d2G/pQ//RPySheVMI6OC8WbmHNgwL12urjO5Gpin0npaVDBXpI0a+Cb1mCgsB331
 Bx2Om8p0JCasL9XEvUkMtigli0+c9wWdBx/XAJnK1xoeB2Yroef2by98GAkIzl3T
 Ol0URYIXMA4cMUqfJC7uMnvonfgAoPcKfPyKPE7JzD7pSDw9LrGBHGfsGAu1n62T
 HpF/hPu1n/sTQX3xCwsxb+74Rl+G/zv77j0y6QTv010cCpkiJRMht7a9kzze4dEs
 PruF9sgKa3RM9oLPGXNCkp614Bmeuj9C5phmSynLGylRS7FbxqgqgYpZZ13Kqts9
 mlOlpwuWPkp4PlZF9Hci4Yx+sktOlCGbD9EznU/ZOxEKnIv/1dZ7LvQsSn/hp8eW
 GdQ/Q4I2wcExRna2NEngjAMRx8/OH3cdH/9Z8Pj8/EzAy/MKkBR9Ks+OwR7FppFq
 tdDj1lJ6jSQ0UH5LhG48UaC03b0M0BpjZHLBmEYQqC8KvOU3ODZx8jsZ8KNc0AFk
 nm5PeC5rMCyVpX/eh/kwE8aXfmoxACWxDekuQL2K9rQ8ibAfcMIdNdrk12IJwTOw
 PM/WoSpvezsXBefgqAbfSGPZXIcvvle6qjxvLUbgmS+AlPjX/ahFoUDEkdJPYDKJ
 3QounH9XAm5Z3SqnSX9MnSk/jmz/41wd6/8p7J8a+kdRDDw4CXM=
 =+rL+
 -----END PGP SIGNATURE-----

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

Pull backlight updates from Lee Jones:

 - Apple DWI Backlight:
    - Added devicetree bindings for backlight controllers on Apple's DWI
      interface.
    - Added a new driver (apple_dwi_bl) for these controllers found on
      some Apple mobile devices.
    - Added MAINTAINERS entries for the new driver.

 - led_bl: Fixed a locking issue by holding the led_access lock when
   calling led_sysfs_disable() during device removal to prevent
   potential warnings.

 - Removed unnecessary <linux/fb.h> includes from a bunch of drivers.

 - tdo24m: Removed redundant whitespace in Kconfig description.

 - pcf50633-backlight: Removed the driver as the underlying pcf50633 MFD
   and s3c24xx platform support were removed.

* tag 'backlight-next-6.15' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight: (22 commits)
  backlight: pcf50633-backlight: Remove unused driver
  backlight: tdo24m: Eliminate redundant whitespace
  MAINTAINERS: Add entries for Apple DWI backlight controller
  backlight: apple_dwi_bl: Add Apple DWI backlight driver
  dt-bindings: leds: backlight: apple,dwi-bl: Add Apple DWI backlight
  backlight: led_bl: Hold led_access lock when calling led_sysfs_disable()
  backlight: wm831x_bl: Do not include <linux/fb.h>
  backlight: vgg2432a4: Do not include <linux/fb.h>
  backlight: tps65217_bl: Do not include <linux/fb.h>
  backlight: max8925_bl: Do not include <linux/fb.h>
  backlight: lv5207lp: Do not include <linux/fb.h>
  backlight: locomolcd: Do not include <linux/fb.h>
  backlight: hp680_bl: Do not include <linux/fb.h>
  backlight: ep93xx_bl: Do not include <linux/fb.h>
  backlight: da9052_bl: Do not include <linux/fb.h>
  backlight: da903x_bl: Do not include <linux/fb.h>
  backlight: bd6107_bl: Do not include <linux/fb.h>
  backlight: as3711_bl: Do not include <linux/fb.h>
  backlight: adp8870_bl: Do not include <linux/fb.h>
  backlight: adp8860_bl: Do not include <linux/fb.h>
  ...
2025-03-29 14:48:33 -07:00
Dr. David Alan Gilbert
44356090d5 mfd: pcf50633: Remove remaining PCF50633 support
Remove the remaining parts of the 50633, the core, headers and glue.

The pcf50633 was used as part of the OpenMoko devices but
the support for its main chip was recently removed in:
commit 61b7f8920b ("ARM: s3c: remove all s3c24xx support")

See https://lore.kernel.org/all/Z8z236h4B5A6Ki3D@gallifrey/

Remove it.

Signed-off-by: "Dr. David Alan Gilbert" <linux@treblig.org>
Link: https://lore.kernel.org/r/20250311014959.743322-10-linux@treblig.org
Signed-off-by: Lee Jones <lee@kernel.org>
2025-03-14 11:42:51 +00:00
Dr. David Alan Gilbert
8559602247 mfd: pcF50633-gpio: Remove unused driver
The pcf50633 was used as part of the OpenMoko devices but
the support for its main chip was recently removed in:
commit 61b7f8920b ("ARM: s3c: remove all s3c24xx support")

See https://lore.kernel.org/all/Z8z236h4B5A6Ki3D@gallifrey/

Remove it.

Signed-off-by: "Dr. David Alan Gilbert" <linux@treblig.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20250311014959.743322-4-linux@treblig.org
Signed-off-by: Lee Jones <lee@kernel.org>
2025-03-14 11:42:35 +00:00
Dr. David Alan Gilbert
0d0e549538 mfd: pcf50633-adc: Remove unused driver
The pcf50633 was used as part of the OpenMoko devices but
the support for its main chip was recently removed in:
commit 61b7f8920b ("ARM: s3c: remove all s3c24xx support")

See https://lore.kernel.org/all/Z8z236h4B5A6Ki3D@gallifrey/

Remove it.

Signed-off-by: "Dr. David Alan Gilbert" <linux@treblig.org>
Link: https://lore.kernel.org/r/20250311014959.743322-2-linux@treblig.org
Signed-off-by: Lee Jones <lee@kernel.org>
2025-03-14 11:42:26 +00:00
Dr. David Alan Gilbert
dfc034a049 backlight: pcf50633-backlight: Remove unused driver
The pcf50633 was used as part of the OpenMoko devices but
the support for its main chip was recently removed in:
commit 61b7f8920b ("ARM: s3c: remove all s3c24xx support")

See https://lore.kernel.org/all/Z8z236h4B5A6Ki3D@gallifrey/

Remove it.

Signed-off-by: "Dr. David Alan Gilbert" <linux@treblig.org>
Link: https://lore.kernel.org/r/20250311014959.743322-8-linux@treblig.org
Signed-off-by: Lee Jones <lee@kernel.org>
2025-03-14 11:36:33 +00:00