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  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]
Date:   Mon, 6 Jul 2020 13:21:18 +0200
From:   Bartosz Golaszewski <bgolaszewski@...libre.com>
To:     Sungbo Eo <mans0n@...ani.run>
Cc:     Linus Walleij <linus.walleij@...aro.org>,
        Andy Shevchenko <andy.shevchenko@...il.com>,
        Michael Walle <michael@...le.cc>,
        LKML <linux-kernel@...r.kernel.org>,
        linux-gpio <linux-gpio@...r.kernel.org>
Subject: Re: [PATCH v5 1/2] gpio: add GPO driver for PCA9570

On Sun, Jul 5, 2020 at 3:31 PM Sungbo Eo <mans0n@...ani.run> wrote:
>
> NXP PCA9570 is a 4-bit I2C GPO expander without interrupt functionality.
> Its ports are controlled only by a data byte without register address.
>
> Datasheet: https://www.nxp.com/docs/en/data-sheet/PCA9570.pdf
>
> Signed-off-by: Sungbo Eo <mans0n@...ani.run>
> ---
> v5:
> * amended the commit message
> * removed unnecessary castings
> * added data to of_match_table
>
> v4:
> * removed ->direction_input() and ->direction_output()
>   (Seems unnecessary to me)
> * removed ->set_multiple()
>   (I'm not sure this implementation is really correct)
> * added ->get()
>   (DS says we can read the status from the device)
> * read current status during probe
>
> v3:
> * remove mutex
> * rename buffer to out
> * simplify return statements
> * replace ->probe() to ->probe_new()
> * move ngpio to driver_data
>   (PCA9571 is 8-bit so I thought making ngpio configurable is a good idea)

This driver looks nice now but why did you remove the mutex in v3? I
think when Andy commented on that, he meant not understanding why the
error check is protected, not the i2c operations.

Are you sure you don't need this lock?

Bartosz

Powered by blists - more mailing lists