fix(pointing): Support multiple temp layer instances#3241
Open
nobyk wants to merge 2 commits intozmkfirmware:mainfrom
Open
fix(pointing): Support multiple temp layer instances#3241nobyk wants to merge 2 commits intozmkfirmware:mainfrom
nobyk wants to merge 2 commits intozmkfirmware:mainfrom
Conversation
Previously, the `input-processor-temp-layer` driver failed to support multiple instances because the background work queue callback (`layer_action_work_cb`) was hardcoded to operate only on the first driver instance (instance 0). This caused actions from secondary instances to either be ignored or incorrectly apply state changes to the first instance. This commit fixes the issue by: - Adding a `dev` pointer to the `layer_state_action` struct to identify the originating device instance for each event. - updating the work callback to use the specific device instance from the action payload. - Implementing a lookup mechanism for timeout-based deactivation to find and update the correct active instance managing the expiring layer. - Fixing macro expansion errors in `DT_INST_FOREACH_STATUS_OKAY` usage.
petejohanson
requested changes
Feb 19, 2026
Contributor
petejohanson
left a comment
There was a problem hiding this comment.
Generally seems reasonable, just one minor comment on the mutex use. Thanks!
Add return check and logging for k_mutex_lock
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Previously, the
input-processor-temp-layerdriver failed to support multiple instances because the background work queue callback (layer_action_work_cb) was hardcoded to operate only on the first driver instance (instance 0). This caused actions from secondary instances to either be ignored or incorrectly apply state changes to the first instance.This commit fixes the issue by:
devpointer to thelayer_state_actionstruct to identify the originating device instance for each event.DT_INST_FOREACH_STATUS_OKAYusage.PR check-list