Investigate SPI runtime PM count underflow
I noticed this when booting rk3588-test
from 2024-03-22 on my RK3588 EVB1.
rockchip-spi feb20000.spi: Runtime PM usage count underflow!
rockchip-spi feb20000.spi: Runtime PM usage count underflow!
I noticed this when booting rk3588-test
from 2024-03-22 on my RK3588 EVB1.
rockchip-spi feb20000.spi: Runtime PM usage count underflow!
rockchip-spi feb20000.spi: Runtime PM usage count underflow!
The underflow also happens on the Rock 5B in the CI. As this is an underflow, there is an unbalanced pm_runtime_put*()
. The driver has a total of 3:
rockchip_spi_setup()
. That one has a matching pm_runtime_get_sync()
a few lines before and should be finerockchip_spi_remove()
, directly after pm_runtime_get_sync()
, so it should also be fine.rockchip_spi_set_cs
. That one runs pm_runtime_put()
when CS is deasserted and pm_runtime_get_sync()
when it is asserted.I'm pretty sure the last one is the root cause, since there is no need to have balanced calls to rockchip_spi_set_cs()
and it kind of makes sense to explicitly de-assert CS at probe time.
It looks like this got fixed at some point. I no longer see the error after rebasing to latest master.
closed