1. 01 Jun, 2016 2 commits
    • Javier Martinez Canillas's avatar
      regulator: Try to resolve regulators supplies on registration · db9c6316
      Javier Martinez Canillas authored
      [ Upstream commit 5e3ca2b3 ]
      
      Commit 6261b06d ("regulator: Defer lookup of supply to regulator_get")
      moved the regulator supplies lookup logic from the regulators registration
      to the regulators get time.
      
      Unfortunately, that changed the behavior of the regulator core since now a
      parent supply with a child regulator marked as always-on, won't be enabled
      unless a client driver attempts to get the child regulator during boot.
      
      This patch tries to resolve the parent supply for the already registered
      regulators each time that a new regulator is registered. So the regulators
      that have child regulators marked as always on will be enabled regardless
      if a driver gets the child regulator or not.
      
      That was the behavior before the mentioned commit, since parent supplies
      were looked up at regulator registration time instead of during child get.
      
      Since regulator_resolve_supply() checks for rdev->supply, most of the times
      it will be a no-op. Errors aren't checked to keep the possible out of order
      dependencies which was the motivation for the mentioned commit.
      
      Also, the supply being available will be enforced on regulator get anyways
      in case the resolve fails on regulators registration.
      
      Fixes: 6261b06d ("regulator: Defer lookup of supply to regulator_get")
      Suggested-by: default avatarMark Brown <broonie@kernel.org>
      Signed-off-by: default avatarJavier Martinez Canillas <javier@osg.samsung.com>
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      Cc: <stable@vger.kernel.org> # 4.1+
      Signed-off-by: default avatarSasha Levin <sasha.levin@oracle.com>
      db9c6316
    • Mark Brown's avatar
      regulator: core: Use class device list for regulator_list in late init · 28c94eff
      Mark Brown authored
      [ Upstream commit 609ca5f3 ]
      
      The regulator_list has exactly the same contents as the list that the
      driver core maintains of regulator_class members so is redundant. As a
      first step in converting over to use the class device list convert our
      iteration in late_initcall() to use the class device iterator.
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      Signed-off-by: default avatarSasha Levin <sasha.levin@oracle.com>
      28c94eff
  2. 30 May, 2016 3 commits
  3. 21 May, 2016 1 commit
  4. 17 May, 2016 34 commits