Skip to content

Conversation

Martinhoff-maker
Copy link
Member

This commit introduce power management in gpdma driver.

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);
Copy link
Contributor

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;
Copy link
Contributor

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.

Copy link
Member

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:

Copy link
Member

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

Copy link
Member

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]>
@sonarqubecloud
Copy link

.baseC = (uint32_t)cfg->channel_reg,
.sramBase = (uint32_t)data->desc_pool->buffer,
};
RSI_GPDMA_HANDLE_T gpdma_handle;
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: Boards/SoCs area: DMA Direct Memory Access platform: Silabs Silicon Labs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants