[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <4ea6c6b1-fe2d-445d-8e8a-b00c3c2584ad@sirena.org.uk>
Date: Fri, 20 Dec 2024 13:57:24 +0000
From: Mark Brown <broonie@...nel.org>
To: Linus Walleij <linus.walleij@...aro.org>
Cc: Matthias Schiffer <matthias.schiffer@...tq-group.com>,
Bartosz Golaszewski <brgl@...ev.pl>, linux@...tq-group.com,
linux-gpio@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 3/4] gpio: tqmx86: introduce tqmx86_gpio_clrsetbits()
helper
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.
Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)
Powered by blists - more mailing lists