diff options
author | Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> | 2021-07-14 11:22:05 +0800 |
---|---|---|
committer | Vinod Koul <vkoul@kernel.org> | 2021-08-02 11:08:22 +0530 |
commit | 4a7a603cad3f667fb02e194c0a3412d3a7292093 (patch) | |
tree | 4a9364ab2610bc53a43bf18779fceacc37673ccd /include/linux/soundwire/sdw.h | |
parent | e6645314eb2747bef4d9a375997221dede8ce4ce (diff) |
soundwire: add flag to ignore all command/control for mockup devices
SoundWire mockup devices don't take part in the command/control
protocol, so all commands will complete with -ENODATA or
Command_Ignored results. With a flag, we can suppress such errors in
the bus management and make it appear as if all read/writes succeed.
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/20210714032209.11284-7-yung-chuan.liao@linux.intel.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'include/linux/soundwire/sdw.h')
-rw-r--r-- | include/linux/soundwire/sdw.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/soundwire/sdw.h b/include/linux/soundwire/sdw.h index a48ac3e77301..76ce3f3ac0f2 100644 --- a/include/linux/soundwire/sdw.h +++ b/include/linux/soundwire/sdw.h @@ -661,6 +661,8 @@ struct sdw_slave_ops { * initialized * @first_interrupt_done: status flag tracking if the interrupt handling * for a Slave happens for the first time after enumeration + * @is_mockup_device: status flag used to squelch errors in the command/control + * protocol for SoundWire mockup devices */ struct sdw_slave { struct sdw_slave_id id; @@ -683,6 +685,7 @@ struct sdw_slave { struct completion initialization_complete; u32 unattach_request; bool first_interrupt_done; + bool is_mockup_device; }; #define dev_to_sdw_dev(_dev) container_of(_dev, struct sdw_slave, dev) |