Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp327784ybk; Wed, 20 May 2020 00:16:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzsWQHx+rJdY3AJ8WJajx8UxZWTbN45s/1rRtXPp511v9wkbhLCHgURMSSqrNOoYy6wDv04 X-Received: by 2002:a05:6402:169a:: with SMTP id a26mr2044916edv.321.1589958991271; Wed, 20 May 2020 00:16:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589958991; cv=none; d=google.com; s=arc-20160816; b=GH/ctZtQCONCM9mOld0a0FSPOeiKjnWVYe5LS/Ei7wCP+qSu/S13Jwu3jF/dokVXOw nv3SLqxBqqHc5Qem3ad9SHZn14n7OlKLxJ7ksMVH8wyIyRl4nsbRHpmfYNaUXzTL33aD HfyN49GP5QiDq6A/BywI1dAu+nGY2n23/8L61L2f3409XAOi4nybvw7y1t/LIHtlehMc KOnR6wr65jGdrIKA9cdgmLlC4u6v6PbY7ZDS07D/aJlQWdllVCOLGmj8BNtyFk04X7A3 rKdntelcRmCOmA7dt+GU/0Y/nHTmCgc7eEqYiz45lXWH7bW/CkdFTRZ+zuEAWtRwT4s5 knZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=v8YCDZZ3pKMrP8ELAcXKLBWyM9D5ZuSolbkNTyJecrI=; b=HrR+uXuogl3uGGqZgXn13LQZf/zoyIdHJ9TO66Kvt98dtZVI1JnSEcB7UFY2YDZhME ARHetYzTB/g0oLSmOWTsfZRDtQB1HfywZubQfW1KnkHH6mE0NWJjjlIb/2lx8Oh36WwX mE5m4NxqyOr+VqJcocom3JjTyaI6hqsKppuzdOQp9tdPPp5B3nF7g0XKvu6Gz8jUBln/ j4FPtrXmSw1AHCX5pIjKGnzFI6swiEenZ80qzOe1MvIn/SEaly87CWHuXzULUk9ADNwl KEhSkkgdVlAiPuywfNBNDjKs/wkUR5rfpWaASu4l5mEzDaBUpfX7VLJlOXZJeQflsVyS rO1A== 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 bt16si994991edb.306.2020.05.20.00.16.08; Wed, 20 May 2020 00:16:31 -0700 (PDT) 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 S1726545AbgETHOZ (ORCPT + 99 others); Wed, 20 May 2020 03:14:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44518 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726401AbgETHOX (ORCPT ); Wed, 20 May 2020 03:14:23 -0400 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 C6C99C061A0F for ; Wed, 20 May 2020 00:14:23 -0700 (PDT) Received: from ptx.hi.pengutronix.de ([2001:67c:670:100:1d::c0]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jbIvl-0004Kb-KV; Wed, 20 May 2020 09:14:21 +0200 Received: from pza by ptx.hi.pengutronix.de with local (Exim 4.92) (envelope-from ) id 1jbIvj-0001XJ-8J; Wed, 20 May 2020 09:14:19 +0200 Date: Wed, 20 May 2020 09:14:19 +0200 From: Philipp Zabel To: Jim Quinlan Cc: Nicolas Saenz Julienne , Jens Axboe , "open list:LIBATA SUBSYSTEM (Serial and Parallel ATA drivers)" , open list Subject: Re: [PATCH 02/15] ahci_brcm: fix use of BCM7216 reset controller Message-ID: <20200520071419.GA5213@pengutronix.de> References: <20200519203419.12369-1-james.quinlan@broadcom.com> <20200519203419.12369-3-james.quinlan@broadcom.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200519203419.12369-3-james.quinlan@broadcom.com> X-Sent-From: Pengutronix Hildesheim X-URL: http://www.pengutronix.de/ X-IRC: #ptxdist @freenode X-Accept-Language: de,en X-Accept-Content-Type: text/plain X-Uptime: 09:10:42 up 90 days, 14:41, 103 users, load average: 0.85, 0.58, 0.33 User-Agent: Mutt/1.10.1 (2018-07-13) X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::c0 X-SA-Exim-Mail-From: pza@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 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Jim, On Tue, May 19, 2020 at 04:34:00PM -0400, Jim Quinlan wrote: > From: Jim Quinlan > > A reset controller "rescal" is shared between the AHCI driver > and the PCIe driver for the BrcmSTB 7216 chip. The code is > modified to allow this sharing and to deassert() properly. > > Signed-off-by: Jim Quinlan > --- > drivers/ata/ahci_brcm.c | 14 +++++--------- > 1 file changed, 5 insertions(+), 9 deletions(-) > > diff --git a/drivers/ata/ahci_brcm.c b/drivers/ata/ahci_brcm.c > index 6853dbb4131d..a3c32fc29e9c 100644 > --- a/drivers/ata/ahci_brcm.c > +++ b/drivers/ata/ahci_brcm.c > @@ -428,7 +428,6 @@ static int brcm_ahci_probe(struct platform_device *pdev) > { > const struct of_device_id *of_id; > struct device *dev = &pdev->dev; > - const char *reset_name = NULL; > struct brcm_ahci_priv *priv; > struct ahci_host_priv *hpriv; > struct resource *res; > @@ -452,11 +451,11 @@ static int brcm_ahci_probe(struct platform_device *pdev) > > /* Reset is optional depending on platform and named differently */ > if (priv->version == BRCM_SATA_BCM7216) > - reset_name = "rescal"; > + priv->rcdev = devm_reset_control_get_shared(&pdev->dev, > + "rescal"); With this change the "rescal" reset control is not optional anymore. Please use devm_reset_control_get_optional_shared() or change the comment. > else > - reset_name = "ahci"; > - > - priv->rcdev = devm_reset_control_get_optional(&pdev->dev, reset_name); > + priv->rcdev = devm_reset_control_get_optional(&pdev->dev, > + "ahci"); You can use devm_reset_control_get_optional_exclusive() here to make it clear this requests an exclusive control. regards Philipp