[v3,1/4] dt-bindings: input: touchscreen: goodix: Document AVDD28-supply property
diff mbox series

Message ID 20181215151802.18592-2-jagan@amarulasolutions.com
State Superseded
Headers show
Series
  • input: touchscreen: Add goodix GT5553 CTP support
Related show

Commit Message

Jagan Teki Dec. 15, 2018, 3:17 p.m. UTC
Most of the Goodix CTP controllers are supply with AVDD28 pin.
which need to supply for controllers like GT5663 on some boards
to trigger the power.

So, document the supply property so-that the require boards
that used on GT5663 can enable it via device tree.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
---
 Documentation/devicetree/bindings/input/touchscreen/goodix.txt | 1 +
 1 file changed, 1 insertion(+)

Comments

Dmitry Torokhov Jan. 7, 2019, 10:58 p.m. UTC | #1
On Sat, Dec 15, 2018 at 08:47:59PM +0530, Jagan Teki wrote:
> Most of the Goodix CTP controllers are supply with AVDD28 pin.
> which need to supply for controllers like GT5663 on some boards
> to trigger the power.
> 
> So, document the supply property so-that the require boards
> that used on GT5663 can enable it via device tree.
> 
> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
> ---
>  Documentation/devicetree/bindings/input/touchscreen/goodix.txt | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/Documentation/devicetree/bindings/input/touchscreen/goodix.txt b/Documentation/devicetree/bindings/input/touchscreen/goodix.txt
> index f7e95c52f3c7..c4622c983e08 100644
> --- a/Documentation/devicetree/bindings/input/touchscreen/goodix.txt
> +++ b/Documentation/devicetree/bindings/input/touchscreen/goodix.txt
> @@ -23,6 +23,7 @@ Optional properties:
>   - touchscreen-inverted-y  : Y axis is inverted (boolean)
>   - touchscreen-swapped-x-y : X and Y axis are swapped (boolean)
>                               (swapping is done after inverting the axis)
> + - AVDD28-supply	: Analog power supply regulator on AVDD28 pin

I think we normally use lower case in DT bindings and rarely encode
voltage in the supply name unless we are dealing with several supplies
of the same kind, but I'll let Ron comment on this.

Thanks.
Rob Herring Jan. 9, 2019, 1:37 p.m. UTC | #2
Please CC DT list if you want bindings reviewed.

On Wed, Jan 9, 2019 at 1:40 AM Dmitry Torokhov
<dmitry.torokhov@gmail.com> wrote:
>
> On Sat, Dec 15, 2018 at 08:47:59PM +0530, Jagan Teki wrote:
> > Most of the Goodix CTP controllers are supply with AVDD28 pin.
> > which need to supply for controllers like GT5663 on some boards
> > to trigger the power.
> >
> > So, document the supply property so-that the require boards
> > that used on GT5663 can enable it via device tree.
> >
> > Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
> > ---
> >  Documentation/devicetree/bindings/input/touchscreen/goodix.txt | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/Documentation/devicetree/bindings/input/touchscreen/goodix.txt b/Documentation/devicetree/bindings/input/touchscreen/goodix.txt
> > index f7e95c52f3c7..c4622c983e08 100644
> > --- a/Documentation/devicetree/bindings/input/touchscreen/goodix.txt
> > +++ b/Documentation/devicetree/bindings/input/touchscreen/goodix.txt
> > @@ -23,6 +23,7 @@ Optional properties:
> >   - touchscreen-inverted-y  : Y axis is inverted (boolean)
> >   - touchscreen-swapped-x-y : X and Y axis are swapped (boolean)
> >                               (swapping is done after inverting the axis)
> > + - AVDD28-supply     : Analog power supply regulator on AVDD28 pin
>
> I think we normally use lower case in DT bindings and rarely encode
> voltage in the supply name unless we are dealing with several supplies
> of the same kind, but I'll let Ron comment on this.

Yes on lowercase though there are some exceptions.

There's also a AVDD22 supply as well as DVDD12 and VDDIO. So we
probably need to keep the voltage, but the binding is incomplete.

Rob
Jagan Teki Jan. 18, 2019, 4:01 p.m. UTC | #3
On Wed, Jan 9, 2019 at 7:08 PM Rob Herring <robh@kernel.org> wrote:
>
> Please CC DT list if you want bindings reviewed.

Sorry I forgot.

>
> On Wed, Jan 9, 2019 at 1:40 AM Dmitry Torokhov
> <dmitry.torokhov@gmail.com> wrote:
> >
> > On Sat, Dec 15, 2018 at 08:47:59PM +0530, Jagan Teki wrote:
> > > Most of the Goodix CTP controllers are supply with AVDD28 pin.
> > > which need to supply for controllers like GT5663 on some boards
> > > to trigger the power.
> > >
> > > So, document the supply property so-that the require boards
> > > that used on GT5663 can enable it via device tree.
> > >
> > > Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
> > > ---
> > >  Documentation/devicetree/bindings/input/touchscreen/goodix.txt | 1 +
> > >  1 file changed, 1 insertion(+)
> > >
> > > diff --git a/Documentation/devicetree/bindings/input/touchscreen/goodix.txt b/Documentation/devicetree/bindings/input/touchscreen/goodix.txt
> > > index f7e95c52f3c7..c4622c983e08 100644
> > > --- a/Documentation/devicetree/bindings/input/touchscreen/goodix.txt
> > > +++ b/Documentation/devicetree/bindings/input/touchscreen/goodix.txt
> > > @@ -23,6 +23,7 @@ Optional properties:
> > >   - touchscreen-inverted-y  : Y axis is inverted (boolean)
> > >   - touchscreen-swapped-x-y : X and Y axis are swapped (boolean)
> > >                               (swapping is done after inverting the axis)
> > > + - AVDD28-supply     : Analog power supply regulator on AVDD28 pin
> >
> > I think we normally use lower case in DT bindings and rarely encode
> > voltage in the supply name unless we are dealing with several supplies
> > of the same kind, but I'll let Ron comment on this.
>
> Yes on lowercase though there are some exceptions.
>
> There's also a AVDD22 supply as well as DVDD12 and VDDIO. So we
> probably need to keep the voltage, but the binding is incomplete.

