Linux driver development procfs or dev file?
Something bother me all the time while learning about linux kernel.
I have done some example tryout on /dev type of file vs /procfs.
Currently from my point of view seem like /procfs is more easy to use/implement.
There no need to "mknod" or assign major dev number. I love the idea it is dynamically assigned.
With seeing some of the tutorials, I didn't find where it is mention how the mknod is automated for devices.
I have been bothered by this should I be using /dev or /procfs types?
What any specification that dictate which must we use?
My project, I'm doing some data buffering driver from devices to application layer.
There also a SPI comm beside the data buffering port(almost similar to the video streaming ports).
But how does a SPI+/dev or SPI+/proc types? or can we combine that in the single driver file?
I am not altogether sure what you are asking and am probably not the best person to help you, but I don't like to see threads unanswered. The /dev hierarchy is also now dynamically populated by udev. Users are always direct to /dev for info about their programs and udev can be overridden to provide consistent interfaces with udev rules. It seems to me that drivers would be better served with consistent interfaces as well. I believe that procfs is quite random in its assignments of process id's and would therefore be difficult, if not impossible, to manage. Hopefully, someone who really understands this will post a better reply.
|All times are GMT -5. The time now is 08:01 PM.|