New IOCTLs
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 11 lines · Louis Rilling
Quoted 4 lines · Singaravelan Nallasellan
Thank you for your response.
The driver needs to assign an id for each open and create a sysfs entry based on that id and expose some properties.
What about using configfs? A user could create an id using mkdir in the driver's configfs subsystem, and this would make the driver create the matching sysfs entry.
Quoted 5 lines
# mkdir /sys/kernel/config/<driver_subsys>/2 -> reserve id 2 for the caller, and create /sys/class/xxx/<drivername>/2You could even put whatever configuration items inside configfs instead of sysfs.
Sounds like simulating file descriptors, with more overhead and less functionality, just for having non-atomic access to name->value pairs.
Besides that, we don't yet know the purpose of the IOCTL, and even less about the driver. Maybe the user will need to read or write, too, or pass the fd to other processes.