diff options
author | Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> | 2023-03-14 04:54:00 +0300 |
---|---|---|
committer | Vinod Koul <vkoul@kernel.org> | 2023-03-15 16:54:02 +0300 |
commit | 84706e9a75ffc3c950424bdfea06cabb4101a6b4 (patch) | |
tree | ff40e47c08e0380da1d8e4a201916f59265d3813 /drivers/soundwire/intel.h | |
parent | 9c49a4dd6c861bd2636094712d6d874e257787e2 (diff) | |
download | linux-84706e9a75ffc3c950424bdfea06cabb4101a6b4.tar.xz |
soundwire: intel: add sync_arm/sync_go to ops
The bus start/stop sequences can be reused between platforms if we add
a couple of new callbacks. In following patches the code will be moved to
a shared file.
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-7-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.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/drivers/soundwire/intel.h b/drivers/soundwire/intel.h index 089c41babfc1..28b21a92e28b 100644 --- a/drivers/soundwire/intel.h +++ b/drivers/soundwire/intel.h @@ -167,4 +167,24 @@ static inline void sdw_intel_shim_wake(struct sdw_intel *sdw, bool wake_enable) SDW_INTEL_OPS(sdw, shim_wake)(sdw, wake_enable); } +static inline void sdw_intel_sync_arm(struct sdw_intel *sdw) +{ + if (SDW_INTEL_CHECK_OPS(sdw, sync_arm)) + SDW_INTEL_OPS(sdw, sync_arm)(sdw); +} + +static inline int sdw_intel_sync_go_unlocked(struct sdw_intel *sdw) +{ + if (SDW_INTEL_CHECK_OPS(sdw, sync_go_unlocked)) + return SDW_INTEL_OPS(sdw, sync_go_unlocked)(sdw); + return -ENOTSUPP; +} + +static inline int sdw_intel_sync_go(struct sdw_intel *sdw) +{ + if (SDW_INTEL_CHECK_OPS(sdw, sync_go)) + return SDW_INTEL_OPS(sdw, sync_go)(sdw); + return -ENOTSUPP; +} + #endif /* __SDW_INTEL_LOCAL_H */ |