[PATCH] nvmem: core: add nvmem_cell_nbits()
Sascha Hauer
s.hauer at pengutronix.de
Tue Oct 20 06:56:03 PDT 2026
On Thu, 15 Oct 2026 16:07:42 +0200, Ahmad Fatoum wrote:
> A cell with a bits property is narrower than the bytes nvmem_cell_read()
> returns and nvmem_cell_write() doesn't mask the value written to it, so
> anything that doesn't fit spills into the neighbouring bits.
>
> A consumer that computes the value it writes back, like a counter, thus
> needs to know the width of the cell. Let's add a helper that returns it.
>
> [...]
Applied, thanks!
[1/1] nvmem: core: add nvmem_cell_nbits()
https://git.pengutronix.de/cgit/barebox/commit/?id=4830dc51b191 (link may not be stable)
Best regards,
--
Sascha Hauer <s.hauer at pengutronix.de>
More information about the barebox
mailing list