From: Andy Shevchenko <andy.shevchenko@gmail.com>
To: Martyn Welch <martyn.welch@collabora.com>
Cc: Linus Walleij <linus.walleij@linaro.org>,
Bartosz Golaszewski <brgl@bgdev.pl>,
Collabora Kernel ML <kernel@collabora.com>,
"open list:GPIO SUBSYSTEM" <linux-gpio@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 3/5] gpio: pca953x: Fix pca953x_gpio_set_pull_up_down()
Date: Wed, 31 Aug 2022 23:54:45 +0300 [thread overview]
Message-ID: <CAHp75VfO2xc3RU1brxUnj5bXg4xid76YiwGJBwwwS+665GO-2Q@mail.gmail.com> (raw)
In-Reply-To: <20220829133923.1114555-3-martyn.welch@collabora.com>
On Mon, Aug 29, 2022 at 4:43 PM Martyn Welch <martyn.welch@collabora.com> wrote:
>
> A previous fix (dc87f6dd058a gpio: pca953x: Fix pca953x_gpio_set_config)
Format is wrong. Please read documentation on how to refer to the
commits in the tree.
> identified that pinconf_to_config_param() needed to be used to isolate
> the config_param from the pinconf in pca953x_gpio_set_config(). This fix
> however did not consider that this would also be needed in
> pca953x_gpio_set_pull_up_down() to which it passes this config.
>
> Perform a similar call in pca953x_gpio_set_pull_up_down() to isolate the
> configuration parameter there as well, rather than passing it from
> pca953x_gpio_set_config() as the configuration argument may also be needed
> in pca953x_gpio_set_pull_up_down() at a later date.
...
> u8 pull_en_reg = pca953x_recalc_addr(chip, PCAL953X_PULL_EN, offset);
> u8 pull_sel_reg = pca953x_recalc_addr(chip, PCAL953X_PULL_SEL, offset);
> u8 bit = BIT(offset % BANK_SZ);
> + enum pin_config_param param = pinconf_to_config_param(config);
I would move it up before the u8 variable.
The code looks good otherwise.
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Thanks for fixing this!
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2022-08-31 20:55 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-29 13:39 [PATCH 1/5] dt-bindings: vendor-prefixes: add Diodes Martyn Welch
2022-08-29 13:39 ` [PATCH 2/5] dt-bindings: gpio: pca95xx: add entry for pcal6534 and PI4IOE5V6534Q Martyn Welch
2022-08-30 7:50 ` Krzysztof Kozlowski
2022-08-31 13:26 ` Linus Walleij
2022-08-31 13:34 ` Krzysztof Kozlowski
2022-09-08 12:06 ` Linus Walleij
2022-08-29 13:39 ` [PATCH 3/5] gpio: pca953x: Fix pca953x_gpio_set_pull_up_down() Martyn Welch
2022-08-31 12:35 ` Linus Walleij
2022-08-31 20:54 ` Andy Shevchenko [this message]
2022-08-29 13:39 ` [PATCH 4/5] gpio: pca953x: Swap if statements to save later complexity Martyn Welch
2022-08-31 12:36 ` Linus Walleij
2022-08-31 20:55 ` Andy Shevchenko
2022-08-29 13:39 ` [PATCH 5/5] gpio: pca953x: Add support for PCAL6534 and compatible Martyn Welch
2022-08-31 11:57 ` Bartosz Golaszewski
2022-08-31 16:30 ` Martyn Welch
2022-08-31 19:44 ` Bartosz Golaszewski
2022-08-31 21:02 ` Andy Shevchenko
2022-09-01 17:18 ` Martyn Welch
2022-08-30 9:14 ` [PATCH 1/5] dt-bindings: vendor-prefixes: add Diodes Krzysztof Kozlowski
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=CAHp75VfO2xc3RU1brxUnj5bXg4xid76YiwGJBwwwS+665GO-2Q@mail.gmail.com \
--to=andy.shevchenko@gmail.com \
--cc=brgl@bgdev.pl \
--cc=kernel@collabora.com \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=martyn.welch@collabora.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®