From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: Linux Input <linux-input@vger.kernel.org>,
linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 7/7] Input: cy8ctmg110_ts - switch to using gpiod API
Date: Sat, 5 Jun 2021 21:08:17 -0700 [thread overview]
Message-ID: <YLxKMXamSx0aXYSl@google.com> (raw)
In-Reply-To: <CACRpkdYsw6T_CMoV0XwLZ3YKmrKL5QsWsm4Ap4D47FrKpOCMcw@mail.gmail.com>
On Fri, Jun 04, 2021 at 09:38:04AM +0200, Linus Walleij wrote:
> On Thu, Jun 3, 2021 at 6:37 AM Dmitry Torokhov
> <dmitry.torokhov@gmail.com> wrote:
>
> > Instead of legacy gpio API let's use newer gpiod API. This also allows us
> > to get rid of platform data.
> >
> > Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
>
> Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
>
> > static void cy8ctmg110_power(struct cy8ctmg110 *ts, bool poweron)
> > {
> > - if (ts->reset_pin)
> > - gpio_direction_output(ts->reset_pin, 1 - poweron);
> > + if (ts->reset_gpio)
> > + gpiod_set_value_cansleep(ts->reset_gpio, !poweron);
>
> I would perhaps drop in a comment that this de-asserts the RESET
> line when we power on and asserts it when we power off.
>
> > + ts->reset_gpio = devm_gpiod_get_optional(&client->dev, NULL,
> > + GPIOD_OUT_HIGH);
>
> And here that this will assert RESET.
Good idea, added and applied.
Thank you Linus.
--
Dmitry
next prev parent reply other threads:[~2021-06-06 4:09 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-03 4:37 [PATCH 1/7] Input: cy8ctmg110_ts - rely on platform code to supply interrupt Dmitry Torokhov
2021-06-03 4:37 ` [PATCH 2/7] Input: cy8ctmg110_ts - do not hard code interrupt trigger Dmitry Torokhov
2021-06-04 7:31 ` Linus Walleij
2021-06-03 4:37 ` [PATCH 3/7] Input: cy8ctmg110_ts - do not hardcode as wakeup source Dmitry Torokhov
2021-06-04 7:31 ` Linus Walleij
2021-06-03 4:37 ` [PATCH 4/7] Input: cy8ctmg110_ts - let I2C core configure wake interrupt Dmitry Torokhov
2021-06-04 7:32 ` Linus Walleij
2021-06-06 4:10 ` Dmitry Torokhov
2021-06-03 4:37 ` [PATCH 5/7] Input: cy8ctmg110_ts - use endian helpers when converting data on wire Dmitry Torokhov
2021-06-04 7:34 ` Linus Walleij
2021-06-03 4:37 ` [PATCH 6/7] Input: cy8ctmg110_ts - switch to using managed resources Dmitry Torokhov
2021-06-04 7:35 ` Linus Walleij
2021-06-03 4:37 ` [PATCH 7/7] Input: cy8ctmg110_ts - switch to using gpiod API Dmitry Torokhov
2021-06-04 7:38 ` Linus Walleij
2021-06-06 4:08 ` Dmitry Torokhov [this message]
2021-06-04 7:30 ` [PATCH 1/7] Input: cy8ctmg110_ts - rely on platform code to supply interrupt Linus Walleij
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YLxKMXamSx0aXYSl@google.com \
--to=dmitry.torokhov@gmail.com \
--cc=linus.walleij@linaro.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.