summaryrefslogtreecommitdiff
path: root/include/sound
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2025-11-21 21:28:15 +0000
committerMark Brown <broonie@kernel.org>2025-11-21 21:28:15 +0000
commitd4a3411ca31337f369e5600270138165e8eb57c0 (patch)
treee412429f90bbfc68a159e6bc2201c248735f4ed6 /include/sound
parentdf919994d323c7c86e32fa2745730136d58ada12 (diff)
parent3af1815a2f9caebfc666af3912e24d030a5368d5 (diff)
Add SDCA class driver
Merge series from Charles Keepax <ckeepax@opensource.cirrus.com>: This series adds an initial SDCA class driver, this consists of a primary driver attached to the SoundWire device, and auxiliary drivers representing each of the functions of the SDCA device. These drivers all use the APIs added over the past series's to provide the class functionality, as such these final drivers themselves are quite thin. Also a few fix ups at the start of the series that have gathered up whilst the last SDCA series was in review.
Diffstat (limited to 'include/sound')
-rw-r--r--include/sound/sdca.h14
-rw-r--r--include/sound/sdca_regmap.h2
2 files changed, 16 insertions, 0 deletions
diff --git a/include/sound/sdca.h b/include/sound/sdca.h
index d38cdbfeb35f..67ff3c88705d 100644
--- a/include/sound/sdca.h
+++ b/include/sound/sdca.h
@@ -13,19 +13,23 @@
#include <linux/kconfig.h>
struct acpi_table_swft;
+struct fwnode_handle;
struct sdw_slave;
+struct sdca_dev;
#define SDCA_MAX_FUNCTION_COUNT 8
/**
* struct sdca_function_desc - short descriptor for an SDCA Function
* @node: firmware node for the Function.
+ * @func_dev: pointer to SDCA function device.
* @name: Human-readable string.
* @type: Function topology type.
* @adr: ACPI address (used for SDCA register access).
*/
struct sdca_function_desc {
struct fwnode_handle *node;
+ struct sdca_dev *func_dev;
const char *name;
u32 type;
u8 adr;
@@ -58,6 +62,8 @@ void sdca_lookup_functions(struct sdw_slave *slave);
void sdca_lookup_swft(struct sdw_slave *slave);
void sdca_lookup_interface_revision(struct sdw_slave *slave);
bool sdca_device_quirk_match(struct sdw_slave *slave, enum sdca_quirk quirk);
+int sdca_dev_register_functions(struct sdw_slave *slave);
+void sdca_dev_unregister_functions(struct sdw_slave *slave);
#else
@@ -68,6 +74,14 @@ static inline bool sdca_device_quirk_match(struct sdw_slave *slave, enum sdca_qu
{
return false;
}
+
+static inline int sdca_dev_register_functions(struct sdw_slave *slave)
+{
+ return 0;
+}
+
+static inline void sdca_dev_unregister_functions(struct sdw_slave *slave) {}
+
#endif
#endif
diff --git a/include/sound/sdca_regmap.h b/include/sound/sdca_regmap.h
index b2e3c2ad2bb8..792540a530fc 100644
--- a/include/sound/sdca_regmap.h
+++ b/include/sound/sdca_regmap.h
@@ -27,5 +27,7 @@ int sdca_regmap_populate_constants(struct device *dev, struct sdca_function_data
int sdca_regmap_write_defaults(struct device *dev, struct regmap *regmap,
struct sdca_function_data *function);
+int sdca_regmap_write_init(struct device *dev, struct regmap *regmap,
+ struct sdca_function_data *function);
#endif // __SDCA_REGMAP_H__