• Anson Huang's avatar
    mailbox: imx: Support runtime PM · 676f23ea
    Anson Huang authored
    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: default avatarAnson Huang <Anson.Huang@nxp.com>
    Signed-off-by: default avatarJassi Brar <jaswinder.singh@linaro.org>
    676f23ea
imx-mailbox.c 13.8 KB