1. 13 10月, 2014 1 次提交
    • G
      regulator: Include err.h from consumer.h to fix build failure · 174e964e
      Guenter Roeck 提交于
      sh:sh2007_defconfig fails to build with the following error:
      
      In file included from include/linux/regulator/machine.h:18:0,
                       from arch/sh/boards/board-sh2007.c:10:
      include/linux/regulator/consumer.h: In function 'regulator_get_optional':
      include/linux/regulator/consumer.h:271:2:
      		error: implicit declaration of function 'ERR_PTR'
      include/linux/err.h: At top level:
      include/linux/err.h:23:35: error: conflicting types for 'ERR_PTR'
      include/linux/regulator/consumer.h:271:9:
      		note: previous implicit declaration of 'ERR_PTR' was here
      
      Since consumer.h uses ERR_PTR, it should include err.h.
      Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      174e964e
  2. 29 8月, 2014 1 次提交
  3. 29 7月, 2014 1 次提交
  4. 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
  5. 04 6月, 2014 1 次提交
    • A
      regulator: add regulator_can_change_voltage stub · b14903e1
      Arnd Bergmann 提交于
      When CONFIG_REGULATOR is not set, we cannot call
      regulator_can_change_voltage() from a device driver, which results
      in a build error like
      
      video/fbdev/omap2/dss/hdmi5.c: In function 'hdmi_init_regulator':
      video/fbdev/omap2/dss/hdmi5.c:149:2: error: implicit declaration of function 'regulator_can_change_voltage' [-Werror=implicit-function-declaration]
      
      even for drivers that don't require the regulator API normally.
      Such a use was recently added in the omap2+ hdmi driver.
      
      This avoids the problem by adding a static inline function
      stub in the API header, as we have for most of the other
      regulator functions as well.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Cc: Mark Brown <broonie@kernel.org>
      Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
      Signed-off-by: NMark Brown <broonie@linaro.org>
      b14903e1
  6. 29 5月, 2014 1 次提交
  7. 24 5月, 2014 1 次提交
  8. 18 4月, 2014 1 次提交
  9. 18 10月, 2013 1 次提交
  10. 30 8月, 2013 1 次提交
  11. 31 7月, 2013 2 次提交
    • M
      regulator: core: Provide hints to the core about optional supplies · de1dd9fd
      Mark Brown 提交于
      While the majority of supplies on devices are mandatory and can't be
      physically omitted for electrical reasons some devices do have optional
      supplies and need to know if they are missing, MMC being the most common
      of these.
      
      Currently the core accurately reports all errors when regulators are
      requested since it does not know if the supply is one that must be provided
      even if by a regulator software does not know about or if it is one that
      may genuinely be disconnected. In order to allow this behaviour to be
      changed and stub regulators to be provided in the former case add a new
      regulator request function regulator_get_optional() which provides a hint
      to the core that the regulator may genuinely not be connected.
      
      Currently the implementation is identical to the current behaviour, future
      patches will add support in the core for returning stub regulators in the
      case where normal regulator_get() fails and the board has requested it.
      Signed-off-by: NMark Brown <broonie@linaro.org>
      Acked-by: NChris Ball <cjb@laptop.org>
      de1dd9fd
    • M
      4bdfb272
  12. 15 7月, 2013 1 次提交
    • M
      regulator: core: Make set_voltage_tol() try for mid-range first · dc9ceed6
      Mark Brown 提交于
      The expected semantic for something expressed as a tolerance is that it
      should deliver the specified value with some deviation allowed but this
      is not what set_voltage_tol() currently does. Instead it just passes
      the maximum possible range to set_voltage() which will typically result
      in a voltage aimed at lower than the target voltage.
      
      Instead first try to set a voltage between the target voltage and the
      upper limit, then fall back on the full range. This will be much more
      robust against physical variation in systems and makes the API behave
      more like users would expect.
      Signed-off-by: NMark Brown <broonie@linaro.org>
      dc9ceed6
  13. 07 6月, 2013 1 次提交
  14. 04 3月, 2013 1 次提交
  15. 06 12月, 2012 1 次提交
  16. 21 11月, 2012 1 次提交
  17. 14 11月, 2012 1 次提交
  18. 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
  19. 08 8月, 2012 1 次提交
  20. 02 7月, 2012 1 次提交
  21. 18 6月, 2012 1 次提交
  22. 16 3月, 2012 1 次提交
    • P
      device.h: audit and cleanup users in main include dir · 313162d0
      Paul Gortmaker 提交于
      The <linux/device.h> header includes a lot of stuff, and
      it in turn gets a lot of use just for the basic "struct device"
      which appears so often.
      
      Clean up the users as follows:
      
      1) For those headers only needing "struct device" as a pointer
      in fcn args, replace the include with exactly that.
      
      2) For headers not really using anything from device.h, simply
      delete the include altogether.
      
      3) For headers relying on getting device.h implicitly before
      being included themselves, now explicitly include device.h
      
      4) For files in which doing #1 or #2 uncovers an implicit
      dependency on some other header, fix by explicitly adding
      the required header(s).
      
      Any C files that were implicitly relying on device.h to be
      present have already been dealt with in advance.
      
      Total removals from #1 and #2: 51.  Total additions coming
      from #3: 9.  Total other implicit dependencies from #4: 7.
      
      As of 3.3-rc1, there were 110, so a net removal of 42 gives
      about a 38% reduction in device.h presence in include/*
      Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com>
      313162d0
  23. 30 1月, 2012 1 次提交
  24. 27 1月, 2012 1 次提交
  25. 23 1月, 2012 2 次提交
  26. 20 1月, 2012 1 次提交
  27. 04 1月, 2012 1 次提交
  28. 02 1月, 2012 1 次提交
  29. 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
  30. 09 9月, 2011 1 次提交
  31. 09 8月, 2011 1 次提交
  32. 30 5月, 2011 1 次提交
    • M
      regulator: Do bulk enables of regulators in parallel · f21e0e81
      Mark Brown 提交于
      In order to reduce the impact of ramp times rather than enabling the
      regulators for a device in series use async tasks to run the actual
      enables. This means that the delays which the enables implement can all
      run in parallel, though it does mean that the order in which the
      supplies come on may be unstable.
      
      For super bonus fun points if any of the regulators are shared between
      multiple supplies on the same device (as is rather likely) then this
      will test our locking.  Note that in this case we only delay once for
      each physical regulator so the threads shouldn't block each other while
      delaying.
      
      It'd be even nicer if we could coalesce writes to a shared enable registers
      in PMICs but that's definitely future work, and it may also be useful
      and is certainly more achievable to optimise out the parallelism if none
      of the regulators implement ramp delays.
      Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
      Signed-off-by: NLiam Girdwood <lrg@slimlogic.co.uk>
      f21e0e81
  33. 26 3月, 2011 1 次提交
  34. 12 1月, 2011 1 次提交
  35. 19 4月, 2010 1 次提交
  36. 03 3月, 2010 1 次提交
    • M
      regulator: Add notifier event on regulator disable · 84b68263
      Mark Brown 提交于
      The intended use case is for drivers which disable regulators to save
      power but need to do some work to restore the hardware state when
      restarting.  If the supplies are not actually disabled due to board
      limits or sharing with other active devices this notifier allows the
      driver to avoid unneeded reinitialisation, particularly when used with
      runtime PM.
      Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
      84b68263
  37. 17 12月, 2009 1 次提交
  38. 22 9月, 2009 1 次提交