Re: [PATCH 1/1] regulator: fixed: add system pm routines for pinctrl

From: Peter Chen
Date: Fri Mar 13 2020 - 09:16:40 EST


On 20-03-13 12:11:03, Mark Brown wrote:
> On Fri, Mar 13, 2020 at 03:08:48AM +0000, Peter Chen wrote:
> > On 20-03-12 15:07:10, Mark Brown wrote:
>
> > > I'd expect that this would be handled by the GPIO driver, the user
> > > shouldn't need to care.
>
> > GPIO function is just our case for this fixed regulator, other users for
> > this fixed regulator may set pinctrl as other functions.
>
> > Here, it is just save and restore pinctrl value for fixed regulator
> > driver, not related to GPIO.
>
> My point is that the fixed regulator doesn't have pins in pinctrl,
> whatever is providing the control signal to the fixed voltage regulator
> (if there is one) does. I'd expect this to be being handled on the
> producer side rather than the consumer.

I am sorry I have different points.

Most of pins for controlling fixed regulator on or off is GPIO, but how
GPIO driver handles this? We usually configure pin as GPIO function at
its user's node (Eg, reset pin for most drivers), but not GPIO node,
GPIO node is usually per SoC, not per board level.

So, I am wondering why fixed regulator can't have a pin in pinctrl.
If you grep the dts, there are already several fixed regulator has
pinctrl.

--

Thanks,
Peter Chen