1. 05 12月, 2016 1 次提交
  2. 05 11月, 2016 1 次提交
  3. 17 8月, 2016 1 次提交
  4. 09 6月, 2016 1 次提交
    • M
      regulator: Remove regulator_can_change_voltage() · fc1e1c4a
      Mark Brown 提交于
      There is little obvious use case for a regualtor driver to know if it is
      possible to vary voltages at all by itself.  If a consumer needs to
      limit what voltages it tries to set based on the system configuration
      then it will need to enumerate the possible voltages, and without that
      even if it is possible to change voltages that doesn't mean that
      constraints or other consumers will allow whatever change the driver is
      trying to do at a given time.  It doesn't even indicate if _set_voltage()
      calls will work as noop _set_voltage() calls return success.
      
      There were no users of this API that weren't abusing it and now they're
      all gone so remove the API.
      Signed-off-by: NMark Brown <broonie@kernel.org>
      fc1e1c4a
  5. 18 5月, 2016 1 次提交
    • M
      regulator: Silence build warnings from regulator_can_change_voltage() · ec4c4366
      Mark Brown 提交于
      Cut down on noise for mainstream users of the API and people doing build
      testing by dropping the deprecated flag from regulator_can_change_voltage()
      as it triggers even on the EXPORT_SYMBOL_GPL() which affects all builds
      rather than just the remaining drivers with calls to it (for which fixes
      are currently pending).
      
      The function remains deprecated and is expected to be removed entirely
      in v4.8.
      Signed-off-by: NMark Brown <broonie@kernel.org>
      ec4c4366
  6. 31 3月, 2016 1 次提交
    • M
      regulator: Deprecate regulator_can_change_voltage() · 6a0028b3
      Mark Brown 提交于
      All current users of regulator_can_change_voltage() are abusing it,
      using it to wrap a call to regulator_set_voltage() on probe without any
      alternative handling for fixed voltages.  Drivers should only be using
      regulator_set_voltage() if they need to vary voltages at runtime, fixed
      voltages should normally be set via machine constraints, and calling
      regulator_set_voltage() on a regulator which can't be varied will
      succeed if the current voltage is within the range requested so users
      shouldn't worry if they have permission to vary normally.
      
      Deprecate the API to try to stop any new users appearing while we fix
      the current callers.
      Signed-off-by: NMark Brown <broonie@kernel.org>
      6a0028b3
  7. 18 11月, 2015 1 次提交
  8. 18 8月, 2015 1 次提交
    • V
      regulator: core: Define regulator_set_voltage_triplet() · 30f93ca8
      Viresh Kumar 提交于
      Voltage tolerance isn't necessarily same on both sides of the target
      voltage and regulator_set_voltage_tol() wouldn't be suitable in such
      cases.
      
      Add another routine regulator_set_voltage_triplet(), which accepts
      target, min and max voltages as arguments.
      
      This first tries to set the voltage between the target voltage and the
      upper limit, then fall back on the full range. The idea behind this is
      to set regulator's voltage as close to the target voltage, as possible.
      
      Based on regulator_set_voltage_tol().
      Signed-off-by: NViresh Kumar <viresh.kumar@linaro.org>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      30f93ca8
  9. 11 7月, 2015 1 次提交
    • S
      regulator: Add missing dummy definition for regulator_list_voltage · 5127e31a
      Suzuki K. Poulose 提交于
      Fixes a build break when CONFIG_REGULATOR is not selected.
      
      e.g, on linux-next - 07102015:
      
      drivers/clk/tegra/clk-dfll.c: In function ‘find_lut_index_for_rate’:
      drivers/clk/tegra/clk-dfll.c:691:3: error: implicit declaration of function ‘regulator_list_voltage’ [-Werror=implicit-function-declaration]
          if (regulator_list_voltage(td->vdd_reg, td->i2c_lut[i]) == uv)
          ^
         CC      drivers/clocksource/mmio.o
         CC      fs/proc/softirqs.o
      cc1: some warnings being treated as errors
      make[3]: *** [drivers/clk/tegra/clk-dfll.o] Error 1
      make[2]: *** [drivers/clk/tegra] Error 2
      make[1]: *** [drivers/clk] Error 2
      make[1]: *** Waiting for unfinished jobs....
      
      This should be pushed to 4.2 as we have the issue in 4.2-rc1, just that
      nobody uses it without the REGULATOR(yet).
      Signed-off-by: NSuzuki K. Poulose <suzuki.poulose@arm.com>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      5127e31a
  10. 10 3月, 2015 2 次提交
  11. 06 3月, 2015 1 次提交
  12. 24 2月, 2015 1 次提交
  13. 24 11月, 2014 1 次提交
  14. 25 10月, 2014 1 次提交
  15. 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
  16. 29 8月, 2014 1 次提交
  17. 29 7月, 2014 1 次提交
  18. 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
  19. 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
  20. 29 5月, 2014 1 次提交
  21. 24 5月, 2014 1 次提交
  22. 18 4月, 2014 1 次提交
  23. 18 10月, 2013 1 次提交
  24. 30 8月, 2013 1 次提交
  25. 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
  26. 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
  27. 07 6月, 2013 1 次提交
  28. 04 3月, 2013 1 次提交
  29. 06 12月, 2012 1 次提交
  30. 21 11月, 2012 1 次提交
  31. 14 11月, 2012 1 次提交
  32. 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
  33. 08 8月, 2012 1 次提交
  34. 02 7月, 2012 1 次提交
  35. 18 6月, 2012 1 次提交
  36. 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
  37. 30 1月, 2012 1 次提交
  38. 27 1月, 2012 1 次提交