-
Notifications
You must be signed in to change notification settings - Fork 8.1k
driver: dma: dma_silabs_siwx91x_gpdma: Add pm support #97909
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
base: main
Are you sure you want to change the base?
driver: dma: dma_silabs_siwx91x_gpdma: Add pm support #97909
Conversation
9f7066f to
1963d63
Compare
| static void siwx91x_gpdma_pm_policy_state_lock_get(void) | ||
| { | ||
| pm_policy_state_lock_get(PM_STATE_SUSPEND_TO_IDLE, PM_ALL_SUBSTATES); | ||
| pm_policy_state_lock_get(PM_STATE_STANDBY, PM_ALL_SUBSTATES); |
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.
siwg917.dtsi does not have power-state-name = "standby". So I think this line is a no-op.
| .baseC = (uint32_t)cfg->channel_reg, | ||
| .sramBase = (uint32_t)data->desc_pool->buffer, | ||
| }; | ||
| RSI_GPDMA_HANDLE_T gpdma_handle; |
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.
A case does not open a new scope. So these declarations are not on top of any scope.
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'm not aware of any style requirement like that for Zephyr. IMO it's fine to have inline declarations when it helps code readability. If absolutely necessary, one could add braces here:
case PM_DEVICE_ACTION_TURN_ON: {
...
break;
}
case PM_DEVICE_ACTION_TURN_OFF: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.
Actually, please add the braces at least. I just noticed CI failures due to similar issues elsewhere:
https://github.com/zephyrproject-rtos/zephyr/actions/runs/18721827138/job/53395989790
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.
And related fix: #98107
This commit introduce power management in gpdma driver. Signed-off-by: Martin Hoff <[email protected]>
1963d63 to
1af1f41
Compare
|
| .baseC = (uint32_t)cfg->channel_reg, | ||
| .sramBase = (uint32_t)data->desc_pool->buffer, | ||
| }; | ||
| RSI_GPDMA_HANDLE_T gpdma_handle; |
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.
Actually, please add the braces at least. I just noticed CI failures due to similar issues elsewhere:
https://github.com/zephyrproject-rtos/zephyr/actions/runs/18721827138/job/53395989790



This commit introduce power management in gpdma driver.