Hi Sean,

Am 2022-02-08 17:02, schrieb Sean Anderson:
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.

Ahh I see. That seems to be outdated, see commit
795ddd18d38f9762fbfefceab9aa16caef0cf431 ("nvmem: core: remove
regmap dependency").

-michael

Reply via email to