1. 04 3月, 2015 1 次提交
  2. 03 2月, 2015 1 次提交
  3. 29 1月, 2015 1 次提交
  4. 15 1月, 2015 1 次提交
  5. 09 1月, 2015 3 次提交
  6. 30 12月, 2014 2 次提交
  7. 05 12月, 2014 1 次提交
  8. 24 11月, 2014 1 次提交
  9. 01 11月, 2014 1 次提交
  10. 20 10月, 2014 1 次提交
    • M
      regulator: Add ena_gpio_initialized to regulator_config · 76f439df
      Markus Pargmann 提交于
      Most drivers do not set the ena_gpio field of struct regulator_config
      before passing it to the regulator core. This is fine as long as the
      gpio identifier that is passed is a positive integer. But the gpio
      identifier 0 is also valid. So we are not able to decide wether we got a
      real gpio identifier or not based on a 0 in ena_gpio.
      
      To be able to decide if it is a valid gpio that got passed, this patch
      adds a ena_gpio_initialized field that should be set if was initialized
      with a correct value, either a gpio >= 0 or a negative error number. The
      core then checks if ena_gpio or ena_gpio_initialized before handling it
      as a gpio. This way we maintain backwards compatibility and fix the
      behaviour for gpio number 0.
      Signed-off-by: NMarkus Pargmann <mpa@pengutronix.de>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      76f439df
  11. 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
  12. 29 8月, 2014 1 次提交
  13. 19 8月, 2014 1 次提交
  14. 17 8月, 2014 3 次提交
  15. 30 7月, 2014 2 次提交
  16. 26 7月, 2014 1 次提交
    • T
      regulator: Add helpers for low-level register access · 04eca28c
      Tuomas Tynkkynen 提交于
      Add helper functions that allow regulator consumers to obtain low-level
      details about the regulator hardware, like the voltage selector register
      address and such. These details can be useful when configuring hardware
      or firmware that want to do low-level access to regulators, with no
      involvement from the kernel.
      
      The use-case for Tegra is a voltage-controlled oscillator clocksource
      which has control logic to change the supply voltage via I2C to achieve
      a desired output clock rate.
      Signed-off-by: NTuomas Tynkkynen <ttynkkynen@nvidia.com>
      Signed-off-by: NMark Brown <broonie@linaro.org>
      04eca28c
  17. 30 6月, 2014 1 次提交
  18. 05 6月, 2014 1 次提交
    • N
      regulator: core: print error value when constraints are not applied · 69d58839
      Nishanth Menon 提交于
      With commit 064d5cd1
      (regulator: core: Fix the init of DT defined fixed regulators)
      We ensure that regulator must be capable of providing it's current
      voltage when constraints are used, however adding the return value in
      the print is a little more informative to explain the nature of the
      failure involved.
      
      So, instead of providing message such as:
      smps9: failed to get the current voltage
      
      having error value added to the message such as:
      smps9: failed to get the current voltage(-22)
      
      is a little more informative for debugging the error.
      Signed-off-by: NNishanth Menon <nm@ti.com>
      Signed-off-by: NMark Brown <broonie@linaro.org>
      69d58839
  19. 02 6月, 2014 3 次提交
    • A
      regulator: core: Fix the init of DT defined fixed regulators · 064d5cd1
      Alban Bedel 提交于
      When a regulator is defined using DT and it has a single voltage the
      regulator init always tries to apply this voltage. However it fails if
      the regulator isn't settable because it is using an internal low level
      function. To overcome this we now first query the regulator and only
      set it if needed.
      Signed-off-by: NAlban Bedel <alban.bedel@avionic-design.de>
      Signed-off-by: NMark Brown <broonie@linaro.org>
      064d5cd1
    • S
      regulator: core: Disable unused regulators after deferred probing is done · fd482a3e
      Saravana Kannan 提交于
      regulator_init_complete does a scan of regulators which dont have
      always-on or consumers are automatically disabled as being unused.
      However, with deferred probing, late_initcall() is too soon to
      declare a regulator as unused as the regulator itself might not
      have registered due to defferal - Example: A regulator deffered due
      to i2bus not available which in turn is deffered due to pinctrl
      availability.
      
      Since deferred probing is done in late_initcall(), do the cleanup of
      unused regulators by regulator_init_complete in late_initcall_sync
      instead of late_initcall.
      
      Cc: Liam Girdwood <lgirdwood@gmail.com>
      Cc: Mark Brown <broonie@kernel.org>
      Cc: Markus Pargmann <mpa@pengutronix.de>
      Signed-off-by: NSaravana Kannan <skannan@codeaurora.org>
      [nm@ti.com: minor rewording]
      Signed-off-by: NNishanth Menon <nm@ti.com>
      Signed-off-by: NMark Brown <broonie@linaro.org>
      fd482a3e
    • M
      regulator: Don't disable unused regulators we don't have permission for · e9535834
      Mark Brown 提交于
      In the spirit of conservatism that governs our general approach to
      permissions it is better if we don't touch regulators we weren't explicitly
      given permissions to control. This avoids the need to explicitly specify
      unknown regulators in DT as always on, if a regulator is not otherwise
      involved in software control it can be omitted from the DT.
      
      Regulators explicitly given constraints in DT still need to have an always
      on constraint specified as before.
      Signed-off-by: NMark Brown <broonie@linaro.org>
      e9535834
  20. 29 5月, 2014 1 次提交
  21. 26 5月, 2014 1 次提交
  22. 24 5月, 2014 1 次提交
  23. 15 4月, 2014 1 次提交
    • C
      regulator: core: Get and put regulator of_node · 63c7c9e1
      Charles Keepax 提交于
      Currently the regulator core does not take an additional reference to
      the of_node it is passed. This means that the caller must ensure that
      the of_node is valid for the duration of the regulator's existance.
      It is reasonable for the framework to assume it is passed a valid
      of_node but seems onerous for it to assume the caller will keep the node
      valid for the life-time of the regulator, especially when
      devm_regulator_register is used and there will likely be no code in the
      driver called at the point it would be safe to put the of_node.
      
      This patch adds an additional of_node_get when the regulator is
      registered and an of_node_put when it is unregistered in the core. This
      means individual drivers are free to put their of_node references at the
      end of probe letting the regulator core handling it from there. This
      simplifies code on the driver side.
      Signed-off-by: NCharles Keepax <ckeepax@opensource.wolfsonmicro.com>
      Signed-off-by: NMark Brown <broonie@linaro.org>
      63c7c9e1
  24. 25 2月, 2014 2 次提交
    • M
      regulator: core: Replace direct ops->disable usage · 66fda75f
      Markus Pargmann 提交于
      There are many places where ops->disable is called directly. Instead we
      should use _regulator_do_disable() which also handles gpio regulators.
      
      To be able to use the wrapper function from _regulator_force_disable(),
      I moved the _notifier_call_chain() call from _regulator_do_disable() to
      _regulator_disable(). This way, _regulator_force_disable() can use
      different flags for _notifier_call_chain() without calling it twice.
      
      Cc: <stable@vger.kernel.org> # 3.10+
      Signed-off-by: NMarkus Pargmann <mpa@pengutronix.de>
      Signed-off-by: NMark Brown <broonie@linaro.org>
      66fda75f
    • M
      regulator: core: Replace direct ops->enable usage · 30c21971
      Markus Pargmann 提交于
      There are some direct ops->enable in the regulator core driver. This is
      a potential issue as the function _regulator_do_enable() handles gpio
      regulators and the normal ops->enable calls. These gpio regulators are
      simply ignored when ops->enable is called directly.
      
      One possible bug is that boot-on and always-on gpio regulators are not
      enabled on registration.
      
      This patch replaces all ops->enable calls by _regulator_do_enable.
      
      [Handle missing enable operations -- broonie]
      
      Cc: <stable@vger.kernel.org> # 3.10+
      Signed-off-by: NMarkus Pargmann <mpa@pengutronix.de>
      Signed-off-by: NMark Brown <broonie@linaro.org>
      
      regulator: Handle invalid enable operation for always/boot on regulators
      Signed-off-by: NMark Brown <broonie@linaro.org>
      30c21971
  25. 21 2月, 2014 1 次提交
  26. 19 2月, 2014 1 次提交
  27. 07 2月, 2014 1 次提交
  28. 28 1月, 2014 1 次提交
    • M
      regulator: core: Correct default return value for full constraints · 317b5684
      Mark Brown 提交于
      Once we have full constraints then all supply mappings should be known to
      the regulator API. This means that we should treat failed lookups as fatal
      rather than deferring in the hope of further registrations but this was
      broken by commit 9b92da1f "regulator: core: Fix default return
      value for _get()" which was targeted at DT systems but unintentionally
      broke non-DT systems by changing the default return value.
      
      Fix this by explicitly returning -EPROBE_DEFER from the DT lookup if we
      find a property but no corresponding regulator and by having the non-DT
      case default to -ENODEV when we have full constraints.
      
      Fixes: 9b92da1f "regulator: core: Fix default return value for _get()"
      Signed-off-by: NMark Brown <broonie@linaro.org>
      Tested-by: NGuenter Roeck <linux@roeck-us.net>
      Cc: stable@vger.kernel.org
      317b5684
  29. 09 1月, 2014 1 次提交
  30. 18 12月, 2013 1 次提交
  31. 28 11月, 2013 1 次提交