spi: spi-mtk-nor: Add power management support
authorIkjoon Jang <ikjn@chromium.org>
Tue, 6 Oct 2020 07:54:05 +0000 (15:54 +0800)
committerMark Brown <broonie@kernel.org>
Tue, 6 Oct 2020 14:53:47 +0000 (15:53 +0100)
commit3bfd9103c7af07915a84a6849e718622936233c1
tree15cb51b718446d2c9fffea58433801efe7f85fbd
parente836d4cf615f89c6695408e5dcacdefa5cf50167
spi: spi-mtk-nor: Add power management support

This patch adds dev_pm_ops to mtk-nor to support suspend/resume,
auto suspend delay is set to -1 by default.

Accessing registers are only permitted after its clock is enabled
to deal with unknown state of operating clk at probe time.

Signed-off-by: Ikjoon Jang <ikjn@chromium.org>
Link: https://lore.kernel.org/r/20201006155010.v5.4.I68983b582d949a91866163bab588ff3c2a0d0275@changeid
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-mtk-nor.c