]> git.baikalelectronics.ru Git - kernel.git/commit
mailbox: imx: Support runtime PM
authorAnson Huang <Anson.Huang@nxp.com>
Mon, 13 Apr 2020 12:25:30 +0000 (20:25 +0800)
committerJassi Brar <jaswinder.singh@linaro.org>
Sat, 30 May 2020 21:07:19 +0000 (16:07 -0500)
commit9eed5464a8a8dda48f3e234443e4a9ed5ed4adfc
tree5fc1640847d2ce587584f6c43c34bcc2d23e739e
parentbdb89d6f78203570dceb0b16c4d80c26a9ce9573
mailbox: imx: Support runtime PM

Some power hungry sub-systems like VPU has its own MUs which also
use mailbox driver, current mailbox driver uses platform driver
model and MU's power will be ON after driver probed and left ON
there, it may cause the whole sub-system can NOT enter lower power
mode, take VPU driver for example, it has runtime PM support, but
due to its MU always ON, the VPU sub-system will be always ON and
consume many power during kernel idle.

To save power in kernel idle, mailbox driver needs to support
runtime PM in order to power off MU when it is unused. However,
the runtime suspend/resume can ONLY be implemented in mailbox's
.shutdown/.startup callback, so its consumer needs to call
mbox_request_channel()/mbox_free_channel() in consumer driver's
runtime PM callback, then the MU's power will be ON/OFF along with
consumer's runtime PM status.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
drivers/mailbox/imx-mailbox.c