[PATCH 00/14] Add support for NVMEM API

Sean Anderson sean.anderson at seco.com
Tue Feb 8 17:02:59 CET 2022


Hi Michael,

On 2/8/22 10:00 AM, Michael Walle wrote:
> Hi Sean,
> 
>> Should this be implemented on top of/as part of syscon/regmap? In Linux,
>> all nvmem devices must also implement regmap support, making nvmem a
>> subset of regmap drivers. There are certainly similarities, but I don't
>> know if we want to make this depend on regmap.
> 
> What do you mean by that? I assume with "nvmem devices" you mean the
> nvmem providers. I've implemented the nvmem provider for MTD OTP devices
> in linux and there is no regmap support.

According to [1],

> [The NVMEM] framework is based on regmap, so that most of the
> abstraction available in regmap can be reused, across multiple types
> of buses.

and

> It is mandatory that the NVMEM provider has a regmap associated with
> its struct device. Failure to do would return error code from
> nvmem_register().

which seems to imply that NVMEM devices should also be regmaps.

--Sean

[1] https://www.kernel.org/doc/html/latest/driver-api/nvmem.html


More information about the U-Boot mailing list