1. 04 7月, 2012 1 次提交
  2. 04 6月, 2012 3 次提交
  3. 23 4月, 2012 1 次提交
  4. 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
  5. 04 4月, 2012 1 次提交
  6. 01 4月, 2012 1 次提交
  7. 24 11月, 2011 1 次提交
  8. 11 10月, 2011 1 次提交
  9. 09 10月, 2011 1 次提交
    • H
      regulator: Add driver for gpio-controlled regulators · 3f0292ae
      Heiko Stübner 提交于
      This patch adds support for regulators that can be controlled via gpios.
      
      Examples for such regulators are the TI-tps65024x voltage regulators
      with 4 fixed and 1 runtime-switchable voltage regulators
      or the TI-bq240XX charger regulators.
      
      The number of controlling gpios is not limited, the mapping between
      voltage/current and target gpio state is done via the states map
      and the driver can be used for either voltage or current regulators.
      
      A mapping for a regulator with two GPIOs could look like:
      
      gpios = {
      	{ .gpio = GPIO1, .flags = GPIOF_OUT_INIT_HIGH, .label = "gpio name 1" },
      	{ .gpio = GPIO2, .flags = GPIOF_OUT_INIT_LOW,  .label = "gpio name 2" },
      }
      
      The flags element of the gpios array determines the initial state of
      the gpio, set during probe. The initial state of the regulator is also
      calculated from these values
      
      states = {
      	{ .value = volt_or_cur1, .gpios = (0 << 1) | (0 << 0) },
      	{ .value = volt_or_cur2, .gpios = (0 << 1) | (1 << 0) },
      	{ .value = volt_or_cur3, .gpios = (1 << 1) | (0 << 0) },
      	{ .value = volt_or_cur4, .gpios = (1 << 1) | (1 << 0) },
      }
      
      The target-state for the n-th gpio is determined by the n-th bit
      in the bitfield of the target-value.
      Signed-off-by: NHeiko Stuebner <heiko@sntech.de>
      Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
      3f0292ae