Article View: linux.kernel.netdev
Article #26419Re: [PATCH net-next 8/8] net: pse-pd: tps23881: Add support for Vdd and Vpwr power supply
From: netdev-bot+sashiko
Date: Thu, 03 Dec 2026 14:21
Date: Thu, 03 Dec 2026 14:21
131 lines
13276 bytes
13276 bytes
Thank you for your contribution! Sashiko AI review found 3 potential
issue(s) to consider.
Critical: 0 · High: 0 · Medium: 2 · Low: 1
If you believe none of the issues are legitimate, please reply to each
issue of Medium severity or higher and explain why the AI is wrong.
If any of them are legitimate and you plan to respin, please let patchwork
know by including "pw-bot: cr" as a separate line at the end of your reply
(one such reply per series is enough).
- [Medium] In drivers/net/pse-pd/tps23881.c, tps23881_i2c_probe() now
calls devm_regulator_bulk_get_enable(dev, 2, {"vdd", "vpwr"}) on the…
- [Medium] tps23881_i2c_probe() now powers the TPS2388x itself with
devm_regulator_bulk_get_enable() (line 1443), but the only wait after…
- [Low] In tps23881_i2c_probe() the devm-managed regulator enable (line
1443) is registered before the reset GPIO (devm_gpiod_get_optional at…
--
net: pse-pd: tps23881: Add support for Vdd and Vpwr power supply
This commit adds handling for the Vdd and Vpwr supplies to the TPS23881
PSE controller driver. tps23881_i2c_probe() now gets and enables both
supplies with devm_regulator_bulk_get_enable() before the reset GPIO is
requested.
> diff --git a/drivers/net/pse-pd/tps23881.c b/drivers/net/pse-pd/tps23881.c
> index 5736f052732a2..759b3039ce21c 100644
> --- a/drivers/net/pse-pd/tps23881.c
> +++ b/drivers/net/pse-pd/tps23881.c
> @@ -1419,6 +1419,7 @@ static int tps23881_setup_irq(struct tps23881_priv *priv, int irq)
>
> static int tps23881_i2c_probe(struct i2c_client *client)
> {
> + static const char * const regulators[] = { "vdd", "vpwr" };
> struct device *dev = &client->dev;
> const struct tps23881_info *info;
> struct tps23881_priv *priv;
> @@ -1439,6 +1440,12 @@ static int tps23881_i2c_probe(struct i2c_client *client)
> if (!priv)
> return -ENOMEM;
>
> + ret = devm_regulator_bulk_get_enable(dev, ARRAY_SIZE(regulators),
> + regulators);
> + if (ret)
> + return dev_err_probe(dev, ret,
> + "Failed to enable regulators\n");
> +
[Severity: Medium]
On device trees with no controller-level vpwr-supply, which regulator does
the "vpwr" consumer end up with?
If the property is missing on the controller node, of_get_regulator() in
drivers/regulator/of_regulator.c falls back to a recursive search of the
child nodes:
regnode = of_parse_phandle(node, prop_name, 0);
if (regnode)
return regnode;
regnode = of_get_child_regulator(dev->of_node, prop_name);
Before the earlier binding patch in this series, the binding only allowed
vpwr-supply in the pse-pi nodes. The example in ti,tps23881.yaml still has
it only there.
On those DTs, the controller's "vpwr" consumer would silently resolve to
the first PI's supply (vpwr1 in the binding example, found via channels ->
pse-pis -> pse-pi@0). No dummy regulator message would be printed.
That supply then stays enabled for the whole lifetime of the device. Can
the first PI rail still be turned off when the PIs on it are disabled?
The other PI rails (vpwr2) are not held, so the PIs would be treated
differently.
The commit message only says Vdd and Vpwr are enabled at probe time. Is
this binding to a PI supply intended for existing DTs?
[Severity: Medium]
Now that probe can power up the chip itself, is there still a power-on
delay when no reset GPIO is present? The only wait after power-on is
inside the reset block later in tps23881_i2c_probe():
if (reset) {
...
msleep(50);
}
ret = i2c_smbus_read_byte_data(client, TPS23881_REG_DEVID);
reset-gpios is optional in the binding. Without it, if vdd/vpwr were off
before probe, the DEVID read and tps23881_flash_sram_fw() run straight
after the regulators are enabled.
The regulator core only waits for the regulator's own enable/ramp time. It
does not wait for the chip's power-on reset.
The comment in the reset block cites a 20ms minimum after power-on reset
and a 50ms delay before SRAM loading. Without that wait, could the DEVID
read fail or return a bad ID (probe fails with "Wrong device ID")? Could
the SRAM and parity firmware be written while the chip is still in POR,
leaving it on ROM firmware or in safe mode (FWREV 0xFF)?
> reset = devm_gpiod_get_optional(dev, "reset", GPIOD_OUT_HIGH);
[Severity: Low]
What state is the RESET pin in when the supplies are turned off during
teardown?
The regulators are registered with devm before the reset GPIO, so devm
frees them in the reverse order. This happens on unbind and on a probe
failure after this point, for example in tps23881_flash_sram_fw(),
devm_pse_controller_register() or tps23881_setup_irq().
The GPIO descriptor is freed first, and the line stays deasserted. Then
vdd/vpwr are disabled. Nothing asserts reset before power is removed.
If the RESET pin is not fail-safe, could the host drive the unpowered
chip through that pin and back-power it? Before this patch the driver
never removed power, so this state could not happen.
> if (IS_ERR(reset))
> return dev_err_probe(&client->dev, PTR_ERR(reset), "Failed to get reset GPIO\n");
[ ... ]
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261202-feat_tps23861-v1-0-7d8320369817%40bootlin.com
Technical Details
Message-ID:
<179630770354.3146.335449007968453480@kernel.org>Path:
mbox-mo1.pugleaf.net!news-lon.pugleaf.net!feed-eu-txt.newsdeef.eu!feed-eu-ch.newsdeef.eu!srl.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-376655-linux-kernel-netdev=dewy.ruReferences:
<20261202-feat_tps23861-v1-8-7d8320369817@bootlin.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lon.pugleaf.net!feed-eu-txt.newsdeef.eu!feed-eu-ch.newsdeef.eu!srl.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-376655-linux-kernel-netdev=dewy.ru From: netdev-bot+sashiko@kernel.org Newsgroups: linux.kernel.netdev Subject: Re: [PATCH net-next 8/8] net: pse-pd: tps23881: Add support for Vdd and Vpwr power supply Date: Thu, 03 Dec 2026 14:21:43 +0000 Organization: Usenet Network Message-ID: <179630770354.3146.335449007968453480@kernel.org> References: <20261202-feat_tps23861-v1-8-7d8320369817@bootlin.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Injection-Info: usenet.network; logging-data="2512513"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:hvyuxj6zqJlGzMi2PyqApo6O3b4= sha256:BfasEAxYqIEEx9opFcFExuTSmCZ/YENRi+xw/2q9SWI= sha1:Y4TbV/yqb1lP7+h1tIdD1FZRwtc= sha256:y076f+XGj8bbjgwmFihPXFNQqJCAtf6XmWZAYx/omvA= List-ID: <netdev.vger.kernel.org> X-Mailpost-Empty-Hdrs: X-Spam-Level X-Received: from localhost (localhost [127.0.0.1]) by mail.dewy.ru (Postfix) with ESMTP id 01650117979; Thu, 3 Dec 2026 17:22:07 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.64 X-Spam-Status: No, score=-3.64 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.24, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key) header.d=kernel.org X-Received: from mail.dewy.ru ([127.0.0.1]) by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id lq9XjzT1ufkb; Thu, 3 Dec 2026 17:22:03 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-376655-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mail.dewy.ru (Postfix) with ESMTPS id 32112117976; Thu, 3 Dec 2026 17:21:54 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sea.lore.kernel.org (Postfix) with ESMTP id 3098C28D11; Thu, 3 Dec 2026 14:21:48 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1796307706; b=QfUfVp7FL2n4JDaoCU80z3PDO1KCztPe9L5HR4lEcdPaL49ykbLTArclUmUCedNuIr3Y kmS03MoCiOgG7K/t/1RKsEZ0aCzNe+Kj4vTbTuMQ0ngjmWXIrjRg1rg7wbQKbUTV2uwRk S5dr2MGdb5FFY4McfbLlUd4oJLI3uyPaj42gfS1ZUN6ru+NxtnOAbJXf1XS4MUIhrmXhk FNA9lCuoUx5sDpJ18SwMJCJhNpqVrmcNWzDZIV+HShftFoGhOGfP2QktWGE4Yy0jYLDoA rVzDF0NVfQMg7J23ZobdLFMpugNn3eLKnF5utjtdnTSWEiWfvfnfQLaLL0rB4ywqVJA== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796307706; h=X-Original-To:Received:Received:DKIM-Signature:Subject:From:To:Cc: Date:Message-ID:In-Reply-To:References:X-sashiko-severity: Content-Type:Content-Transfer-Encoding:X-Mailing-List:List-Id: List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner: Precedence:MIME-Version; bh=rfNdURtSu5/8KPQOe/eS8u51YG43GRjaHyc+beQtaFw=; b=5IUdsxtMQ8rvBE+6nV3dL/Nnr16EQgdcFsJYTzdMsFC+8iiSW5NjncXj0Mz/UzjtIZl4 ehT4HOz08srQTdAVE/9bFsKzcIx2AvRGjhp2r4pTvU97Qw9NxlUPapOmudHUbW2YDWCzw mIBiyKckawCxFi5StV3MlFLSYM3ash/j2KNVauYKe57CiLxWughHVX/6OqKVDRslHU8pi hdFowb+UTeVW2i0qYbndjAj+KJUdzFbnx1nJVJ6gZOptS4lPljBNYzRnSJSlM6evFKz8m Mv3lJywhNd6iXko3EoRdC2xzdKAQ2ioe2YaX55Wo1g/VRsmBT0eTvrzqEq0Y0Li6gXA== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=lF8MJWjM; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 39AB1606A692; Thu, 3 Dec 2026 14:21:46 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=lF8MJWjM X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796307705; b=aMe8vLojzFV8PnL0fQ9aSZyF9GnaVlFEbKhv5r9BoUEXplatOLM2SKddVw75XR6wuXrB pXfHSSreVY+LUGeUcHJCdyPf9eaoikuDORTQm6/dGCwexzFjTjecejOvjDu6owSr9itiR hFw5Kcs2Nhx7h8vSRREiPI2Hx0ZzInYPWtBsfIhVMjzu0DztLymF/tdwKYjdm43QbLEds GOqwtFHnGFgll5CWmNWXt9I/8nnCjBVYMMQYIKX1W/lzN9ENHh3ImTX5vqJm9SUpBuCOe EI2cEzvP4caFyFmR29ST8NH9qgxK6FHMmbV7Da7WMwaWtEuqe8BWTt3l9iM6GnzEjIw== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796307705; h=Received:DKIM-Signature:Subject:From:To:Cc:Date:Message-ID: In-Reply-To:References:X-sashiko-severity:Content-Type: Content-Transfer-Encoding:MIME-Version; bh=rfNdURtSu5/8KPQOe/eS8u51YG43GRjaHyc+beQtaFw=; b=O/a+AE29H2O+JhEATPKJGrRYqyRQUc1h8QCL/NJF7rr50HcEPD+ZS1tUwwFPsiNO0cbL /2QYQjARJjOcb71e/gRSH3L14KSqDw+dUaK8GY9BI5HZx16TK2wACwvxh+ABnSeHB2yYZ 0VHXW2Adq3jmoPH10Qgo5s4IspM2d8xzK9klTkNQld3QgX1BGBtEE+sS2zoLnoc6h33FY 0pTP1+k71IXAbGXk/6qBQ4JGwfUF0ccrWFipaVAj7ENPrARAheDWEjDXRlPIxplsq/DkY iOi3glkwpLPynRuJtHQ+XF9YfbzjpZnaWKVTNM2drV16I4/Ap3zgDaU0SlJLWGdbNPg== X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=lF8MJWjM; arc=none smtp.remote-ip=100.103.45.18 X-Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5B3CD606A33E; Thu, 3 Dec 2026 14:21:45 +0000 (UTC) X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 023271F00893; Thu, 3 Dec 2026 14:21:43 +0000 (UTC) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796307704; bh=rfNdURtSu5/8KPQOe/eS8u51YG43GRjaHyc+beQtaFw=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=lF8MJWjMM99a1SjJ/9tQZVNso357ne+DvthI/29arrRsajXOWGj2UJ25o5iZvMKN5 lR6UJLWEStZ7UQlG6VaBKBuD0oKMdpelJXrGVi4mKSnRiG/9nBzXOlMNQyCRhDUlwR nYhmQFuiIUTIX714+YOLIWtRyM7eoZB+2fhdZIMd/7dBd6L2zRytsQ7JwGoxNWKm8t 7tP4PP3SFSoEWfqpEA02oQ50ptnOth9ixNHECGFNydOH8ecx1ObfmWSKF7q2P8VeV5 iGWvkOcUx5A3m0e8HY7rcJoRQKOFlt7iWrusYBH522soSgdWH6P76IrxEya018u3iB rZDY6dwnTAIsg== X-Cc: o.rempel@pengutronix.de, andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@kernel.org, kuba@kernel.org, pabeni@redhat.com, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, roman@damex.org, maxime.chevallier@bootlin.com, thomas.petazzoni@bootlin.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Phil.Edworthy@addsecure.com, devicetree@vger.kernel.org X-In-Reply-To: <20261202-feat_tps23861-v1-8-7d8320369817@bootlin.com> X-sashiko-severity: Medium X-Mailing-List: netdev@vger.kernel.org X-List-Post: <mailto:netdev@vger.kernel.org> X-List-Help: <mailto:netdev+help@vger.kernel.org> X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org> X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org> X-List-Owner: <mailto:netdev+owner@vger.kernel.org> X-Precedence: list