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. 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
  3. 01 9月, 2014 1 次提交
  4. 29 8月, 2014 1 次提交
  5. 28 8月, 2014 1 次提交
  6. 27 8月, 2014 1 次提交
  7. 21 8月, 2014 1 次提交
  8. 18 8月, 2014 1 次提交
    • A
      regulator: core: Fix build error due to const qualifier for ops · 716845eb
      Axel Lin 提交于
      Drop const qualifier for ops of struct regulator_desc.
      Allow regulator drivers to update ops before registering regulator.
      
      Fix below build error:
        CC [M]  drivers/regulator/mc13892-regulator.o
      drivers/regulator/mc13892-regulator.c: In function 'mc13892_regulator_probe':
      drivers/regulator/mc13892-regulator.c:586:3: error: assignment of member 'set_mode' in read-only object
      drivers/regulator/mc13892-regulator.c:588:3: error: assignment of member 'get_mode' in read-only object
      make[2]: *** [drivers/regulator/mc13892-regulator.o] Error 1
      make[1]: *** [drivers/regulator] Error 2
      make: *** [drivers] Error 2
      Reported-by: NStephen Rothwell <sfr@canb.auug.org.au>
      Signed-off-by: NAxel Lin <axel.lin@ingics.com>
      Signed-off-by: NMark Brown <broonie@linaro.org>
      716845eb
  9. 17 8月, 2014 3 次提交
  10. 06 8月, 2014 2 次提交
  11. 29 7月, 2014 1 次提交
  12. 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
  13. 15 7月, 2014 1 次提交
  14. 22 6月, 2014 1 次提交
  15. 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
  16. 29 5月, 2014 1 次提交
  17. 24 5月, 2014 1 次提交
  18. 19 4月, 2014 1 次提交
  19. 18 4月, 2014 1 次提交
  20. 15 4月, 2014 2 次提交
  21. 06 3月, 2014 1 次提交
    • C
      regulator: helpers: Modify helpers enabling multi-bit control · ca5d1b35
      Carlo Caione 提交于
      This patch extends the regulator helpers to account for device that use
      multiple bits for control when using regmap enable/disable/bypass ops.
      
      The actual regulator helpers wrongly assume that the regulator control
      is always performed using single bits, using in the regulator_desc
      struct only two parameters *_reg and *_mask defining register and mask
      for control.
      
      This patch extends this struct and introduces the helpers to take into
      account devices where control is performed using multiple bits and
      specific multi-bit values are used for enabling/disabling/bypassing the
      regulator.
      Signed-off-by: NCarlo Caione <carlo@caione.org>
      Signed-off-by: NMark Brown <broonie@linaro.org>
      ca5d1b35
  22. 04 3月, 2014 1 次提交
  23. 24 12月, 2013 1 次提交
  24. 18 10月, 2013 1 次提交
  25. 11 10月, 2013 2 次提交
  26. 19 9月, 2013 1 次提交
  27. 17 9月, 2013 3 次提交
  28. 11 9月, 2013 1 次提交
  29. 30 8月, 2013 1 次提交
  30. 07 8月, 2013 1 次提交
  31. 03 8月, 2013 1 次提交
  32. 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