Received: by 2002:ac8:3b51:0:b0:3f3:9eb6:4eb6 with SMTP id r17csp2797451qtf; Wed, 24 May 2023 10:48:23 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6C6MvobnIL2rvJaaFfuAtGIEMfjeLIB93XEXYRvndLflljcR6N0fjshfTu+DYFOE/JjQql X-Received: by 2002:a05:6a20:8f15:b0:10a:ef03:3346 with SMTP id b21-20020a056a208f1500b0010aef033346mr15667187pzk.9.1684950503000; Wed, 24 May 2023 10:48:23 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1684950502; cv=pass; d=google.com; s=arc-20160816; b=LORx639nbN7kTFo6GPDgt5sdKqok1oqOaKYrb5s8QUWn6iXrv++k8o1ijcp0yYxtyr v30pVDGYLbqFJxb/fmchv/gP2O/s5B+gdd1lpDyaRb8M6P3cLnhIQv5HIxnmbHLZEX5I +RTbM0GrX1Ap+i6e4d/VcqZMzZI4m+mIVaCxmlZEJKh5c8pKA6soPHRU/tt5FSIVOUvG VLdnJwqlOUd0qXcUSpqXxswd24N3pf6LGAvk7LFQyyloFsffhXnyOlwCwAhUhA2f4t9w 51lBX9UuQvhFgDpaPW0v97qUma4s8fntCpmbIajauZpLkjEyXxNs3fFpwaF1Y/ocI/Io chtQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:in-reply-to:content-disposition :references:message-id:subject:cc:to:from:date:dkim-signature; bh=HO3r5/vabGTJDkPD31j0/egzfOAkHFEjpUqIsoYPRp8=; b=o2qOYlTiDdY3n4bq/OX91bR3iGgz4UnaN/RvmBvZLhguJbSQ5ZmUCiR6aH8JQEBZfC 4dsv/eAg/nSCAjm/nCZYbBw5VIfc5FBrzqYIck2du6m3Az55R24UGtCv1kBzwlpEaPHR OoOEUi2X8Slm2jKQMvrpgf9dxn6lGfDRGFUzWNcrPwEwhoPnc2K4ybL2aiQsPPXkXjxR 7xx77O7jknPQThdd4Bhb0eR9xXMdqEZ0k41Tg3zbJqSB+dNR7ZQd1+dOJMBmf1Jc3q4H 374RxlsLYDwyN+CzKW0bLnYh/Y0QF3CS+Rm8KZRCW99y3/OF3k0A6GNuBG911F9yFtG8 Vw5A== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=fcZuEOs6; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); 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=nxp.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id lk9-20020a17090b33c900b0024df8757367si958437pjb.87.2023.05.24.10.48.08; Wed, 24 May 2023 10:48:22 -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=@nxp.com header.s=selector2 header.b=fcZuEOs6; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); 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=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232786AbjEXRl6 (ORCPT + 99 others); Wed, 24 May 2023 13:41:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53446 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229921AbjEXRl4 (ORCPT ); Wed, 24 May 2023 13:41:56 -0400 Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-vi1eur04on2057.outbound.protection.outlook.com [40.107.8.57]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 52161186; Wed, 24 May 2023 10:41:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cEv9iwP9mQMq3ZVouPRVNoJIyqwfXl3nI/fh5MgY4YZ042udbAKtBbWT9fXucxwRs1PW53rxNA5VVqT736p45gmSai4OdRVZuNjIfIoEv37cD6Lj7iO603zrjwVfwEn0Twsq3EtzZ4br5zaUoFz6Tsqxp/HQYyK1Fov8VjbZRZ6FaLgPKHAHjiCC129WNvFe5TfrWJBbrLhgSMW+Y0QFIOutFsf6QqZ+HiHnBeVQm0x042Ch2JHjTlUtykakf01DO6xJfYcF7Ga3i4hCJNdOwbx00RdwoC7ZLMrccxq2859vRMJhrqX0roPlNuLOgF+nhabBZI2RVN3hUmC+9ApZEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=HO3r5/vabGTJDkPD31j0/egzfOAkHFEjpUqIsoYPRp8=; b=BRwise9i/EyKVq+aX6vp7rytPpMLaQYAV74Zf3+yWThZBJzhaiKlwDJPN+S2z7ychEXLxvEjAcDNjQj5RwpFElg30xcRDAvCLh4/GQw4BkIQO+9JEZbE2Wg7xPxN1mht57kuXlmaKUEyb7LL2W84e943tAxNfFASopK5rHXCMBI1UA2PUNYhMMO8a2xLaeSF5IypM89YAXgOdTt6YBcIV9Sh7XZ0+vUKriJmrx/HMwHLHIPs4gMmBQKd6u+JoLiYvKEM5VMgCGeO1rZTvxGXhElL67JEpY2w/JLbZkbOYK0x9TBaJAkG/nGu5uzxwwyG2UchkenTyzq5S0DbROf5wg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=HO3r5/vabGTJDkPD31j0/egzfOAkHFEjpUqIsoYPRp8=; b=fcZuEOs672PQhZd7xrFEe0u2A+a2n79S263pS8OPgzsiUd7g/00RvXTA53p5e5/W0KwIxoOllT27TtHXFk2N7/bl1e4o0p9qzDNljhVYvMwLAyI9vDI0lGCeha+vzIN4rLDy/6AfV469wQ6QzkAmR/qEUM3WVwGhgRlgyyTzvYg= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AM0PR04MB6452.eurprd04.prod.outlook.com (2603:10a6:208:16d::21) by PA4PR04MB7693.eurprd04.prod.outlook.com (2603:10a6:102:e0::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6411.28; Wed, 24 May 2023 17:41:50 +0000 Received: from AM0PR04MB6452.eurprd04.prod.outlook.com ([fe80::b027:17aa:e5f5:4fea]) by AM0PR04MB6452.eurprd04.prod.outlook.com ([fe80::b027:17aa:e5f5:4fea%6]) with mapi id 15.20.6411.029; Wed, 24 May 2023 17:41:49 +0000 Date: Wed, 24 May 2023 20:41:45 +0300 From: Vladimir Oltean To: Andrew Lunn Cc: Maxime Chevallier , Mark Brown , davem@davemloft.net, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, alexis.lothore@bootlin.com, thomas.petazzoni@bootlin.com, Jakub Kicinski , Eric Dumazet , Paolo Abeni , Florian Fainelli , Heiner Kallweit , Russell King , Ioana Ciornei , linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, Maxime Coquelin , Jose Abreu , Alexandre Torgue , Giuseppe Cavallaro Subject: Re: [PATCH net-next 1/4] net: mdio: Introduce a regmap-based mdio driver Message-ID: <20230524174145.hhurl4olnzmfadww@skbuf> References: <20230524130807.310089-1-maxime.chevallier@bootlin.com> <20230524130807.310089-2-maxime.chevallier@bootlin.com> <8f779d98-d437-4d8b-914d-8e315b4aca17@lunn.ch> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8f779d98-d437-4d8b-914d-8e315b4aca17@lunn.ch> X-ClientProxiedBy: FR2P281CA0175.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:9f::12) To AM0PR04MB6452.eurprd04.prod.outlook.com (2603:10a6:208:16d::21) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM0PR04MB6452:EE_|PA4PR04MB7693:EE_ X-MS-Office365-Filtering-Correlation-Id: 549ce354-8bfa-4604-eb50-08db5c7e270d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: UCj8em0Ad6jE6ghNCQm65l9JH7h6OIi4f3GAbRz4lTB+scDtm+73bZxEPxo81YnKjPMwAdP/8NQ0qhKo2uHzndp4GSnWIv4XSdEgiDGR8mSs7cruVW+rETsh/IbxV3XU11d90e4ii5wtOq1a3082C8AcfFaCiEwLbWyUbiibZU31UgSBTxafgg3ADEEZ/EW/zAWyn3Z7OvkYHSZFoZQ/54uXN6zrvBNope/WbkwJHeKZN3AcVcbGQ8hze6bZBo0XvuHjrV5agNraYyMWsoCQooyvY3sE9L6+bYVzOOuK/Uy+JAc6gcwHa0r/LsZQd6IFmcO4Wsh+Rd6QPmkPQfj56Sv/70Ot25bFwT0eDGpBvYMunw7145zi2q3a2PR9s4NmWY0dH3zJNschPjhqCB4hKjbak3pLN360jOkLgGeuEL/zMlZlmkCG4YUsVdUZE7et3WYd/soEnnZg+YC9RHxpJC2OWNgfZfp17Ice4JmDSM6S5J2QEbuCKCo418mTvZJMB7CwAbX0K9XN1bVYDCUOzb3cwN7ax+8a0KmVlKvPJ9i+DKbXae+Hy5y/pDM55YK3 X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM0PR04MB6452.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(7916004)(4636009)(39860400002)(366004)(136003)(396003)(346002)(376002)(451199021)(186003)(9686003)(26005)(6506007)(1076003)(6512007)(7416002)(38100700002)(44832011)(4744005)(2906002)(54906003)(316002)(6486002)(41300700001)(6666004)(4326008)(478600001)(86362001)(33716001)(6916009)(66946007)(66476007)(66556008)(8676002)(8936002)(5660300002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?1tn7cgTzUxik1VbrcmBKl9brn5rIJwXCVL3tOtdBYSgUx8qNRUevzIX5MYbw?= =?us-ascii?Q?fUprLunGhGrWc4WJhd/KHWve8eqxAfMh8dY5euS8JubmW5wRb5VPWnBD++Ns?= =?us-ascii?Q?x3Vzw3w0sN0phjjEdMaF2Hh3ZZ78d6YBAauIdKxbt6r47a6IuSkG3aQJnQak?= =?us-ascii?Q?H67I6CGJvqvfmkztn+WeXsx+TJXxgN+VZ41EucZBh/Xq2fURx/bMl0RS+hXn?= =?us-ascii?Q?AkQD6k5g+HZSAK03kDJtFy9W+PYEZNBpk5EdghiV5tYZMx8Biq7o/ae5D/ue?= =?us-ascii?Q?U++qhl4p2TgDoZgZs7xb9ir5X5gOC3kX4xKckok8i8mLu2rvT67vz3dbUtH1?= =?us-ascii?Q?ApxKDuEXfZHTWClNlVxXzDYwI7mEArZUGIxTlR53yX0G6yuhvqwMiZjAVZET?= =?us-ascii?Q?nuULdvZd+puRwiyqyivEzhJ+7xFnZY6pnLR/57eqMAYpLBxjKoMxBsHT2I3i?= =?us-ascii?Q?Bu3oIo9vS7F9x8ePjKlvVm2/76b6nxR+mIDqXKD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GZpgLXF4aIx+jMAkZDLUmK8Vn3Wbp90FDexuKTu+yMdobae6yx?= =?us-ascii?Q?cFs80s9nUV6xhMtj5Pg8JxySpxhEhYSZXWLh/SYAWgkWGSTcMROtsrKcGHbE?= =?us-ascii?Q?k8Kmf+Nz290dttpzs+vB85j6ZLln+lvTTYe7rDfhq0SvfGLPpGCndSWbRRQp?= =?us-ascii?Q?xCBSwQZINfZugWPkzz43UqckfGbc29DJu+3ZEik0Vnw3Ked1cVt25Swtaqe/?= =?us-ascii?Q?KA=3D=3D?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 549ce354-8bfa-4604-eb50-08db5c7e270d X-MS-Exchange-CrossTenant-AuthSource: AM0PR04MB6452.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 May 2023 17:41:49.5968 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: n5/iuawBkst9NsUgwWxRgd6XRyfVNkNTejVrbrkAD16zczqNjnVqWNnJzy8LasRIe58jJS3voNf0zVR9geUdog== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR04MB7693 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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, May 24, 2023 at 07:30:51PM +0200, Andrew Lunn wrote: > > + mii->name = DRV_NAME; > > + strscpy(mii->id, config->name, MII_BUS_ID_SIZE); > > + mii->parent = config->parent; > > + mii->read = mdio_regmap_read_c22; > > + mii->write = mdio_regmap_write_c22; > > Since there is only one valid address on the bus, you can set > mii->phy_mask to make the scanning of the bus a little faster. Sorry, I didn't reach this thread yet, I don't have the full context. Just wanted to add: if the caller knows that there's only a PCS and not a PHY on this bus, you don't want auto-scanning at all, since that will create an unconnected phy_device. It would be good if the caller provided the phy_mask.