From: sashiko-bot@kernel.org
To: "Akash Kumar" <akash.kumar@oss.qualcomm.com>
Cc: linux-usb@vger.kernel.org, devicetree@vger.kernel.org,
robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH v3 4/4] usb: typec: ucsi_ccg: Add CC orientation sensing via GPIO
Date: Tue, 24 Nov 2026 09:06:36 +0000 [thread overview]
Message-ID: <sashiko-outbox-230787@kernel.org> (raw)
In-Reply-To: <20261124-ucsi-ccg-cc-orientation-v3-4-73cd114e5393@oss.qualcomm.com>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Medium] usb: typec: ucsi_ccg: wrong %pOFn format for fwnode in
ucsi_ccg_probe()
--
commit 4f8b454feccd38f23c3b043c36a16ff7ae4ab46d
Author: Akash Kumar <akash.kumar@oss.qualcomm.com>
usb: typec: ucsi_ccg: Add CC orientation sensing via GPIO
This commit adds optional per-connector GPIO sensing to report USB Type-C
CC orientation on Cypress CCGx controllers via the orientation-gpios
property.
> diff --git a/drivers/usb/typec/ucsi/ucsi_ccg.c b/drivers/usb/typec/ucsi/ucsi_ccg.c
> index c560d45393024..06c536d876940 100644
> --- a/drivers/usb/typec/ucsi/ucsi_ccg.c
> +++ b/drivers/usb/typec/ucsi/ucsi_ccg.c
[ ... ]
> @@ -1506,6 +1553,34 @@ static int ucsi_ccg_probe(struct i2c_client *client)
> if (uc->info.mode & CCG_DEVINFO_PDPORTS_MASK)
> uc->port_num++;
>
> + device_for_each_child_node_scoped(dev, fwnode) {
> + struct gpio_desc *desc;
> + u32 port;
> +
> + status = fwnode_property_read_u32(fwnode, "reg", &port);
> + if (status < 0) {
> + dev_err(dev, "missing reg property of %pOFn\n", fwnode);
> + return status;
> + }
[Severity: Medium]
Should this format specifier be %pfwP instead of %pOFn?
device_for_each_child_node_scoped() yields a struct fwnode_handle *,
whereas %pOFn expects a struct device_node * and applies
of_fwnode_handle(dn) (&dn->fwnode) in device_node_string(), causing an
invalid or NULL pointer dereference if a child node is missing its reg
property.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261124-ucsi-ccg-cc-orientation-v3-0-73cd114e5393@oss.qualcomm.com?part=4
next prev parent reply other threads:[~2026-11-24 9:06 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-24 8:53 [PATCH v3 0/4] usb: typec: ucsi_ccg: Add cypd6129/cypd6229 support and CC orientation sensing via GPIO Akash Kumar
2026-11-24 8:53 ` [PATCH v3 1/4] dt-bindings: usb: cypress,cypd4226: Add cypd6129/cypd6229 support Akash Kumar
2026-11-24 9:02 ` sashiko-bot
2026-11-24 8:53 ` [PATCH v3 2/4] usb: typec: ucsi_ccg: Add cypd6129/cypd6229 OF device IDs Akash Kumar
2026-11-24 8:53 ` [PATCH v3 3/4] dt-bindings: usb: cypress,cypd4226: Add orientation-gpios property Akash Kumar
2026-11-24 8:53 ` [PATCH v3 4/4] usb: typec: ucsi_ccg: Add CC orientation sensing via GPIO Akash Kumar
2026-11-24 9:06 ` sashiko-bot [this message]
2026-11-24 9:06 ` [PATCH v3 0/4] usb: typec: ucsi_ccg: Add cypd6129/cypd6229 support and " sashiko-bot
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=sashiko-outbox-230787@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=akash.kumar@oss.qualcomm.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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