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. 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
  3. 29 3月, 2012 1 次提交
  4. 02 2月, 2012 1 次提交
  5. 15 10月, 2011 1 次提交
  6. 27 5月, 2011 2 次提交
  7. 26 3月, 2011 1 次提交
    • M
      Regulator: add suspend-finish API for regulator core. · 7a32b589
      MyungJoo Ham 提交于
      The regulator core had suspend-prepare that turns off the regulators
      when entering a system-wide suspend. However, it did not have
      suspend-finish that pairs with suspend-prepare and the regulator core
      has assumed that the regulator devices and their drivers support
      autonomous recover at resume.
      
      This patch adds regulator_suspend_finish that pairs with the
      previously-existed regulator_suspend_prepare. The function
      regulator_suspend_finish turns on the regulators that have always_on set
      or positive use_count so that we can reset the regulator states
      appropriately at resume.
      
      In regulator_suspend_finish, if has_full_constraints, it disables
      unnecessary regulators.
      Signed-off-by: NMyungJoo Ham <myungjoo.ham@samsung.com>
      Signed-off-by: NKyungmin Park <kyungmin.park@samsung.com>
      Acked-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
      --
      Updates
      v3
      	comments corrected (Thanks to Igor)
      v2
      	disable unnecessary regulators (Thanks to Mark)
      Signed-off-by: NLiam Girdwood <lrg@slimlogic.co.uk>
      7a32b589
  8. 29 10月, 2010 1 次提交
  9. 25 5月, 2010 1 次提交
  10. 17 12月, 2009 1 次提交
  11. 22 9月, 2009 4 次提交
  12. 31 3月, 2009 4 次提交
  13. 09 1月, 2009 1 次提交
  14. 14 10月, 2008 1 次提交
    • L
      regulator: core - Rework machine API to remove string based functions. · a5766f11
      Liam Girdwood 提交于
      This improves the machine level API in order to configure
      regulator constraints and consumers as platform data and removes the
      old string based API that required several calls to set up each regulator.
      
      The intention is to create a struct regulator_init_data, populate
      it's fields with constraints, consumers devices, etc and then register
      the regulator device from board.c in the standard Linux way.
      
      e.g. regulator LDO2 (supplying codec and sim) platform data.
      
      /* regulator LDO2 consumer devices */
      static struct regulator_consumer_supply ldo2_consumers[] = {
      {
      	.dev	= &platform_audio_device.dev,
      	.supply	= "codec_avdd",
      },
      {
      	.dev	= &platform_sim_device.dev,
      	.supply	= "sim_vcc",
      }
      };
      
      /* regulator LDO2 constraints  */
      static struct regulator_init_data ldo2_data = {
      	.constraints = {
      		.min_uV = 3300000,
      		.max_uV = 3300000,
      		.valid_modes_mask = REGULATOR_MODE_NORMAL,
      		.apply_uV = 1,
      	},
      	.num_consumer_supplies = ARRAY_SIZE(ldo2_consumers),
      	.consumer_supplies = ldo2_consumers,
      };
      
      /* machine regulator devices with thier consumers and constraints */
      static struct platform_device wm8350_regulator_devices[] = {
      {
      	.name = "wm8350-regulator",
      	.id = WM8350_LDO_2,
      	.dev = {
      		.platform_data = &ldo2_data,
      	},
      },
      };
      
      Changes in detail:-
      
        o Removed all const char* regulator config functions in machine API.
        o Created new struct regulator_init_data to contain regulator
          machine configuration constraints and consmuers.
        o Changed set_supply(), set_machine_constraints(),
          set_consumer_device_supply() to remove their string identifier
          parameters. Also made them static and moved functions nearer top of
          core.c.
        o Removed no longer used inline func to_rdev()
        o Added regulator_get_init_drvdata() to retrieve init data.
        o Added struct device* as parameter to regulator_register().
        o Changed my email address.
      Signed-off-by: NEric Miao <eric.miao@marvell.com>
      Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
      Signed-off-by: NLiam Girdwood <lrg@slimlogic.co.uk>
      a5766f11
  15. 30 7月, 2008 1 次提交