Received: by 2002:ab2:1689:0:b0:1f7:5705:b850 with SMTP id d9csp1450697lqa; Mon, 29 Apr 2024 08:48:04 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUsvZrh0k+SxNc03it6J050wTsyLFZl0HbIVouTJEoYMJsLpZr7khLkx9yiHZEFSh3K9c3nHnRfmb4rifD0h7gtQBmiO4ljjVgvCRu4ng== X-Google-Smtp-Source: AGHT+IH+LSr2+oxQZb2PHbjcE5fmCt4fkqnsMTRCkJucgOWMHdUR/tU16Q5//Zg/OBtHwvc9t2BX X-Received: by 2002:a50:a6d1:0:b0:56e:603:9fc9 with SMTP id f17-20020a50a6d1000000b0056e06039fc9mr4427957edc.3.1714405683933; Mon, 29 Apr 2024 08:48:03 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714405683; cv=pass; d=google.com; s=arc-20160816; b=sWzelX0XNn8S38iIzjOY/MoB7bnYZacsej7EMGOE8R74WvvaPTqjnVfvcoFIMYgi/x TyiHU5xFjyZhUESs4RiyqpfyFcqCX2YawRyXKc0eMK50NgafDwIix4hW96xPyMr+bO6I N+FDiQXkgDO0ed+XgLk8/B+6PM6obw0xlq2g38AsJz+9iREQWiHiXtKx21qsh5Wq+alK 6qcN9F5TDYti0eeaqhe6cZoB4KuwDvWXjgiCPdewJgB3j6lh3ZRNPER+qbHUJV0v2Kiq Nr39nn9nNZ9lNombiOI3v7CkVRHWMsm/dvCo7ur5cRutqkaOmaKOPqa0GwvL5jUB/+ej VvLA== 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=QtyC9UHBBf0+iuha9B/Pnj5qgmz8o94I3YQBDylotco=; fh=oKT9vJi0PZaGZPIZNyfGGBroF8n8qpc06mpEneQgzR0=; b=n0aa6ht20lGUEYv9a9oBsGP2T2rB0E6QHRKqMJQoskZANNLD3yixkNtNbK+DoHq2Q3 EKkr6pBLecoiPE9BzyoauXJhbmSMLKXGRTQyCShiyzbtJDjtPBPgB0jeHwLpo8utLh89 517pEJx6kp7CPaaq8wOpu7Ir9G16j5lN5eu25B7gXSpbHWIuqksfbxF/cUeOtWisHjFh LpeDwhmayNBZqt+sVSHa35eFYS4jExZUvid92umyMXPrvuoGF/7O2c2TC6pXHjK1N2M0 YrJPYin6VgnJe/BYe7zYLJsa59qj6CsiUzic3+us3qH37ySLLXA/30R+MSpu5Bam42Iz 3UTQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=kcUmaELw; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-162609-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-162609-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=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 u17-20020aa7d551000000b0056c4eeebe87si13965316edr.332.2024.04.29.08.48.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Apr 2024 08:48:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-162609-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=@kernel.org header.s=k20201202 header.b=kcUmaELw; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-162609-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-162609-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=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 A77401F21BEE for ; Mon, 29 Apr 2024 15:48:03 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3E79582D75; Mon, 29 Apr 2024 15:47:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="kcUmaELw" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 6706B81745; Mon, 29 Apr 2024 15:47:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714405674; cv=none; b=jSTjRSzsQWREzlwcR/ieaWlK6VxW+/5PWXyQPGTtbIwB1IvRm8Aafprxt3CHvbiFvLY8RT/rk0mujOCQsSx2c2S5lcOJ1i7p3AjonQy6dFqE2LBHrN89R48S0OwVJ2VDHOjo/5FINaYabTtzw56ubSlqjbGTiDTdO8KDSir0A9s= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714405674; c=relaxed/simple; bh=MXEUogA99lTzY+rAVdsNJFMUbYG/L9I1Xzm+BQCRy3k=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=OE8EkhjdqbuJEnNATkmwK/z7L58iLZ95+4Z3yyKIesTmhn/UtpK9daMDttmwpwGUDa7v3hm3nqJgELwRDQabRDGkWJ0tseas59Aa7W5dwVLKhMmqOL0yu3dKJGcYOufcH4H3d88IISLiVweQ3vX8eqKx6HstvjaVdaQrGedD+K0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=kcUmaELw; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id C5135C113CD; Mon, 29 Apr 2024 15:47:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1714405674; bh=MXEUogA99lTzY+rAVdsNJFMUbYG/L9I1Xzm+BQCRy3k=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=kcUmaELwtBnIWmSY3ozAgMoCaxxzNDMTn2KC5r/IuRVD3B7+azkCqWzbAe2+FQPho IGs6gKfAQvcMXN6EnTb4IMoYNqk69GGluSe+D/jG31e2bVQFymhIO5YBOoN6H2qyGa ZhP2cuTEV6BMNzBs77lEzCYUHKPEWqJ3cE30VnW46VGiH7KMEMef9Q630NNAAcqq8m +Q6rA6B5MqVLXE9tU0Ka7tuognfY6XOp1LcnwtcX0R/cgzks20lrsF9avU1wjowW+D 8cMjQtUJwIzHjsXze61szxUxUJCuyb5bBcTum469sduiQ1rFO2c8KEaPTvAVkPR9NV unTYglmB72GdA== Date: Tue, 30 Apr 2024 00:47:52 +0900 From: Mark Brown To: Andrew Lunn Cc: Kory Maincent , Oleksij Rempel , 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: References: <20240426124253.56fd0933@kmaincent-XPS-13-7390> <57a79abd-722c-4907-b0e7-2396392ae675@lunn.ch> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="z0k5BVdQYkZbQzID" Content-Disposition: inline In-Reply-To: <57a79abd-722c-4907-b0e7-2396392ae675@lunn.ch> X-Cookie: lisp, v.: --z0k5BVdQYkZbQzID Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Sat, Apr 27, 2024 at 12:41:19AM +0200, Andrew Lunn wrote: > I'm assuming this is mostly about book keeping? When a regulator is > created, we want to say is can deliver up to X Kilowatts. We then want > to allocate power to ports. So there needs to be a call asking it to > allocate part of X to a consumer, which could fail if there is not > sufficient power budget left. And there needs to be a call to release > such an allocation. The current limits for regulators are generally imposed in hardware as a safety measure, this also happens for example with USB where there's regulators in the PHYs. Whatever is providing the power is very likely to have reasonable headroom for robustness. > We are probably not so much interested in what the actual current > power draw is, assuming there is no wish to over provision? One of the goals is to protect the system in the case that something malfunctions and tries to draw more current than can be sustained. A system that is overprovisioned might choose to allow excessive draw, especially transiently to cover bootsrapping issues, though there's tradeoffs with system protection vs interoperability with poor quality implementations there. --z0k5BVdQYkZbQzID Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmYvwScACgkQJNaLcl1U h9BE5wf/eGMbGuMBrgTE/BBGw7ZPtzshbhPpItvoGiNej1Aa8AeY6iPc6OJy3g27 Ara8ZgQ0qWxv1hkOrgzlgNEq/BxkG5pGcNIRp68dJWM31xI2YkGAH4FiI0Yo74eD 3fnt5adFdZzVVA/jHguYIzzdXp5AK32YEfZ4mbdaPO+gLM4VakFWiRVOU/P3jQoa asM2b9FLIFjMKtzlHYefDMUIC28WMbkVcpq9YJUy2Sr4goqJFObKFzIZhe2B7rmA kGEBGEh3c/vjcYGepZ2ivGD5yInwRK5njcTGgGI8kZ3YnyQOIX63Y0Ep+RaawToJ D3uv6/3i/nbUBM1TetHgPEjcafc+WQ== =I9We -----END PGP SIGNATURE----- --z0k5BVdQYkZbQzID--