Unverified Commit e92f0426 authored by Cezary Rojewski's avatar Cezary Rojewski Committed by Mark Brown
Browse files

ASoC: codecs: pcm3168a: Relax probing conditions



On ACPI-based systems with Intel MalibouLake there is no "scki" clock
entry defined. Make that initialization part optional and default to
24.576 MHz rate if not set. The rate is the default for both TI and
Intel devices.

Signed-off-by: default avatarCezary Rojewski <cezary.rojewski@intel.com>
Link: https://patch.msgid.link/20250203141051.2361323-3-cezary.rojewski@intel.com


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent dc561ab1
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -743,7 +743,7 @@ int pcm3168a_probe(struct device *dev, struct regmap *regmap)
		return dev_err_probe(dev, PTR_ERR(pcm3168a->gpio_rst),
				     "failed to acquire RST gpio\n");

	pcm3168a->scki = devm_clk_get(dev, "scki");
	pcm3168a->scki = devm_clk_get_optional(dev, "scki");
	if (IS_ERR(pcm3168a->scki))
		return dev_err_probe(dev, PTR_ERR(pcm3168a->scki),
				     "failed to acquire clock 'scki'\n");
@@ -755,6 +755,9 @@ int pcm3168a_probe(struct device *dev, struct regmap *regmap)
	}

	pcm3168a->sysclk = clk_get_rate(pcm3168a->scki);
	/* Fallback to the default if no clk entry available. */
	if (!pcm3168a->sysclk)
		pcm3168a->sysclk = 24576000;

	for (i = 0; i < ARRAY_SIZE(pcm3168a->supplies); i++)
		pcm3168a->supplies[i].supply = pcm3168a_supply_names[i];