From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C8107C433F5 for ; Thu, 16 Dec 2021 05:04:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=xrfGz2qsa7cxGq3RAraLppr3VOYLHXKiFos/9nwA2PY=; b=MqntU7NzhJI/gP I2Wza0Kz2Y1wTmCG+l0vSj+nDEsrTkrX2v+pr7bOAJBUkknVk0F02CnWO+2HSZVIcBzFTIEQObhil UUgduOVE5YAh8MrkGNerFgMLWC3yV5ea4aYnbRy/buw+lpwGEnoTah92actJG0HR1GHy0e2+E+mKk svNL35gquZFPTTf+MxLdb2ffzphZDJOsIPQvD2ybMo/ZYAauX5TJZgp8eVgT8SBS3i5yYWxTXzTw0 bkfgDAzOPA5Ty6WGoT5zkBsp0u6jrhLghBwmedaV/Mi/2NAXnQRHs2UlgPdD8i6Z2SZiGvY/ouzr0 p5moge8e0lTNRIW28ENg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mxiux-003ZzJ-P5; Thu, 16 Dec 2021 05:02:59 +0000 Received: from mail-pg1-x52d.google.com ([2607:f8b0:4864:20::52d]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mxiut-003ZyC-0W for linux-arm-kernel@lists.infradead.org; Thu, 16 Dec 2021 05:02:56 +0000 Received: by mail-pg1-x52d.google.com with SMTP id r138so21953877pgr.13 for ; Wed, 15 Dec 2021 21:02:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=pfDndh5e7Tg9q69/YQCj2DgRuK6iAt8tciGnd8xjSmI=; b=mQ60iAZHmviFhEZtFnaYnuwg7xBPRGJJ8/24Gz5sxtDAv4ZjLaJWmxB+KO0MAA13tO Qd1nmvYJFU8zT5YOa1qI7rWVU4gKTR3/dJHiPA7L7fdo2Wjfu2vHT7klLTbcde6k8HVX 2009CeKdaus3+e1oCfWW3eZDD1BwKTMVXB3+foDdqUGH+nbAyjyQbo5I7KliLtVRCRkA +Cn8geXx9lHF5vZv6SepQssTvui2xIxZSOEU4EFH+kg+7OfgAROubebzmmfGsOQo/hSq ivD92P1tFRDCCukstrweUvb/gdLH3WJ0jK/fA990hefh/eT/yV6CSscXz3DBV0Qnc+OW Asaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=pfDndh5e7Tg9q69/YQCj2DgRuK6iAt8tciGnd8xjSmI=; b=y1cntc97+oUEjEQh/jBj6hifo1xq2sJn03MfHUuvitycfYPbpj8rZrH3o+88sOmiHD gXmaIpedf8Uu1wAizmh8wWlwR206kj4BmyiLdzl2dSOnWVv+qOBRP8WVwQdWu5Xmn0pD rCfivUWpkJNbmiArNJDlrhdFkOe35Xif3+W8UGL2eEKfDUz3bEC5jNN1Elj4wlcdqNTb CvGHrJ5ONhFdJVZ43xZosZ81yDLjvRnXgVAyCzk9NXedvMNa4UHAnk79ou8ji14QAjA3 utmZMNfH1nJwQCL2Mw+cUcdwlLxklx4i93dIj0jShrlwxDGfajB5Ec5dV+i/XF3p4T4Y EEsA== X-Gm-Message-State: AOAM533WKCSkYOWCCZrotPZua7Ad+3ZiIatnBeiXejsT08IUVjGuhcKb hS+GN3kkirmC/3Tg/GQDkVFu1w== X-Google-Smtp-Source: ABdhPJwVq8Jr3aN71SKClzCOk34eBWZvVcMoOmFxHXjyNBwML3uULOKbn6p3eon3jHFwIvPuypS/8w== X-Received: by 2002:a63:5a18:: with SMTP id o24mr10519774pgb.459.1639630970703; Wed, 15 Dec 2021 21:02:50 -0800 (PST) Received: from google.com ([2401:fa00:1:10:af33:9cc2:c307:ce8c]) by smtp.gmail.com with ESMTPSA id j22sm4599968pfj.130.2021.12.15.21.02.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Dec 2021 21:02:50 -0800 (PST) Date: Thu, 16 Dec 2021 13:02:47 +0800 From: Tzung-Bi Shih To: Trevor Wu Cc: broonie@kernel.org, tiwai@suse.com, robh+dt@kernel.org, matthias.bgg@gmail.com, alsa-devel@alsa-project.org, linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, jiaxin.yu@mediatek.com, shumingf@realtek.com Subject: Re: [PATCH 1/2] ASoC: mediatek: mt8195: update control for RT5682 series Message-ID: References: <20211215065835.3074-1-trevor.wu@mediatek.com> <0b99c46f84c98c56e8fc99b2e103f52f756b5bf9.camel@mediatek.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <0b99c46f84c98c56e8fc99b2e103f52f756b5bf9.camel@mediatek.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211215_210255_081234_FD708AC7 X-CRM114-Status: GOOD ( 17.16 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, Dec 16, 2021 at 11:37:34AM +0800, Trevor Wu wrote: > On Wed, 2021-12-15 at 16:20 +0800, Tzung-Bi Shih wrote: > > On Wed, Dec 15, 2021 at 02:58:34PM +0800, Trevor Wu wrote: > > > @@ -1072,6 +1119,19 @@ static int > > > mt8195_mt6359_rt1011_rt5682_dev_probe(struct platform_device *pdev) > > > return -EINVAL; > > > } > > > > > > + priv->i2so1_mclk = devm_clk_get(&pdev->dev, "i2so1_mclk"); > > > + if (IS_ERR(priv->i2so1_mclk)) { > > > + ret = PTR_ERR(priv->i2so1_mclk); > > > + if (ret == -ENOENT) { > > > + dev_dbg(&pdev->dev, > > > + "Failed to get i2so1_mclk, defer > > > probe\n"); > > > + return -EPROBE_DEFER; > > > + } > > > > Does devm_clk_get_optional() could make the block more concise? > > Even though we use devm_clk_get_optional, we still have to handle the > (-ENOENT) case in probe function. In my opinion, original > implementation could be kept. I am neutral to my original suggestion but devm_clk_get_optional() returns NULL if -ENONENT. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel