Re: [PATCH 3/4] gpio: tqmx86: introduce tqmx86_gpio_clrsetbits() helper

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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: signature.asc
Description: PGP signature


[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux