Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp911304rwl; Wed, 29 Mar 2023 09:59:24 -0700 (PDT) X-Google-Smtp-Source: AKy350ZwA2yY6CT2m0wVbycfW77+wAG1Rbyol50GUSATfBnC8NkNULcISXklvWcyElm1cBS1q2g2 X-Received: by 2002:a17:906:3c53:b0:932:c56a:c19b with SMTP id i19-20020a1709063c5300b00932c56ac19bmr19869373ejg.22.1680109164621; Wed, 29 Mar 2023 09:59:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680109164; cv=none; d=google.com; s=arc-20160816; b=DoWvwRshVLGVSp5WQ+/bA0WC6d3C/l6ABPWt1KAwzE2NZPWAG2MqW9NlB0MqGxw1+S SwAxuGL9x1wJG33l8WKIlZQdlC4VS2QS7QfRkZycPK3hojYoyPXpQyOPK3JKHNHWHIEl s9V3CzbFUhD658hatWS5/xQhY4q2yz8+REZnROQu4fsADL8KlGqC0C+xK843ks6NAC2d Fjfz3QjRJ9zERVmHXkQneybxYtCzHouiwQ1r0M1ObmQF5oQ6cAWSFnqoblnDKZaBMYwL rUh3dCzNoXFMzqjswBfahVKXFtDKwqhueiJcMCw1XBBYwKjW4dUUaK6NOxvp1RXq7OPB CDLQ== 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=OhiuGHeCY6mb/VmM9pba3c4hvDQmt4O9Ky61+mVEOwk=; b=0U8ipv1B6K4N8Up/NFeE2PHZFeU/EfsNFYQHUDBEdNA3we2kq+jQINYcJa3MJauo8K QPZFU3qlR8cuns0deeDTuxd0rbZ+D4UflYcTbbbf7PEXs+ldRkg7EdwzTd1JrXCVxJNm 2OBCsK1kqJazU2PqR6EwExhsxHfEw9wADXQCIQzvs285ans5wlx00zvRRzPxCNFHfnbf D/VAo2/ylFLq7/g/r3O/eLUfw5uzlK8Nu1jrTlzExxNtDLoSiqS7LzD0PoIA1Lpyo38x aiJ9RNfbNJ2pTLNeW0SRH8rsypSjVdoSzu4LK8cao4D1NjWw9oi0whPaH2SjujFkWMRW os/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=eWu+51Wo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bv12-20020a170906b1cc00b00922f66a2949si11891039ejb.484.2023.03.29.09.58.59; Wed, 29 Mar 2023 09:59:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=eWu+51Wo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230264AbjC2Qou (ORCPT + 99 others); Wed, 29 Mar 2023 12:44:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51426 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230105AbjC2Qop (ORCPT ); Wed, 29 Mar 2023 12:44:45 -0400 Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7F03E46AC; Wed, 29 Mar 2023 09:44:44 -0700 (PDT) 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=OhiuGHeCY6mb/VmM9pba3c4hvDQmt4O9Ky61+mVEOwk=; b=eWu+51WoLOq0vVZsd+3V0xa2jK oOut7+dM/ujZkhoVXuWyL30qr5aHHQm64/eiEDYiFQ2geOo/BA2VpSLfDgxWR++aYRZxrpcadrevs XwY1I+hpueS0a1Fy5BsaHFu7/Tw99gsBi9ZGFsMGRZA348uwtzIXqvytn4hmZkvKuE54=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1phYuc-008mg8-7K; Wed, 29 Mar 2023 18:44:38 +0200 Date: Wed, 29 Mar 2023 18:44:38 +0200 From: Andrew Lunn To: Daniel Golle Cc: netdev@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Florian Fainelli , Vladimir Oltean , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Matthias Brugger , AngeloGioacchino Del Regno , Sean Wang , Landen Chao , DENG Qingfang , Philipp Zabel , Sam Shih , Lorenzo Bianconi , John Crispin , Felix Fietkau Subject: Re: [RFC PATCH net-next v3 12/15] net: dsa: mt7530: add support for single-chip reset line Message-ID: <452c4d28-dc1b-4726-9bec-7065032de119@lunn.ch> References: <0f696278bd8d13121a500f80cfe2f806debe4da5.1680105013.git.daniel@makrotopia.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <0f696278bd8d13121a500f80cfe2f806debe4da5.1680105013.git.daniel@makrotopia.org> X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS autolearn=unavailable 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, Mar 29, 2023 at 05:00:06PM +0100, Daniel Golle wrote: > Similar to multi-chip-module MT7530 also MT7988 uses an internal > reset line instead of using an optional reset GPIO like it is the > case for external MT7530 and MT7531 ICs. > Add support for internal but non-MCM reset line in preparation for > adding support for MT7988. > > Signed-off-by: Daniel Golle > --- > drivers/net/dsa/mt7530.c | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/drivers/net/dsa/mt7530.c b/drivers/net/dsa/mt7530.c > index c6fad2d156160..fd55ddc2d1eb3 100644 > --- a/drivers/net/dsa/mt7530.c > +++ b/drivers/net/dsa/mt7530.c > @@ -3066,6 +3066,12 @@ mt7530_probe_common(struct mt7530_priv *priv) > dev_err(dev, "Couldn't get our reset line\n"); > return PTR_ERR(priv->rstc); > } > + } else if (!priv->bus) { !priv->bus is being used as a proxy here for MT7988. Maybe it would be better to unconditionally use devm_reset_control_get_optional()? Or move the reset out of mt7530_probe_common() because it is not actually common? Andrew