What is incomplete here? can you please elaborate.
Rob Herring Jan. 21, 2019, 4:16 p.m. UTC | #4
On Fri, Jan 18, 2019 at 10:01 AM Jagan Teki <jagan@amarulasolutions.com> wrote:
>
> On Wed, Jan 9, 2019 at 7:08 PM Rob Herring <robh@kernel.org> wrote:
> >
> > Please CC DT list if you want bindings reviewed.
>
> Sorry I forgot.
>
> >
> > On Wed, Jan 9, 2019 at 1:40 AM Dmitry Torokhov
> > <dmitry.torokhov@gmail.com> wrote:
> > >
> > > On Sat, Dec 15, 2018 at 08:47:59PM +0530, Jagan Teki wrote:
> > > > Most of the Goodix CTP controllers are supply with AVDD28 pin.
> > > > which need to supply for controllers like GT5663 on some boards
> > > > to trigger the power.
> > > >
> > > > So, document the supply property so-that the require boards
> > > > that used on GT5663 can enable it via device tree.
> > > >
> > > > Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
> > > > ---
> > > >  Documentation/devicetree/bindings/input/touchscreen/goodix.txt | 1 +
> > > >  1 file changed, 1 insertion(+)
> > > >
> > > > diff --git a/Documentation/devicetree/bindings/input/touchscreen/goodix.txt b/Documentation/devicetree/bindings/input/touchscreen/goodix.txt
> > > > index f7e95c52f3c7..c4622c983e08 100644
> > > > --- a/Documentation/devicetree/bindings/input/touchscreen/goodix.txt
> > > > +++ b/Documentation/devicetree/bindings/input/touchscreen/goodix.txt
> > > > @@ -23,6 +23,7 @@ Optional properties:
> > > >   - touchscreen-inverted-y  : Y axis is inverted (boolean)
> > > >   - touchscreen-swapped-x-y : X and Y axis are swapped (boolean)
> > > >                               (swapping is done after inverting the axis)
> > > > + - AVDD28-supply     : Analog power supply regulator on AVDD28 pin
> > >
> > > I think we normally use lower case in DT bindings and rarely encode
> > > voltage in the supply name unless we are dealing with several supplies
> > > of the same kind, but I'll let Ron comment on this.
> >
> > Yes on lowercase though there are some exceptions.
> >
> > There's also a AVDD22 supply as well as DVDD12 and VDDIO. So we
> > probably need to keep the voltage, but the binding is incomplete.
>
> What is incomplete here? can you please elaborate.

You are missing the 3 other supplies the chip has: AVDD22, DVDD12 and VDDIO.

Rob
Jagan Teki Jan. 24, 2019, 4:32 a.m. UTC | #5
+ DT ML

On Tue, Jan 22, 2019 at 7:08 PM Jagan Teki <jagan@amarulasolutions.com> wrote:
>
> On Mon, Jan 21, 2019 at 9:46 PM Rob Herring <robh@kernel.org> wrote:
> >
> > On Fri, Jan 18, 2019 at 10:01 AM Jagan Teki <jagan@amarulasolutions.com> wrote:
> > >
> > > On Wed, Jan 9, 2019 at 7:08 PM Rob Herring <robh@kernel.org> wrote:
> > > >
> > > > Please CC DT list if you want bindings reviewed.
> > >
> > > Sorry I forgot.
> > >
> > > >
> > > > On Wed, Jan 9, 2019 at 1:40 AM Dmitry Torokhov
> > > > <dmitry.torokhov@gmail.com> wrote:
> > > > >
> > > > > On Sat, Dec 15, 2018 at 08:47:59PM +0530, Jagan Teki wrote:
> > > > > > Most of the Goodix CTP controllers are supply with AVDD28 pin.
> > > > > > which need to supply for controllers like GT5663 on some boards
> > > > > > to trigger the power.
> > > > > >
> > > > > > So, document the supply property so-that the require boards
> > > > > > that used on GT5663 can enable it via device tree.
> > > > > >
> > > > > > Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
> > > > > > ---
> > > > > >  Documentation/devicetree/bindings/input/touchscreen/goodix.txt | 1 +
> > > > > >  1 file changed, 1 insertion(+)
> > > > > >
> > > > > > diff --git a/Documentation/devicetree/bindings/input/touchscreen/goodix.txt b/Documentation/devicetree/bindings/input/touchscreen/goodix.txt
> > > > > > index f7e95c52f3c7..c4622c983e08 100644
> > > > > > --- a/Documentation/devicetree/bindings/input/touchscreen/goodix.txt
> > > > > > +++ b/Documentation/devicetree/bindings/input/touchscreen/goodix.txt
> > > > > > @@ -23,6 +23,7 @@ Optional properties:
> > > > > >   - touchscreen-inverted-y  : Y axis is inverted (boolean)
> > > > > >   - touchscreen-swapped-x-y : X and Y axis are swapped (boolean)
> > > > > >                               (swapping is done after inverting the axis)
> > > > > > + - AVDD28-supply     : Analog power supply regulator on AVDD28 pin
> > > > >
> > > > > I think we normally use lower case in DT bindings and rarely encode
> > > > > voltage in the supply name unless we are dealing with several supplies
> > > > > of the same kind, but I'll let Ron comment on this.
> > > >
> > > > Yes on lowercase though there are some exceptions.
> > > >
> > > > There's also a AVDD22 supply as well as DVDD12 and VDDIO. So we
> > > > probably need to keep the voltage, but the binding is incomplete.
> > >
> > > What is incomplete here? can you please elaborate.
> >
> > You are missing the 3 other supplies the chip has: AVDD22, DVDD12 and VDDIO.
>
> Though it has other supplies, only AVDD28 is connected in the Host
> interface design similar like 9. Reference Schematic on Page, 23 in
> attached manual.
Rob Herring Feb. 13, 2019, 9:51 p.m. UTC | #6
On Tue, Jan 22, 2019 at 7:39 AM Jagan Teki <jagan@amarulasolutions.com> wrote:
>
> On Mon, Jan 21, 2019 at 9:46 PM Rob Herring <robh@kernel.org> wrote:
> >
> > On Fri, Jan 18, 2019 at 10:01 AM Jagan Teki <jagan@amarulasolutions.com> wrote:
> > >
> > > On Wed, Jan 9, 2019 at 7:08 PM Rob Herring <robh@kernel.org> wrote:
> > > >
> > > > Please CC DT list if you want bindings reviewed.
> > >
> > > Sorry I forgot.
> > >
> > > >
> > > > On Wed, Jan 9, 2019 at 1:40 AM Dmitry Torokhov
> > > > <dmitry.torokhov@gmail.com> wrote:
> > > > >
> > > > > On Sat, Dec 15, 2018 at 08:47:59PM +0530, Jagan Teki wrote:
> > > > > > Most of the Goodix CTP controllers are supply with AVDD28 pin.
> > > > > > which need to supply for controllers like GT5663 on some boards
> > > > > > to trigger the power.
> > > > > >
> > > > > > So, document the supply property so-that the require boards
> > > > > > that used on GT5663 can enable it via device tree.
> > > > > >
> > > > > > Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
> > > > > > ---
> > > > > >  Documentation/devicetree/bindings/input/touchscreen/goodix.txt | 1 +
> > > > > >  1 file changed, 1 insertion(+)
> > > > > >
> > > > > > diff --git a/Documentation/devicetree/bindings/input/touchscreen/goodix.txt b/Documentation/devicetree/bindings/input/touchscreen/goodix.txt
> > > > > > index f7e95c52f3c7..c4622c983e08 100644
> > > > > > --- a/Documentation/devicetree/bindings/input/touchscreen/goodix.txt
> > > > > > +++ b/Documentation/devicetree/bindings/input/touchscreen/goodix.txt
> > > > > > @@ -23,6 +23,7 @@ Optional properties:
> > > > > >   - touchscreen-inverted-y  : Y axis is inverted (boolean)
> > > > > >   - touchscreen-swapped-x-y : X and Y axis are swapped (boolean)
> > > > > >                               (swapping is done after inverting the axis)
> > > > > > + - AVDD28-supply     : Analog power supply regulator on AVDD28 pin
> > > > >
> > > > > I think we normally use lower case in DT bindings and rarely encode
> > > > > voltage in the supply name unless we are dealing with several supplies
> > > > > of the same kind, but I'll let Ron comment on this.
> > > >
> > > > Yes on lowercase though there are some exceptions.
> > > >
> > > > There's also a AVDD22 supply as well as DVDD12 and VDDIO. So we
> > > > probably need to keep the voltage, but the binding is incomplete.
> > >
> > > What is incomplete here? can you please elaborate.
> >
> > You are missing the 3 other supplies the chip has: AVDD22, DVDD12 and VDDIO.
>
> Though it has other supplies, only AVDD28 is connected in the Host
> interface design similar like 9. Reference Schematic on Page, 23 in
> attached manual.

