Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp2439240pxb; Tue, 12 Oct 2021 06:43:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyOIXyXnAN1/ZdXSxE9ERgWpX8hcKSPvgMeIFgFlzPVjt1N3svR9tCANoVscXGEWcs/KxJQ X-Received: by 2002:a17:907:2071:: with SMTP id qp17mr32561518ejb.41.1634046187452; Tue, 12 Oct 2021 06:43:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634046187; cv=none; d=google.com; s=arc-20160816; b=lPXnQJFSct04+JJuRsArUyPVJZ1008qxZBdkqcCGBVW/an2xFa9308p+tY4f248cUZ hQXFDAwINt52G3bKlxRuHbsJS8PVCD0BX825EKfCW7gS1YJvzL1WmiRlNb5EkcgA8nYG asZqJ0wnAGAYglLngYBQ32npqI4+0VP4FE45M7V5f7J6JE63KlHOGLJWmg/BfmpUsWsD GPbOG3rQzQsekIsSUZ0wSqbRj6/9U0vu3JgE5ConaqW2a0kyDt55k/BEPsM1mzn+KcDc 8nw4fBI51gQseDhuXW6FEaozEvRysTwnizQRCjAtKa+CAhZCPcYdqTJfn6XIfbdi1uBn J23g== 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:to:from :subject:message-id; bh=H2znTJihi2q6lh5UkySkCfy+RMLV0DzsX4in4FZjvCk=; b=Zjz34lhnEZzkJ66V1dM9t5kAs8zB3u53kFoPWJRfW6goirpx9u4mmxdVrS/AxnH5jw X3hEHhUE2AMuUIbsAyrlKZpM4lQjFnYTTcWO7wAAylTUK1BCbdGrBMj68SotPt+hL/ou N6egyVcgirGhln0Tf153gDyuw0+QemYm7MMuJYUUKRPrzvZzZ58MB4EkEXl1cyhZBnAq CcjKybYXzcDHfW+KZvzqA0HgyubsVMLj342VkdDpaI7OlwkO3K8PbEF1s1XblETsw+dn 7Cu1R8vUIO3FfbHj7ybZJ8hVJSrE5KpWAhQs6Bw83bgb/QKcni9yMy7U02/Vjx+SO3ef ziSA== 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 jx12si15430169ejc.294.2021.10.12.06.42.42; Tue, 12 Oct 2021 06:43:07 -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 S236773AbhJLNmx convert rfc822-to-8bit (ORCPT + 99 others); Tue, 12 Oct 2021 09:42:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48362 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236394AbhJLNmx (ORCPT ); Tue, 12 Oct 2021 09:42:53 -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 AD33BC061570 for ; Tue, 12 Oct 2021 06:40:51 -0700 (PDT) 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 1maI1L-0002rR-92; Tue, 12 Oct 2021 15:40:43 +0200 Received: from pza by lupine with local (Exim 4.92) (envelope-from ) id 1maI1K-0001pd-Qa; Tue, 12 Oct 2021 15:40:42 +0200 Message-ID: Subject: Re: [PATCH] pinctrl: microchip sgpio: use reset driver From: Philipp Zabel To: Horatiu Vultur , lars.povlsen@microchip.com, Steen.Hegelund@microchip.com, UNGLinuxDriver@microchip.com, linus.walleij@linaro.org, linux-arm-kernel@lists.infradead.org, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org Date: Tue, 12 Oct 2021 15:40:42 +0200 In-Reply-To: <20211012122435.2081930-1-horatiu.vultur@microchip.com> References: <20211012122435.2081930-1-horatiu.vultur@microchip.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 Tue, 2021-10-12 at 14:24 +0200, Horatiu Vultur wrote: > On lan966x platform when the switch gets reseted then also the sgpio > gets reseted. The fix for this is to extend also the sgpio driver to > call the reset driver which will be reseted only once by the first > driver that is probed. > > Signed-off-by: Horatiu Vultur > --- > drivers/pinctrl/pinctrl-microchip-sgpio.c | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/drivers/pinctrl/pinctrl-microchip-sgpio.c b/drivers/pinctrl/pinctrl-microchip-sgpio.c > index 072bccdea2a5..e8a91d0824cb 100644 > --- a/drivers/pinctrl/pinctrl-microchip-sgpio.c > +++ b/drivers/pinctrl/pinctrl-microchip-sgpio.c > @@ -17,6 +17,7 @@ > #include > #include > #include > +#include > > #include "core.h" > #include "pinconf.h" > @@ -803,6 +804,7 @@ static int microchip_sgpio_probe(struct platform_device *pdev) > int div_clock = 0, ret, port, i, nbanks; > struct device *dev = &pdev->dev; > struct fwnode_handle *fwnode; > + struct reset_control *reset; > struct sgpio_priv *priv; > struct clk *clk; > u32 val; > @@ -813,6 +815,10 @@ static int microchip_sgpio_probe(struct platform_device *pdev) > > priv->dev = dev; > > + reset = devm_reset_control_get_shared(&pdev->dev, "switch"); This seems to be missing an update to the devicetree binding. Just to make sure we aren't introducing a circular dependency here, are the PHY reset GPIOs that are toggled by the "switch" reset controller in [1] provided by one of the sgpio controllers? [1] https://lore.kernel.org/all/20211012114238.2060101-3-horatiu.vultur@microchip.com/ regards Philipp