firmware: ti_sci: Use system_state to determine polling
authorNishanth Menon <nm@ti.com>
Tue, 20 Jun 2023 13:03:29 +0000 (08:03 -0500)
committerNishanth Menon <nm@ti.com>
Tue, 11 Jul 2023 18:01:08 +0000 (13:01 -0500)
commit9225bcdedf16297a346082e7d23b0e8434aa98ed
tree06e1b1be2aaf42c7b37c92a6b32392231282c54e
parent06c2afb862f9da8dc5efa4b6076a0e48c3fbaaa5
firmware: ti_sci: Use system_state to determine polling

Commit b9e8a7d950ff ("firmware: ti_sci: Switch transport to polled
mode during system suspend") aims to resolve issues with tisci
operations during system suspend operation. However, the system may
enter a no_irq stage in various other usage modes, including power-off
and restart. To determine if polling mode is appropriate, use the
system_state instead.

While at this, drop the unused is_suspending state variable and
related helpers.

Fixes: b9e8a7d950ff ("firmware: ti_sci: Switch transport to polled mode during system suspend")
Reported-by: Francesco Dolcini <francesco@dolcini.it>
Reported-by: Wadim Egorov <w.egorov@phytec.de>
Tested-by: Francesco Dolcini <francesco.dolcini@toradex.com> # Toradex Verdin AM62
Link: https://lore.kernel.org/r/20230620130329.4120443-1-nm@ti.com
Closes: https://lore.kernel.org/all/ZGeHMjlnob2GFyHF@francesco-nb.int.toradex.com/
Signed-off-by: Nishanth Menon <nm@ti.com>
drivers/firmware/ti_sci.c