That is for a particular board design. It still has other supplies.
Just make the binding complete please. You can make them optional. I
don't care if the driver supports controlling all the supplies or not
(though Dmitry might).
Jagan Teki Feb. 17, 2019, 7:51 a.m. UTC | #7
Hi Dmitry and Rob,

On Thu, Feb 14, 2019 at 3:21 AM Rob Herring <robh@kernel.org> wrote:
>
> On Tue, Jan 22, 2019 at 7:39 AM Jagan Teki <jagan@amarulasolutions.com> wrote:
> >
> > On Mon, Jan 21, 2019 at 9:46 PM Rob Herring <robh@kernel.org> wrote:
> > >
> > > On Fri, Jan 18, 2019 at 10:01 AM Jagan Teki <jagan@amarulasolutions.com> wrote:
> > > >
> > > > On Wed, Jan 9, 2019 at 7:08 PM Rob Herring <robh@kernel.org> wrote:
> > > > >
> > > > > Please CC DT list if you want bindings reviewed.
> > > >
> > > > Sorry I forgot.
> > > >
> > > > >
> > > > > On Wed, Jan 9, 2019 at 1:40 AM Dmitry Torokhov
> > > > > <dmitry.torokhov@gmail.com> wrote:
> > > > > >
> > > > > > On Sat, Dec 15, 2018 at 08:47:59PM +0530, Jagan Teki wrote:
> > > > > > > Most of the Goodix CTP controllers are supply with AVDD28 pin.
> > > > > > > which need to supply for controllers like GT5663 on some boards
> > > > > > > to trigger the power.
> > > > > > >
> > > > > > > So, document the supply property so-that the require boards
> > > > > > > that used on GT5663 can enable it via device tree.
> > > > > > >
> > > > > > > Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
> > > > > > > ---
> > > > > > >  Documentation/devicetree/bindings/input/touchscreen/goodix.txt | 1 +
> > > > > > >  1 file changed, 1 insertion(+)
> > > > > > >
> > > > > > > diff --git a/Documentation/devicetree/bindings/input/touchscreen/goodix.txt b/Documentation/devicetree/bindings/input/touchscreen/goodix.txt
> > > > > > > index f7e95c52f3c7..c4622c983e08 100644
> > > > > > > --- a/Documentation/devicetree/bindings/input/touchscreen/goodix.txt
> > > > > > > +++ b/Documentation/devicetree/bindings/input/touchscreen/goodix.txt
> > > > > > > @@ -23,6 +23,7 @@ Optional properties:
> > > > > > >   - touchscreen-inverted-y  : Y axis is inverted (boolean)
> > > > > > >   - touchscreen-swapped-x-y : X and Y axis are swapped (boolean)
> > > > > > >                               (swapping is done after inverting the axis)
> > > > > > > + - AVDD28-supply     : Analog power supply regulator on AVDD28 pin
> > > > > >
> > > > > > I think we normally use lower case in DT bindings and rarely encode
> > > > > > voltage in the supply name unless we are dealing with several supplies
> > > > > > of the same kind, but I'll let Ron comment on this.
> > > > >
> > > > > Yes on lowercase though there are some exceptions.
> > > > >
> > > > > There's also a AVDD22 supply as well as DVDD12 and VDDIO. So we
> > > > > probably need to keep the voltage, but the binding is incomplete.
> > > >
> > > > What is incomplete here? can you please elaborate.
> > >
> > > You are missing the 3 other supplies the chip has: AVDD22, DVDD12 and VDDIO.
> >
> > Though it has other supplies, only AVDD28 is connected in the Host
> > interface design similar like 9. Reference Schematic on Page, 23 in
> > attached manual.
>
> That is for a particular board design. It still has other supplies.
> Just make the binding complete please. You can make them optional. I
> don't care if the driver supports controlling all the supplies or not
> (though Dmitry might).

So, Can I make bulk get and enable in all 4 regulators global to
driver or specific to that chip, in either way the regulators which
are not used to process via dummy regulators (which we all know).

or regulator which are not using are get via devm_regulator_get_optional.

