From nobody Sat Oct 4 03:17:43 2025 Received: from smtpout-03.galae.net (smtpout-03.galae.net [185.246.85.4]) (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 D5798320CC9 for ; Wed, 20 Aug 2025 13:33:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.246.85.4 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755696815; cv=none; b=I+Ycc5RFdTGONVnt0KGvZeHrtVP7tvA32QfYmMlGQoQj7pSlhhUOxJXp3wbaYGBNl5sQJkHavVawTH52Dn08c3P2Z/ISBHdcUH0YpyyYhfsDs99FnF9BemPgFzGidx6cphrQd9N1mc3yLpTJcZBpJVuhoq42T2F9vpPrPs0Mpyc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755696815; c=relaxed/simple; bh=s5nq5zhQ1y3HYWSGGKoVP69NbrF8fp/t313EOBKu9Zk=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=s/b1lK0kH3SPdrnyNJNQ5M74cE3xKHL58340EIj+++Kt7AtuIJTusa0i2SzcoMNMWzZcwD/9PS/GEBowXeVZm/2R7l8FQdWVyFunvnCeWGM75uWJn2epmLIj3pwIasZS6Ov9BNfK4SOOHXX6TOFjCx/h7IBUn/r5IXw+Dlb8ArI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=yPojbQbw; arc=none smtp.client-ip=185.246.85.4 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="yPojbQbw" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-03.galae.net (Postfix) with ESMTPS id E95624E40C46; Wed, 20 Aug 2025 13:33:30 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id A47C8606A0; Wed, 20 Aug 2025 13:33:30 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 17D291C22D8CE; Wed, 20 Aug 2025 15:33:26 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1755696810; h=from:subject:date:message-id:to:cc:mime-version: content-transfer-encoding; bh=1exOsN2tUfvocnLM2bOw6co3KUlzDpgtNbjqhHK9TTc=; b=yPojbQbwJyVy2nNadP5X8pNRptPTv47RllAZPCpvUUZe5YVYDfPTyIuxVn4pQ3ZkanVCwa qcarx/gh8edE5vmXw+oQU5I828eGX0Fcoos0A+szBkWjBM/n0ZMSFRPy6yO7BFRY9WKOUY IALWXvcn3GwCG7SLTsmfYdckAqGORVxkfef3Dj3R+9OF1jfechoUzFma9hni00JM+qVApP j9IzEFn3DeeX/gVTwZx/lc8w7ly+/Ts3BKGNqDwPF1IiGwKnQo4qc5/3NP8yFVwBpGmD2K 2eyjZwrQXs/b4oSClmTAhw0AEnpnll46wbe/I5NioFczn7Xfw7wPsLJtgkNVNA== From: Kory Maincent To: Oleksij Rempel , "Kory Maincent (Dent Project)" , Jakub Kicinski , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Cc: thomas.petazzoni@bootlin.com, Andrew Lunn , "David S. Miller" , Eric Dumazet , Paolo Abeni Subject: [PATCH net] net: pse-pd: pd692x0: Skip power budget configuration when undefined Date: Wed, 20 Aug 2025 15:33:21 +0200 Message-ID: <20250820133321.841054-1-kory.maincent@bootlin.com> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Last-TLS-Session-Version: TLSv1.3 Content-Type: text/plain; charset="utf-8" If the power supply's power budget is not defined in the device tree, the current code still requests power and configures the PSE manager with a 0W power limit, which is undesirable behavior. Skip power budget configuration entirely when the budget is zero, avoiding unnecessary power requests and preventing invalid 0W limits from being set on the PSE manager. Fixes: 359754013e6a ("net: pse-pd: pd692x0: Add support for PSE PI priority= feature") Signed-off-by: Kory Maincent Acked-by: Oleksij Rempel --- drivers/net/pse-pd/pd692x0.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/net/pse-pd/pd692x0.c b/drivers/net/pse-pd/pd692x0.c index 395f6c662175..f4e91ba64a66 100644 --- a/drivers/net/pse-pd/pd692x0.c +++ b/drivers/net/pse-pd/pd692x0.c @@ -1041,6 +1041,10 @@ pd692x0_configure_managers(struct pd692x0_priv *priv= , int nmanagers) int pw_budget; =20 pw_budget =3D regulator_get_unclaimed_power_budget(supply); + if (!pw_budget) + /* Do nothing if no power budget */ + continue; + /* Max power budget per manager */ if (pw_budget > 6000000) pw_budget =3D 6000000; --=20 2.43.0