1. 02 3月, 2016 2 次提交
  2. 07 1月, 2016 1 次提交
    • D
      regulator: core: remove some dead code · 70dc6daf
      Dan Carpenter 提交于
      Originally queue_delayed_work() used to negative error codes or 0 and 1
      on success depending if the work was queued or not.  It caused a lot of
      bugs where people treated all non-zero returns as failures so we changed
      it to return bool instead in d4283e93 ('workqueue: make queueing
      functions return bool').  Now it never returns failure.
      
      Checking for negative values causes a static checker warning since it is
      impossible based on the bool type.
      Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      70dc6daf
  3. 05 1月, 2016 1 次提交
  4. 03 12月, 2015 2 次提交
    • T
      regulator: core: Fix nested locking of supplies · 70a7fb80
      Thierry Reding 提交于
      Commit fa731ac7 ("regulator: core: avoid unused variable warning")
      introduced a subtle change in how supplies are locked. Where previously
      code was always locking the regulator of the current iteration, the new
      implementation only locks the regulator if it has a supply. For any
      given power tree that means that the root will never get locked.
      
      On the other hand the regulator_unlock_supply() will still release all
      the locks, which in turn causes the lock debugging code to warn about a
      mutex being unlocked which wasn't locked.
      
      Cc: Mark Brown <broonie@kernel.org>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Fixes: Fixes: fa731ac7 ("regulator: core: avoid unused variable warning")
      Signed-off-by: NThierry Reding <treding@nvidia.com>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      70a7fb80
    • M
      regulator: core: Ensure we lock all regulators · 49a6bb7a
      Mark Brown 提交于
      The latest workaround for the lockdep interface's not using the second
      argument of mutex_lock_nested() changed the loop missed locking the last
      regulator due to a thinko with the loop termination condition exiting
      one regulator too soon.
      Reported-by: NTyler Baker <tyler.baker@linaro.org>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      49a6bb7a
  5. 28 11月, 2015 1 次提交
    • A
      regulator: core: fix regulator_lock_supply regression · bb41897e
      Arnd Bergmann 提交于
      As noticed by Geert Uytterhoeven, my patch to avoid a harmless build warning
      in regulator_lock_supply() was total crap and introduced a real bug:
      
      > [ BUG: bad unlock balance detected! ]
      > kworker/u4:0/6 is trying to release lock (&rdev->mutex) at:
      > [<c0247b84>] regulator_set_voltage+0x38/0x50
      
      we still lock the regulator supplies, but not the actual regulators,
      so we are missing a lock, and the unlock is unbalanced.
      
      This rectifies it by first locking the regulator device itself before
      using the same loop as before to lock its supplies.
      Reported-by: NGeert Uytterhoeven <geert@linux-m68k.org>
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Fixes: 716fec9d1965 ("[SUBMITTED] regulator: core: avoid unused variable warning")
      Signed-off-by: NMark Brown <broonie@kernel.org>
      bb41897e
  6. 21 11月, 2015 1 次提交
    • A
      regulator: core: avoid unused variable warning · fa731ac7
      Arnd Bergmann 提交于
      The second argument of the mutex_lock_nested() helper is only
      evaluated if CONFIG_DEBUG_LOCK_ALLOC is set. Otherwise we
      get this build warning for the new regulator_lock_supply
      function:
      
      drivers/regulator/core.c: In function 'regulator_lock_supply':
      drivers/regulator/core.c:142:6: warning: unused variable 'i' [-Wunused-variable]
      
      To avoid the warning, this restructures the code to make it
      both simpler and to move the 'i++' outside of the mutex_lock_nested
      call, where it is now always used and the variable is not
      flagged as unused.
      
      We had some discussion about changing mutex_lock_nested to an
      inline function, which would make the code do the right thing here,
      but in the end decided against it, in order to guarantee that
      mutex_lock_nested() does not introduced overhead without
      CONFIG_DEBUG_LOCK_ALLOC.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Fixes: 9f01cd4a ("regulator: core: introduce function to lock regulators and its supplies")
      Link: http://permalink.gmane.org/gmane.linux.kernel/2068900Signed-off-by: NMark Brown <broonie@kernel.org>
      fa731ac7
  7. 18 11月, 2015 1 次提交
  8. 04 11月, 2015 1 次提交
  9. 22 10月, 2015 1 次提交
    • S
      regulator: core: Propagate voltage changes to supply regulators · fc42112c
      Sascha Hauer 提交于
      Until now changing the voltage of a regulator only ever effected the
      regulator itself, but never its supplies. It's a common pattern though
      to put LDO regulators behind switching regulators. The switching
      regulators efficiently drop the input voltage but have a high ripple on
      their output. The output is then cleaned up by the LDOs. For higher
      energy efficiency the voltage drop at the LDOs should be minimized. For
      this scenario we need to propagate the voltage change to the supply
      regulators. Another scenario where voltage propagation is desired is
      a regulator which only consists of a switch and thus cannot regulate
      voltages itself. In this case we can pass setting voltages to the
      supply.
      
      This patch adds support for voltage propagation. We do voltage
      propagation when the current regulator has a minimum dropout voltage
      specified or if the current regulator lacks a get_voltage operation
      (indicating it's a switch and not a regulator).
      
      Changing the supply voltage must be done carefully. When we are
      increasing the current regulators output we must first increase the
      supply voltage and then the regulator itself. When we are decreasing the
      current regulators voltage we must decrease the supply voltage after
      changing the current regulators voltage.
      Signed-off-by: NSascha Hauer <s.hauer@pengutronix.de>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      fc42112c
  10. 20 10月, 2015 1 次提交
  11. 17 10月, 2015 1 次提交
  12. 01 10月, 2015 3 次提交
  13. 22 9月, 2015 1 次提交
  14. 18 9月, 2015 1 次提交
  15. 17 9月, 2015 1 次提交
    • S
      regulator: core: Make error messages more informative · 7ebcf26c
      Stephen Boyd 提交于
      The same error print exists 4 times in the regulator core
      
      	<rdev>: operation not allowed
      
      Unfortunately, seeing this in the dmesg is not very informative.
      Add what type of operation is not allowed to the message so that
      these errors are unique, hopefully pointing developers in the
      right direction
      
      	<rdev>: drms operation not allowed
      	<rdev>: voltage operation not allowed
      	<rdev>: current operation not allowed
      	<rdev>: mode operation not allowed
      Signed-off-by: NStephen Boyd <sboyd@codeaurora.org>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      7ebcf26c
  16. 02 9月, 2015 1 次提交
  17. 29 8月, 2015 1 次提交
  18. 18 8月, 2015 1 次提交
  19. 15 8月, 2015 1 次提交
  20. 13 8月, 2015 1 次提交
  21. 12 8月, 2015 3 次提交
  22. 07 8月, 2015 1 次提交
  23. 25 7月, 2015 1 次提交
  24. 17 7月, 2015 2 次提交
  25. 15 7月, 2015 1 次提交
  26. 07 7月, 2015 1 次提交
  27. 12 6月, 2015 4 次提交
  28. 10 6月, 2015 3 次提交