After applying this patch the last register is writable, but still not
readable.
The size is now correct:
barebox:/ ls -l /dev/stm32-bsec
crw---384 /dev/stm32-bsec
This now works:
mw -l -d /dev/stm32-bsec 0x017c+4 0x12345678
This still doesn't:
barebox:/ md -l -s
We should add 1 to the max_register index since counting is zero based.
i.e. the stm32mp151 bsec has registers 0 - 95 with reg_stride 4.
Size should be (95 + 1) * 4 = 384 bytes otherwise we can't access bsec
register 95 (last one).
Signed-off-by: Robin van der Gracht
---
drivers/nvmem/regmap.c