#define CS47L35_SILICON_ID 0x6360
#define CS47L85_SILICON_ID 0x6338
#define CS47L90_SILICON_ID 0x6364
+#define CS47L92_SILICON_ID 0x6371
#define MADERA_32KZ_MCLK2 1
},
};
+static const char * const cs47l92_supplies[] = {
+ "MICVDD",
+ "CPVDD1",
+ "CPVDD2",
+};
+
+static const struct mfd_cell cs47l92_devs[] = {
+ { .name = "madera-pinctrl" },
+ { .name = "madera-irq", },
+ { .name = "madera-micsupp", },
+ { .name = "madera-gpio" },
+ { .name = "madera-extcon" },
+ {
+ .name = "cs47l92-codec",
+ .parent_supplies = cs47l92_supplies,
+ .num_parent_supplies = ARRAY_SIZE(cs47l92_supplies),
+ },
+};
+
+
const char *madera_name_from_type(enum madera_type type)
{
switch (type) {
return "CS47L90";
case CS47L91:
return "CS47L91";
+ case CS47L92:
+ return "CS47L92";
+ case CS47L93:
+ return "CS47L93";
case WM1840:
return "WM1840";
default:
return 4;
case CS47L90:
case CS47L91:
+ case CS47L92:
+ case CS47L93:
return 2;
default:
dev_warn(madera->dev, "No micbias known for codec %s\n",
case CS47L90:
case CS47L91:
return 4;
+ case CS47L92:
+ case CS47L93:
+ switch (micbias) {
+ case 1:
+ return 4;
+ case 2:
+ return 2;
+ default:
+ dev_warn(madera->dev,
+ "No child micbias for codec %s, micbias %u\n",
+ madera_name_from_type(madera->type),
+ micbias);
+ return 0;
+ }
default:
dev_warn(madera->dev, "No child micbias known for codec %s\n",
madera_name_from_type(madera->type));
{ .compatible = "cirrus,cs47l85", .data = (void *)CS47L85 },
{ .compatible = "cirrus,cs47l90", .data = (void *)CS47L90 },
{ .compatible = "cirrus,cs47l91", .data = (void *)CS47L91 },
+ { .compatible = "cirrus,cs47l92", .data = (void *)CS47L92 },
+ { .compatible = "cirrus,cs47l93", .data = (void *)CS47L93 },
{ .compatible = "cirrus,wm1840", .data = (void *)WM1840 },
{},
};
case CS47L35:
case CS47L90:
case CS47L91:
+ case CS47L92:
+ case CS47L93:
break;
case CS47L85:
case WM1840:
case CS47L35_SILICON_ID:
case CS47L85_SILICON_ID:
case CS47L90_SILICON_ID:
+ case CS47L92_SILICON_ID:
break;
default:
dev_err(madera->dev, "Unknown device ID: %x\n", hwid);
}
}
break;
+ case CS47L92_SILICON_ID:
+ if (IS_ENABLED(CONFIG_MFD_CS47L92)) {
+ switch (madera->type) {
+ case CS47L92:
+ case CS47L93:
+ patch_fn = cs47l92_patch;
+ mfd_devs = cs47l92_devs;
+ n_devs = ARRAY_SIZE(cs47l92_devs);
+ break;
+ default:
+ break;
+ }
+ }
+ break;
default:
break;
}