All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/2] regulator_sync_state() support
@ 2020-05-28 19:06 Saravana Kannan
  2020-05-28 19:06 ` [PATCH v2 1/2] driver core: Add dev_set_drv_sync_state() Saravana Kannan
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Saravana Kannan @ 2020-05-28 19:06 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown, Greg Kroah-Hartman
  Cc: Saravana Kannan, John Stultz, linux-kernel, kernel-team

Poorly worded subject, but patch 1/2 should give more details.

The simplified explanation of the problem is, for regulators left on by
the bootloader, we want to keep them on until all the consumers are
probed. This is because we need to protect consumer-A from turning off a
shared regulator used by consumer-B. Once consumer-B (and all the other
consumers come up), they can do it themselves and the regulator
framework no longer needs to keep the regulator on.

So, this is not just about module or device probe ordering between
suppliers and consumers. Even if we get the probe order prefectly right,
it still won't solve this problem.

We can eventually extend this to also cover voltage and other
properties, but in this patch series I want to get this right for
"enabled/disabled" first.

This patch series also has the additional benefit of turning off unused
regulators that are probed after the 30s timeout that's there today.

v1->v2:
Patch 1/2
- New patch that might get dropped based on review.

Patch 2/2
- This was the only patch in v1
- Made the late_initcall_sync timeout a commandline param
- If timeout is set, we also give up waiting for all consumers after
  the timeout expires.
- Made every regulator driver add sync_state() support

Saravana Kannan (2):
  driver core: Add dev_set_drv_sync_state()
  regulator: Add support for sync_state() callbacks

 drivers/regulator/core.c         | 112 +++++++++++++++++++++++++++++++
 include/linux/device.h           |  12 ++++
 include/linux/regulator/driver.h |   2 +
 3 files changed, 126 insertions(+)

-- 
2.27.0.rc0.183.gde8f92d652-goog


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

end of thread, other threads:[~2020-06-15 15:38 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-28 19:06 [PATCH v2 0/2] regulator_sync_state() support Saravana Kannan
2020-05-28 19:06 ` [PATCH v2 1/2] driver core: Add dev_set_drv_sync_state() Saravana Kannan
2020-05-28 19:06 ` [PATCH v2 2/2] regulator: Add support for sync_state() callbacks Saravana Kannan
2020-05-29 13:00   ` Mark Brown
2020-05-30  2:39     ` Saravana Kannan
2020-06-01 17:23       ` Mark Brown
2020-06-09  3:16         ` Saravana Kannan
2020-06-09 10:51           ` Mark Brown
2020-06-15 10:27             ` Ulf Hansson
2020-06-15 11:49               ` Mark Brown
2020-06-15 15:37                 ` Ulf Hansson
2020-05-29 13:09 ` [PATCH v2 0/2] regulator_sync_state() support Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.