From: Heikki Krogerus <heikki.krogerus@linux.intel.com>
To: Michael Grzeschik <m.grzeschik@pengutronix.de>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
kernel@pengutronix.de, Badhri Jagan Sridharan <badhri@google.com>
Subject: Re: [PATCH] usb: typec: tcpci: add regulator support
Date: Mon, 7 Apr 2025 16:52:04 +0300 [thread overview]
Message-ID: <Z_PYhMbmNv6dWM4w@kuha.fi.intel.com> (raw)
In-Reply-To: <20250404-ml-topic-tcpci-v1-1-4442c7d0ee1e@pengutronix.de>
+Badhri
On Fri, Apr 04, 2025 at 01:17:20AM +0200, Michael Grzeschik wrote:
> The tcpci chip vbus pin is possibly driven by an regulator. This patch
> is adding support to enable an optional vdd regulator before probing.
>
> Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
> ---
> drivers/usb/typec/tcpm/tcpci.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/drivers/usb/typec/tcpm/tcpci.c b/drivers/usb/typec/tcpm/tcpci.c
> index 19ab6647af706..a56e31b20c214 100644
> --- a/drivers/usb/typec/tcpm/tcpci.c
> +++ b/drivers/usb/typec/tcpm/tcpci.c
> @@ -17,6 +17,7 @@
> #include <linux/usb/tcpci.h>
> #include <linux/usb/tcpm.h>
> #include <linux/usb/typec.h>
> +#include <linux/regulator/consumer.h>
>
> #define PD_RETRY_COUNT_DEFAULT 3
> #define PD_RETRY_COUNT_3_0_OR_HIGHER 2
> @@ -905,6 +906,10 @@ static int tcpci_probe(struct i2c_client *client)
> int err;
> u16 val = 0;
>
> + err = devm_regulator_get_enable_optional(&client->dev, "vdd");
> + if (err && err != -ENODEV)
> + return dev_err_probe(&client->dev, err, "Failed to get regulator\n");
> +
> chip = devm_kzalloc(&client->dev, sizeof(*chip), GFP_KERNEL);
> if (!chip)
> return -ENOMEM;
>
> ---
> base-commit: a1b5bd45d4ee58af4f56e49497b8c3db96d8f8a3
> change-id: 20250404-ml-topic-tcpci-524d1d6bfede
>
> Best regards,
> --
> Michael Grzeschik <m.grzeschik@pengutronix.de>
--
heikki
prev parent reply other threads:[~2025-04-07 13:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-03 23:17 Michael Grzeschik
2025-04-07 13:52 ` Heikki Krogerus [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=Z_PYhMbmNv6dWM4w@kuha.fi.intel.com \
--to=heikki.krogerus@linux.intel.com \
--cc=badhri@google.com \
--cc=gregkh@linuxfoundation.org \
--cc=kernel@pengutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=m.grzeschik@pengutronix.de \
/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®