soc: ti: Remove pm_runtime_irq_safe() usage for smartreflex
authorTony Lindgren <tony@atomide.com>
Mon, 9 Aug 2021 16:27:47 +0000 (11:27 -0500)
committerSantosh Shilimkar <santosh.shilimkar@oracle.com>
Tue, 10 Aug 2021 22:51:22 +0000 (15:51 -0700)
commited4520d6a10bbc1d6fdebf325f0395995ce634cf
tree1e8f4c9f9160591f39284279a0a09a705ad220ef
parent22ea87ef3f22742cf2d3dcd31379be3b5612e282
soc: ti: Remove pm_runtime_irq_safe() usage for smartreflex

For the smartreflex device, we need to disable smartreflex on SoC idle,
and have been using pm_runtime_irq_safe() to do that. But we want to
remove the irq_safe usage as PM runtime takes a permanent usage count
on the parent device with it.

In order to remove the need for pm_runtime_irq_safe(), let's gate
the clock directly in the driver. This removes the need to call PM runtime
during idle, and allows us to switch to using CPU_PM in the following
patch.

Note that the smartreflex interconnect target module is configured for smart
idle, but the clock does not have autoidle capability, and needs to be gated
manually. If the clock supported autoidle, we would not need to even gate
the clock.

With this change, we can now remove the related quirk flags for ti-sysc
also.

Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
drivers/bus/ti-sysc.c
drivers/soc/ti/smartreflex.c
include/linux/power/smartreflex.h