Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp5050095rwl; Tue, 28 Mar 2023 15:39:17 -0700 (PDT) X-Google-Smtp-Source: AKy350ayVdGu8G1lCgiK6getWFNLpPDiL9ASVmbl4Bz0uYLZ6qkf9FlBPxi/a6IEgDXxla9rZOyn X-Received: by 2002:a17:907:a78a:b0:914:4277:f3e1 with SMTP id vx10-20020a170907a78a00b009144277f3e1mr18469078ejc.53.1680043156898; Tue, 28 Mar 2023 15:39:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680043156; cv=none; d=google.com; s=arc-20160816; b=XrJsz/gmnMRJD/GQdh/1hiaqd11VFBcSklTGzcH6hRVOpgH28mU4rLr+2qgLgec466 nwxTu+5WS/wSUSNbq6WmMlqLK5HraRtOm6U6DeVgxVe0oVETWnPpLGVi+gsbs9py6FsP RztqQgNOaF3OdeAFLxfV/KZl/JFlUAL2rATXY1u/tBDMJPrx2dBTn2KYugogSlXlIFYZ /4HhfbqzAM0xXYOJBN0Tmf99ramczsa6S/l02RHjsmRYKG5OJRcX1oQb/aWVt2A9miWK 5LEDnuAWqlDmPN3Xwy1A39YYcL6n1+r4ybxcytkCOxz656zbYBEdRI2O8u4Yn6P7WkiE 5iMw== 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=oUvWcSk4q2OtdCCFSokbqXR2MDjcWokmOFXBQXZUNrs=; b=WKrXklwoprC+L9T3j5jd1BzdccrmefZpwJcSdR8KMJS587vi0oth9Fk2bfCLvqcl3M 6VcIuhk3m3TR+jH0/6Iv1Pnt5/W9k+d6FqHKPWbH1kJ8DHDfuukCDSJNmZq81zgHQcM1 QHdE4gzUm9amwpy7SOjdGHXma96auXGiha0ONkfBGqZ2TwTLhoyaW4QYPmi6vieBK0q2 zGcxVBSK+Ep72847ZSYNsFCRcsGetTTEkhwZHbm4WXlKPxLc3QijQUuJc71kQL/tbDBp BtEebPDr73WNidBcTj/w/khPoifOtTDRErJw/gSweiiQM0haTGYlPmtGYdMJcIM6sAFK cZjQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=23p5LPbw; 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 n13-20020a170906688d00b00926f64a9e55si14183207ejr.898.2023.03.28.15.38.30; Tue, 28 Mar 2023 15:39:16 -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=23p5LPbw; 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 S229519AbjC1WfT (ORCPT + 99 others); Tue, 28 Mar 2023 18:35:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60942 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229525AbjC1WfS (ORCPT ); Tue, 28 Mar 2023 18:35:18 -0400 Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5BBAA2123; Tue, 28 Mar 2023 15:35:14 -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=oUvWcSk4q2OtdCCFSokbqXR2MDjcWokmOFXBQXZUNrs=; b=23p5LPbwhEL8SKLaUdZHVRAOQC n77xT4tNz5KGDYJ33g14arqK+v/nWQECGWaL2I+DQCR/RnpvBm1V0n4y72E4RZqbHdkR5+F2l2s4s S7WMuLqStlge1lR4feWxBo/GqASj+AFFy9uBnKoTU9iTts8YJ+OQnKtKX4KJGG8LGWCs=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1phHu8-008hJt-PY; Wed, 29 Mar 2023 00:35:00 +0200 Date: Wed, 29 Mar 2023 00:35:00 +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 v2 1/2] net: dsa: mt7530: split-off MDIO driver Message-ID: References: <4acd93e451146cee593c1b91b74ee72319c63833.1680041193.git.daniel@makrotopia.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4acd93e451146cee593c1b91b74ee72319c63833.1680041193.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 Tue, Mar 28, 2023 at 11:16:51PM +0100, Daniel Golle wrote: > In order to support the built-in switch of some MediaTek SoCs we need > to use MMIO instead of MDIO to access the switch. > Prepare this be splitting-off the part of the driver registering an > MDIO driver, so we can add another module acting as MMIO/platform driver. > > Signed-off-by: Daniel Golle Hi Daniel This is getting better. Please try to split this patch up. Ideally you want lots of small patches which are obviously correct. So maybe refactor the creation of the PCS as a patch. Move p5_intf_modes() as a patch, etc. Also, look at mt7530_probe() and mt7988_probe() side by side and see what is common and can be put into one shared function in the core. Same for remove. It could be that creating that helper is a patch done before adding mt7530-mdio.c. Andrew