Any suggestions?
Jagan Teki Feb. 17, 2019, 9:15 a.m. UTC | #8
On Sun, Feb 17, 2019 at 1:21 PM Jagan Teki <jagan@amarulasolutions.com> wrote:
>
> Hi Dmitry and Rob,
>
> On Thu, Feb 14, 2019 at 3:21 AM Rob Herring <robh@kernel.org> wrote:
> >
> > On Tue, Jan 22, 2019 at 7:39 AM Jagan Teki <jagan@amarulasolutions.com> wrote:
> > >
> > > On Mon, Jan 21, 2019 at 9:46 PM Rob Herring <robh@kernel.org> wrote:
> > > >
> > > > On Fri, Jan 18, 2019 at 10:01 AM Jagan Teki <jagan@amarulasolutions.com> wrote:
> > > > >
> > > > > On Wed, Jan 9, 2019 at 7:08 PM Rob Herring <robh@kernel.org> wrote:
> > > > > >
> > > > > > Please CC DT list if you want bindings reviewed.
> > > > >
> > > > > Sorry I forgot.
> > > > >
> > > > > >
> > > > > > On Wed, Jan 9, 2019 at 1:40 AM Dmitry Torokhov
> > > > > > <dmitry.torokhov@gmail.com> wrote:
> > > > > > >
> > > > > > > On Sat, Dec 15, 2018 at 08:47:59PM +0530, Jagan Teki wrote:
> > > > > > > > Most of the Goodix CTP controllers are supply with AVDD28 pin.
> > > > > > > > which need to supply for controllers like GT5663 on some boards
> > > > > > > > to trigger the power.
> > > > > > > >
> > > > > > > > So, document the supply property so-that the require boards
> > > > > > > > that used on GT5663 can enable it via device tree.
> > > > > > > >
> > > > > > > > Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
> > > > > > > > ---
> > > > > > > >  Documentation/devicetree/bindings/input/touchscreen/goodix.txt | 1 +
> > > > > > > >  1 file changed, 1 insertion(+)
> > > > > > > >
> > > > > > > > diff --git a/Documentation/devicetree/bindings/input/touchscreen/goodix.txt b/Documentation/devicetree/bindings/input/touchscreen/goodix.txt
> > > > > > > > index f7e95c52f3c7..c4622c983e08 100644
> > > > > > > > --- a/Documentation/devicetree/bindings/input/touchscreen/goodix.txt
> > > > > > > > +++ b/Documentation/devicetree/bindings/input/touchscreen/goodix.txt
> > > > > > > > @@ -23,6 +23,7 @@ Optional properties:
> > > > > > > >   - touchscreen-inverted-y  : Y axis is inverted (boolean)
> > > > > > > >   - touchscreen-swapped-x-y : X and Y axis are swapped (boolean)
> > > > > > > >                               (swapping is done after inverting the axis)
> > > > > > > > + - AVDD28-supply     : Analog power supply regulator on AVDD28 pin
> > > > > > >
> > > > > > > I think we normally use lower case in DT bindings and rarely encode
> > > > > > > voltage in the supply name unless we are dealing with several supplies
> > > > > > > of the same kind, but I'll let Ron comment on this.
> > > > > >
> > > > > > Yes on lowercase though there are some exceptions.
> > > > > >
> > > > > > There's also a AVDD22 supply as well as DVDD12 and VDDIO. So we
> > > > > > probably need to keep the voltage, but the binding is incomplete.
> > > > >
> > > > > What is incomplete here? can you please elaborate.
> > > >
> > > > You are missing the 3 other supplies the chip has: AVDD22, DVDD12 and VDDIO.
> > >
> > > Though it has other supplies, only AVDD28 is connected in the Host
> > > interface design similar like 9. Reference Schematic on Page, 23 in
> > > attached manual.
> >
> > That is for a particular board design. It still has other supplies.
> > Just make the binding complete please. You can make them optional. I
> > don't care if the driver supports controlling all the supplies or not
> > (though Dmitry might).
>
> So, Can I make bulk get and enable in all 4 regulators global to
> driver or specific to that chip, in either way the regulators which
> are not used to process via dummy regulators (which we all know).
>
> or regulator which are not using are get via devm_regulator_get_optional.
>
> Any suggestions?

Just realized to go with bulk calls, please have a look at on v5 [1]

[1] https://patchwork.kernel.org/cover/10816901/
Dmitry Torokhov Feb. 18, 2019, 7:12 a.m. UTC | #9
On Sun, Feb 17, 2019 at 02:45:52PM +0530, Jagan Teki wrote:
> On Sun, Feb 17, 2019 at 1:21 PM Jagan Teki <jagan@amarulasolutions.com> wrote:
> >
> > Hi Dmitry and Rob,
> >
> > On Thu, Feb 14, 2019 at 3:21 AM Rob Herring <robh@kernel.org> wrote:
> > >
> > > On Tue, Jan 22, 2019 at 7:39 AM Jagan Teki <jagan@amarulasolutions.com> wrote:
> > > >
> > > > On Mon, Jan 21, 2019 at 9:46 PM Rob Herring <robh@kernel.org> wrote:
> > > > >
> > > > > On Fri, Jan 18, 2019 at 10:01 AM Jagan Teki <jagan@amarulasolutions.com> wrote:
> > > > > >
> > > > > > On Wed, Jan 9, 2019 at 7:08 PM Rob Herring <robh@kernel.org> wrote:
> > > > > > >
> > > > > > > Please CC DT list if you want bindings reviewed.
> > > > > >
> > > > > > Sorry I forgot.
> > > > > >
> > > > > > >
> > > > > > > On Wed, Jan 9, 2019 at 1:40 AM Dmitry Torokhov
> > > > > > > <dmitry.torokhov@gmail.com> wrote:
> > > > > > > >
> > > > > > > > On Sat, Dec 15, 2018 at 08:47:59PM +0530, Jagan Teki wrote:
> > > > > > > > > Most of the Goodix CTP controllers are supply with AVDD28 pin.
> > > > > > > > > which need to supply for controllers like GT5663 on some boards
> > > > > > > > > to trigger the power.
> > > > > > > > >
> > > > > > > > > So, document the supply property so-that the require boards
> > > > > > > > > that used on GT5663 can enable it via device tree.
> > > > > > > > >
> > > > > > > > > Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
> > > > > > > > > ---
> > > > > > > > >  Documentation/devicetree/bindings/input/touchscreen/goodix.txt | 1 +
> > > > > > > > >  1 file changed, 1 insertion(+)
> > > > > > > > >
> > > > > > > > > diff --git a/Documentation/devicetree/bindings/input/touchscreen/goodix.txt b/Documentation/devicetree/bindings/input/touchscreen/goodix.txt
> > > > > > > > > index f7e95c52f3c7..c4622c983e08 100644
> > > > > > > > > --- a/Documentation/devicetree/bindings/input/touchscreen/goodix.txt
> > > > > > > > > +++ b/Documentation/devicetree/bindings/input/touchscreen/goodix.txt
> > > > > > > > > @@ -23,6 +23,7 @@ Optional properties:
> > > > > > > > >   - touchscreen-inverted-y  : Y axis is inverted (boolean)
> > > > > > > > >   - touchscreen-swapped-x-y : X and Y axis are swapped (boolean)
> > > > > > > > >                               (swapping is done after inverting the axis)
> > > > > > > > > + - AVDD28-supply     : Analog power supply regulator on AVDD28 pin
> > > > > > > >
> > > > > > > > I think we normally use lower case in DT bindings and rarely encode
> > > > > > > > voltage in the supply name unless we are dealing with several supplies
> > > > > > > > of the same kind, but I'll let Ron comment on this.
> > > > > > >
> > > > > > > Yes on lowercase though there are some exceptions.
> > > > > > >
> > > > > > > There's also a AVDD22 supply as well as DVDD12 and VDDIO. So we
> > > > > > > probably need to keep the voltage, but the binding is incomplete.
> > > > > >
> > > > > > What is incomplete here? can you please elaborate.
> > > > >
> > > > > You are missing the 3 other supplies the chip has: AVDD22, DVDD12 and VDDIO.
> > > >
> > > > Though it has other supplies, only AVDD28 is connected in the Host
> > > > interface design similar like 9. Reference Schematic on Page, 23 in
> > > > attached manual.
> > >
> > > That is for a particular board design. It still has other supplies.
> > > Just make the binding complete please. You can make them optional. I
> > > don't care if the driver supports controlling all the supplies or not
> > > (though Dmitry might).
> >
> > So, Can I make bulk get and enable in all 4 regulators global to
> > driver or specific to that chip, in either way the regulators which
> > are not used to process via dummy regulators (which we all know).
> >
> > or regulator which are not using are get via devm_regulator_get_optional.
> >
> > Any suggestions?
> 
> Just realized to go with bulk calls, please have a look at on v5 [1]

