lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACRpkdYsw6T_CMoV0XwLZ3YKmrKL5QsWsm4Ap4D47FrKpOCMcw@mail.gmail.com>
Date:   Fri, 4 Jun 2021 09:38:04 +0200
From:   Linus Walleij <linus.walleij@...aro.org>
To:     Dmitry Torokhov <dmitry.torokhov@...il.com>
Cc:     Linux Input <linux-input@...r.kernel.org>,
        linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 7/7] Input: cy8ctmg110_ts - switch to using gpiod API

On Thu, Jun 3, 2021 at 6:37 AM Dmitry Torokhov
<dmitry.torokhov@...il.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@...il.com>

Reviewed-by: Linus Walleij <linus.walleij@...aro.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.

But that is just nitpicks, the code is fine.

Yours,
Linus Walleij

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