Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1491459

Re: Removal of regulator-boot-on/always-on when a consumer exists

From Fabio Estevam <festevam@gmail.com>
Newsgroups linux.kernel
Subject Re: Removal of regulator-boot-on/always-on when a consumer exists
Date 2016-09-26 19:30 +0200
Message-ID <slHT3-6G2-15@gated-at.bofh.it> (permalink)
References (1 earlier) <slH6G-6aE-11@gated-at.bofh.it> <slHgl-6ej-11@gated-at.bofh.it> <slHgl-6ej-9@gated-at.bofh.it> <slHq1-6hN-7@gated-at.bofh.it> <slHq2-6hN-41@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Mon, Sep 26, 2016 at 1:57 PM, Mark Brown <broonie@kernel.org> wrote:

> Like I say I can't give you a definitive answer on this without looking
> at the actual hardware and what it needs.  Based on what you're saying
> it sounds like it won't be an issue from the point of view of disrupting
> other users but without knowing the hardware I can't tell if the
> connected device can safely have power removed, sometimes devices don't
> like having only one of many supplies removed.

Ok, let me give you more details: we power the board with an external
5V power supply, then a discrete regulator generates 3.3V to the CAN
transceiver chip.

Software has no influence on this 3.3V rail, which stays powered as
long as the board is powered.

According to Documentation/devicetree/bindings/regulator/regulator.txt:

- regulator-always-on: boolean, regulator should never be disabled
- regulator-boot-on: bootloader/firmware enabled regulator

and the dts looks like:

       reg_3p3v: regulator-3p3v {
               compatible = "regulator-fixed";
               regulator-name = "3P3V";
               regulator-min-microvolt = <3300000>;
               regulator-max-microvolt = <3300000>;
               regulator-boot-on;
               regulator-always-on;
       };
};

&can1 {
       pinctrl-names = "default";
       pinctrl-0 = <&pinctrl_flexcan1>;
       xceiver-supply = <&reg_3p3v>;
};

The flexcan driver (which is the consumer of reg_3p3v) will call
regulator_disable() when can1 is not used. Calling regulator_disable
on reg_3p3v will not physically remove power from the 3.3V, so should
we use "regulator-always-on" or not in this case?

About "regulator-boot-on": since it was not the bootloader/firmware
that was responsible for enabling such regulator, I think this could
be removed from the dts.

Thanks for the clarification.

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Removal of regulator-boot-on/always-on when a consumer exists Fabio Estevam <festevam@gmail.com> - 2016-09-26 16:30 +0200
  Re: Removal of regulator-boot-on/always-on when a consumer exists Mark Brown <broonie@kernel.org> - 2016-09-26 18:40 +0200
    Re: Removal of regulator-boot-on/always-on when a consumer exists Mark Brown <broonie@kernel.org> - 2016-09-26 18:50 +0200
      Re: Removal of regulator-boot-on/always-on when a consumer exists Fabio Estevam <festevam@gmail.com> - 2016-09-26 19:00 +0200
        Re: Removal of regulator-boot-on/always-on when a consumer exists Mark Brown <broonie@kernel.org> - 2016-09-26 19:00 +0200
          Re: Removal of regulator-boot-on/always-on when a consumer exists Fabio Estevam <festevam@gmail.com> - 2016-09-26 19:30 +0200
        Re: Removal of regulator-boot-on/always-on when a consumer exists Michael Trimarchi <michael@amarulasolutions.com> - 2016-09-26 19:00 +0200
    Re: Removal of regulator-boot-on/always-on when a consumer exists Fabio Estevam <festevam@gmail.com> - 2016-09-26 18:50 +0200

csiph-web