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: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://patch.msgid.link/20250203141051.2361323-3-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
committed by
Mark Brown
parent
dc561ab16d
commit
e92f042642
@@ -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];
|
||||
|
||||
Reference in New Issue
Block a user