public inbox for linux-sound@vger.kernel.org
 help / color / mirror / Atom feed
From: Cezary Rojewski <cezary.rojewski@intel.com>
To: broonie@kernel.org
Cc: tiwai@suse.com, perex@perex.cz,
	amadeuszx.slawinski@linux.intel.com, shenghao-ding@ti.com,
	kevin-lu@ti.com, baojun.xu@ti.com, linux-sound@vger.kernel.org,
	Cezary Rojewski <cezary.rojewski@intel.com>
Subject: [PATCH 02/11] ASoC: codecs: pcm3168a: Relax probing conditions
Date: Wed, 22 Jan 2025 18:54:17 +0100	[thread overview]
Message-ID: <20250122175426.1369059-3-cezary.rojewski@intel.com> (raw)
In-Reply-To: <20250122175426.1369059-1-cezary.rojewski@intel.com>

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>
---
 sound/soc/codecs/pcm3168a.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/sound/soc/codecs/pcm3168a.c b/sound/soc/codecs/pcm3168a.c
index fac0617ab95b..43c0cb5e538e 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];
-- 
2.25.1


  parent reply	other threads:[~2025-01-22 17:40 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-22 17:54 [PATCH 00/11] ASoC: Intel: avs: Add support for MalibouLake configuration Cezary Rojewski
2025-01-22 17:54 ` [PATCH 01/11] ASoC: codecs: pcm3168a: Add ACPI match table Cezary Rojewski
2025-01-22 17:54 ` Cezary Rojewski [this message]
2025-01-22 17:54 ` [PATCH 03/11] ASoC: codecs: pcm3168a: Allow for 24-bit in provider mode Cezary Rojewski
2025-01-22 17:54 ` [PATCH 04/11] ASoC: Intel: avs: Add pcm3168a machine board Cezary Rojewski
2025-01-22 23:15   ` Jeff Johnson
2025-01-23  9:25     ` Cezary Rojewski
2025-01-22 17:54 ` [PATCH 05/11] ASoC: Intel: avs: pcm3168a board selection Cezary Rojewski
2025-01-22 17:54 ` [PATCH 06/11] ASoC: Intel: avs: Move DSP-boot steps into individual functions Cezary Rojewski
2025-01-22 17:54 ` [PATCH 07/11] ASoC: Intel: avs: Configure basefw on TGL-based platforms Cezary Rojewski
2025-01-22 17:54 ` [PATCH 08/11] ASoC: Intel: avs: New gateway configuration mechanism Cezary Rojewski
2025-01-22 17:54 ` [PATCH 09/11] ASoC: Intel: avs: Remove unused gateway configuration code Cezary Rojewski
2025-01-22 17:54 ` [PATCH 10/11] ASoC: Intel: avs: Add WHM module support Cezary Rojewski
2025-01-22 17:54 ` [PATCH 11/11] ALSA: hda: Select avs-driver by default on MBL Cezary Rojewski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250122175426.1369059-3-cezary.rojewski@intel.com \
    --to=cezary.rojewski@intel.com \
    --cc=amadeuszx.slawinski@linux.intel.com \
    --cc=baojun.xu@ti.com \
    --cc=broonie@kernel.org \
    --cc=kevin-lu@ti.com \
    --cc=linux-sound@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=shenghao-ding@ti.com \
    --cc=tiwai@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox