Re: register access issues in pca953x gpio driver

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

 



On Fri, Mar 27, 2020 at 02:46:57PM +0100, Uwe Kleine-König wrote:
> On Fri, Mar 27, 2020 at 01:03:21PM +0000, Mark Brown wrote:

> > If you want to dynamically change if the register is autoincrementing
> > you're going to have to add stuff to regmap for that, it understands
> > devices that autoincrement and devices that don't autoincrement but
> > there's currently nothing for transitioning between the two.

> I'm not entirely sure, but I think they all support autoincrementing but
> some need the flag set and others don't. I imagine that this should be
> modeled as register range [0-0x7f] (as AI = 0x80) and the accessor
> callbacks have to set AI or not depending on the chip.

So it's not that you're varying this at runtime but rather that you have
different chips?  In that case you can use read_flag_mask and
write_flag_mask to set the autoincrement flag, and use_single_write for
things that lack autoincrement.

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