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-next>] [day] [month] [year] [list]
Message-ID: <3343657.nOMI9WY9u8@pc-42>
Date:   Thu, 5 Dec 2019 14:08:23 +0000
From:   Jérôme Pouiller <Jerome.Pouiller@...abs.com>
To:     Michał Mirosław <mirq-linux@...e.qmqm.pl>
CC:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        "devel@...verdev.osuosl.org" <devel@...verdev.osuosl.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] staging: wfx: fix reset GPIO polarity

On Wednesday 4 December 2019 17:59:46 CET Michał Mirosław wrote:
> Driver inverts meaning of GPIO_ACTIVE_LOW/HIGH. Fix it to prevent
> confusion.
> 
> Signed-off-by: Michał Mirosław <mirq-linux@...e.qmqm.pl>
> ---
>  drivers/staging/wfx/bus_spi.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/staging/wfx/bus_spi.c b/drivers/staging/wfx/bus_spi.c
> index ab0cda1e124f..73d0157a86ba 100644
> --- a/drivers/staging/wfx/bus_spi.c
> +++ b/drivers/staging/wfx/bus_spi.c
> @@ -199,9 +199,9 @@ static int wfx_spi_probe(struct spi_device *func)
>         if (!bus->gpio_reset) {
>                 dev_warn(&func->dev, "try to load firmware anyway\n");
>         } else {
> -               gpiod_set_value(bus->gpio_reset, 0);
> -               udelay(100);
>                 gpiod_set_value(bus->gpio_reset, 1);
> +               udelay(100);
> +               gpiod_set_value(bus->gpio_reset, 0);
>                 udelay(2000);
>         }
Hello Michał,

I did not find real consensus in kernel code. My personal taste would
be to keep this gpio "ACTIVE_HIGH" and rename it gpio_nreset. What do
you think about it?

(in add, this solution would explicitly change the name of the DT
attribute instead of changing the semantic of the existing attribute)

-- 
Jérôme Pouiller

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