From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pf1-f176.google.com (mail-pf1-f176.google.com [209.85.210.176]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DC7313B4EAF for ; Wed, 15 Jul 2026 05:12:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.176 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784092325; cv=none; b=AvnynQTJ6uoVQ/yxukfV+2bcbBjo8Nbsoq0Yo6lXOkkAhJCvAVT296Z/MFSNBfKOR8tPkm1uZqPE4dkakwWz6XJCLucNxjpcwQeLQFJwfJAbI2xkDouh6/URYd6DzDYrRICn1G6TjSKsPZUYUrV5gr41acfM3qnw1oMJ7UUPoiA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784092325; c=relaxed/simple; bh=JPBdZyzURlk1+bQObNjx1u7L1CoI0zKQeh16Th7K6Bk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=fqD5aI2C1bTV3M9Cqlv52UKvNgVa28QAWvit6VMe31zW7ta9ikKiswERAJJTZzJjW2R+YizEnozmo/nrutWzgaRZIWnKrf4orzJyD4NlAWXKbbO6nFhjCMlGR2u7+GFAu0kJ8TGNXCXzAcfszB3dlT7U58hH3keCPmWiGyyk4S4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=dAIj8UDR; arc=none smtp.client-ip=209.85.210.176 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="dAIj8UDR" Received: by mail-pf1-f176.google.com with SMTP id d2e1a72fcca58-8487214ad2bso2445371b3a.1 for ; Tue, 14 Jul 2026 22:12:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1784092323; x=1784697123; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=T3PRPoMPx+OET/WGMVQSkA8IuTp6F1i04Nbb1oO1IQs=; b=dAIj8UDRRMr8y+FQI+vFcwdOIx/WCErIDc+ydPmROxrCJoydr3vFLETtRh0WLriijJ 5C283A1JxcBEf5MaiyPbhgVLoIzr9GnzQfvI9z8gdB22IbUyATqiwtQ1wJksWD6oR0sn NNB7YvCtK5Wt/kmyjqfyEp8stg+YqSV4pxZcUOMmcnSQB/taGQNOIDcxn3JHvMFpCjhe E5/nSKQLpbuLWPUm7S2Y/1mVTXmtS5uprUQ4V7Uu+PpF0VnakgA0zswodhYgKgOxZrEZ US2MdrEpa7f0YbAPLw2fVh+ZvFSIOZ1TMhB/gim8W4Q8+gwWhqsQNs4n3EoXP12aklxx Z/EQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1784092323; x=1784697123; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=T3PRPoMPx+OET/WGMVQSkA8IuTp6F1i04Nbb1oO1IQs=; b=HL79ptjoFO4rSEGVjKsFbLKHi07NZjrbDn8Hwp5UqrFjTBZjMywTKq/E2xcp65mcaa d2Z0GLKoC8mxHiU9L2i5NV0Qoavs7Y+Y42QRFK3Wnz467S8qUUz9+9g56sXHZiHhfWOC pjLM3fElDEv4jeDXua+goDj+crr8mhcLIodx1D7qV+PPW8HlMKKuL6oL3jhQDYu002rw w60GmnlQmG38WUtPIVGt0m24gbnRdzAA2PlinJEcWhx9mYwXRT1AzdEi9Ibl9VK4/iss uE1JWRl39aR8su7+UwquuDZe3sTdGteMhv5gkTEWgGLAhjt55ef+ky99EGts8eOrb6mA kJLw== X-Forwarded-Encrypted: i=1; AHgh+RppV143tDzR3AL0bPY7vJSZ9OyTBOaE+bmXv84G2gPOSfd46mfwbzgTwwSRyPl/F9wGLyBH3ToiXf4AdQ==@vger.kernel.org X-Gm-Message-State: AOJu0YzURVvWrv/rLrJeQPwjZey+UAcCNJCRQ2ug1XGAM3fitWx8FWa1 5LFo/jptYlD11k1a1Z26i7xhXxJAYJ7xZhL1sBDPbVmBNjzxqL4I1ozt X-Gm-Gg: AfdE7ckBEh0ro/P/ynDI08G7fIFjggfeFPifUqIqbxJXNmpEcYTcQ9eRG5yHIQm7mRJ Awk+n3u3A7Hcyue5LiIxP5tavAB6EY3VxhXNTw0yIdpq2oBU1eQm1e+A36JRsib2LXYvwKnoMVx NQ6CWiqjcUPFNOJVMaqWePSIJzOMP3jBaxsXBF64HXQNXXGe8xZr1xa87Lv/Yl86fI9HjNPlG2S vG0T61PGDVpaYFDdzCrkQFYMjejLM8LFU1NLOfgkwyWIfA3zsiqtS1tE/PphwTSCd0ADSAt5FR6 urAVTmJdS1MFEJlaeOW+6LLHPYDd7xaaQWhMYg4LlebQirtdsoBVlZukwhLhj5W/de9SL+jWq4/ 7Kfj5IkgosC3yIoaWaJ3vVRv5Mv4ZaxRrKZNnxpncAcfUWGgOm0g2xJ+bcHCPj01uIMMAnYdZrc R7Dt1GNOAZfWMH2JPgeahEFXDGHUYjqOQQQWQD6exMCWY/pUrPgVDlk73zvg== X-Received: by 2002:a05:6a00:179f:b0:848:60a2:4e9b with SMTP id d2e1a72fcca58-8488970ae6fmr14622666b3a.42.1784092323189; Tue, 14 Jul 2026 22:12:03 -0700 (PDT) Received: from phuc-desktop.. ([183.91.15.56]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-84a4f271ddbsm2594093b3a.18.2026.07.14.22.11.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Jul 2026 22:12:02 -0700 (PDT) From: phucduc.bui@gmail.com To: Mark Brown , Thierry Reding , Liam Girdwood , Jaroslav Kysela , Takashi Iwai , Jonathan Hunter Cc: Krzysztof Kozlowski , Sheetal , u.kleine-koenig@baylibre.com, Kuninori Morimoto , Rosen Penev , Piyush Patle , Takashi Sakamoto , Bjorn Helgaas , linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sound@vger.kernel.org, bui duc phuc Subject: [PATCH 4/4] ASoC: tegra: tegra210: Use devm_clk_get_optional() for sync_input clock Date: Wed, 15 Jul 2026 12:11:15 +0700 Message-ID: <20260715051115.17385-5-phucduc.bui@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260715051115.17385-1-phucduc.bui@gmail.com> References: <20260715051115.17385-1-phucduc.bui@gmail.com> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: bui duc phuc The existing comment states that the sync_input clock is only needed when another I/O is configured to use the current I2S instance as its input clock, and the current code does not treat its absence as an error. Use devm_clk_get_optional() to match the existing behaviour while still reporting real failures via dev_err_probe(). Update the comment to describe the optional nature of the clock rather than the previous error handling. Signed-off-by: bui duc phuc --- sound/soc/tegra/tegra210_i2s.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sound/soc/tegra/tegra210_i2s.c b/sound/soc/tegra/tegra210_i2s.c index ff8c72fc38c5..e7e26e917291 100644 --- a/sound/soc/tegra/tegra210_i2s.c +++ b/sound/soc/tegra/tegra210_i2s.c @@ -1078,13 +1078,13 @@ static int tegra210_i2s_probe(struct platform_device *pdev) "can't retrieve I2S bit clock\n"); /* - * Not an error, as this clock is needed only when some other I/O - * requires input clock from current I2S instance, which is - * configurable from DT. + * This clock is optional and is only needed when another I/O uses + * the current I2S instance as its input clock, as configured in DT. */ - i2s->clk_sync_input = devm_clk_get(dev, "sync_input"); + i2s->clk_sync_input = devm_clk_get_optional(dev, "sync_input"); if (IS_ERR(i2s->clk_sync_input)) - dev_dbg(dev, "can't retrieve I2S sync input clock\n"); + return dev_err_probe(dev, PTR_ERR(i2s->clk_sync_input), + "can't retrieve I2S sync input clock\n"); regs = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(regs)) -- 2.43.0