]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
ASoC: SDCA: Add RJ support to class driver
authorCharles Keepax <ckeepax@opensource.cirrus.com>
Fri, 27 Mar 2026 16:27:32 +0000 (16:27 +0000)
committerMark Brown <broonie@kernel.org>
Fri, 3 Apr 2026 14:11:10 +0000 (15:11 +0100)
Add the retaskable jack Function to the list of Functions supported by
the class driver, it shouldn't require anything that isn't already
supported.

Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://patch.msgid.link/20260327162732.877257-1-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sdca/sdca_class_function.c

index 98fd3fd1052b42e9fef967fbbe705b5e18847427..c3eb3c23a7db9711bbebaaeba93b8ad0ac1d67ba 100644 (file)
@@ -368,8 +368,14 @@ static int class_function_probe(struct auxiliary_device *auxdev,
                return dev_err_probe(dev, PTR_ERR(drv->regmap),
                                     "failed to create regmap");
 
-       if (desc->type == SDCA_FUNCTION_TYPE_UAJ)
+       switch (desc->type) {
+       case SDCA_FUNCTION_TYPE_UAJ:
+       case SDCA_FUNCTION_TYPE_RJ:
                cmp_drv->set_jack = class_function_set_jack;
+               break;
+       default:
+               break;
+       }
 
        ret = sdca_asoc_populate_component(dev, drv->function, cmp_drv,
                                           &dais, &num_dais,
@@ -539,6 +545,10 @@ static const struct auxiliary_device_id class_function_id_table[] = {
                .name = "snd_soc_sdca." SDCA_FUNCTION_TYPE_HID_NAME,
                .driver_data = SDCA_FUNCTION_TYPE_HID,
        },
+       {
+               .name = "snd_soc_sdca." SDCA_FUNCTION_TYPE_RJ_NAME,
+               .driver_data = SDCA_FUNCTION_TYPE_RJ,
+       },
        {},
 };
 MODULE_DEVICE_TABLE(auxiliary, class_function_id_table);