From: Cezary Rojewski Date: Mon, 3 Feb 2025 14:10:42 +0000 (+0100) Subject: ASoC: codecs: pcm3168a: Relax probing conditions X-Git-Tag: v6.15-rc1~173^2~4^2~135^2~9 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e92f042642aed6f6206caace892d9df2d0166841;p=thirdparty%2Fkernel%2Flinux.git 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 Link: https://patch.msgid.link/20250203141051.2361323-3-cezary.rojewski@intel.com Signed-off-by: Mark Brown --- diff --git a/sound/soc/codecs/pcm3168a.c b/sound/soc/codecs/pcm3168a.c index fac0617ab95b6..43c0cb5e538e8 100644 --- a/sound/soc/codecs/pcm3168a.c +++ b/sound/soc/codecs/pcm3168a.c @@ -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];