
Hi Jean-Jacques,
On Tue, 5 Nov 2019 at 04:47, Jean-Jacques Hiblot jjhiblot@ti.com wrote:
Some linux drivers provide their own read/write functions to access data from/of the regmap. Adding support for it.
Signed-off-by: Jean-Jacques Hiblot jjhiblot@ti.com
Changes in v2:
- Only use custom accessors if {,SPL,TPL}_REGMAP_ACCESSORS is enabled
drivers/core/Kconfig | 25 +++++++++++++++++++++++++ drivers/core/regmap.c | 22 ++++++++++++++++++++-- include/regmap.h | 28 +++++++++++++++++++++++++--- 3 files changed, 70 insertions(+), 5 deletions(-)
Coming back to the discussion on driver model....
How do you specify the fields? I would expect that this would be done in the driver tree? Perhaps in a subnode of the device?
Just to state what I see as the advantages of using a separate device for access:
- Remove the #ifdef in the regmap struct - Easy to specify the behaviour in a device-tree node - Easy to extend as the child device can do what it likes with respect to access
Disadvantage is that it takes a bit more space.
Regards, Simon