Received: by 2002:ab2:1689:0:b0:1f7:5705:b850 with SMTP id d9csp1415694lqa; Mon, 29 Apr 2024 07:57:53 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXxuZWjyffPdKIUFf5DD6xoP6lcSLhFVlU9b4zDrkoPiSgCaxnXgyHoZedxFu+iiCXOiLW07mgE2yEGR2iy1nq2QbdEVLWDBxmuhkvBdA== X-Google-Smtp-Source: AGHT+IGgEPBBwCaDe74T3BXVskGmXFK8IlUW2SWfGwDjv/Y0qcd/cfAO3p+aNS7dt8HR6hDwVBCW X-Received: by 2002:a50:d516:0:b0:566:f5d6:4b4 with SMTP id u22-20020a50d516000000b00566f5d604b4mr7294368edi.12.1714402673682; Mon, 29 Apr 2024 07:57:53 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714402673; cv=pass; d=google.com; s=arc-20160816; b=LwPWsno8onFlF3isVx7eqQEJvBMrfWohocNkLAzrBVm74nCbIxtYQ4PAW1ktRQSl/d 3OzKpqs1G1IiQyhKvx65pmdPxnQZ/i2dPIEK9CeoI0HGDoLnLi8alBAeA/FpHnpA2sNf zeprHntrWQd9YVtDvxxe4A6eITjiXSSjItJj9fBmgO18/cprQ1YdWjO2CiYX+N8XmYE3 9dQkPeCVujV0buk2Z5i6aMVo9/41bergLTB61eH79p8fhqfOCzXVF6ONsQrKfC+EElx1 n52mkQKRykjnXN4fzUqQBBGpm+fyF5DXz6/iN2Pzx95KVsLNIREsCqW7Y5cBRw0tUcCg Trcw== 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=cWBfapoZi8jsbt7Iy+JKtlaopk7WUGuiHafZVePp7/w=; fh=xUzmYDSoKRjUYKIfLhxIBh1+624huu1qmrEMwnjtfU4=; b=YZdR1iwEB7rKiZAv+x9SxiCgaxeQPkqNmgBbeZrOuh3ONTySDlMCrnHCxNAeYt2w+Q q5Po5IAep9tE3ishH5X2uQVK9rxNRsSBN0ZKu2Wof0yIzbckK0iU/j/7dPWJU/AuWuAH rlbik3+2Ed97WRtfY+KbJP6R7pGWlgYXDkAwnHh2xAK5rzzzPqBuAwv+dt9co/n23dzI anDsAx0KXIdn+RK8IG3HMfNdCPW0x7JcH9kUoE75MfmE9NBg3Nrf+1rtCP2HEMbE3vbh 3bPPq7aE4ituPIg6q+d884dVyR2UBpX/KHbjFC3ei4iEyQpvXcoLln1+ia8EFrUhZdwH zP6A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=5kNs7mmv; 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-162503-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-162503-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. [147.75.80.249]) by mx.google.com with ESMTPS id o20-20020a056402039400b00571bfc76223si13413309edv.304.2024.04.29.07.57.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Apr 2024 07:57:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-162503-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=5kNs7mmv; 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-162503-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-162503-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 5E08C1F203B0 for ; Mon, 29 Apr 2024 14:57:53 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4EAA3811FB; Mon, 29 Apr 2024 14:57:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b="5kNs7mmv" 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 2EFB37EEF2; Mon, 29 Apr 2024 14:57:41 +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=1714402663; cv=none; b=Tw9vvKVenAaR/KMT3G7X8tM20IX0cghrfCmDBYCS6urb//xg2WXw0xxqF3Fn1n6qPxrpw5kNK/il+7IMVTt7GLgPPF/JvT65jOUuSlwxhpLY/1R8WIMpjd/6iZkEW+/mU91qvDitWNohnqlrB0phk0UBQPwiKRQYYepTwXffXzk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714402663; c=relaxed/simple; bh=IcugJ0QwbKQ6I/BOBlgoBQscijLsbDvk0jtQCL+HSjU=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=q0p5NsCvlVFBVMuf/3IXrTRYEqTtu3GYnNpft9kynleG9KlwdoWPZmfjLYJhW0zQ1mzNiNIkrHqfTbU4ko8NZFHqSJrISrZd+KsamdVia+MVCU9ers7uDVbotE62O+H5jNl8osvGbLlfdEp2N2njd33fntnF5Nzmb2gVzWUo2/k= 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=5kNs7mmv; 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=cWBfapoZi8jsbt7Iy+JKtlaopk7WUGuiHafZVePp7/w=; b=5kNs7mmveYPQjgP4V1Uy81UUsm G1WP+1HAONV/YqfaHS9jlLRXy04i7tL67Yz7VRyu/TQ2w9Mcg1V3sgOaXpJcD1MHl9ir+tsKOT+Jv TJcryVSOW+nIY1+6gM18qqyTpEkT/gdOCxn4FVhIQNv09WefiIxr0Ylx/YW6qMtPayZw=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1s1SRj-00EGI7-6N; Mon, 29 Apr 2024 16:57:35 +0200 Date: Mon, 29 Apr 2024 16:57:35 +0200 From: Andrew Lunn To: Oleksij Rempel Cc: Kory Maincent , Mark Brown , Kyle Swenson , Liam Girdwood , linux-kernel@vger.kernel.org, netdev@vger.kernel.org, Thomas Petazzoni Subject: Re: PoE complex usage of regulator API Message-ID: <5063429d-5dca-4538-b240-50c35cbf5e93@lunn.ch> References: <20240426124253.56fd0933@kmaincent-XPS-13-7390> <57a79abd-722c-4907-b0e7-2396392ae675@lunn.ch> <20240429145203.219bee06@kmaincent-XPS-13-7390> 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: > Since there is already support to work with current (I) values, there > are is also overcurrent protection. If a device is beyond the power > budget limit, it is practically an over current event. Regulator > framework already capable on handling some of this events, what we need > for PoE is prioritization. If we detect overcurrent on supply root/node > we need to shutdown enough low prio consumers to provide enough power > for the high prio consumers. So the assumption is we allow over provisioning? > > So there is a potential second user, that's great to hear it! Could the > > priority stuff be also interesting? Like to allow only high priority SFP to use > > higher power class in case of a limiting power budget. I was not expecting over-provisioning to happen. So prioritisation does not make much sense. You either have the power budget, or you don't. The SFP gets to use a higher power class if there is budget, or it is kept at a lower power class if there is no budget. I _guess_ you could give it a high power class, let it establish link, monitor its actual power consumption, and then decide to drop it to a lower class if the actual consumption indicates it could work at a lower class. But the danger is, you are going to loose link. I've no real experience with this, and all systems today hide this away in firmware, rather than have Linux control it. Andrew