Received: by 2002:a89:2c3:0:b0:1ed:23cc:44d1 with SMTP id d3csp420176lqs; Tue, 5 Mar 2024 06:07:52 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCU4QhqwS1+DfC3RYrUzDVL/AUBFaOWpFvgtIonmgzJ9PCU0jFTgFuvJchvxw0j//J7lqPb1wg8aex8vE+vPv+Xc9xldWuHWPA3jqBP9TQ== X-Google-Smtp-Source: AGHT+IHsvAnU2lbuoGjfRNpk5vYDqWilW+Fa2TWkfO2VJPWI9mnea7Hc2ksD6/8N4e++ue9s53sc X-Received: by 2002:ac8:5743:0:b0:42e:f5f8:eaa6 with SMTP id 3-20020ac85743000000b0042ef5f8eaa6mr2125969qtx.37.1709647672196; Tue, 05 Mar 2024 06:07:52 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709647672; cv=pass; d=google.com; s=arc-20160816; b=hXVo21inbFeOENht+d12nCU57Vg78CLZh0jGGQn67zuB+gKzGeK2daMDp7dxFX+oc7 NKwuABRmxRIYbZ+cZ/LqyDHFCjUYSAsoX52GrnjE1k1FO7JH+iYupHJ5q1kX+V91uYpk teKf75d/IiJZqKAXtlzZC3F+0JOZKiuVBSwNrBEFqqzbHFLmU0e/YeQ/fqv4BUVRRz7r EsaP0MeLMzdQtQoqju3noyiJZQua51kwaTggDBtWNKupLrPh7OWf46Y/v799uXWFlRAy AqrgWPQbJu9aLRil5TBloWwFkSFjSz+lPeLrEh7dm6QIOskv4xc8DkWggZca83/PxyQb hJlg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:organization:references :in-reply-to:message-id:subject:cc:to:from:date:dkim-signature; bh=mlSdtS9gPl3MStQDE6pU+wB4e620UH09fdWfMjz3JdY=; fh=EK8I8sd7ADpIgzcS5U/pliivVdUj3yYMh5bOxYyAlZc=; b=EIUKtycPgoWpebPyAz/K6Vtn9OjlseH0LBG/9w7gW0k6Olm4D/6G7D097+6/kUQxEs 1cOOzNL1xyy1nkMaVWH0s0jeWclK7jbQND/Nmi4N3n19Zrd13f9atJy4ef9hucOyUEeI Of2I6+xDxqFoVSs/qfYnQkSPnVl7/83csIILKclOZy3BQplcHyrEMNG5zHVWca+17Xqr R0X/mFm32d010KI6Yb3WPlgNIePG1YAkF8HIr0KpnYUSNMKcEXfUHAnL7Zuvj4VTmFLa LU6FyzPFnLtx6Ix6duQD+0syjMZXPATPUNF0KIs8T0c9jszsCM/ippX4/YSrHTInUiD6 78IA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b="mKJ/As3N"; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-kernel+bounces-92489-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-92489-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id l20-20020a05622a051400b0042eee3c7489si5141845qtx.299.2024.03.05.06.07.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Mar 2024 06:07:52 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-92489-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; dkim=pass header.i=@bootlin.com header.s=gm1 header.b="mKJ/As3N"; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-kernel+bounces-92489-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-92489-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com 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 D37C01C21966 for ; Tue, 5 Mar 2024 14:07:51 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BE3E186140; Tue, 5 Mar 2024 14:07:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="mKJ/As3N" Received: from relay8-d.mail.gandi.net (relay8-d.mail.gandi.net [217.70.183.201]) (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 9C90E8663E; Tue, 5 Mar 2024 14:07:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709647644; cv=none; b=NacoEkipkNaQorFsWzTC0kk+bPwgKofL5PMzHxk017DLNoIo3OtIOD1e6NXg7RcN8UbgT2BNruD/MW5RTRdoA58HjBhvaQZhMIDLPJScb0WwMECGmSl1ryqL4CYgaDNUt0fXsxI4hQFiJq1zdZY5HGedJqNz15po1zJl1Iajazo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709647644; c=relaxed/simple; bh=OCWByTDlSAOYwh/VIzepEs26ct4znatcq/z2wwX8uS8=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=jcm2GEe1AnLUxKfUk+L+0uSbJDRzSF2M9tmz5249FUnREJKsj3dTWLkXR66pBVzLUMLITDvEOZPWGYAoD3DiOK9sT78idQLHxekXVFfzrkDskopG5oYXCLAXeH1+Hz8sAziwdqaRRuyeUqVOmQLZ8w/Kw7R+xjrWKuIrog01MMo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=mKJ/As3N; arc=none smtp.client-ip=217.70.183.201 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Received: by mail.gandi.net (Postfix) with ESMTPSA id 974621BF20A; Tue, 5 Mar 2024 14:07:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1709647639; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=mlSdtS9gPl3MStQDE6pU+wB4e620UH09fdWfMjz3JdY=; b=mKJ/As3NrkbIh4PqASWy22hOM4m+EZHgPI+zhZQrt886iDFGwkdhs8cK5LSEZHlRUbVD7J c7gx2HJ7SrSF1AXWtqe70ZWhjiOFzpE6or4k+k7JaHKoojt9TQzfREwGwIu3Zmm9Tk9p4X 84q8AGfD9BW+fuoqymLP5MswVra4Wa44dcIWDJASp6/tMbEfUurr0NqwX5/Kacul2npFcU gfJndI9ZTkBq924ykcXEhGAoaI1U3t5rdSpaN0U8+aKBa9m1aGxeTuf/pxA4DwRAS+m+sJ 1bkxO0ZxdojAXtO+RHCjuqZIMygma3rFAfi2SyNMjO2uuy5+jEpbdcXkTl4PZg== Date: Tue, 5 Mar 2024 15:07:16 +0100 From: Luca Ceresoli To: Philipp Zabel Cc: Nicolas Frattaroli , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Heiko Stuebner , Rob Herring , Krzysztof Kozlowski , Conor Dooley , 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 Subject: Re: [PATCH v3 4/7] ASoC: codecs: Add RK3308 internal audio codec driver Message-ID: <20240305150716.0fca0e33@booty> In-Reply-To: <09c275d0f0a1bf85f37635d9570514e8fc631e72.camel@pengutronix.de> References: <20240221-rk3308-audio-codec-v3-0-dfa34abfcef6@bootlin.com> <20240221-rk3308-audio-codec-v3-4-dfa34abfcef6@bootlin.com> <09c275d0f0a1bf85f37635d9570514e8fc631e72.camel@pengutronix.de> Organization: Bootlin X-Mailer: Claws Mail 4.0.0 (GTK+ 3.24.33; x86_64-pc-linux-gnu) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-GND-Sasl: luca.ceresoli@bootlin.com Hello Philipp, On Wed, 21 Feb 2024 14:21:23 +0100 Philipp Zabel wrote: > On Mi, 2024-02-21 at 11:22 +0100, Luca Ceresoli wrote: > > Add driver for the internal audio codec of the Rockchip RK3308 SoC. > > > > Initially based on the vendor kernel driver [0], with lots of cleanups, > > fixes, improvements, conversion to DAPM and removal of some features. > > > > [0] https://github.com/rockchip-linux/kernel/blob/develop-4.19/sound/soc/codecs/rk3308_codec.c > > > > Signed-off-by: Luca Ceresoli > > > [...] > > diff --git a/sound/soc/codecs/rk3308_codec.c b/sound/soc/codecs/rk3308_codec.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 = devm_reset_control_get(&pdev->dev, "codec"); > > + if (IS_ERR(rk3308->reset)) { > > + err = PTR_ERR(rk3308->reset); > > + if (err != -ENOENT) > > + return err; > > + > > + dev_dbg(&pdev->dev, "No reset control found\n"); > > + rk3308->reset = 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. Good point, thanks. Queued for v4. Best regards, Luca -- Luca Ceresoli, Bootlin Embedded Linux and Kernel engineering https://bootlin.com