I do not believe you can use bulk regulator API here as you need to
implement the power up timing scheme mentioned on p. 12 of the spec you
referenced earlier. And, because of that timing diagram, I believe if
you want to control AVDD supply, you also have to control VDDIO supply
as it has to be on only after enabling AVDD.

I also wonder if it is valid to have both AVDD28 and AVDD22 connected at
the same time.

Thanks.
Jagan Teki Feb. 18, 2019, 9:33 a.m. UTC | #10
Hi Dmitry,

On Mon, Feb 18, 2019 at 12:42 PM Dmitry Torokhov
<dmitry.torokhov@gmail.com> wrote:
>
> On Sun, Feb 17, 2019 at 02:45:52PM +0530, Jagan Teki wrote:
> > On Sun, Feb 17, 2019 at 1:21 PM Jagan Teki <jagan@amarulasolutions.com> wrote:
> > >
> > > Hi Dmitry and Rob,
> > >
> > > On Thu, Feb 14, 2019 at 3:21 AM Rob Herring <robh@kernel.org> wrote:
> > > >
> > > > On Tue, Jan 22, 2019 at 7:39 AM Jagan Teki <jagan@amarulasolutions.com> wrote:
> > > > >
> > > > > On Mon, Jan 21, 2019 at 9:46 PM Rob Herring <robh@kernel.org> wrote:
> > > > > >
> > > > > > On Fri, Jan 18, 2019 at 10:01 AM Jagan Teki <jagan@amarulasolutions.com> wrote:
> > > > > > >
> > > > > > > On Wed, Jan 9, 2019 at 7:08 PM Rob Herring <robh@kernel.org> wrote:
> > > > > > > >
> > > > > > > > Please CC DT list if you want bindings reviewed.
> > > > > > >
> > > > > > > Sorry I forgot.
> > > > > > >
> > > > > > > >
> > > > > > > > On Wed, Jan 9, 2019 at 1:40 AM Dmitry Torokhov
> > > > > > > > <dmitry.torokhov@gmail.com> wrote:
> > > > > > > > >
> > > > > > > > > On Sat, Dec 15, 2018 at 08:47:59PM +0530, Jagan Teki wrote:
> > > > > > > > > > Most of the Goodix CTP controllers are supply with AVDD28 pin.
> > > > > > > > > > which need to supply for controllers like GT5663 on some boards
> > > > > > > > > > to trigger the power.
> > > > > > > > > >
> > > > > > > > > > So, document the supply property so-that the require boards
> > > > > > > > > > that used on GT5663 can enable it via device tree.
> > > > > > > > > >
> > > > > > > > > > Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
> > > > > > > > > > ---
> > > > > > > > > >  Documentation/devicetree/bindings/input/touchscreen/goodix.txt | 1 +
> > > > > > > > > >  1 file changed, 1 insertion(+)
> > > > > > > > > >
> > > > > > > > > > diff --git a/Documentation/devicetree/bindings/input/touchscreen/goodix.txt b/Documentation/devicetree/bindings/input/touchscreen/goodix.txt
> > > > > > > > > > index f7e95c52f3c7..c4622c983e08 100644
> > > > > > > > > > --- a/Documentation/devicetree/bindings/input/touchscreen/goodix.txt
> > > > > > > > > > +++ b/Documentation/devicetree/bindings/input/touchscreen/goodix.txt
> > > > > > > > > > @@ -23,6 +23,7 @@ Optional properties:
> > > > > > > > > >   - touchscreen-inverted-y  : Y axis is inverted (boolean)
> > > > > > > > > >   - touchscreen-swapped-x-y : X and Y axis are swapped (boolean)
> > > > > > > > > >                               (swapping is done after inverting the axis)
> > > > > > > > > > + - AVDD28-supply     : Analog power supply regulator on AVDD28 pin
> > > > > > > > >
> > > > > > > > > I think we normally use lower case in DT bindings and rarely encode
> > > > > > > > > voltage in the supply name unless we are dealing with several supplies
> > > > > > > > > of the same kind, but I'll let Ron comment on this.
> > > > > > > >
> > > > > > > > Yes on lowercase though there are some exceptions.
> > > > > > > >
> > > > > > > > There's also a AVDD22 supply as well as DVDD12 and VDDIO. So we
> > > > > > > > probably need to keep the voltage, but the binding is incomplete.
> > > > > > >
> > > > > > > What is incomplete here? can you please elaborate.
> > > > > >
> > > > > > You are missing the 3 other supplies the chip has: AVDD22, DVDD12 and VDDIO.
> > > > >
> > > > > Though it has other supplies, only AVDD28 is connected in the Host
> > > > > interface design similar like 9. Reference Schematic on Page, 23 in
> > > > > attached manual.
> > > >
> > > > That is for a particular board design. It still has other supplies.
> > > > Just make the binding complete please. You can make them optional. I
> > > > don't care if the driver supports controlling all the supplies or not
> > > > (though Dmitry might).
> > >
> > > So, Can I make bulk get and enable in all 4 regulators global to
> > > driver or specific to that chip, in either way the regulators which
> > > are not used to process via dummy regulators (which we all know).
> > >
> > > or regulator which are not using are get via devm_regulator_get_optional.
> > >
> > > Any suggestions?
> >
> > Just realized to go with bulk calls, please have a look at on v5 [1]
>
> I do not believe you can use bulk regulator API here as you need to
> implement the power up timing scheme mentioned on p. 12 of the spec you
> referenced earlier. And, because of that timing diagram, I believe if
> you want to control AVDD supply, you also have to control VDDIO supply
> as it has to be on only after enabling AVDD.

AVDD here is AVDD28 it' is an out name of pin (mentioned in p. 23). So
the power scheme goes to enable AVDD28 and then VDDIO does that really
mean bulk of two regulators?

>
> I also wonder if it is valid to have both AVDD28 and AVDD22 connected at
> the same time.

