1. 02 Jul, 2019 2 commits
    • Krzysztof Kozlowski's avatar
      regulator: s2mps11: Adjust supported buck voltages to real values · 9d83dcb3
      Krzysztof Kozlowski authored
      The driver was registering buck regulators with unsupported range of
      voltages for S2MPS11 devices.  Basically it assumed that all 256 values
      are possible for a single 8-bit I2C register controlling buck's voltage.
      This is not true, as datasheet describes subset of these which can be
      used.
      
      For example for buck[12346] the minimum voltage is 650 mV which
      corresponds to register value of 0x8.  The driver was however
      registering regulator starting at 600 mV, so for a step of 6.25 mV this
      gave the same result.  However this allowed to try to configure
      regulators to unsupported values.
      Signed-off-by: default avatarKrzysztof Kozlowski <krzk@kernel.org>
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      9d83dcb3
    • Krzysztof Kozlowski's avatar
      regulator: s2mps11: Fix buck7 and buck8 wrong voltages · 16da0eb5
      Krzysztof Kozlowski authored
      On S2MPS11 device, the buck7 and buck8 regulator voltages start at 750
      mV, not 600 mV.  Using wrong minimal value caused shifting of these
      regulator values by 150 mV (e.g. buck7 usually configured to v1.35 V was
      reported as 1.2 V).
      
      On most of the boards these regulators are left in default state so this
      was only affecting reported voltage.  However if any driver wanted to
      change them, then effectively it would set voltage 150 mV higher than
      intended.
      
      Cc: <stable@vger.kernel.org>
      Fixes: cb74685e ("regulator: s2mps11: Add samsung s2mps11 regulator driver")
      Signed-off-by: default avatarKrzysztof Kozlowski <krzk@kernel.org>
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      16da0eb5
  2. 20 Jun, 2019 1 commit
    • Krzysztof Kozlowski's avatar
      regulator: s2mps11: Fix ERR_PTR dereference on GPIO lookup failure · 70ca117b
      Krzysztof Kozlowski authored
      If devm_gpiod_get_from_of_node() call returns ERR_PTR, it is assigned
      into an array of GPIO descriptors and used later because such error is
      not treated as critical thus it is not propagated back to the probe
      function.
      
      All code later expects that such GPIO descriptor is either a NULL or
      proper value.  This later might lead to dereference of ERR_PTR.
      
      Only devices with S2MPS14 flavor are affected (other do not control
      regulators with GPIOs).
      
      Fixes: 1c984942 ("regulator: s2mps11: Pass descriptor instead of GPIO number")
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarKrzysztof Kozlowski <krzk@kernel.org>
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      70ca117b
  3. 16 May, 2019 1 commit
  4. 03 May, 2019 7 commits
  5. 02 May, 2019 3 commits
  6. 26 Apr, 2019 10 commits
  7. 17 Apr, 2019 7 commits
  8. 16 Apr, 2019 3 commits
  9. 15 Apr, 2019 6 commits