1. 17 9月, 2013 1 次提交
  2. 15 7月, 2013 1 次提交
    • M
      regulator: core: Add helpers for multiple linear ranges · 94d33c02
      Mark Brown 提交于
      Many regulators have several linear ranges of selector with different
      step sizes, for example offering better resolution at lower voltages.
      Provide regulator_{map,list}_voltage_linear_range() allowing these
      regulators to use generic code. To do so a table of regulator_linear_range
      structs needs to be pointed to from the descriptor.
      
      This was inspired by similar code included in a driver submission from
      Chao Xie and Yi Zhang at Marvell.
      Signed-off-by: NMark Brown <broonie@linaro.org>
      94d33c02
  3. 18 4月, 2013 1 次提交
  4. 05 3月, 2013 1 次提交
  5. 04 3月, 2013 2 次提交
    • K
      regulator: core: use regulator_ena_pin member · 7b74d149
      Kim, Milo 提交于
       The regulator_dev has regulator_enable_gpio structure.
       'ena_gpio' and 'ena_gpio_invert' were moved to in regulator_enable_gpio.
      
        regulator_dev   --->   regulator_enable_gpio
        .ena_gpio              .gpio
        .ena_gpio_invert       .ena_gpio_invert
      
        Pointer, 'ena_pin' is used for checking valid enable GPIO pin.
      Signed-off-by: NMilo(Woogyom) Kim <milo.kim@ti.com>
      Reviewed-by: NAxel Lin <axel.lin@ingics.com>
      Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
      7b74d149
    • K
      regulator: core: support shared enable GPIO concept · f19b00da
      Kim, Milo 提交于
       A Regulator can be enabled by external GPIO pin.
       This is configurable in the regulator_config.
       At this moment, the GPIO can be owned by only one regulator device.
       In some devices, multiple regulators are enabled by shared one GPIO pin.
       This patch extends this limitation, enabling shared enable GPIO of regulators.
      
       New list for enable GPIO: 'regulator_ena_gpio_list'
         This manages enable GPIO list.
      
       New structure for supporting shared enable GPIO: 'regulator_enable_gpio'
         The enable count is used for balancing GPIO control count.
         This count is incremented when GPIO is enabled.
         On the other hand, it's decremented when GPIO is disabled.
      
       Reference count: 'request_count'
         The reference count, 'request_count' is incremented/decremented on
         requesting/freeing the GPIO. This count makes sure only free the GPIO
         when it has no users.
      
       How it works
         If the GPIO is already used, skip requesting new GPIO usage.
         The GPIO is new one, request GPIO function and add it to the list of
         enable GPIO.
         This list is used for balancing enable GPIO count and pin control.
      
       Updating a GPIO and invert code moved
         'ena_gpio' and 'ena_gpio_invert' of the regulator_config were moved to
          new function, regulator_ena_gpio_request().
          Use regulator_enable_pin structure rather than regulator_dev.
      Signed-off-by: NMilo(Woogyom) Kim <milo.kim@ti.com>
      Reviewed-by: NAxel Lin <axel.lin@ingics.com>
      Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
      f19b00da
  6. 01 3月, 2013 1 次提交
    • N
      regulator: core: update kernel documentation for regulator_desc · 5838b032
      Nishanth Menon 提交于
      commit df367931 (regulator: core: Provide regmap get/set bypass
      operations) introduced regulator_[gs]et_bypass_regmap
      
      However structure documentation for regulator_desc needs an update.
      ./scripts/kernel-doc include/linux/regulator/driver.h >/dev/null
      generates:
      Warning(include/linux/regulator/driver.h:233): No description found for parameter 'bypass_reg'
      Warning(include/linux/regulator/driver.h:233): No description found for parameter 'bypass_mask'
      
      Cc: Liam Girdwood <lgirdwood@gmail.com>
      Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
      Cc: linux-kernel@vger.kernel.org
      Signed-off-by: NNishanth Menon <nm@ti.com>
      Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
      5838b032
  7. 25 12月, 2012 1 次提交
  8. 28 11月, 2012 1 次提交
    • A
      regulator: core: Allow specific minimal selector for starting linear mapping · 33234e79
      Axel Lin 提交于
      Some drivers (at least 3 drivers) have such variant of linear mapping that
      the first few selectors are invalid and the reset are linear mapping.
      Let's support this case in core.
      
      This patch adds linear_min_sel in struct regulator_desc,
      so we can allow specific minimal selector for starting linear mapping.
      Then extends regulator_[map|list]_voltage_linear() to support this feature.
      
      Note that for selectors less than min_linear_index, we need count them to
      n_voltages so regulator_list_voltage() won't fail while checking the boundary
      for selector before calling list_voltage callback.
      Signed-off-by: NAxel Lin <axel.lin@ingics.com>
      Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
      33234e79
  9. 15 10月, 2012 1 次提交
  10. 10 9月, 2012 2 次提交
  11. 01 9月, 2012 1 次提交
  12. 29 8月, 2012 1 次提交
  13. 13 7月, 2012 1 次提交
  14. 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
  15. 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
  16. 11 6月, 2012 1 次提交
  17. 03 6月, 2012 1 次提交
  18. 12 5月, 2012 2 次提交
  19. 17 4月, 2012 3 次提交
  20. 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
  21. 04 4月, 2012 1 次提交
  22. 21 2月, 2012 1 次提交
  23. 17 2月, 2012 1 次提交
  24. 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
  25. 01 11月, 2011 1 次提交
  26. 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
  27. 10 6月, 2011 1 次提交
  28. 26 3月, 2011 1 次提交
  29. 12 1月, 2011 4 次提交