-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Fix: allow kscan-composite to wake up device. #2682
Conversation
include kscan.yaml so we can set kscan-composite as a wakeup source
modify enable and disable callback to check for wakeup capabilities of composite and children
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.
Thanks for the PR! One comment on the code change.
if (pm_device_wakeup_is_enabled(dev) && pm_device_wakeup_is_enabled(child_cfg->child)) { | ||
continue; | ||
} |
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.
I would expect this to disable wakeup on the child device when the composite is getting disabled.
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.
You are correct I think: the disable function is only called when the composite is not an enabled wakeup source. In that case the children should also not be an enabled wakeup source, so they can get suspended.
The disable function is only called when the composite is not an enabled wakeup source. In that case the children should also not be an enabled wakeup source, so they can get suspended
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.
This should be disabling, not enabling here.
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.
Thanks!
The kscan-composite driver does not respect the wakeup capabilities of its child kscans.
This branch fixes that by checking for their capabilities and whether the composite kscan is a wakeup source, before disabling them.
Relates to #2654 and #2673
PR check-list