1. 26 1月, 2018 3 次提交
    • M
      regulator: core: Move of_find_regulator_by_node() to of_regulator.c · 148096af
      Maciej Purski 提交于
      As of_find_regulator_by_node() is an of function it should be moved from
      core.c to of_regulator.c. It provides better separation of device tree
      functions from the core and allows other of_functions in of_regulator.c
      to resolve device_node to regulator_dev. This will be useful for
      implementation of parsing coupled regulators properties.
      
      Declare of_find_regulator_by_node() function in internal.h as well as
      regulator_class and dev_to_rdev(), as they are needed by
      of_find_regulator_by_node().
      Signed-off-by: NMaciej Purski <m.purski@samsung.com>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      148096af
    • C
      regulator: add PM suspend and resume hooks · f7efad10
      Chunyan Zhang 提交于
      In this patch, consumers are allowed to set suspend voltage, and this
      actually just set the "uV" in constraint::regulator_state, when the
      regulator_suspend_late() was called by PM core through callback when
      the system is entering into suspend, the regulator device would act
      suspend activity then.
      
      And it assumes that if any consumer set suspend voltage, the regulator
      device should be enabled in the suspend state.  And if the suspend
      voltage of a regulator device for all consumers was set zero, the
      regulator device would be off in the suspend state.
      
      This patch also provides a new function hook to regulator devices for
      resuming from suspend states.
      Signed-off-by: NChunyan Zhang <zhang.chunyan@linaro.org>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      f7efad10
    • C
      regulator: leave one item to record whether regulator is enabled · 72069f99
      Chunyan Zhang 提交于
      The items "disabled" and "enabled" are a little redundant, since only one
      of them would be set to record if the regulator device should keep on
      or be switched to off in suspend states.
      
      So in this patch, the "disabled" was removed, only leave the "enabled":
        - enabled == 1 for regulator-on-in-suspend
        - enabled == 0 for regulator-off-in-suspend
        - enabled == -1 means do nothing when entering suspend mode.
      Signed-off-by: NChunyan Zhang <zhang.chunyan@linaro.org>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      72069f99
  2. 11 8月, 2017 1 次提交
  3. 19 7月, 2017 1 次提交
  4. 17 5月, 2017 1 次提交
  5. 06 4月, 2017 1 次提交
  6. 22 6月, 2016 1 次提交
  7. 30 3月, 2016 1 次提交
  8. 27 3月, 2016 1 次提交
  9. 22 3月, 2016 1 次提交
  10. 12 3月, 2016 1 次提交
  11. 02 3月, 2016 1 次提交
  12. 17 9月, 2015 1 次提交
  13. 25 7月, 2015 1 次提交
  14. 12 6月, 2015 4 次提交
  15. 13 5月, 2015 1 次提交
  16. 28 4月, 2015 1 次提交
  17. 09 1月, 2015 1 次提交
  18. 27 11月, 2014 3 次提交
  19. 03 11月, 2014 1 次提交
  20. 01 11月, 2014 1 次提交
  21. 29 10月, 2014 1 次提交
  22. 23 10月, 2014 1 次提交
  23. 20 10月, 2014 1 次提交
  24. 10 9月, 2014 1 次提交
    • M
      regulator: of: Provide simplified DT parsing method · a0c7b164
      Mark Brown 提交于
      Currently regulator drivers which support DT all repeat very similar code
      to supply a list of known regulator identifiers to be matched with DT,
      convert that to platform data which is then matched up with the regulators
      as they are registered. This is both fiddly to get right and for devices
      which can use the standard helpers to provide their operations is the main
      source of code in the driver.
      
      Since this code is essentially identical for most drivers we can factor it
      out into the core, moving the identifiers in the match table into the
      regulator descriptors and also allowing drivers to pass in the name of the
      subnode to search. When a driver provides an of_match string for the
      regulator the core will attempt to use that to obtain init_data, allowing
      the driver to remove all explicit code for DT parsing and simply provide
      data instead.
      
      The current code leaks the phandles for the child nodes, this will be
      addressed incrementally and makes no practical difference for FDT anyway
      as the DT data structures are never freed.
      Signed-off-by: NMark Brown <broonie@linaro.org>
      a0c7b164
  25. 01 6月, 2014 1 次提交
  26. 19 4月, 2014 1 次提交
  27. 15 4月, 2014 2 次提交
  28. 19 9月, 2013 1 次提交
  29. 15 7月, 2013 1 次提交
  30. 20 6月, 2013 1 次提交
  31. 30 1月, 2013 1 次提交
    • S
      regulator: clear state each invocation of of_regulator_match · a2f95c36
      Stephen Warren 提交于
      of_regulator_match() saves some dynamcially allocated state into the
      match table that's passed to it. By implementation and not contract, for
      each match table entry, if non-NULL state is already present,
      of_regulator_match() will not overwrite it. of_regulator_match() is
      typically called each time a regulator is probe()d. This means it is
      called with the same match table over and over again if a regulator
      triggers deferred probe. This results in stale, kfree()d data being left
      in the match table from probe to probe, which causes a variety of crashes
      or use of invalid data.
      
      Explicitly free all output state from of_regulator_match() before
      generating new results in order to avoid this.
      Signed-off-by: NStephen Warren <swarren@nvidia.com>
      Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
      Cc: stable@vger.kernel.org
      a2f95c36
  32. 25 9月, 2012 1 次提交
    • S
      regulator: deprecate regulator-compatible DT property · 13511def
      Stephen Warren 提交于
      When the bindings for the TPS6586x regulator were being proposed, I
      asserted that DT node naming rules for bus child nodes should also be
      applied to nodes inside the TPS6586x regulator node itself. In other
      words, that each node providing regulator init data should be named
      after the type of object it represented ("regulator") and hence that
      some other property was required to indicate which regulator the node
      described ("regulator-compatible"). In turn this led to multiple nodes
      having the same name, thus requiring node names to use a unit address
      to make them unique, thus requiring reg properties within the nodes and
      
      However, subsequent discussion indicates that the rules I was asserting
      only applies to standardized bus nodes, and within a device's own node,
      the binding can basically do anything sane that it wants.
      
      Hence, this change deprecates the register-compatible property, and
      instead uses node names to replace this functionality. This greatly
      simplifies the device tree content, making them smaller and more legible.
      
      The code is changed such that old device trees continue to work.
      Signed-off-by: NStephen Warren <swarren@nvidia.com>
      Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
      13511def