Message ID | 20220207234212.685316-1-sean.anderson@seco.com |
---|---|
Headers | show |
Series | Add support for NVMEM API | expand |
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. -michael
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
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