-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Input subsystem core implementation #54908
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
Input subsystem core implementation #54908
Conversation
728dd75 to
c3462d6
Compare
c3462d6 to
4907ccd
Compare
gmarull
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.
overall lgtm, nice addition to Zephyr! Please check my comments
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.
Zbus can handle all the event work done here without significant overhead. I think you should use zbus for this part. I will propose an alternative using zbus. If we have a Zephyr message bus in the RTOS, using another implementation of the same thing would be strange to an official input driver. Don't you fellows think? @fabiobaltieri @gmarull
I haven't checked in detail, but from what I heard in the Arch WG, ZBus could be added as another option, so you'd have callbacks, thread+queue and zbus. I guess it's the most flexible solution. |
4907ccd to
53ed5d5
Compare
a100d87 to
fc6b880
Compare
nordicjm
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.
Also needs an entry in the API table
Initial commit introducing the input subsystem into Zephyr. Includes the input_event data structure, the input_report_* APIs, an iterables sections based subscription API and two operation modes: synchronous, where the listeners are called directly, and asynchronous, where the listeners are called in a dedicated thread. Signed-off-by: Fabio Baltieri <[email protected]>
fc6b880 to
602b17d
Compare
Yeah good point.
|
gmarull
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.
re-approval bot
mbolivar-nordic
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.
Couple other suggestions for the docs. At least I got confused about whether input_report() is a function or a family of functions from just reading the documentation. Since the answer is "both", I think this could be made clearer
Add the initial documentation for the input subsystem. Signed-off-by: Fabio Baltieri <[email protected]>
Add a first input sample in the subsys/input directory. This just prints any input event on the console. Signed-off-by: Fabio Baltieri <[email protected]>
Add some initial tests for the input subsystem, covering all the APIs in both synchronous and thread mode. Signed-off-by: Fabio Baltieri <[email protected]>
Add an entry for the input subsystem, experimental, 3.4. Signed-off-by: Fabio Baltieri <[email protected]>
Add a maintainer section for Input. Signed-off-by: Fabio Baltieri <[email protected]>
89125e3
602b17d to
89125e3
Compare
Cool, all applied. |
Hi, this is the first PR for the input subsystem, adding the core functionalities, sample, testing and documentation. This has been proposed in #54622 and is built on the proof of concept code presented there and in the architecture WG.
Tentatively planning to follow-up with the kscan adapter implementation, porting over the
zephyr,gpio-keysdriver and then the three kscan keyboard drivers (npcx, mchp and ite, there's some code dedup opportunity there).