bus: sunxi-rsb: Implement suspend/resume/shutdown callbacks
authorSamuel Holland <samuel@sholland.org>
Sun, 3 Jan 2021 11:06:34 +0000 (05:06 -0600)
committerChen-Yu Tsai <wens@csie.org>
Wed, 6 Jan 2021 11:34:02 +0000 (19:34 +0800)
commit843107498f91e57d1d4b22cd8787112726fdaeb4
tree1df4ae3f7fda515eea95ef8dd332316c8e37ef3a
parent22754ac9a632f9bcb2cfd91243459e679778a497
bus: sunxi-rsb: Implement suspend/resume/shutdown callbacks

Since system firmware is likely to use the RSB bus to communicate with a
PMIC while the system is suspended, we cannot make any assumptions about
the controller state after resuming. Thus it is important to completely
reinitialize the controller.

The RSB bus needs to be ready as soon as IRQs are enabled, to handle
wakeup event IRQs coming from the PMIC. Thus it uses NOIRQ callbacks.

Signed-off-by: Samuel Holland <samuel@sholland.org>
Acked-by: Maxime Ripard <mripard@kernel.org>
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
drivers/bus/sunxi-rsb.c