I want to pass certain information from the user space to my driver, whenever the user apps. open my driver.
I have considered 2 options:
1. Call an ioctl to my device with the data I want to pass.
2. Use the sysfs FS.
But I am not sure about the procedure to create a sysfs entry for my driver, and how to access it from kernel space, how to write into it from User space etc...
Can anyone provide a pointer to this. Sorry if it has already been answered, I tried to search but could find relevant post.