Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1607481pxb; Thu, 4 Mar 2021 16:11:49 -0800 (PST) X-Google-Smtp-Source: ABdhPJz2OpUO3ZnGLjgoSVkZiJO83W9vQN0J7dGq2hvpJLb90tjXIL6pk++S0TAnUckvev7O6w5r X-Received: by 2002:a02:11c9:: with SMTP id 192mr6853983jaf.135.1614903109043; Thu, 04 Mar 2021 16:11:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614903109; cv=none; d=google.com; s=arc-20160816; b=mWcVCgQ/O7+8E28fya4Zpw7M4Pr+7C/E3grAiAh8E+HXyL5PlEWzk6p2ZsvKPmnQbx NgwNGa7XjIRBZ4DP8deHT/V3eqArwGGDfqPqSDS955DFr0ZH49FfNh8hfmkfYPDWyCGO ADjfj9GvVFyKsJZCxDC08QuqHtqT0KWFWFQmXMTfgcUTMiEVi4fa0KpFc+dHsgSZasIB IapnD69UX8zMb/M2qcaKZLCpmd2S3A4KVOcHiNBW7i4xJWnXfd0+lJYWg9hRAbrSLo5+ YsqECXIxmiiT6tBfZbyRBdsewejhYN4m81zcWVtdwsKsL1MFnaXh7AN8opwbTmrP1W7S 7CjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent :content-transfer-encoding:references:in-reply-to:date:cc:to:from :subject:message-id; bh=6tuWbSOUhEucBmb8hKVW5oN8k4dtI0TMWykRXNssFm8=; b=EN3ZkxXmrLj+KCsG3/6naQbGgKA1SWiaC7MuYpvXCRss2pTQIcLFuGZOdSlvrOgGM5 u4/qUscCHokFvw+j99ZQV8olQ3Aa4STZ0EzsOLDICz39EP3MHEFMuhEP6Mxat4qXa5yO tNqMycCqUrCbonCKwqNfm8eCFHRBueZgmN3FRU/M4rFhUpdDv915SGa6sc7fXw0HVWAD NyGNeO2C4We8NpCmqfIHph7Z/N8Ljn7g81cKyAhiO2SiB3ubJ+xNrVcODPODWO/iuprF glKzfTbHW0d1ZbKWD5jOMCLUBnWkku7mOyo0neJOgXar3USSVQeZ7YYU3PJ+suIgjm0v xfxQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b3si686236ile.22.2021.03.04.16.11.35; Thu, 04 Mar 2021 16:11:49 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232221AbhCDLz3 convert rfc822-to-8bit (ORCPT + 99 others); Thu, 4 Mar 2021 06:55:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57540 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229526AbhCDLzH (ORCPT ); Thu, 4 Mar 2021 06:55:07 -0500 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D3E3FC061574 for ; Thu, 4 Mar 2021 03:54:26 -0800 (PST) Received: from lupine.hi.pengutronix.de ([2001:67c:670:100:3ad5:47ff:feaf:1a17] helo=lupine) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lHmYg-0001x8-GK; Thu, 04 Mar 2021 12:54:22 +0100 Received: from pza by lupine with local (Exim 4.92) (envelope-from ) id 1lHmYf-0004l2-GS; Thu, 04 Mar 2021 12:54:21 +0100 Message-ID: Subject: Re: [PATCH v4 06/13] phy: cadence: cadence-sierra: Move all reset_control_get*() to a separate function From: Philipp Zabel To: Kishon Vijay Abraham I , Vinod Koul , Rob Herring , Swapnil Jakhade Cc: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Lokesh Vutla Date: Thu, 04 Mar 2021 12:54:21 +0100 In-Reply-To: <20210304044122.15166-7-kishon@ti.com> References: <20210304044122.15166-1-kishon@ti.com> <20210304044122.15166-7-kishon@ti.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT User-Agent: Evolution 3.30.5-1.1 MIME-Version: 1.0 X-SA-Exim-Connect-IP: 2001:67c:670:100:3ad5:47ff:feaf:1a17 X-SA-Exim-Mail-From: p.zabel@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2021-03-04 at 10:11 +0530, Kishon Vijay Abraham I wrote: > No functional change. Group devm_reset_control_get() and > devm_reset_control_get_optional() to a separate function. > > Signed-off-by: Kishon Vijay Abraham I > --- > drivers/phy/cadence/phy-cadence-sierra.c | 36 ++++++++++++++++-------- > 1 file changed, 25 insertions(+), 11 deletions(-) > > diff --git a/drivers/phy/cadence/phy-cadence-sierra.c b/drivers/phy/cadence/phy-cadence-sierra.c > index 7bf1b4c7774a..935f165404e4 100644 > --- a/drivers/phy/cadence/phy-cadence-sierra.c > +++ b/drivers/phy/cadence/phy-cadence-sierra.c > @@ -509,6 +509,28 @@ static int cdns_sierra_phy_get_clocks(struct cdns_sierra_phy *sp, > return 0; > } > > +static int cdns_sierra_phy_get_resets(struct cdns_sierra_phy *sp, > + struct device *dev) > +{ > + struct reset_control *rst; > + > + rst = devm_reset_control_get(dev, "sierra_reset"); Please use rst = devm_reset_control_get_exclusive(dev, "sierra_reset"); here ... > + if (IS_ERR(rst)) { > + dev_err(dev, "failed to get reset\n"); > + return PTR_ERR(rst); > + } > + sp->phy_rst = rst; > + > + rst = devm_reset_control_get_optional(dev, "sierra_apb"); ... and rst = devm_reset_control_get_optional_exclusive(dev, "sierra_apb"); here (no functional change). With that, Reviewed-by: Philipp Zabel regards Philipp