Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp2154143pxb; Wed, 9 Feb 2022 12:01:59 -0800 (PST) X-Google-Smtp-Source: ABdhPJwDGHOtelB6lFZS5k1CNNXb+Auoe1zHWIUyA9zwS1REAsTkMDVmyvgh0AuMQP9AX2h7Iamm X-Received: by 2002:a17:902:7486:: with SMTP id h6mr4127011pll.92.1644436918978; Wed, 09 Feb 2022 12:01:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644436918; cv=none; d=google.com; s=arc-20160816; b=RwswJNkYpdwRKA/5WNSpxHUwdqCVnXGw58MiJvRyhCbYs3rdBqpUAD3GEWgzE8IoJD UyFSJJoMYGLcXeSRyjDiMdcHnrNO2+GOTR06iL9lpOy+Bl9SQUbm+wWd6AYbU49LZUFC X6VzLxUBOasvLiMxZQZrYDDW/IwbhDZeoHrMybFs1wdW4k5u/F9oEqZAFk9Ko2/a8rS5 q0toj55QuesV6a7+SgEOtj9VtBJpanYOhnK9mQzQ5AZ9EOOjGBipXrlp9gTbVZt1MvI7 mtLyRu5hoJXcVZtY7DcKDYDLElZClY1vZKzRqaof2cuQ3hRYph/m9BLgs88FGsT8drhK V46Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=Ra5g0T3VlzyA5hCnuk9FntM7LL+ZGOWg6+oMRbHNWkc=; b=qEiVZpFWEpwXOrkFQKckLQADo6UoPGuCr92YIKBy6j2E96pNGtmAwccEyexqtegBiT kf32uefVLfRdkPXuDUTxNjiifgu469F/UCsb2zmBiCyAGestJxlzzA8U39Ewi48BfaOR EJqJH7YkD2M65SDnWq+NgALyIlToapIx1utnKuUZgPMBDxW8dHxDpB+p+f6nImibMHM/ uTLSjnXPXRqqSRtyuZyeWPZQUYyQjwoQ9xFIrhg6HTrpbniulq1uFdj74v441o6i3e4R UM0HgQE3/Q0Ksbg+vAmkNXj9SZKQy87vGIonOuciFgUTdGMvJjM7KLXf7aWZjw5ut7Yk C9WQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=Iw16vNAv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id l10si18343111pgp.672.2022.02.09.12.01.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Feb 2022 12:01:58 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=Iw16vNAv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 53736E04C3FD; Wed, 9 Feb 2022 11:51:23 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236428AbiBIQBb (ORCPT + 99 others); Wed, 9 Feb 2022 11:01:31 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38240 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231620AbiBIQB3 (ORCPT ); Wed, 9 Feb 2022 11:01:29 -0500 Received: from vps0.lunn.ch (vps0.lunn.ch [185.16.172.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3F458C0613C9; Wed, 9 Feb 2022 08:01:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=Ra5g0T3VlzyA5hCnuk9FntM7LL+ZGOWg6+oMRbHNWkc=; b=Iw16vNAv331p3QhwXKA/Y5jSnU 2EWE3WfzfluRcc0mWKd+FYLFE3lVMz+FSzerwULtiCXRshj2prdjHSpTbzf1JdvAZUXIRJ3dSFr2f HeoI0FWxbPZXDyVtJI7et2hiumJrld1+QUIC/dPWvbyY7HG5FC/FXNaTR3HqYj5j4TWU=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1nHpPI-00596C-Dq; Wed, 09 Feb 2022 17:01:24 +0100 Date: Wed, 9 Feb 2022 17:01:24 +0100 From: Andrew Lunn To: Mans Rullgard Cc: Vivien Didelot , Florian Fainelli , "David S. Miller" , Vladimir Oltean , Jakub Kicinski , Juergen Borleis , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] net: dsa: lan9303: fix reset on probe Message-ID: References: <20220209145454.19749-1-mans@mansr.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220209145454.19749-1-mans@mansr.com> X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Feb 09, 2022 at 02:54:54PM +0000, Mans Rullgard wrote: > The reset input to the LAN9303 chip is active low, and devicetree > gpio handles reflect this. Therefore, the gpio should be requested > with an initial state of high in order for the reset signal to be > asserted. Other uses of the gpio already use the correct polarity. > > Signed-off-by: Mans Rullgard > --- > drivers/net/dsa/lan9303-core.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/net/dsa/lan9303-core.c b/drivers/net/dsa/lan9303-core.c > index aa1142d6a9f5..2de67708bbd2 100644 > --- a/drivers/net/dsa/lan9303-core.c > +++ b/drivers/net/dsa/lan9303-core.c > @@ -1301,7 +1301,7 @@ static int lan9303_probe_reset_gpio(struct lan9303 *chip, > struct device_node *np) > { > chip->reset_gpio = devm_gpiod_get_optional(chip->dev, "reset", > - GPIOD_OUT_LOW); > + GPIOD_OUT_HIGH); > if (IS_ERR(chip->reset_gpio)) > return PTR_ERR(chip->reset_gpio); lan9303_handle_reset() does a sleep and then releases the reset. I don't see anywhere in the driver which asserts the reset first. So is it actually asserted as part of this getting the GPIO? And if so, does not this change actually break the reset? Andrew