Hi
Thanks for reply.
We make some proxy layer in linux /sys. So for example we have directories:
/sys/resets
/sys/routers
etc.
So if user wants to get to know what is the reset reason he doesn't use devmem 0xfff...., he just read the file in /sys/resets/..
If user wants to know some routing path he doesn't read registers via devmem, he only reads some file in /sys/routers which gives him output.
So this is in order to facilitate reading/writing to registers. Instead of searching in documentation concrete registers users have some helper proxy layer in sysfs. And for each directory in /sys there is separate kernel module. Division is based on some functionalities like resets, routing etc.
And the problem is should this 6th kernel module perform role of getting access to all registers or only to parts which are used by more than one kernel module? Now I am using second approach but when I am looking at the code it looks terrible. For example #define for register X and function to access it, is in module A, for egister Y in module B, for register Z in 6th kernel module. There is mess I think and maybe better approach is to put all API to 6th kernel module?