Received: by 2002:ab2:3141:0:b0:1ed:23cc:44d1 with SMTP id i1csp1847641lqg; Mon, 4 Mar 2024 05:54:19 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWmM8Z/mmwhnUyI5AH+Xe9EUifwb3b9oyaGgshl/j62UIQaX7IF2EVqF9HiL3zObu8IJrQwqWhWJFxkte9L2CMbLowXbgKYXLWLZS+j8w== X-Google-Smtp-Source: AGHT+IEXTud3wslaB6LvLZb1pBHptsR+rDcFwzqpwm4rZaRUB6KcNV8GhryqOonqzRfQRlHoVUHU X-Received: by 2002:a17:906:2448:b0:a45:3308:560d with SMTP id a8-20020a170906244800b00a453308560dmr2354670ejb.71.1709560459439; Mon, 04 Mar 2024 05:54:19 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709560459; cv=pass; d=google.com; s=arc-20160816; b=VsKMpxSvLgAPwEMiLNTmIh1FcOYn3tMunAGD2wXO5JHd5O4rJOfqRnruxnUFRrK424 jZ2i4M6MNN6to0KI3oCX4goNiKcC6OkqACv9XIpwkZBrVLP9C6Z7uFwJYZEzQuNwjh/R sUwZO2Hd+OS1Nx7xEpwGL4WfwLCe0wfDbJqS4qO4AYiAU2VFlz/JJyIPBU22FvTHkHAU T/7xQ9HM6/ZrVBUDRyY3kokpVJvUgn0WcEAcuqlBjblDluwebxZ6qis3eOpyD+zUUIUD mSUoe3uyj+z7klqLIANQGMCciivLiGR5WFRFYdZWcZC5GDRUrPcobDfB5uLkEE7GJXOk OHsw== 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:dkim-signature; bh=GrzTZEtZxWdDNRIjLiasY3q5ubsmD0i5rvI/Q95SnuI=; fh=I6G+oUvcXt4YH5DJIWnifE+ASTgFhogamoNb4rXy/jA=; b=QML+IiHg+WIe2DMvJy2cqTpqTdk5aJyv4VULWPYQlRS90y3ye5KL/Q38q4w8pRjYjl LflDZGHJoeio63Sen0xV3Rxcq5/K7mut5AVBTwvzrNCZJ1CGOunQnW7mR1/9zGwc8h7G tcKjjFCt1+J6BZRyHNZmxJaugVc7unS/y85p9k9XZwUD3giKKuCU+IlugpQ1f2dNWsRg eMWBQMP10HzvQOIHzdb2t8bJbusat9g7a2cZLuVS9fiXJ/orpT/0w+wIs+U93tSqWaF4 EG2jdvCFSBTqj1Lw9Kktw43sSQeMy/mwvgA0cko4DvVf5aJc3iHS0B0iva+4al9g3YZZ 2dXw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=BlDLhXa7; arc=pass (i=1 spf=pass spfdomain=lunn.ch dkim=pass dkdomain=lunn.ch dmarc=pass fromdomain=lunn.ch); spf=pass (google.com: domain of linux-kernel+bounces-90686-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-90686-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id n25-20020a1709061d1900b00a4309fb085esi3825670ejh.281.2024.03.04.05.54.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Mar 2024 05:54:19 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-90686-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; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=BlDLhXa7; arc=pass (i=1 spf=pass spfdomain=lunn.ch dkim=pass dkdomain=lunn.ch dmarc=pass fromdomain=lunn.ch); spf=pass (google.com: domain of linux-kernel+bounces-90686-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-90686-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch 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 E441E1F26476 for ; Mon, 4 Mar 2024 13:54:18 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2B33E3FB0A; Mon, 4 Mar 2024 13:53:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b="BlDLhXa7" Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) (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 BDEA63F9C3; Mon, 4 Mar 2024 13:53:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=156.67.10.101 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709560427; cv=none; b=MNY5rqruXzmBZ3ro7R69GhOtD63RaO9XdqB1Vx03Kpyzh3LN0k6SmUGP3n6eq4tk8ruicYBYrlpxwLKevHL3+m7DShPc6feNET/7zcmOm9OClbGAEHS9d9E01bTNVog7FaqXP1TDyHjfWizvv0IlM52qJ9nrabn9bd/aPGYlwn8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709560427; c=relaxed/simple; bh=c027nQXo6duzC3sChLkEYD+sefZ/bqJ5BjPU+eIda6k=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=P13QWWoqYTvxxRgtOVUhUmTKW1yVvyEF3PIWLvqOZgrfGIbSmUotwvB9Y68evEhsiVPZxHHKwaql2E3rmpeNOAe9gU4UKsvnPdNNekJATD5FmjUA49fqkt3n1nilIEfTHvZU3XS068a3Qsu7IHGAS7sVKVcpX18QdBYZrIB3NDM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch; spf=pass smtp.mailfrom=lunn.ch; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b=BlDLhXa7; arc=none smtp.client-ip=156.67.10.101 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lunn.ch 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=GrzTZEtZxWdDNRIjLiasY3q5ubsmD0i5rvI/Q95SnuI=; b=BlDLhXa70PeAxAiugcSnp0h4xR 05PZfZoSo/Zsk/Zr8GodcFkqaEqOehJStj+zh55wqWw5Ymb23Gi5XbvlxmjE5ebu6ZrCS/Xz2/fvm vUT18KLPrHbEGyMmdnC+Vl3IkqSyUKKXw20LhwEFHQLGJB3siSpZ/w7hSNFmF6UU+xIg=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1rh8lO-009KSk-Nc; Mon, 04 Mar 2024 14:53:54 +0100 Date: Mon, 4 Mar 2024 14:53:54 +0100 From: Andrew Lunn To: Oleksij Rempel Cc: =?iso-8859-1?Q?K=F6ry?= 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: <290c516e-6cf7-4db2-9b32-c9dc7200fe73@lunn.ch> 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=us-ascii Content-Disposition: inline In-Reply-To: On Mon, Mar 04, 2024 at 02:39:08PM +0100, Oleksij Rempel wrote: > 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. The device on the other end of the cable? > Withing the system, it would be the RJ45 port, but we have no > abstraction for ports so far. A Linux regulator is generally used in a producer/consumer pair. If there is no consumer device, why have a producer? What is going to use the consumer API? When we have a port representor, do we expect it to have active elements? Something which will consume this regulator? Andrew