Yes, DVDD12 and AVDD22 not been part of power-up schema at-least from
the datasheet. I'm thinking we can skip these until any of other
goodix CTP needed, what do you think Rob?
Jagan Teki Feb. 18, 2019, 7:30 p.m. UTC | #11
On Mon, Feb 18, 2019 at 3:03 PM Jagan Teki <jagan@amarulasolutions.com> wrote:
>
> Hi Dmitry,
>
> On Mon, Feb 18, 2019 at 12:42 PM Dmitry Torokhov
> <dmitry.torokhov@gmail.com> wrote:
> >
> > On Sun, Feb 17, 2019 at 02:45:52PM +0530, Jagan Teki wrote:
> > > On Sun, Feb 17, 2019 at 1:21 PM Jagan Teki <jagan@amarulasolutions.com> wrote:
> > > >
> > > > Hi Dmitry and Rob,
> > > >
> > > > On Thu, Feb 14, 2019 at 3:21 AM Rob Herring <robh@kernel.org> wrote:
> > > > >
> > > > > On Tue, Jan 22, 2019 at 7:39 AM Jagan Teki <jagan@amarulasolutions.com> wrote:
> > > > > >
> > > > > > On Mon, Jan 21, 2019 at 9:46 PM Rob Herring <robh@kernel.org> wrote:
> > > > > > >
> > > > > > > On Fri, Jan 18, 2019 at 10:01 AM Jagan Teki <jagan@amarulasolutions.com> wrote:
> > > > > > > >
> > > > > > > > On Wed, Jan 9, 2019 at 7:08 PM Rob Herring <robh@kernel.org> wrote:
> > > > > > > > >
> > > > > > > > > Please CC DT list if you want bindings reviewed.
> > > > > > > >
> > > > > > > > Sorry I forgot.
> > > > > > > >
> > > > > > > > >
> > > > > > > > > On Wed, Jan 9, 2019 at 1:40 AM Dmitry Torokhov
> > > > > > > > > <dmitry.torokhov@gmail.com> wrote:
> > > > > > > > > >
> > > > > > > > > > On Sat, Dec 15, 2018 at 08:47:59PM +0530, Jagan Teki wrote:
> > > > > > > > > > > Most of the Goodix CTP controllers are supply with AVDD28 pin.
> > > > > > > > > > > which need to supply for controllers like GT5663 on some boards
> > > > > > > > > > > to trigger the power.
> > > > > > > > > > >
> > > > > > > > > > > So, document the supply property so-that the require boards
> > > > > > > > > > > that used on GT5663 can enable it via device tree.
> > > > > > > > > > >
> > > > > > > > > > > Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
> > > > > > > > > > > ---
> > > > > > > > > > >  Documentation/devicetree/bindings/input/touchscreen/goodix.txt | 1 +
> > > > > > > > > > >  1 file changed, 1 insertion(+)
> > > > > > > > > > >
> > > > > > > > > > > diff --git a/Documentation/devicetree/bindings/input/touchscreen/goodix.txt b/Documentation/devicetree/bindings/input/touchscreen/goodix.txt
> > > > > > > > > > > index f7e95c52f3c7..c4622c983e08 100644
> > > > > > > > > > > --- a/Documentation/devicetree/bindings/input/touchscreen/goodix.txt
> > > > > > > > > > > +++ b/Documentation/devicetree/bindings/input/touchscreen/goodix.txt
> > > > > > > > > > > @@ -23,6 +23,7 @@ Optional properties:
> > > > > > > > > > >   - touchscreen-inverted-y  : Y axis is inverted (boolean)
> > > > > > > > > > >   - touchscreen-swapped-x-y : X and Y axis are swapped (boolean)
> > > > > > > > > > >                               (swapping is done after inverting the axis)
> > > > > > > > > > > + - AVDD28-supply     : Analog power supply regulator on AVDD28 pin
> > > > > > > > > >
> > > > > > > > > > I think we normally use lower case in DT bindings and rarely encode
> > > > > > > > > > voltage in the supply name unless we are dealing with several supplies
> > > > > > > > > > of the same kind, but I'll let Ron comment on this.
> > > > > > > > >
> > > > > > > > > Yes on lowercase though there are some exceptions.
> > > > > > > > >
> > > > > > > > > There's also a AVDD22 supply as well as DVDD12 and VDDIO. So we
> > > > > > > > > probably need to keep the voltage, but the binding is incomplete.
> > > > > > > >
> > > > > > > > What is incomplete here? can you please elaborate.
> > > > > > >
> > > > > > > You are missing the 3 other supplies the chip has: AVDD22, DVDD12 and VDDIO.
> > > > > >
> > > > > > Though it has other supplies, only AVDD28 is connected in the Host
> > > > > > interface design similar like 9. Reference Schematic on Page, 23 in
> > > > > > attached manual.
> > > > >
> > > > > That is for a particular board design. It still has other supplies.
> > > > > Just make the binding complete please. You can make them optional. I
> > > > > don't care if the driver supports controlling all the supplies or not
> > > > > (though Dmitry might).
> > > >
> > > > So, Can I make bulk get and enable in all 4 regulators global to
> > > > driver or specific to that chip, in either way the regulators which
> > > > are not used to process via dummy regulators (which we all know).
> > > >
> > > > or regulator which are not using are get via devm_regulator_get_optional.
> > > >
> > > > Any suggestions?
> > >
> > > Just realized to go with bulk calls, please have a look at on v5 [1]
> >
> > I do not believe you can use bulk regulator API here as you need to
> > implement the power up timing scheme mentioned on p. 12 of the spec you
> > referenced earlier. And, because of that timing diagram, I believe if
> > you want to control AVDD supply, you also have to control VDDIO supply
> > as it has to be on only after enabling AVDD.
>
> AVDD here is AVDD28 it' is an out name of pin (mentioned in p. 23). So
> the power scheme goes to enable AVDD28 and then VDDIO does that really
> mean bulk of two regulators?

The time between these two regulator operations is nearly 0, as per
power scheme diagram T1 >= 0us. I think I can use bulk since there is
no necessity of delay between these two regulator operations.

