-
Notifications
You must be signed in to change notification settings - Fork 1.5k
driver/sensors[2]: enhance and update sensor driver #6708
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
This is PR is a part of #6653 |
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
pkarashchenko
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In general this design solution is a bit odd to me. We couple the vfs layer with driver implementation layer. In general all other drivers (correct me if I'm wrong) are not built in that way and in theory driver can be used even without vfs node.
Maybe introducing some generic approach for multi-user driver is better. Like creating a list of users at lower half and passing user id of any similar to driver instead of filep.
I mean that current approach allow us to achieve the goal, but IMO destroys the driver model modularity.
Yes, this design will be a bit different from other drivers and designed for rpmsg sensor in PR:#6653 In the rpmsg sensor, we need to use file_xxx to directly access the device node, and use o_flags with O_REMOTE to indicate that it is a remote access to prevent recursion when calling the sensor_ops method.
|
|
I will take a closer look today |
Thank you. |
|
|
Thank you for clarification. Let's pass |
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
Done! |
|
why did the additional parameter struct file *filep was added but it was not used in function at all? |
it's used in sensor_rpmsg_open |


Summary
Impact
Testing
Vela Ci