From: Mark Brown <broonie@kernel.org>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: Matthias Schiffer <matthias.schiffer@ew.tq-group.com>,
Bartosz Golaszewski <brgl@bgdev.pl>,
linux@ew.tq-group.com, linux-gpio@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/4] gpio: tqmx86: introduce tqmx86_gpio_clrsetbits() helper
Date: Fri, 20 Dec 2024 13:57:24 +0000 [thread overview]
Message-ID: <4ea6c6b1-fe2d-445d-8e8a-b00c3c2584ad@sirena.org.uk> (raw)
In-Reply-To: <CACRpkdar+8qS6r30WwCJBjVuqc16xnruVQa3y1m1rKAnJbcN7Q@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1102 bytes --]
On Fri, Dec 20, 2024 at 02:43:15PM +0100, Linus Walleij wrote:
> I don't see why we can't add
> unsigned in regmap_read_cantfail()
> that always just return the value if this is a common problem for people using
> regmap MMIO specifically? Could perhaps be restricted to mmio.
I can't recall people ever having much problem with just ignoring the
return value if they don't care about it.
> > - I introduced a tqmx86_gpio_clrsetbits() wrapper around regmap_update_bits()
> > (having arguments for set and clear was more convenient than mask and value
> > in a few places)
> Isn't that what regmap fields are for?
> regmap_field_set_bits()
> regmap_field_clear_bits()
The field API is more for and indirection where bitfields move about,
but there are top level set and clear operations too.
> > - I was still handling locking outside of regmap because we sometimes want to
> > protect a whole sequence of accesses or other driver state
> So reg_sequence cannot be used in this case? (Other driver state seems
> to imply that.)
Yes, regmap_multi_reg_write() does what it says on the tin.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2024-12-20 13:57 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-09 10:36 [PATCH 0/4] gpio-tqmx86: cleanup + changing directions Matthias Schiffer
2024-12-09 10:36 ` [PATCH 1/4] gpio: tqmx86: add macros for interrupt configuration Matthias Schiffer
2024-12-11 15:11 ` Bartosz Golaszewski
2024-12-09 10:36 ` [PATCH 2/4] gpio: tqmx86: consistently refer to IRQs by hwirq numbers Matthias Schiffer
2024-12-09 10:36 ` [PATCH 3/4] gpio: tqmx86: introduce tqmx86_gpio_clrsetbits() helper Matthias Schiffer
2024-12-17 14:16 ` Linus Walleij
2024-12-17 15:11 ` Matthias Schiffer
2024-12-20 13:43 ` Linus Walleij
2024-12-20 13:57 ` Mark Brown [this message]
2024-12-09 10:36 ` [PATCH 4/4] gpio: tqmx86: add support for changing GPIO directions Matthias Schiffer
2024-12-11 15:13 ` Bartosz Golaszewski
2024-12-11 15:12 ` [PATCH 0/4] gpio-tqmx86: cleanup + changing directions Bartosz Golaszewski
2024-12-11 15:35 ` Matthias Schiffer
2024-12-11 15:47 ` Bartosz Golaszewski
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=4ea6c6b1-fe2d-445d-8e8a-b00c3c2584ad@sirena.org.uk \
--to=broonie@kernel.org \
--cc=brgl@bgdev.pl \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@ew.tq-group.com \
--cc=matthias.schiffer@ew.tq-group.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®