What do you think?
Dmitry Torokhov Feb. 19, 2019, 8:15 a.m. UTC | #12
On Tue, Feb 19, 2019 at 01:00:19AM +0530, Jagan Teki wrote:
> On Mon, Feb 18, 2019 at 3:03 PM Jagan Teki <jagan@amarulasolutions.com> wrote:
> >
> > Hi Dmitry,
> >
> > On Mon, Feb 18, 2019 at 12:42 PM Dmitry Torokhov
> > <dmitry.torokhov@gmail.com> wrote:
> > >
> > > On Sun, Feb 17, 2019 at 02:45:52PM +0530, Jagan Teki wrote:
> > > > On Sun, Feb 17, 2019 at 1:21 PM Jagan Teki <jagan@amarulasolutions.com> wrote:
> > > > >
> > > > > Hi Dmitry and Rob,
> > > > >
> > > > > On Thu, Feb 14, 2019 at 3:21 AM Rob Herring <robh@kernel.org> wrote:
> > > > > >
> > > > > > On Tue, Jan 22, 2019 at 7:39 AM Jagan Teki <jagan@amarulasolutions.com> wrote:
> > > > > > >
> > > > > > > On Mon, Jan 21, 2019 at 9:46 PM Rob Herring <robh@kernel.org> wrote:
> > > > > > > >
> > > > > > > > On Fri, Jan 18, 2019 at 10:01 AM Jagan Teki <jagan@amarulasolutions.com> wrote:
> > > > > > > > >
> > > > > > > > > On Wed, Jan 9, 2019 at 7:08 PM Rob Herring <robh@kernel.org> wrote:
> > > > > > > > > >
> > > > > > > > > > Please CC DT list if you want bindings reviewed.
> > > > > > > > >
> > > > > > > > > Sorry I forgot.
> > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > On Wed, Jan 9, 2019 at 1:40 AM Dmitry Torokhov
> > > > > > > > > > <dmitry.torokhov@gmail.com> wrote:
> > > > > > > > > > >
> > > > > > > > > > > On Sat, Dec 15, 2018 at 08:47:59PM +0530, Jagan Teki wrote:
> > > > > > > > > > > > Most of the Goodix CTP controllers are supply with AVDD28 pin.
> > > > > > > > > > > > which need to supply for controllers like GT5663 on some boards
> > > > > > > > > > > > to trigger the power.
> > > > > > > > > > > >
> > > > > > > > > > > > So, document the supply property so-that the require boards
> > > > > > > > > > > > that used on GT5663 can enable it via device tree.
> > > > > > > > > > > >
> > > > > > > > > > > > Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
> > > > > > > > > > > > ---
> > > > > > > > > > > >  Documentation/devicetree/bindings/input/touchscreen/goodix.txt | 1 +
> > > > > > > > > > > >  1 file changed, 1 insertion(+)
> > > > > > > > > > > >
> > > > > > > > > > > > diff --git a/Documentation/devicetree/bindings/input/touchscreen/goodix.txt b/Documentation/devicetree/bindings/input/touchscreen/goodix.txt
> > > > > > > > > > > > index f7e95c52f3c7..c4622c983e08 100644
> > > > > > > > > > > > --- a/Documentation/devicetree/bindings/input/touchscreen/goodix.txt
> > > > > > > > > > > > +++ b/Documentation/devicetree/bindings/input/touchscreen/goodix.txt
> > > > > > > > > > > > @@ -23,6 +23,7 @@ Optional properties:
> > > > > > > > > > > >   - touchscreen-inverted-y  : Y axis is inverted (boolean)
> > > > > > > > > > > >   - touchscreen-swapped-x-y : X and Y axis are swapped (boolean)
> > > > > > > > > > > >                               (swapping is done after inverting the axis)
> > > > > > > > > > > > + - AVDD28-supply     : Analog power supply regulator on AVDD28 pin
> > > > > > > > > > >
> > > > > > > > > > > I think we normally use lower case in DT bindings and rarely encode
> > > > > > > > > > > voltage in the supply name unless we are dealing with several supplies
> > > > > > > > > > > of the same kind, but I'll let Ron comment on this.
> > > > > > > > > >
> > > > > > > > > > Yes on lowercase though there are some exceptions.
> > > > > > > > > >
> > > > > > > > > > There's also a AVDD22 supply as well as DVDD12 and VDDIO. So we
> > > > > > > > > > probably need to keep the voltage, but the binding is incomplete.
> > > > > > > > >
> > > > > > > > > What is incomplete here? can you please elaborate.
> > > > > > > >
> > > > > > > > You are missing the 3 other supplies the chip has: AVDD22, DVDD12 and VDDIO.
> > > > > > >
> > > > > > > Though it has other supplies, only AVDD28 is connected in the Host
> > > > > > > interface design similar like 9. Reference Schematic on Page, 23 in
> > > > > > > attached manual.
> > > > > >
> > > > > > That is for a particular board design. It still has other supplies.
> > > > > > Just make the binding complete please. You can make them optional. I
> > > > > > don't care if the driver supports controlling all the supplies or not
> > > > > > (though Dmitry might).
> > > > >
> > > > > So, Can I make bulk get and enable in all 4 regulators global to
> > > > > driver or specific to that chip, in either way the regulators which
> > > > > are not used to process via dummy regulators (which we all know).
> > > > >
> > > > > or regulator which are not using are get via devm_regulator_get_optional.
> > > > >
> > > > > Any suggestions?
> > > >
> > > > Just realized to go with bulk calls, please have a look at on v5 [1]
> > >
> > > I do not believe you can use bulk regulator API here as you need to
> > > implement the power up timing scheme mentioned on p. 12 of the spec you
> > > referenced earlier. And, because of that timing diagram, I believe if
> > > you want to control AVDD supply, you also have to control VDDIO supply
> > > as it has to be on only after enabling AVDD.
> >
> > AVDD here is AVDD28 it' is an out name of pin (mentioned in p. 23). So
> > the power scheme goes to enable AVDD28 and then VDDIO does that really
> > mean bulk of two regulators?
> 
> The time between these two regulator operations is nearly 0, as per
> power scheme diagram T1 >= 0us. I think I can use bulk since there is
> no necessity of delay between these two regulator operations.
> 
> What do you think?

Does the bulk enable provide any guarantees as to the order of
operations? If it does not then I think we should ensure that they are
powered up/down in the right order.

