diff options
| author | Charles Keepax <ckeepax@opensource.cirrus.com> | 2025-10-20 18:54:57 +0300 |
|---|---|---|
| committer | Mark Brown <broonie@kernel.org> | 2025-10-27 18:31:14 +0300 |
| commit | 7159816707dc7040fe3ac4fa3d7ac3d173bd772a (patch) | |
| tree | 36c2f94d6db24830bffca98397bffba239bb3e4b /include | |
| parent | 907364ea3db47530751add6d2d62122ca17329cb (diff) | |
| download | linux-7159816707dc7040fe3ac4fa3d7ac3d173bd772a.tar.xz | |
ASoC: SDCA: Pass SoundWire slave to HID
The SDCA HID code can't assume that the struct device it is passed is
the SoundWire slave device. HID is represented by a Function in SDCA and
will thus likely be implemented by a child driver. Update the code to
explicitly pass in the SoundWire slave device.
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.dev>
Link: https://patch.msgid.link/20251020155512.353774-5-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'include')
| -rw-r--r-- | include/sound/sdca_function.h | 2 | ||||
| -rw-r--r-- | include/sound/sdca_hid.h | 8 |
2 files changed, 7 insertions, 3 deletions
diff --git a/include/sound/sdca_function.h b/include/sound/sdca_function.h index ea68856e4c8c..51e12fcfc53c 100644 --- a/include/sound/sdca_function.h +++ b/include/sound/sdca_function.h @@ -1332,7 +1332,7 @@ static inline u32 sdca_range_search(struct sdca_control_range *range, return 0; } -int sdca_parse_function(struct device *dev, +int sdca_parse_function(struct device *dev, struct sdw_slave *sdw, struct sdca_function_desc *desc, struct sdca_function_data *function); diff --git a/include/sound/sdca_hid.h b/include/sound/sdca_hid.h index 8ab3e498884e..3a155835e035 100644 --- a/include/sound/sdca_hid.h +++ b/include/sound/sdca_hid.h @@ -12,10 +12,14 @@ #include <linux/hid.h> #if IS_ENABLED(CONFIG_SND_SOC_SDCA_HID) -int sdca_add_hid_device(struct device *dev, struct sdca_entity *entity); + +int sdca_add_hid_device(struct device *dev, struct sdw_slave *sdw, + struct sdca_entity *entity); #else -static inline int sdca_add_hid_device(struct device *dev, struct sdca_entity *entity) + +static inline int sdca_add_hid_device(struct device *dev, struct sdw_slave *sdw, + struct sdca_entity *entity) { return 0; } |
