Received: by 2002:a05:7412:7c14:b0:fa:6e18:a558 with SMTP id ii20csp336786rdb; Mon, 22 Jan 2024 05:59:29 -0800 (PST) X-Google-Smtp-Source: AGHT+IE2f0+J29ssHJVKF/43UmimB4+vJ8dQ6rdt8+vBCUplce1b8Wvf4Zi1UBac78rOoYQMpo8f X-Received: by 2002:a92:da0f:0:b0:361:993b:7f3 with SMTP id z15-20020a92da0f000000b00361993b07f3mr5854329ilm.11.1705931969639; Mon, 22 Jan 2024 05:59:29 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705931969; cv=pass; d=google.com; s=arc-20160816; b=Q6MD2P+Lc5LRWF0BewGC9bj6Msdc6Ym0gkcOUWD10u0GBsmNH3b8pIFDLkf4pw7Xx0 AG0Oa9cYyj4TKMp5wa23n0FB9NqBgYWoUGIGc0EBbOXII+D5UC99gdqzehfRVVi1NQSn 5VJf8vt7Y8v/+xe85N+RMd563soSYpfE7KbAUHqCYnCVfDj1HW4EAUtzpndpU6W+OGBS 1Na38lDPlkzIKX4ojcVGsGjSNTapEmqptBJhZnyeDC8sTxFxjNiSEGZuPtquP2ytkfPg j0i+3xxfPZFuESFysANx1eK4Fvh8cm3DxfyukJYaNyitA/Qb15ukrwurNv3zmTvDiYdJ j1lg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=pm2aVaMXozHElGFg/nnrwpFyCR0LOsEomV4/ji1yL1Y=; fh=8GlNGXCJ4eOlrP/5jaJPf3zvMo7SF22aTxtkiC+zrgI=; b=cwf2lnOx2MzXMW+ivScMU9ZzEtxA21LhqI4XcAf6orhj+B9MdhS4+2j1F1virjSvPO IgQdGnlH/xjeCRpq8qikphetb9puOvaiY5FP7BR8ycDOvn5fPecSBvq0041vZoZLkqmd WEAhJcHa+BJnXkHYupq4EfOJZFWUBk43R42oEhHvVNDmhiQyEAkhy/2RPVCJw6zaBIyO UwUFKwZ+feV4UmT3isCqk3s+1j9o5ozNAEiKCb6yCFZD423lgiRiJaGyOBorshoXts/w 9Z9RPKn4Nbgc3MHhquQvX5LfFEqO/UhAdj5rhc4Qzcg32gjHq0kweDmA640UXGcWqLyM 3aOQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Orqi7aiC; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-33096-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-33096-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id u2-20020a63df02000000b005cfbea76cfesi4102804pgg.165.2024.01.22.05.59.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jan 2024 05:59:29 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-33096-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Orqi7aiC; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-33096-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-33096-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 83BE0B23081 for ; Mon, 22 Jan 2024 13:28:48 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 22B293CF7D; Mon, 22 Jan 2024 13:28:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Orqi7aiC" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.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 4D7903CF63; Mon, 22 Jan 2024 13:28:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705930120; cv=none; b=m6cS1cQTZjOEu9hGfOOmRmcveM7q8pbFqPclY9Xvha5+OEwqPfIziwcWSGGYqfaoy2SBbkDhYUuk2nyaHU/WPspYddsnX1qMqIrqIS1s3lCD4UKVDqpeu9Gmf5CTOIBx529DmAuaM5z+ZrUFsala4iIdck+LtUM24aMW53sDv+A= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705930120; c=relaxed/simple; bh=AznU8j2SdYTSEwJC02gNSrCDmEKaUE5Gb5SSkPG/ikk=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=T5anx7uZMEB28NQ9rLf5QBfGVhaMYjLobVh/teqb84YjfhaNi2D3EHK5J2131MWQ2824I+sggrWfm6FH3Si2yGheQ9A/BZEcNO6inJ4ViJTRE6JMYQ/jVuyCHD+WqpOH3k3yYrSvY4+BwxlQrn9tUMh0CeOrb+nsPu1/dcu3BH8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Orqi7aiC; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 597BAC433F1; Mon, 22 Jan 2024 13:28:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1705930119; bh=AznU8j2SdYTSEwJC02gNSrCDmEKaUE5Gb5SSkPG/ikk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Orqi7aiC+MyAfrSUnAhgP70oXz5dI7MFqSKqRDMj+ItUyiUhpnc0EkdZbiF1uRd+D GdGn4aHFa0wrO8UzM9Lkl+JoDb2gEv35fDMn+p0fxkZTjAIHV6cPgHrcNWIaZ69yvA qbsE1jDGAnMzcPieSig70g02DgIo49lf3PGqweQlCUmu4y2CayoEBVFM+k8InFT7BV doe8bzRFgDFwtVt44nIb74UYVfLOyH7TAhKTZT54VlcPWJc1fXJYZRX2QhClsuE54n 7T4BR/ILR3EK8ORRDsOuKacfvP4q01IQZa5WVgNsyWavrLNpSgDt44NtpjTJ+IjyNd Jj/Cw4KQG62tQ== Date: Mon, 22 Jan 2024 14:28:32 +0100 From: Niklas Cassel To: Radhey Shyam Pandey Cc: dlemoal@kernel.org, richardcochran@gmail.com, piyush.mehta@xilinx.com, axboe@kernel.dk, michal.simek@amd.com, linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org, git@amd.com, Piyush Mehta Subject: Re: [PATCH 2/2] ata: ahci_ceva: add missing enable regulator API for Xilinx GT PHY support Message-ID: References: <1705604904-471889-1-git-send-email-radhey.shyam.pandey@amd.com> <1705604904-471889-3-git-send-email-radhey.shyam.pandey@amd.com> 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-Disposition: inline In-Reply-To: <1705604904-471889-3-git-send-email-radhey.shyam.pandey@amd.com> Hello Radhey, On Fri, Jan 19, 2024 at 12:38:24AM +0530, Radhey Shyam Pandey wrote: > From: Piyush Mehta > > The regulators API are disabled and enabled, during suspend and resume, > respectively. The following warning notice shows up on the initial suspend > because the enable regulators API is unaddressed in the probe: Please be a bit more specific in your commit message. e.g. during system suspend, ahci_platform_suspend() calls ahci_platform_disable_resources() which calls ahci_platform_disable_regulators() which calls regulator_disable() for all regulators found in the controller. > > regulator-dummy: Underflow of regulator enable count > > Added the ahci_platform_enable_regulators API in probe to maintain the > regulator enabled and disabled ref count. s/Added/Add/ "Describe your changes in imperative mood, e.g. "make xyzzy do frotz" instead of "[This patch] makes xyzzy do frotz" or "[I] changed xyzzy to do frotz", as if you are giving orders to the codebase to change its behaviour." see: https://www.kernel.org/doc/html/latest/process/submitting-patches.html#describe-your-changes > > Fixes: 9a9d3abe24bb ("ata: ahci: ceva: Update the driver to support xilinx GT phy") > Signed-off-by: Piyush Mehta > Signed-off-by: Radhey Shyam Pandey > --- > drivers/ata/ahci_ceva.c | 10 +++++++++- > 1 file changed, 9 insertions(+), 1 deletion(-) > > diff --git a/drivers/ata/ahci_ceva.c b/drivers/ata/ahci_ceva.c > index bfc513f1d0b3..1c56f0cabb11 100644 > --- a/drivers/ata/ahci_ceva.c > +++ b/drivers/ata/ahci_ceva.c > @@ -219,9 +219,14 @@ static int ceva_ahci_probe(struct platform_device *pdev) > if (rc) > return rc; > } else { > - rc = ahci_platform_enable_clks(hpriv); > + rc = ahci_platform_enable_regulators(hpriv); > if (rc) > return rc; > + > + rc = ahci_platform_enable_clks(hpriv); > + if (rc) > + goto disable_regulator; > + Like I wrote in patch 1/2, I would prefer if you could somehow get ahci_platform_enable_resources() to work for your platform, so that you don't need to copy paste all of ahci_platform_enable_resources() to your driver. If it does not work to simply add a reset_control_assert() + usleep(), considering that this function is essentially a copy paste of ahci_platform_enable_resources(), I would still prefer the addition of a new flag, and keep the extra logic needed in libahci_platform.c, so that the code is kept in the same place, rather than to copy paste the whole function to your driver. Kind regards, Niklas > /* Assert the controller reset */ > reset_control_assert(cevapriv->rst); > > @@ -340,6 +345,9 @@ static int ceva_ahci_probe(struct platform_device *pdev) > disable_clks: > ahci_platform_disable_clks(hpriv); > > +disable_regulator: > + ahci_platform_disable_regulators(hpriv); > + > return rc; > } > > -- > 2.34.1 >