I have two questions:
(A) I am trying to identify the various options available for a Linux device driver to exchange data with userspace.
A common approach I am aware of is copy_from_user()
and copy_to_user()
. From the question on SO, some other options include netlink
, ioctl
, sysfs
, procfs
, configfs
. I want to ask if anyone is aware of any resource where a complete list of options is described along with when it is appropriate to use these options.
(B) I also have the question of whether the type of driver in Linux has anything to do with options allowed to exchange data with user space.
Based on searching online, I can identify the drivers types as Character, Block, PCI, USB, Network, TTY (not sure if this list is complete). I want to ask whether there is any relation between type of driver and way to exchange data with user space OR are they independent ?