Skip to content

Commit

Permalink
[Review] drivers: stm32_gpio: save/restore consumed GPIOs in PM sequence
Browse files Browse the repository at this point in the history
Change pm callbacks to driver level.

Signed-off-by: Gatien Chevallier <[email protected]>
  • Loading branch information
GseoC committed Sep 2, 2024
1 parent d5f38d8 commit 95c4ce2
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions core/drivers/stm32_gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ struct stm32_gpio_bank {
* struct stm32_gpios_pm_state - Consumed GPIO for PM purpose
* @gpio_pinctrl: Reference and configuration state for a consumed GPIO
* @level: GPIO level
* @link: Link consumed GPIO list
* @link: Link in consumed GPIO list
*/
struct stm32_gpio_pm_state {
struct stm32_pinctrl gpio_pinctrl;
Expand Down Expand Up @@ -647,8 +647,7 @@ static TEE_Result stm32_gpio_get_dt(struct dt_pargs *pargs, void *data,
state->gpio_pinctrl.bank = bank->bank_id;
SLIST_INSERT_HEAD(&consumed_gpios_head, state, link);

register_pm_core_service_cb(consumed_gpios_pm, state,
"stm32-gpio-state");
register_pm_driver_cb(consumed_gpios_pm, state, "stm32-gpio-state");

shift_1b = gpio->pin;
shift_2b = SHIFT_U32(gpio->pin, 1);
Expand Down Expand Up @@ -1340,8 +1339,8 @@ static TEE_Result stm32_pinctrl_probe(const void *fdt, int node,
* Register to PM once for all probed banks to restore
* their secure configuration.
*/
register_pm_core_service_cb(stm32_gpio_sec_config_pm, NULL,
"stm32-gpio-secure-config");
register_pm_driver_cb(stm32_gpio_sec_config_pm, NULL,
"stm32-gpio-secure-config");
pm_register = true;
}

Expand Down

0 comments on commit 95c4ce2

Please sign in to comment.