Thanks.
Jagan Teki Feb. 19, 2019, 8:45 a.m. UTC | #13
On Tue, Feb 19, 2019 at 1:45 PM Dmitry Torokhov
<dmitry.torokhov@gmail.com> wrote:
>
> On Tue, Feb 19, 2019 at 01:00:19AM +0530, Jagan Teki wrote:
> > On Mon, Feb 18, 2019 at 3:03 PM Jagan Teki <jagan@amarulasolutions.com> wrote:
> > >
> > > Hi Dmitry,
> > >
> > > On Mon, Feb 18, 2019 at 12:42 PM Dmitry Torokhov
> > > <dmitry.torokhov@gmail.com> wrote:
> > > >
> > > > On Sun, Feb 17, 2019 at 02:45:52PM +0530, Jagan Teki wrote:
> > > > > On Sun, Feb 17, 2019 at 1:21 PM Jagan Teki <jagan@amarulasolutions.com> wrote:
> > > > > >
> > > > > > Hi Dmitry and Rob,
> > > > > >
> > > > > > On Thu, Feb 14, 2019 at 3:21 AM Rob Herring <robh@kernel.org> wrote:
> > > > > > >
> > > > > > > On Tue, Jan 22, 2019 at 7:39 AM Jagan Teki <jagan@amarulasolutions.com> wrote:
> > > > > > > >
> > > > > > > > On Mon, Jan 21, 2019 at 9:46 PM Rob Herring <robh@kernel.org> wrote:
> > > > > > > > >
> > > > > > > > > On Fri, Jan 18, 2019 at 10:01 AM Jagan Teki <jagan@amarulasolutions.com> wrote:
> > > > > > > > > >
> > > > > > > > > > On Wed, Jan 9, 2019 at 7:08 PM Rob Herring <robh@kernel.org> wrote:
> > > > > > > > > > >
> > > > > > > > > > > Please CC DT list if you want bindings reviewed.
> > > > > > > > > >
> > > > > > > > > > Sorry I forgot.
> > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > > On Wed, Jan 9, 2019 at 1:40 AM Dmitry Torokhov
> > > > > > > > > > > <dmitry.torokhov@gmail.com> wrote:
> > > > > > > > > > > >
> > > > > > > > > > > > On Sat, Dec 15, 2018 at 08:47:59PM +0530, Jagan Teki wrote:
> > > > > > > > > > > > > Most of the Goodix CTP controllers are supply with AVDD28 pin.
> > > > > > > > > > > > > which need to supply for controllers like GT5663 on some boards
> > > > > > > > > > > > > to trigger the power.
> > > > > > > > > > > > >
> > > > > > > > > > > > > So, document the supply property so-that the require boards
> > > > > > > > > > > > > that used on GT5663 can enable it via device tree.
> > > > > > > > > > > > >
> > > > > > > > > > > > > Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
> > > > > > > > > > > > > ---
> > > > > > > > > > > > >  Documentation/devicetree/bindings/input/touchscreen/goodix.txt | 1 +
> > > > > > > > > > > > >  1 file changed, 1 insertion(+)
> > > > > > > > > > > > >
> > > > > > > > > > > > > diff --git a/Documentation/devicetree/bindings/input/touchscreen/goodix.txt b/Documentation/devicetree/bindings/input/touchscreen/goodix.txt
> > > > > > > > > > > > > index f7e95c52f3c7..c4622c983e08 100644
> > > > > > > > > > > > > --- a/Documentation/devicetree/bindings/input/touchscreen/goodix.txt
> > > > > > > > > > > > > +++ b/Documentation/devicetree/bindings/input/touchscreen/goodix.txt
> > > > > > > > > > > > > @@ -23,6 +23,7 @@ Optional properties:
> > > > > > > > > > > > >   - touchscreen-inverted-y  : Y axis is inverted (boolean)
> > > > > > > > > > > > >   - touchscreen-swapped-x-y : X and Y axis are swapped (boolean)
> > > > > > > > > > > > >                               (swapping is done after inverting the axis)
> > > > > > > > > > > > > + - AVDD28-supply     : Analog power supply regulator on AVDD28 pin
> > > > > > > > > > > >
> > > > > > > > > > > > I think we normally use lower case in DT bindings and rarely encode
> > > > > > > > > > > > voltage in the supply name unless we are dealing with several supplies
> > > > > > > > > > > > of the same kind, but I'll let Ron comment on this.
> > > > > > > > > > >
> > > > > > > > > > > Yes on lowercase though there are some exceptions.
> > > > > > > > > > >
> > > > > > > > > > > There's also a AVDD22 supply as well as DVDD12 and VDDIO. So we
> > > > > > > > > > > probably need to keep the voltage, but the binding is incomplete.
> > > > > > > > > >
> > > > > > > > > > What is incomplete here? can you please elaborate.
> > > > > > > > >
> > > > > > > > > You are missing the 3 other supplies the chip has: AVDD22, DVDD12 and VDDIO.
> > > > > > > >
> > > > > > > > Though it has other supplies, only AVDD28 is connected in the Host
> > > > > > > > interface design similar like 9. Reference Schematic on Page, 23 in
> > > > > > > > attached manual.
> > > > > > >
> > > > > > > That is for a particular board design. It still has other supplies.
> > > > > > > Just make the binding complete please. You can make them optional. I
> > > > > > > don't care if the driver supports controlling all the supplies or not
> > > > > > > (though Dmitry might).
> > > > > >
> > > > > > So, Can I make bulk get and enable in all 4 regulators global to
> > > > > > driver or specific to that chip, in either way the regulators which
> > > > > > are not used to process via dummy regulators (which we all know).
> > > > > >
> > > > > > or regulator which are not using are get via devm_regulator_get_optional.
> > > > > >
> > > > > > Any suggestions?
> > > > >
> > > > > Just realized to go with bulk calls, please have a look at on v5 [1]
> > > >
> > > > I do not believe you can use bulk regulator API here as you need to
> > > > implement the power up timing scheme mentioned on p. 12 of the spec you
> > > > referenced earlier. And, because of that timing diagram, I believe if
> > > > you want to control AVDD supply, you also have to control VDDIO supply
> > > > as it has to be on only after enabling AVDD.
> > >
> > > AVDD here is AVDD28 it' is an out name of pin (mentioned in p. 23). So
> > > the power scheme goes to enable AVDD28 and then VDDIO does that really
> > > mean bulk of two regulators?
> >
> > The time between these two regulator operations is nearly 0, as per
> > power scheme diagram T1 >= 0us. I think I can use bulk since there is
> > no necessity of delay between these two regulator operations.
> >
> > What do you think?
>
> Does the bulk enable provide any guarantees as to the order of
> operations? If it does not then I think we should ensure that they are
> powered up/down in the right order.

At-least I can saw from the log, async enables based on the definition
of supply arrays. Indeed the regulators with bulk calls enables based
on the supply array order, this is what I usually think.

[    3.676483] Goodix-TS 1-005d: 1-005d supply VDDIO not found, using
dummy regulator
[    3.693159] regulator_bulk_enable_async: Supply AVDD28
[    3.693162] regulator_bulk_enable_async: Supply VDDIO
[    3.806095] Goodix-TS 1-005d: ID 5663, version: 0100

Do we need to go reverse order for power-down? I couldn't see this
information on the datasheet. If yes then we need to go for normal
calls.

Patch
diff mbox series

diff --git a/Documentation/devicetree/bindings/input/touchscreen/goodix.txt b/Documentation/devicetree/bindings/input/touchscreen/goodix.txt
index f7e95c52f3c7..c4622c983e08 100644
--- a/Documentation/devicetree/bindings/input/touchscreen/goodix.txt
+++ b/Documentation/devicetree/bindings/input/touchscreen/goodix.txt
@@ -23,6 +23,7 @@  Optional properties:
  - touchscreen-inverted-y  : Y axis is inverted (boolean)
  - touchscreen-swapped-x-y : X and Y axis are swapped (boolean)
                              (swapping is done after inverting the axis)
+ - AVDD28-supply	: Analog power supply regulator on AVDD28 pin
 
 Example: