1. 04 7月, 2012 1 次提交
    • S
      regulator: Fix recursive mutex lockdep warning · d92d95b6
      Stephen Boyd 提交于
      A recursive lockdep warning occurs if you call
      regulator_set_optimum_mode() on a regulator with a supply because
      there is no nesting annotation for the rdev->mutex. To avoid this
      warning, get the supply's load before locking the regulator's
      mutex to avoid grabbing the same class of lock twice.
      
      =============================================
      [ INFO: possible recursive locking detected ]
      3.4.0 #3257 Tainted: G        W
      ---------------------------------------------
      swapper/0/1 is trying to acquire lock:
       (&rdev->mutex){+.+.+.}, at: [<c036e9e0>] regulator_get_voltage+0x18/0x38
      
      but task is already holding lock:
       (&rdev->mutex){+.+.+.}, at: [<c036ef38>] regulator_set_optimum_mode+0x24/0x224
      
      other info that might help us debug this:
       Possible unsafe locking scenario:
      
             CPU0
             ----
        lock(&rdev->mutex);
        lock(&rdev->mutex);
      
       *** DEADLOCK ***
      
       May be due to missing lock nesting notation
      
      3 locks held by swapper/0/1:
       #0:  (&__lockdep_no_validate__){......}, at: [<c03dbb48>] __driver_attach+0x40/0x8c
       #1:  (&__lockdep_no_validate__){......}, at: [<c03dbb58>] __driver_attach+0x50/0x8c
       #2:  (&rdev->mutex){+.+.+.}, at: [<c036ef38>] regulator_set_optimum_mode+0x24/0x224
      
      stack backtrace:
      [<c001521c>] (unwind_backtrace+0x0/0x12c) from [<c00cc4d4>] (validate_chain+0x760/0x1080)
      [<c00cc4d4>] (validate_chain+0x760/0x1080) from [<c00cd744>] (__lock_acquire+0x950/0xa10)
      [<c00cd744>] (__lock_acquire+0x950/0xa10) from [<c00cd990>] (lock_acquire+0x18c/0x1e8)
      [<c00cd990>] (lock_acquire+0x18c/0x1e8) from [<c080c248>] (mutex_lock_nested+0x68/0x3c4)
      [<c080c248>] (mutex_lock_nested+0x68/0x3c4) from [<c036e9e0>] (regulator_get_voltage+0x18/0x38)
      [<c036e9e0>] (regulator_get_voltage+0x18/0x38) from [<c036efb8>] (regulator_set_optimum_mode+0xa4/0x224)
      ...
      Signed-off-by: NStephen Boyd <sboyd@codeaurora.org>
      Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
      d92d95b6
  2. 08 6月, 2012 1 次提交
  3. 14 5月, 2012 3 次提交
  4. 12 5月, 2012 2 次提交
  5. 10 5月, 2012 1 次提交
  6. 07 5月, 2012 1 次提交
  7. 20 4月, 2012 1 次提交
    • M
      regulator: core: Optimise enable/disable path for always on regulators · 6492bc1b
      Mark Brown 提交于
      If a regulator is always on for any reason then cache that when the
      consumer is created and use it to optimise away the need to take locks
      or recurse up the supply tree when consumers do enable or disable calls.
      The scheduling of asynchronous work for bulk enables is also skipped.
      
      We don't actually check if the device physically supports control on the
      basis that constraints allowing status changes on physically always on
      regulators are nonsensical anyway.
      
      This is a very common pattern in hardware - it's normal to have some
      power supplies that have either no software control or are critical to
      system function - so many systems should be able to benefit.
      Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
      Acked-by: NLiam Girdwood <lrg@ti.com>
      6492bc1b
  8. 17 4月, 2012 4 次提交
  9. 16 4月, 2012 2 次提交
  10. 11 4月, 2012 1 次提交
  11. 09 4月, 2012 1 次提交
    • M
      regulator: core: Use a struct to pass in regulator runtime configuration · c172708d
      Mark Brown 提交于
      Rather than adding new arguments to regulator_register() every time we
      want to add a new bit of dynamic information at runtime change the function
      to take these via a struct. By doing this we avoid needing to do further
      changes like the recent addition of device tree support which required each
      regulator driver to be updated to take an additional parameter.
      
      The regulator_desc which should (mostly) be static data is still passed
      separately as most drivers are able to configure this statically at build
      time.
      Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
      c172708d
  12. 05 4月, 2012 1 次提交
  13. 04 4月, 2012 1 次提交
  14. 03 4月, 2012 3 次提交
  15. 30 3月, 2012 1 次提交
  16. 17 3月, 2012 1 次提交
  17. 13 3月, 2012 1 次提交
  18. 24 2月, 2012 1 次提交
  19. 21 2月, 2012 2 次提交
  20. 20 2月, 2012 1 次提交
  21. 19 2月, 2012 1 次提交
  22. 10 2月, 2012 2 次提交
  23. 02 2月, 2012 1 次提交
  24. 25 1月, 2012 2 次提交
  25. 24 1月, 2012 1 次提交
  26. 23 1月, 2012 2 次提交
  27. 20 1月, 2012 1 次提交