summaryrefslogtreecommitdiff
path: root/sound/soc/sdca/sdca_device.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/sdca/sdca_device.c')
-rw-r--r--sound/soc/sdca/sdca_device.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/sound/soc/sdca/sdca_device.c b/sound/soc/sdca/sdca_device.c
index 4798ce2c8f0b..405e80b979de 100644
--- a/sound/soc/sdca/sdca_device.c
+++ b/sound/soc/sdca/sdca_device.c
@@ -7,6 +7,7 @@
*/
#include <linux/acpi.h>
+#include <linux/device.h>
#include <linux/dmi.h>
#include <linux/module.h>
#include <linux/property.h>
@@ -27,6 +28,25 @@ void sdca_lookup_interface_revision(struct sdw_slave *slave)
}
EXPORT_SYMBOL_NS(sdca_lookup_interface_revision, "SND_SOC_SDCA");
+static void devm_acpi_table_put(void *ptr)
+{
+ acpi_put_table((struct acpi_table_header *)ptr);
+}
+
+void sdca_lookup_swft(struct sdw_slave *slave)
+{
+ acpi_status status;
+
+ status = acpi_get_table(ACPI_SIG_SWFT, 0,
+ (struct acpi_table_header **)&slave->sdca_data.swft);
+ if (ACPI_FAILURE(status))
+ dev_info(&slave->dev, "SWFT not available\n");
+ else
+ devm_add_action_or_reset(&slave->dev, devm_acpi_table_put,
+ &slave->sdca_data.swft);
+}
+EXPORT_SYMBOL_NS(sdca_lookup_swft, "SND_SOC_SDCA");
+
static bool sdca_device_quirk_rt712_vb(struct sdw_slave *slave)
{
struct sdw_slave_id *id = &slave->id;