[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20211110183654.61328998@kemnade.info>
Date: Wed, 10 Nov 2021 18:36:54 +0100
From: Andreas Kemnade <andreas@...nade.info>
To: Alistair Francis <alistair23@...il.com>
Cc: Alistair Francis <alistair@...stair23.me>,
linux-arm-kernel <linux-arm-kernel@...ts.infradead.org>,
devicetree <devicetree@...r.kernel.org>,
linux-input <linux-input@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Mylene Josserand <mylene.josserand@...e-electrons.com>,
Linus Walleij <linus.walleij@...aro.org>,
Henrik Rydberg <rydberg@...math.org>,
Dmitry Torokhov <dmitry.torokhov@...il.com>,
Rob Herring <robh+dt@...nel.org>
Subject: Re: [PATCH v2 2/4] Documentation: DT: bindings: input: Add
documentation for cyttsp5
On Wed, 10 Nov 2021 22:59:50 +1000
Alistair Francis <alistair23@...il.com> wrote:
[...]
> >
> > > + reset-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>;
> >
> > hmm, if the reset gpio at the chip is active low (I guess it is) that
> > would indicate an inverter between SoC and gpio. So a nonstandard setup
> > as an example, probably not a good idea.
>
> It seems to be common for the cypress,tt2100, as the original
> documentation and the rM2 both do this. Does the Kobo not do this?
>
You have a kind of double inversion here, so things are automagically fixed.
IMHO to describe it correctly would be to set GPIO_ACTIVE_LOW here
and in the driver
/* Reset the gpio to be in a reset state */
ts->reset_gpio = devm_gpiod_get_optional(dev, "reset", GPIOD_OUT_HIGH);
if (IS_ERR(ts->reset_gpio)) {
rc = PTR_ERR(ts->reset_gpio);
dev_err(dev, "Failed to request reset gpio, error %d\n", rc);
return rc;
}
gpiod_set_value(ts->reset_gpio, 0);
That is the way how other active-low reset lines are handled.
Regards,
Andreas
Powered by blists - more mailing lists