mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-05 18:39:59 +00:00
soundwire: cadence: add interface to check clock status
If master is in clock stop state, driver can't modify registers in master except the registers for clock stop setting. Signed-off-by: Rander Wang <rander.wang@intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200317163329.25501-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
This commit is contained in:
parent
7b174f24f4
commit
5a885c52cf
2 changed files with 13 additions and 0 deletions
|
@ -1207,6 +1207,17 @@ static const struct sdw_master_port_ops cdns_port_ops = {
|
|||
.dpn_port_enable_ch = cdns_port_enable,
|
||||
};
|
||||
|
||||
/**
|
||||
* sdw_cdns_is_clock_stop: Check clock status
|
||||
*
|
||||
* @cdns: Cadence instance
|
||||
*/
|
||||
bool sdw_cdns_is_clock_stop(struct sdw_cdns *cdns)
|
||||
{
|
||||
return !!(cdns_readl(cdns, CDNS_MCP_STAT) & CDNS_MCP_STAT_CLK_STOP);
|
||||
}
|
||||
EXPORT_SYMBOL(sdw_cdns_is_clock_stop);
|
||||
|
||||
/**
|
||||
* sdw_cdns_probe() - Cadence probe routine
|
||||
* @cdns: Cadence instance
|
||||
|
|
|
@ -144,6 +144,8 @@ int sdw_cdns_pdi_init(struct sdw_cdns *cdns,
|
|||
int sdw_cdns_exit_reset(struct sdw_cdns *cdns);
|
||||
int sdw_cdns_enable_interrupt(struct sdw_cdns *cdns, bool state);
|
||||
|
||||
bool sdw_cdns_is_clock_stop(struct sdw_cdns *cdns);
|
||||
|
||||
#ifdef CONFIG_DEBUG_FS
|
||||
void sdw_cdns_debugfs_init(struct sdw_cdns *cdns, struct dentry *root);
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue