summaryrefslogtreecommitdiffstats
path: root/drivers/soundwire/intel.h
diff options
context:
space:
mode:
authorPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>2023-03-14 09:54:03 +0800
committerVinod Koul <vkoul@kernel.org>2023-03-15 19:24:02 +0530
commit1e76de2e5dfeff17f13afe8146449fec3f5b69f7 (patch)
tree82145cf0d12e0d758336511528d5c5ed9f11afb1 /drivers/soundwire/intel.h
parent1a1a6a692e9cd58c235651fa281219dab02afeed (diff)
downloadlinux-1e76de2e5dfeff17f13afe8146449fec3f5b69f7.tar.gz
linux-1e76de2e5dfeff17f13afe8146449fec3f5b69f7.tar.bz2
linux-1e76de2e5dfeff17f13afe8146449fec3f5b69f7.zip
soundwire: intel: add abstraction for cmdsync check
If we add one more callback, we can have common bank switch sequences between old and new hardware: the only difference is where the CMDSYNC register is located. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Rander Wang <rander.wang@intel.com> Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://lore.kernel.org/r/20230314015410.487311-10-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers/soundwire/intel.h')
-rw-r--r--drivers/soundwire/intel.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/soundwire/intel.h b/drivers/soundwire/intel.h
index abd1a500defa..7a69cf755954 100644
--- a/drivers/soundwire/intel.h
+++ b/drivers/soundwire/intel.h
@@ -187,6 +187,13 @@ static inline int sdw_intel_sync_go(struct sdw_intel *sdw)
return -ENOTSUPP;
}
+static inline bool sdw_intel_sync_check_cmdsync_unlocked(struct sdw_intel *sdw)
+{
+ if (SDW_INTEL_CHECK_OPS(sdw, sync_check_cmdsync_unlocked))
+ return SDW_INTEL_OPS(sdw, sync_check_cmdsync_unlocked)(sdw);
+ return false;
+}
+
/* common bus management */
int intel_start_bus(struct sdw_intel *sdw);
int intel_start_bus_after_reset(struct sdw_intel *sdw);