From mboxrd@z Thu Jan 1 00:00:00 1970 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 94E871EB2C 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: netdev@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: netdev@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 |