mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/8] regulator: core: allow regulator_register() with missing required supply
@ 2025-12-27 12:17 André Draszik
  2025-12-27 12:17 ` [PATCH 1/8] regulator: core: update two debug messages André Draszik
                   ` (7 more replies)
  0 siblings, 8 replies; 11+ messages in thread
From: André Draszik @ 2025-12-27 12:17 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown, Javier Martinez Canillas, Jon Hunter,
	Dmitry Baryshkov, Oleksij Rempel
  Cc: Peter Griffin, Tudor Ambarus, Will McVicker, Juan Yescas,
	kernel-team, linux-kernel, André Draszik

Hi,

With these attached patches it becomes possible again to support
hardware designs with multiple PMICs where individual rails of each act
as required supplies for rails of the other (due to the latter being
e.g. always-on), and vice-versa.

Google Pixel 6 and 6 Pro (oriole and raven) are examples of such
designs.

Rather than returning -EPORBE_DEFER in regulator_register() when
set_machine_constraints() fails with -EPROBE_DEFER (due to missing
required supplies), we still allow rail registration and try to
reresolve supplies each time a new rail gets registered.

This is implemented using a bus (regulator bus), which allows the core
to reresolve supplies for regulators that still need them whenever new
regulators (i.e. devices) are added.

Using a bus also solves existing problems around late resolution of
supplies as mentioned in the commit message introducing that bus.

The series starts with a few bug fixes and the last two commits
implement the changes mentioned above, but do depend on the bug fixes.

Cheers,
Andre'

Signed-off-by: André Draszik <andre.draszik@linaro.org>
---
André Draszik (8):
      regulator: core: update two debug messages
      regulator: core: fix locking in regulator_resolve_supply() error path
      regulator: core: move supply check earlier in set_machine_constraints()
      regulator: core: streamline supply resolution for always-on/boot-on regulators
      regulator: core: remove dead code in regulator_resolve_supply()
      regulator: core: don't ignore errors from event forwarding setup
      regulator: core: reresolve unresolved supplies when available
      regulator: core: don't fail regulator_register() with missing required supply

 drivers/regulator/core.c         | 351 ++++++++++++++++++++++++++++-----------
 include/linux/regulator/driver.h |   2 +
 2 files changed, 254 insertions(+), 99 deletions(-)
---
base-commit: cc3aa43b44bdb43dfbac0fcb51c56594a11338a8
change-id: 20251224-regulators-defer-f5ffa668a3f6

Best regards,
-- 
André Draszik <andre.draszik@linaro.org>


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2025-12-29  6:43 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-12-27 12:17 [PATCH 0/8] regulator: core: allow regulator_register() with missing required supply André Draszik
2025-12-27 12:17 ` [PATCH 1/8] regulator: core: update two debug messages André Draszik
2025-12-27 12:17 ` [PATCH 2/8] regulator: core: fix locking in regulator_resolve_supply() error path André Draszik
2025-12-27 12:17 ` [PATCH 3/8] regulator: core: move supply check earlier in set_machine_constraints() André Draszik
2025-12-27 12:17 ` [PATCH 4/8] regulator: core: streamline supply resolution for always-on/boot-on regulators André Draszik
2025-12-27 12:17 ` [PATCH 5/8] regulator: core: remove dead code in regulator_resolve_supply() André Draszik
2025-12-27 20:01   ` Mark Brown
2025-12-29  6:43     ` André Draszik
2025-12-27 12:17 ` [PATCH 6/8] regulator: core: don't ignore errors from event forwarding setup André Draszik
2025-12-27 12:17 ` [PATCH 7/8] regulator: core: reresolve unresolved supplies when available André Draszik
2025-12-27 12:17 ` [PATCH 8/8] regulator: core: don't fail regulator_register() with missing required supply André Draszik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®