devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH V2 0/5] Add regulator suspend and resume support
@ 2018-01-04  7:22 Chunyan Zhang
  2018-01-04  7:22 ` [PATCH V2 1/5] bindings: regulator: added support for suspend states Chunyan Zhang
                   ` (3 more replies)
  0 siblings, 4 replies; 12+ messages in thread
From: Chunyan Zhang @ 2018-01-04  7:22 UTC (permalink / raw)
  To: Mark Brown, Rob Herring
  Cc: devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA, Ulf Hansson, Chunyan Zhang

Some systems need to set regulators to specific states when they enter low
power modes, especially around CPUs.

Currently the regulator driver, for suspend and resume features, provides
two functions which are exported for being called directly by any modules
or subsystems when they thought the regulator should be entering into
suspend states.

This patchset adds hooks to PM suspend core and provides suspend/resume
callback functions to regulator device, for those who can be switched
off or set low voltage in suspend states only need to implement the
callback functions in the driver, and set the right configurations for
suspend states via device tree and the APIs which regulator core
driver provides.

Those drivers who use the old interfaces - i.e. regulator_suspend_prepare()
and regulator_suspend_finish() should stop using that, since we leave these
two functions empty and plan to remove them one day in the future.

Any comments would be greatly appreciated.

Thanks,
Chunyan

Changes from V1: (https://lkml.org/lkml/2017/12/21/9)
* Rephrased the commit message of patch 0001;
* Declared the property 'regulator-suspend-microvolt' deperated and documented
  the way recommended;
* Revised of_regulator.c, use suspend_state::min_uV as default suspend
  voltage if the property 'regulator-suspend-microvolt' is not used.

Chunyan Zhang (5):
  bindings: regulator: added support for suspend states
  regulator: make regulator voltage be an array to support more states
  drivers: regulator: leave one item to record whether regulator is
    enabled
  drivers: regulator: empty the old suspend functions
  regulator: add PM suspend and resume hooks

 .../devicetree/bindings/regulator/regulator.txt    |  15 +-
 drivers/regulator/core.c                           | 342 ++++++++++++++-------
 drivers/regulator/internal.h                       |  18 +-
 drivers/regulator/of_regulator.c                   |  20 +-
 include/linux/regulator/driver.h                   |   2 +
 include/linux/regulator/machine.h                  |  31 +-
 6 files changed, 305 insertions(+), 123 deletions(-)

-- 
2.7.4

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

end of thread, other threads:[~2018-01-09 16:40 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-04  7:22 [PATCH V2 0/5] Add regulator suspend and resume support Chunyan Zhang
2018-01-04  7:22 ` [PATCH V2 1/5] bindings: regulator: added support for suspend states Chunyan Zhang
     [not found]   ` <1515050568-23876-2-git-send-email-zhang.chunyan-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2018-01-05 18:53     ` Rob Herring
2018-01-05 19:18       ` Mark Brown
     [not found]         ` <20180105191837.GI9076-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2018-01-08  6:36           ` Chunyan Zhang
     [not found]             ` <CAG2=9p-ec1oVe-+O0TGYFF-E5dGrP3FoRZXb1sCyjNScVvGNQg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-01-08 12:35               ` Mark Brown
     [not found]                 ` <20180108123533.GE11698-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2018-01-09  6:08                   ` Chunyan Zhang
2018-01-09 16:40                     ` Mark Brown
2018-01-04  7:22 ` [PATCH V2 3/5] drivers: regulator: leave one item to record whether regulator is enabled Chunyan Zhang
     [not found] ` <1515050568-23876-1-git-send-email-zhang.chunyan-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2018-01-04  7:22   ` [PATCH V2 2/5] regulator: make regulator voltage be an array to support more states Chunyan Zhang
2018-01-04  7:22   ` [PATCH V2 4/5] drivers: regulator: empty the old suspend functions Chunyan Zhang
2018-01-04  7:22 ` [PATCH V2 5/5] regulator: add PM suspend and resume hooks Chunyan Zhang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).