1. 10 9月, 2012 1 次提交
    • M
      regulator: core: Support bypass mode · f59c8f9f
      Mark Brown 提交于
      Many regulators support a bypass mode where they simply switch their
      input supply to the output. This is mainly used in low power retention
      states where power consumption is extremely low so higher voltage or
      less clean supplies can be used.
      
      Support this by providing ops for the drivers and a consumer API which
      allows the device to be put into bypass mode if all consumers enable it
      and the machine enables permission for this.
      
      This is not supported as a mode since the existing modes are rarely used
      due to fuzzy definition and mostly redundant with modern hardware which is
      able to respond promptly to load changes.
      Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
      Reviewed-by: NGraeme Gregory <gg@slimlogic.co.uk>
      f59c8f9f
  2. 13 7月, 2012 1 次提交
  3. 04 7月, 2012 2 次提交
    • M
      regulator: core: Add core support for GPIO controlled enable lines · 65f73508
      Mark Brown 提交于
      It is very common for regulators to support having their enable signal
      controlled by a GPIO. Since there are a bunch of fiddly things to get
      right like handling the operations when the enable signal is tied to
      a rail and it's just replicated code add support for this to the core.
      
      Drivers should set ena_gpio in their config if they have a GPIO control,
      using ena_gpio_flags to specify any flags (including GPIOF_OUT_INIT_ for
      the initial state) and ena_gpio_invert if the GPIO is active low. The
      core will then override any enable and disable operations the driver has
      and instead control the specified GPIO.
      
      This will in the future also allow us to further extend the core by
      identifying when several enable signals have been tied together and
      handling this properly.
      Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
      65f73508
    • M
      regulator: core: Allow fixed enable_time to be set in the regulator_desc · 79511ed3
      Mark Brown 提交于
      Many regulators have a fixed specification for their enable time. Allow
      this to be set in the regulator_desc as a number to save them having to
      implement an explicit operation.
      Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
      79511ed3
  4. 18 6月, 2012 2 次提交
    • A
      regulator: core: Change the unit of ramp_delay from mV/uS to uV/uS · ea38d13f
      Axel Lin 提交于
      This change makes it possible to set ramp_delay with 0.xxx mV/uS without
      truncation issue.
      Signed-off-by: NAxel Lin <axel.lin@gmail.com>
      Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
      ea38d13f
    • Y
      regulator: Add ramp_delay configuration to constraints · 6f0b2c69
      Yadwinder Singh Brar 提交于
      For some hardwares ramp_delay for BUCKs is a configurable parameter which can
      be configured through DT or board file.This patch adds ramp_delay to regulator
      constraints and allow user to configure it for regulators which supports this
      feature, through DT or board file. It will provide two ways of setting the
      ramp_delay for a regulator:
      	First, by setting it as constraints in board file(for configurable
      regulators) and set_machine_constraints() will take care of setting it on
      hardware by calling(the provided) .set_ramp_delay() operation(callback).
      	Second, by setting it as data in regulator_desc(as fixed/default
      ramp_delay rate) for a regulator in driver.
      
      regulator_set_voltage_time_sel() will give preference to
      constraints->ramp_delay while reading ramp_delay rate for regulator. Similarly
      users should also take care accordingly while refering ramp_delay rate(in case
      of implementing their private .set_voltage_time_sel() callbacks for different
      regulators).
      
      [Rewrote subject for 80 columns -- broonie]
      Signed-off-by: NYadwinder Singh Brar <yadi.brar@samsung.com>
      Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
      6f0b2c69
  5. 11 6月, 2012 1 次提交
  6. 03 6月, 2012 1 次提交
  7. 12 5月, 2012 2 次提交
  8. 17 4月, 2012 3 次提交
  9. 09 4月, 2012 1 次提交
    • M
      regulator: core: Use a struct to pass in regulator runtime configuration · c172708d
      Mark Brown 提交于
      Rather than adding new arguments to regulator_register() every time we
      want to add a new bit of dynamic information at runtime change the function
      to take these via a struct. By doing this we avoid needing to do further
      changes like the recent addition of device tree support which required each
      regulator driver to be updated to take an additional parameter.
      
      The regulator_desc which should (mostly) be static data is still passed
      separately as most drivers are able to configure this statically at build
      time.
      Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
      c172708d
  10. 04 4月, 2012 1 次提交
  11. 21 2月, 2012 1 次提交
  12. 17 2月, 2012 1 次提交
  13. 24 11月, 2011 2 次提交
    • R
      regulator: map consumer regulator based on device tree · 69511a45
      Rajendra Nayak 提交于
      Device nodes in DT can associate themselves with one or more
      regulators/supply by providing a list of phandles (to regulator nodes)
      and corresponding supply names.
      
      For Example:
      	devicenode: node@0x0 {
      		...
      		...
      		vmmc-supply = <&regulator1>;
      		vpll-supply = <&regulator2>;
      	};
      
      The driver would then do a regulator_get(dev, "vmmc"); to get
      regulator1 and do a regulator_get(dev, "vpll"); to get
      regulator2.
      
      of_get_regulator() extracts the regulator node for a given
      device, based on the supply name.
      
      Use it to look up the regulator for a given consumer from device tree, during
      a regulator_get(). If not found fallback and lookup through
      the regulator_map_list instead.
      
      Also, since the regulator dt nodes can use the same binding to
      associate with a parent regulator/supply, allow the drivers to
      specify a supply_name, which can then be used to lookup dt
      to find the parent phandle.
      Signed-off-by: NRajendra Nayak <rnayak@ti.com>
      Acked-by: NGrant Likely <grant.likely@secretlab.ca>
      Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
      69511a45
    • R
      regulator: pass additional of_node to regulator_register() · 2c043bcb
      Rajendra Nayak 提交于
      With device tree support for regulators, its needed that the
      regulator_dev->dev device has the right of_node attached.
      To be able to do this add an additional parameter to the
      regulator_register() api, wherein the dt-adapted driver can
      then pass this additional info onto the regulator core.
      Signed-off-by: NRajendra Nayak <rnayak@ti.com>
      Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
      2c043bcb
  14. 01 11月, 2011 1 次提交
  15. 14 9月, 2011 1 次提交
    • M
      regulator: Implement deferred disable support · da07ecd9
      Mark Brown 提交于
      It is a reasonably common pattern for hardware to require some delay after
      being quiesced before the disable has finalised, especially in mixed signal
      devices. For example, an active discharge may be required to ensure that
      the circuit starts up again in a known state. Avoid having to implement
      such delays in the regulator API by providing regulator_deferred_disable()
      which will do a regulator_disable() a specified number of milliseconds
      after it is called.
      
      Due to the reference counting done on regulators a deferred disable can
      be cancelled by doing another regulator_enable().
      Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
      Acked-by: NLiam Girdwood <lrg@ti.com>
      da07ecd9
  16. 10 6月, 2011 1 次提交
  17. 26 3月, 2011 1 次提交
  18. 12 1月, 2011 5 次提交
  19. 03 3月, 2010 1 次提交
    • M
      regulator: Allow regulators to specify the time taken to ramp on enable · 31aae2be
      Mark Brown 提交于
      Regulators may sometimes take longer to enable than the control operation
      used to do so, either because the regulator has ramp rate control used to
      limit inrush current or because the control operation is very fast (GPIO
      being the most common example of this).  In order to ensure that consumers
      do not rely on the regulator before it is enabled provide an enable_time()
      operation and have the core delay for that time before returning to the
      caller.
      
      This is implemented as a function since the ramp rate may be specified in
      voltage per unit time and therefore the time depend on the configuration.
      In future it would be desirable to allow the bulk operations to run the
      delays for multiple enables in parallel but this is not currently supported.
      Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
      31aae2be
  20. 22 9月, 2009 2 次提交
  21. 17 9月, 2009 1 次提交
  22. 29 4月, 2009 1 次提交
  23. 31 3月, 2009 7 次提交