From: Heikki Krogerus <heikki.krogerus@linux.intel.com>
To: Radhey Shyam Pandey <radhey.shyam.pandey@amd.com>
Cc: gregkh@linuxfoundation.org, linux-usb@vger.kernel.org,
linux-kernel@vger.kernel.org, git@amd.com
Subject: Re: [PATCH 1/3] usb: typec: tipd: add error message for vendor ID read failure
Date: Mon, 18 May 2026 13:19:01 +0300 [thread overview]
Message-ID: <agrnlRSyW7_A0AiS@kuha> (raw)
In-Reply-To: <20260513182850.165349-2-radhey.shyam.pandey@amd.com>
On Wed, May 13, 2026 at 11:58:48PM +0530, Radhey Shyam Pandey wrote:
> Log when the vendor ID read fails or returns zero, including the I2C error
> code and register value, to ease probe diagnostics.
>
> Signed-off-by: Radhey Shyam Pandey <radhey.shyam.pandey@amd.com>
> ---
> drivers/usb/typec/tipd/core.c | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/usb/typec/tipd/core.c b/drivers/usb/typec/tipd/core.c
> index 43faec794b95..b282366b5326 100644
> --- a/drivers/usb/typec/tipd/core.c
> +++ b/drivers/usb/typec/tipd/core.c
> @@ -1744,7 +1744,7 @@ static int tps6598x_probe(struct i2c_client *client)
> struct tps6598x *tps;
> struct fwnode_handle *fwnode;
> u32 status;
> - u32 vid;
> + u32 vid = 0;
Why is this necessary?
> int ret;
>
> data = i2c_get_match_data(client);
> @@ -1772,8 +1772,11 @@ static int tps6598x_probe(struct i2c_client *client)
>
> if (!device_is_compatible(tps->dev, "ti,tps25750")) {
> ret = tps6598x_read32(tps, TPS_REG_VID, &vid);
> - if (ret < 0 || !vid)
> + if (ret < 0 || !vid) {
> + dev_err(tps->dev, "failed to read vendor ID: %d, vid: %#x\n",
> + ret, vid);
> return -ENODEV;
> + }
> }
>
> /*
> --
> 2.44.4
--
heikki
next prev parent reply other threads:[~2026-05-18 10:19 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-13 18:28 [PATCH 0/3] usb: typec: tipd: improve probe diagnostics and POWER_STATUS handling Radhey Shyam Pandey
2026-05-13 18:28 ` [PATCH 1/3] usb: typec: tipd: add error message for vendor ID read failure Radhey Shyam Pandey
2026-05-18 10:19 ` Heikki Krogerus [this message]
2026-05-18 15:53 ` Pandey, Radhey Shyam
2026-05-19 13:54 ` Heikki Krogerus
2026-05-19 16:23 ` Pandey, Radhey Shyam
2026-05-13 18:28 ` [PATCH 2/3] usb: typec: tipd: demote missing IRQ log to info for polling mode Radhey Shyam Pandey
2026-05-18 10:26 ` Heikki Krogerus
2026-05-18 15:56 ` Pandey, Radhey Shyam
2026-05-13 18:28 ` [PATCH 3/3] usb: typec: tipd: name TPS_REG_POWER_STATUS field masks Radhey Shyam Pandey
2026-05-18 10:34 ` Heikki Krogerus
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=agrnlRSyW7_A0AiS@kuha \
--to=heikki.krogerus@linux.intel.com \
--cc=git@amd.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=radhey.shyam.pandey@amd.com \
/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