Re: [PATCH] serial: 8250_mtk: Simplify clock sequencing and runtime PM

From: Tony Lindgren
Date: Tue Jun 06 2023 - 08:14:04 EST


* Chen-Yu Tsai <wenst@xxxxxxxxxxxx> [230606 09:19]:
> The 8250_mtk driver's runtime PM support has some issues:
>
> - The bus clock is enabled (through runtime PM callback) later than a
> register write
> - runtime PM resume callback directly called in probe, but no
> pm_runtime_set_active() call is present
> - UART PM function calls the callbacks directly, _and_ calls runtime
> PM API
> - runtime PM callbacks try to do reference counting, adding yet another
> count between runtime PM and clocks
>
> This fragile setup worked in a way, but broke recently with runtime PM
> support added to the serial core. The system would hang when the UART
> console was probed and brought up.

Great, looks like a good for Linux next to me:

Reviewed-by: Tony Lindgren <tony@xxxxxxxxxxx>