Received: by 2002:ab2:3141:0:b0:1ed:23cc:44d1 with SMTP id i1csp1840222lqg; Mon, 4 Mar 2024 05:40:27 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVWdVw0fi5v+RsjwYul2yQGBcRUYXnORGURC5OjZUgWHjBy27MPSXeVWre0tJofvEMOVspz/lFYfmQ+W57x3+62T9w9z7r0g2Fu2u/t3w== X-Google-Smtp-Source: AGHT+IGeOdnngz6TD1eF726VAfpLuH7h/ily/70deSUZZa3zj77RBdtEnkRLfyBzoqUF+Z0QrTfC X-Received: by 2002:a17:906:eb16:b0:a45:3ad3:1f93 with SMTP id mb22-20020a170906eb1600b00a453ad31f93mr1861834ejb.44.1709559627388; Mon, 04 Mar 2024 05:40:27 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709559627; cv=pass; d=google.com; s=arc-20160816; b=AfLjXD3HU90oGh5bFTMyboi5QtmbpJ0dvftrAnyy5y12fvwsTEqMjNPGXRsWIIpgFK tGr8pcBa9vrpk00SIWRuQi4D5zUsUrW+2z+q1YGUvnADgPR8XD3rDuCMHdR1NQbl+iuR f2ctw2g4EOeM/GnW79eVbsYge29yR7h7DOSz1LCXZ0KyynxgPu/v71/gBoXVCJKEPKCc FfdVqoIw1DZf8vcRYNAOPaws2B/FDaQlCSPgNqpcJj49CBIYZDA99zolRHuhScvm6urS nvS12/+AggGeehxw127IsQJaMdC4yVscChPPapQgDB2ikMAInv5FiUrgbkNwc4jsGLY6 Kclg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date; bh=m8jLWguXnhYT6jxaxUII6D4yY8iRCUnkl2foYD2Uem0=; fh=wSYW6BK74oue2ztpgocFgY/fECz3tAuiOLMkiXK2o/s=; b=kcY2rG/s8bVGmopaeHRbsie3eEkvRZU2nGdct4BeefBJIZt7U8DeGWSgLNg83wsUMj ythhRg03kmaRF1K+dvv/yqw/FWpTZENbCWFMILt8K/YDacz0GcVY/qQDzP9Z0pVptyW9 YUaspJSGJBqrNqvCMBKPkLVFvCehBfpLXk3lOoZdCgczsMLQgtIq+LYu7g1b3lcyhF58 WkUO2BPI3uTVR0UrFUMK4aBmwdZsJrNxrAuJDHwY4QadmTwIZNs+qJOA4xZrPpQZnsBX Pi2KKnPelYCu4LkMaSUIFoCFPoDLkGmdPfxPLQ/BHc74TNzJMtlry2QBBgPDAXEdJ96z eBDA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=pengutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-90668-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-90668-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id bu5-20020a170906a14500b00a3f4e9e6783si3901320ejb.522.2024.03.04.05.40.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Mar 2024 05:40:27 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-90668-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=pengutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-90668-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-90668-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id C37E81F268F7 for ; Mon, 4 Mar 2024 13:40:26 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CBF1D3F8E0; Mon, 4 Mar 2024 13:39:40 +0000 (UTC) Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [185.203.201.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 94EBF3EA80 for ; Mon, 4 Mar 2024 13:39:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.203.201.7 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709559580; cv=none; b=gG+P/FuVF+7HxaDzy3gjiMZpZVBRixpjXchKNotu+eaO+iwD3rm3yaRXWiXIT5ABcgGDn6VGLEsdkBXQRhWDuB0pQS3BvTJ+afxnDg0qSEpKFr1Oh/lu5rLOHbicIsXGxNa5j9nc5Nt4m8t5pHbDF2zEUUMbGjTMRrydGxFi+f4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709559580; c=relaxed/simple; bh=DSO4nKZfYc4IR1qnz1wjDII1n4yFyBJMYdZUfFC8Mh0=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=O8ggQUKSk/k58ajscVOTtWQk6MOXy8JtVtSSq241NJVCHey8+EL41SjtWgdsNeKbmC5SWmHTsM9nCvIJc5t6DxIBo4xMSVVQKCiOefvoTEg7PorbnSOa219TvUibuMUTjLFDD+40MsCpOerHBPsb5azfWX7cR3yMgt2HEOwbbFY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de; spf=pass smtp.mailfrom=pengutronix.de; arc=none smtp.client-ip=185.203.201.7 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pengutronix.de Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rh8X9-0000Pk-8L; Mon, 04 Mar 2024 14:39:11 +0100 Received: from [2a0a:edc0:2:b01:1d::c5] (helo=pty.whiteo.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rh8X6-004MgH-Vs; Mon, 04 Mar 2024 14:39:08 +0100 Received: from ore by pty.whiteo.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1rh8X6-001uJD-2q; Mon, 04 Mar 2024 14:39:08 +0100 Date: Mon, 4 Mar 2024 14:39:08 +0100 From: Oleksij Rempel To: Andrew Lunn Cc: =?utf-8?B?S8O2cnk=?= Maincent , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Jonathan Corbet , Luis Chamberlain , Russ Weight , Greg Kroah-Hartman , "Rafael J. Wysocki" , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Mark Brown , Frank Rowand , Heiner Kallweit , Russell King , Thomas Petazzoni , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, devicetree@vger.kernel.org, Dent Project Subject: Re: [PATCH net-next v5 13/17] net: pse-pd: Use regulator framework within PSE framework Message-ID: References: <20240227-feature_poe-v5-0-28f0aa48246d@bootlin.com> <20240227-feature_poe-v5-13-28f0aa48246d@bootlin.com> <20240304102708.5bb5d95c@kmaincent-XPS-13-7390> <84b300c7-8295-424b-9117-c604fb4cd73e@lunn.ch> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <84b300c7-8295-424b-9117-c604fb4cd73e@lunn.ch> X-Sent-From: Pengutronix Hildesheim X-URL: http://www.pengutronix.de/ X-Accept-Language: de,en X-Accept-Content-Type: text/plain X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ore@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org On Mon, Mar 04, 2024 at 02:32:50PM +0100, Andrew Lunn wrote: > > > > + psec = dev_find_pse_control(&phy->mdio.dev); > > > > + if (IS_ERR(psec)) { > > > > + rc = PTR_ERR(psec); > > > > + goto unregister_phy; > > > > + } > > > > + > > > > > > I do not think it is a good idea to make PSE controller depend on > > > phy->mdio.dev. The only reason why we have fwnode_find_pse_control() > > > here was the missing port abstraction. > > > > I totally agree that having port abstraction would be more convenient. > > Maxime Chevallier is currently working on this and will post it after his > > multi-phy series get merged. > > Meanwhile, we still need a device pointer for getting the regulator. The > > phy->mdio.dev is the only one I can think of as a regulator consumer. > > Another idea? > > Sorry, i've not been keeping up... > > Doesn't the device tree binding determine this? Where is the consumer > in the tree? The real consumer is outside of the system. Withing the system, it would be the RJ45 port, but we have no abstraction for ports so far. -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |