1. 22 Feb, 2022 2 commits
  2. 08 Feb, 2022 1 commit
    • Oliver Barta's avatar
      regulator: core: fix false positive in regulator_late_cleanup() · 4e2a354e
      Oliver Barta authored
      The check done by regulator_late_cleanup() to detect whether a regulator
      is on was inconsistent with the check done by _regulator_is_enabled().
      While _regulator_is_enabled() takes the enable GPIO into account,
      regulator_late_cleanup() was not doing that.
      
      This resulted in a false positive, e.g. when a GPIO-controlled fixed
      regulator was used, which was not enabled at boot time, e.g.
      
      reg_disp_1v2: reg_disp_1v2 {
      	compatible = "regulator-fixed";
      	regulator-name = "display_1v2";
      	regulator-min-microvolt = <1200000>;
      	regulator-max-microvolt = <1200000>;
      	gpio = <&tlmm 148 0>;
      	enable-active-high;
      };
      
      Such regulator doesn't have an is_enabled() operation. Nevertheless
      it's state can be determined based on the enable GPIO. The check in
      regulator_late_cleanup() wrongly assumed that the regulator is on and
      tried to disable it.
      Signed-off-by: default avatarOliver Barta <oliver.barta@aptiv.com>
      Link: https://lore.kernel.org/r/20220208084645.8686-1-oliver.barta@aptiv.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
      4e2a354e
  3. 19 Jan, 2022 1 commit
    • Randy Dunlap's avatar
      regulator: MAX20086: add gpio/consumer.h · b4c18c18
      Randy Dunlap authored
      max20086-regulator.c needs <linux/gpio/consumer.h> for an enum, some
      macros, and a function prototype. (seen on ARCH=m68k)
      
      Adding this header file fixes multiple build errors:
      
      ../drivers/regulator/max20086-regulator.c: In function 'max20086_i2c_probe':
      ../drivers/regulator/max20086-regulator.c:217:26: error: storage size of 'flags' isn't known
        217 |         enum gpiod_flags flags;
      ../drivers/regulator/max20086-regulator.c:261:27: error: 'GPIOD_OUT_HIGH' undeclared (first use in this function); did you mean 'GPIOF_INIT_HIGH'?
        261 |         flags = boot_on ? GPIOD_OUT_HIGH : GPIOD_OUT_LOW;
            |                           ^~~~~~~~~~~~~~
      ../drivers/regulator/max20086-regulator.c:261:44: error: 'GPIOD_OUT_LOW' undeclared (first use in this function); did you mean 'GPIOF_INIT_LOW'?
        261 |         flags = boot_on ? GPIOD_OUT_HIGH : GPIOD_OUT_LOW;
      ../drivers/regulator/max20086-regulator.c:262:27: error: implicit declaration of function 'devm_gpiod_get'; did you mean 'devm_gpio_free'? [-Werror=implicit-function-declaration]
        262 |         chip->ena_gpiod = devm_gpiod_get(chip->dev, "enable", flags);
      ../drivers/regulator/max20086-regulator.c:217:26: warning: unused variable 'flags' [-Wunused-variable]
        217 |         enum gpiod_flags flags;
      
      Fixes: bfff546a ("regulator: Add MAX20086-MAX20089 driver")
      Signed-off-by: default avatarRandy Dunlap <rdunlap@infradead.org>
      Reported-by: default avatarkernel test robot <lkp@intel.com>
      Cc: Watson Chow <watson.chow@avnet.com>
      Cc: Mark Brown <broonie@kernel.org>
      Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
      Reviewed-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
      Link: https://lore.kernel.org/r/20220115033603.24473-1-rdunlap@infradead.orgSigned-off-by: default avatarMark Brown <broonie@kernel.org>
      b4c18c18
  4. 11 Jan, 2022 1 commit
  5. 07 Jan, 2022 2 commits
  6. 06 Jan, 2022 1 commit
    • Konrad Dybcio's avatar
      regulator: qcom_smd: Align probe function with rpmh-regulator · 14e2976f
      Konrad Dybcio authored
      The RPMh regulator driver is much newer and gets more attention, which in
      consequence makes it do a few things better. Update qcom_smd-regulator's
      probe function to mimic what rpmh-regulator does to address a couple of
      issues:
      
      - Probe defer now works correctly, before it used to, well,
        kinda just die.. This fixes reliable probing on (at least) PM8994,
        because Linux apparently cannot deal with supply map dependencies yet..
      
      - Regulator data is now matched more sanely: regulator data is matched
        against each individual regulator node name and throwing an -EINVAL if
        data is missing, instead of just assuming everything is fine and
        iterating over all subsequent array members.
      
      - status = "disabled" will now work for disabling individual regulators in
        DT. Previously it didn't seem to do much if anything at all.
      Signed-off-by: default avatarKonrad Dybcio <konrad.dybcio@somainline.org>
      Link: https://lore.kernel.org/r/20211230023442.1123424-1-konrad.dybcio@somainline.orgSigned-off-by: default avatarMark Brown <broonie@kernel.org>
      14e2976f
  7. 04 Jan, 2022 1 commit
  8. 24 Dec, 2021 1 commit
  9. 21 Dec, 2021 1 commit
  10. 15 Dec, 2021 2 commits
  11. 13 Dec, 2021 10 commits
  12. 07 Dec, 2021 3 commits
  13. 01 Dec, 2021 2 commits
  14. 30 Nov, 2021 4 commits
  15. 29 Nov, 2021 2 commits
  16. 26 Nov, 2021 2 commits
  17. 24 Nov, 2021 4 commits