Re: Page select register restrictions in regmap core

From: Guenter Roeck
Date: Tue Jun 18 2024 - 14:10:21 EST


On 6/18/24 10:45, Mark Brown wrote:
On Tue, Jun 18, 2024 at 09:14:56AM -0700, Guenter Roeck wrote:

Anyway, this may be all irrelevant in respect to regmap support.
It turns out that at least some i801 controllers don't work with the
access mechanism used by regmap, or maybe the spd5118 chips don't support
I2C_FUNC_SMBUS_I2C_BLOCK. I already found that those chips don't support
auto-incrementing the register address and actually reset the address on byte
reads (i.e., subsequent calls to i2c_smbus_read_byte() always return the data
from the first register). Since regmap doesn't have a means for me to say
"don't use I2C_FUNC_SMBUS_I2C_BLOCK even if the controller supports it",
I may have to drop regmap support entirely anyway. That would be annoying,
but right now I have no idea how to work around that problem.

You can set the use_single_read and use_single_write flags in the config
to ensure registers are accessed one at a time, that restriction is
moderately common.

I'll give it a try.

Thanks!

Guenter