• Daniel Baluta's avatar
    firmware: imx-dsp: Export functions to request/free channels · 23d89aa0
    Daniel Baluta authored
    In order to save power, we only need to request a channel
    when the communication with the DSP active.
    
    For this we export the following functions:
    	- imx_dsp_request_channel, gets a channel with a given index
    	- imx_dsp_free_channel, frees a channel with a given index
    
    Notice that we still request channels at probe to support devices
    that do not have PM callbacks implemented.
    
    More explanations about why requesting a channel has an effect
    on power savings:
     - requesting an mailbox channel will call mailbox's startup
       function.
     - startup function calls pm_runtime_get_sync which increments device
       usage count and will keep the device active. Specifically, mailbox
       clock will be always ON when a mailbox channel is requested.
    Signed-off-by: default avatarDaniel Baluta <daniel.baluta@nxp.com>
    Reviewed-by: default avatarPaul Olaru <paul.olaru@nxp.com>
    Signed-off-by: default avatarShawn Guo <shawnguo@kernel.org>
    23d89aa0
imx-dsp.c 4.18 KB