diff mbox series

[2/3] dt-bindings: Input: tm2-touchkey - document vddio-supply

Message ID 20201203131242.44397-2-stephan@gerhold.net (mailing list archive)
State Accepted
Commit 3e730ec11d51283ad62a98436967c01b718132ab
Headers show
Series [1/3] dt-bindings: Input: tm2-touchkey - convert to yaml | expand

Commit Message

Stephan Gerhold Dec. 3, 2020, 1:12 p.m. UTC
The Samsung touchkey controllers are often used with external pull-up
for the interrupt line and the I2C lines, so we might need to enable
a regulator to bring the lines into usable state. Otherwise, this might
cause spurious interrupts and reading from I2C will fail.

Document support for a "vddio-supply" that is enabled by the tm2-touchkey
driver so that the regulator gets enabled when needed.

Cc: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
---
 .../devicetree/bindings/input/cypress,tm2-touchkey.yaml      | 5 +++++
 1 file changed, 5 insertions(+)

Comments

Linus Walleij Dec. 5, 2020, 11:09 p.m. UTC | #1
On Thu, Dec 3, 2020 at 2:13 PM Stephan Gerhold <stephan@gerhold.net> wrote:

> The Samsung touchkey controllers are often used with external pull-up
> for the interrupt line and the I2C lines, so we might need to enable
> a regulator to bring the lines into usable state. Otherwise, this might
> cause spurious interrupts and reading from I2C will fail.
>
> Document support for a "vddio-supply" that is enabled by the tm2-touchkey
> driver so that the regulator gets enabled when needed.
>
> Cc: Linus Walleij <linus.walleij@linaro.org>
> Signed-off-by: Stephan Gerhold <stephan@gerhold.net>

Reviewed-by: Linus Walleij <linus.walleij@linaro.org>

> +  vddio-supply:
> +    description: |
> +      Optional regulator that provides digital I/O voltage,
> +      e.g. for pulling up the interrupt line or the I2C pins.

I think the funny pipe | us only needed when you want something to be
fixed-width like ASCII art or ASCII tables. But no big deal I suppose.

Yours,
Linus Walleij
Stephan Gerhold Dec. 6, 2020, 12:28 p.m. UTC | #2
On Sun, Dec 06, 2020 at 12:09:50AM +0100, Linus Walleij wrote:
> On Thu, Dec 3, 2020 at 2:13 PM Stephan Gerhold <stephan@gerhold.net> wrote:
> 
> > The Samsung touchkey controllers are often used with external pull-up
> > for the interrupt line and the I2C lines, so we might need to enable
> > a regulator to bring the lines into usable state. Otherwise, this might
> > cause spurious interrupts and reading from I2C will fail.
> >
> > Document support for a "vddio-supply" that is enabled by the tm2-touchkey
> > driver so that the regulator gets enabled when needed.
> >
> > Cc: Linus Walleij <linus.walleij@linaro.org>
> > Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
> 
> Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
> 
> > +  vddio-supply:
> > +    description: |
> > +      Optional regulator that provides digital I/O voltage,
> > +      e.g. for pulling up the interrupt line or the I2C pins.
> 
> I think the funny pipe | us only needed when you want something to be
> fixed-width like ASCII art or ASCII tables. But no big deal I suppose.
> 

Actually, the pipe | effectively means that new lines \n will be
preserved in the parsed output, i.e.

  something:
    Hello
    World

means "Hello World", while

  something: |
    Hello
    World

means "Hello\nWorld\n".

In practice I guess it doesn't make much of a difference for these
descriptions. It also doesn't seem to be used very consistently in
existing device tree bindings, so I think it's fine as-is.

Thanks,
Stephan
Linus Walleij Dec. 6, 2020, 3:10 p.m. UTC | #3
On Sun, Dec 6, 2020 at 1:32 PM Stephan Gerhold <stephan@gerhold.net> wrote:

> Actually, the pipe | effectively means that new lines \n will be
> preserved in the parsed output, i.e.
>
>   something:
>     Hello
>     World
>
> means "Hello World", while
>
>   something: |
>     Hello
>     World
>
> means "Hello\nWorld\n".

Oh that's nice, I learned something new today :D

Combined with fixed-width font it will indeed preserve ASCII gfx too.
But I don't know of a way to guarantee fixed-width :/

https://yaml-multiline.info/ explained even more. Nice!

Yours,
Linus Walleij
Rob Herring Dec. 9, 2020, 8:12 p.m. UTC | #4
On Thu, 03 Dec 2020 14:12:41 +0100, Stephan Gerhold wrote:
> The Samsung touchkey controllers are often used with external pull-up
> for the interrupt line and the I2C lines, so we might need to enable
> a regulator to bring the lines into usable state. Otherwise, this might
> cause spurious interrupts and reading from I2C will fail.
> 
> Document support for a "vddio-supply" that is enabled by the tm2-touchkey
> driver so that the regulator gets enabled when needed.
> 
> Cc: Linus Walleij <linus.walleij@linaro.org>
> Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
> ---
>  .../devicetree/bindings/input/cypress,tm2-touchkey.yaml      | 5 +++++
>  1 file changed, 5 insertions(+)
> 

Reviewed-by: Rob Herring <robh@kernel.org>
Dmitry Torokhov Dec. 10, 2020, 3:50 a.m. UTC | #5
On Thu, Dec 03, 2020 at 02:12:41PM +0100, Stephan Gerhold wrote:
> The Samsung touchkey controllers are often used with external pull-up
> for the interrupt line and the I2C lines, so we might need to enable
> a regulator to bring the lines into usable state. Otherwise, this might
> cause spurious interrupts and reading from I2C will fail.
> 
> Document support for a "vddio-supply" that is enabled by the tm2-touchkey
> driver so that the regulator gets enabled when needed.
> 
> Cc: Linus Walleij <linus.walleij@linaro.org>
> Signed-off-by: Stephan Gerhold <stephan@gerhold.net>

Applied, thank you.
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/input/cypress,tm2-touchkey.yaml b/Documentation/devicetree/bindings/input/cypress,tm2-touchkey.yaml
index 90d4def83182..52dca8b64081 100644
--- a/Documentation/devicetree/bindings/input/cypress,tm2-touchkey.yaml
+++ b/Documentation/devicetree/bindings/input/cypress,tm2-touchkey.yaml
@@ -37,6 +37,11 @@  properties:
   vcc-supply:
     description: Optional regulator for MCU, 1.8V-3.3V (depending on MCU).
 
+  vddio-supply:
+    description: |
+      Optional regulator that provides digital I/O voltage,
+      e.g. for pulling up the interrupt line or the I2C pins.
+
   linux,keycodes:
     minItems: 1
     maxItems: 4