Skip to content
  1. Feb 08, 2022
    • 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.com
      
      
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      4e2a354e
  2. Jan 20, 2022
    • 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.org
      
      
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      b4c18c18
  3. Jan 11, 2022
  4. Jan 07, 2022
  5. Jan 06, 2022
    • 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.org
      
      
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      14e2976f
  6. Jan 04, 2022
  7. Dec 24, 2021
  8. Dec 21, 2021
  9. Dec 16, 2021
  10. Dec 14, 2021
  11. Dec 13, 2021
  12. Dec 07, 2021
  13. Dec 01, 2021
  14. Nov 30, 2021
  15. Nov 29, 2021
  16. Nov 26, 2021
  17. Nov 24, 2021
  18. Nov 23, 2021
  19. Nov 18, 2021