From: Asdlerto Korry via B4 Relay <devnull+korryasdlerto.gmail.com@kernel.org>
To: Krzysztof Kozlowski <krzk@kernel.org>,
David Heidelberg <david@ixit.cz>,
Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@kernel.org>,
Jakub Kicinski <kuba@kernel.org>,
Paolo Abeni <pabeni@redhat.com>, Rob Herring <robh@kernel.org>,
Conor Dooley <conor+dt@kernel.org>
Cc: oe-linux-nfc@lists.linux.dev, netdev@vger.kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>,
Asdlerto Korry <korryasdlerto@gmail.com>
Subject: [PATCH net-next v3 2/2] nfc: s3fwrn5: i2c: Enable the pvdd supply
Date: Thu, 12 Nov 2026 19:25:50 +0200 [thread overview]
Message-ID: <20261112-m52xq-nfc-netdev-v3-2-725a61ce4148@gmail.com> (raw)
In-Reply-To: <20261112-m52xq-nfc-netdev-v3-0-725a61ce4148@gmail.com>
From: Asdlerto Korry <korryasdlerto@gmail.com>
Get and enable the optional PVDD supply before the enable GPIO is
driven. Boards that switch this supply from the SoC no longer have to
mark the regulator always-on.
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Signed-off-by: Asdlerto Korry <korryasdlerto@gmail.com>
---
drivers/nfc/s3fwrn5/i2c.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/nfc/s3fwrn5/i2c.c b/drivers/nfc/s3fwrn5/i2c.c
index 4ba762611711..eaa9a1f75533 100644
--- a/drivers/nfc/s3fwrn5/i2c.c
+++ b/drivers/nfc/s3fwrn5/i2c.c
@@ -11,6 +11,7 @@
#include <linux/gpio/consumer.h>
#include <linux/delay.h>
#include <linux/module.h>
+#include <linux/regulator/consumer.h>
#include <net/nfc/nfc.h>
@@ -160,6 +161,12 @@ static int s3fwrn5_i2c_probe(struct i2c_client *client)
phy->i2c_dev = client;
i2c_set_clientdata(client, phy);
+ /* The chip has to be powered before EN is driven */
+ ret = devm_regulator_get_enable_optional(&client->dev, "pvdd");
+ if (ret && ret != -ENODEV)
+ return dev_err_probe(&client->dev, ret,
+ "failed to enable pvdd supply\n");
+
phy->common.gpio_en = devm_gpiod_get(&client->dev, "en", GPIOD_OUT_HIGH);
if (IS_ERR(phy->common.gpio_en))
return PTR_ERR(phy->common.gpio_en);
--
2.25.1
prev parent reply other threads:[~2026-11-12 17:25 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-12 17:25 [PATCH net-next v3 0/2] nfc: s3fwrn5: Add optional pvdd-supply Asdlerto Korry via B4 Relay
2026-11-12 17:25 ` [PATCH net-next v3 1/2] dt-bindings: net: nfc: samsung,s3fwrn5: Add pvdd-supply Asdlerto Korry via B4 Relay
2026-11-12 17:25 ` Asdlerto Korry via B4 Relay [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261112-m52xq-nfc-netdev-v3-2-725a61ce4148@gmail.com \
--to=devnull+korryasdlerto.gmail.com@kernel.org \
--cc=andrew+netdev@lunn.ch \
--cc=conor+dt@kernel.org \
--cc=davem@davemloft.net \
--cc=david@ixit.cz \
--cc=devicetree@vger.kernel.org \
--cc=edumazet@kernel.org \
--cc=korryasdlerto@gmail.com \
--cc=krzk@kernel.org \
--cc=krzysztof.kozlowski@oss.qualcomm.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=oe-linux-nfc@lists.linux.dev \
--cc=pabeni@redhat.com \
--cc=robh@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®