Received: by 2002:a05:7412:cfc7:b0:fc:a2b0:25d7 with SMTP id by7csp2355548rdb; Wed, 21 Feb 2024 05:22:14 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVXZY91s/x8qJOFFjabfW0YZOy+zVUZkhb8cHXrnKic4tKd/G6r1f/lzl1d0u10KvIuYIbhtHenX1gGZGD3KYjyz2pzNfjYwzCs/3vF+g== X-Google-Smtp-Source: AGHT+IHt2yWOu6+9RC2uIaYvPVDbHnaey8P8BN9GQCOJRX4NNu4v3o03wDstRePPHI4Qutr45p+Z X-Received: by 2002:a05:622a:1007:b0:42c:5d43:7e77 with SMTP id d7-20020a05622a100700b0042c5d437e77mr23176923qte.7.1708521734480; Wed, 21 Feb 2024 05:22:14 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708521734; cv=pass; d=google.com; s=arc-20160816; b=XlVCjaktTWWUXSfTCTXe2Aja/7PJ4QOnT2kP+DaK1ene9Cszyx1Ox5mQhakUtE+beK xZeLZJFDIVFRO1jZVtUUBwRYgB4z+5gHu8p3MYy7AhJef2868lWTDs9qZYG2QyjQ2UlI 5NGHL3cgXkaXxmEwkMRyMvcN9EGY7TGsvi0qvUV0Hi5CiQdnE9AeuIAvGzSdtk8swvSC ZwNov7QQIpa2bjR5YHWAT+fmXHHngB6IoLKN2e65AG0hGHAlWjZm7DDImgZmHSe1YEIA scNiRvs+eL3mniwO5rD1IAyWddgm9G+Ph6zh2rTa/O1a1r5gb5lXqkvqNtP2kyWKRAwV 6jYA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:content-transfer-encoding:references:in-reply-to:date:cc :to:from:subject:message-id; bh=CMIgKF5feYUj8jUbN4veD1xudlaydTtaxs7cqGCdwL0=; fh=Be99W8jEwNBF4uniPdSFjf/6ogxkgs+UpsvbCRipIJY=; b=tLhITGyS8fiNdkF+RIBvtptHDgv2fYoVXhgh6irnRKT9WF67MO3hkKs7VkCCSDyJHs pVBfuTrXpjimcW5MZ0K1G1J5OvgNxB3yrHOAdFOWzNaqoqnCgRyMqZot+Bue18aP+mbW hUXXc7rKwQFG6aNZBSKKbP+LXuk1XIC1/iW82GRhzaEp7199CNQxZrDWHeeIy65NO0aW ohf1eF56p0tcFNd8ltXzque0qvoBuG2wXvV7LmvLmlWyu9R1SyY/HhvAui4Dl6797Hm6 zO0wiOcQNL+Phe1slt6l4uKbWtpgs3ip0/Hd0kN6rT/w2aS6F9IZdxcyAMuL258eUItT Y0nA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=pengutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-74776-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-74776-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id o5-20020ac87c45000000b0042e16d143bdsi6242369qtv.220.2024.02.21.05.22.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Feb 2024 05:22:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-74776-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=pengutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-74776-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-74776-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 3FC8D1C23132 for ; Wed, 21 Feb 2024 13:22:14 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C5F6F7BB02; Wed, 21 Feb 2024 13:21:38 +0000 (UTC) Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [185.203.201.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B6A313D96B for ; Wed, 21 Feb 2024 13:21:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.203.201.7 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708521698; cv=none; b=DXu4eoSty5lmzAhKs2Wbz5i2uMBzwDI11JzteKTtA+/jo/fQsX9Bg6gtEuqfJRS6y7Jzb5pqNqlQNINQjzed6cl8UvNn0ej5otvFtZwchmQuCbh90IW1aa9rzP2yu4FPK/mV/JbbNAZNY2NDpXlFuwuSvGE5EJ+76+CRelEudm4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708521698; c=relaxed/simple; bh=SI3SEn2rXlKhuuBlz7D1YxEpNb6+9jhtk6arFV0Ido8=; h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References: Content-Type:MIME-Version; b=lEipOPsTcJQpzoBJebab0SIkTbxhy/Ik49tNPhzc4VP4c92ytWQYY/vqO+g9qYvFoZmTEvOxCF+B7odcb7n5nEAbCRVkpprrtEEejxQwL+IMLMDf70jyqNaTyoazj120cvZGh7vgX+GZxWruyouGzDEMwTIB20+IPRZk0bztX20= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de; spf=pass smtp.mailfrom=pengutronix.de; arc=none smtp.client-ip=185.203.201.7 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pengutronix.de Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rcmXM-0002OS-FY; Wed, 21 Feb 2024 14:21:24 +0100 Received: from [2a0a:edc0:0:900:1d::4e] (helo=lupine) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rcmXL-00237x-Gz; Wed, 21 Feb 2024 14:21:23 +0100 Received: from pza by lupine with local (Exim 4.96) (envelope-from ) id 1rcmXL-0009An-1R; Wed, 21 Feb 2024 14:21:23 +0100 Message-ID: <09c275d0f0a1bf85f37635d9570514e8fc631e72.camel@pengutronix.de> Subject: Re: [PATCH v3 4/7] ASoC: codecs: Add RK3308 internal audio codec driver From: Philipp Zabel To: Luca Ceresoli , Nicolas Frattaroli , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Heiko Stuebner , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: Thomas Petazzoni , linux-rockchip@lists.infradead.org, linux-sound@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Date: Wed, 21 Feb 2024 14:21:23 +0100 In-Reply-To: <20240221-rk3308-audio-codec-v3-4-dfa34abfcef6@bootlin.com> References: <20240221-rk3308-audio-codec-v3-0-dfa34abfcef6@bootlin.com> <20240221-rk3308-audio-codec-v3-4-dfa34abfcef6@bootlin.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.46.4-2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: p.zabel@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org On Mi, 2024-02-21 at 11:22 +0100, Luca Ceresoli wrote: > Add driver for the internal audio codec of the Rockchip RK3308 SoC. >=20 > Initially based on the vendor kernel driver [0], with lots of cleanups, > fixes, improvements, conversion to DAPM and removal of some features. >=20 > [0] https://github.com/rockchip-linux/kernel/blob/develop-4.19/sound/soc/= codecs/rk3308_codec.c >=20 > Signed-off-by: Luca Ceresoli > [...] > diff --git a/sound/soc/codecs/rk3308_codec.c b/sound/soc/codecs/rk3308_co= dec.c > new file mode 100644 > index 000000000000..61bfb75f92a3 > --- /dev/null > +++ b/sound/soc/codecs/rk3308_codec.c > @@ -0,0 +1,993 @@ [...] > +static int rk3308_codec_platform_probe(struct platform_device *pdev) > +{ [...] > + rk3308->reset =3D devm_reset_control_get(&pdev->dev, "codec"); > + if (IS_ERR(rk3308->reset)) { > + err =3D PTR_ERR(rk3308->reset); > + if (err !=3D -ENOENT) > + return err; > + > + dev_dbg(&pdev->dev, "No reset control found\n"); > + rk3308->reset =3D NULL; > + } Please use devm_reset_control_get_optional_exclusive(). That already returns NULL instead of -ENOENT if the reset control is not specified in the device tree. Then dev_err_probe() can be used to report errors. regards Philipp