Den 17.02.2020 22.39, skrev Mark Brown:
On Mon, Feb 17, 2020 at 10:33:58PM +0100, Noralf Trønnes wrote:
Den 17.02.2020 13.11, skrev Mark Brown:
This looks like you just don't support a straight write operation, if you need to do this emulation push it up the stack.
After going through the stack I realise that I have a problem. What I have failed to fully comprehend is this regmap requirement:
if (val_len % map->format.val_bytes) return -EINVAL;
There will be a spi and i2c driver down the line which will transfer buffers of any size, and having to use 8-bit register values will not be great.
Out of interest why are 8 bit registers going to be a problem?
I have written 3 drivers so far and they all have some registers that need to deal with values larger than 255. If I would need to add a lot of code because of dropping regmap, then I would have looked at ways to work around this in order to keep regmap, hi/lo registers perhaps with wrapping access functions. But it looks like the LOC won't change much, I need a few lines to ensure values are little endian, but I can also remove some lines that's not needed anymore.
Noralf.