From: sashiko-bot@kernel.org
To: "Nora Schiffer" <nora.schiffer@ew.tq-group.com>
Cc: robh@kernel.org, lee@kernel.org, conor+dt@kernel.org,
devicetree@vger.kernel.org, linux-leds@vger.kernel.org
Subject: Re: [PATCH 3/7] leds: pca995x: add support for reset GPIO
Date: Wed, 02 Sep 2026 12:41:57 +0000 [thread overview]
Message-ID: <20260902124158.19F441F00A3A@smtp.kernel.org> (raw)
In-Reply-To: <1d5436e3a143d72c04c2bfd1d7fee2674e0af8e5.1788350618.git.nora.schiffer@ew.tq-group.com>
Thank you for your contribution! Sashiko AI review found 4 potential issue(s) to consider:
- [Low] The commit message description violates the LED subsystem capitalization convention.
- [Low] Using usleep_range() for a microsecond delay under 10us.
- [Low] Use of the legacy <linux/gpio.h> header instead of <linux/gpio/consumer.h>.
- [Low] Missing #include <linux/delay.h> for usleep_range().
--
commit 73fa0526608a4d478003bcf92f25fa0aa33eae7c
Author: Nora Schiffer <nora.schiffer@ew.tq-group.com>
leds: pca995x: add support for reset GPIO
This commit adds support for resetting the PCA995x LED driver during
probe by utilizing a reset GPIO pin if provided in the Device Tree.
> leds: pca995x: add support for reset GPIO
[Severity: Low]
This isn't a bug, but does this violate the LED subsystem commit message
capitalization convention? The guidelines require capitalizing the
description after the subsystem prefix, so "add" would ideally be "Add".
> diff --git a/drivers/leds/leds-pca995x.c b/drivers/leds/leds-pca995x.c
> index fee6216cd1bd0..8eb9847b9709f 100644
> --- a/drivers/leds/leds-pca995x.c
> +++ b/drivers/leds/leds-pca995x.c
> @@ -8,6 +8,7 @@
> * Copyright 2023 Marek Vasut
> */
>
> +#include <linux/gpio.h>
[Severity: Low]
Does this code use the legacy <linux/gpio.h> header instead of
<linux/gpio/consumer.h>?
The kernel typically forbids including <linux/gpio.h> in consumer drivers.
Since this driver only uses descriptor-based APIs like
devm_gpiod_get_optional() and gpiod_set_value_cansleep(), relying on
<linux/gpio.h> can cause implicit declaration build errors if
CONFIG_GPIOLIB is disabled.
[ ... ]
> @@ -130,6 +132,16 @@ static int pca995x_probe(struct i2c_client *client)
> if (!dev_fwnode(dev))
> return -ENODEV;
>
> + reset_gpio = devm_gpiod_get_optional(dev, "reset", GPIOD_OUT_HIGH);
> + if (IS_ERR(reset_gpio))
> + return dev_err_probe(dev, PTR_ERR(reset_gpio),
> + "failed to request reset GPIO\n");
> + if (reset_gpio) {
> + usleep_range(3, 4);
[Severity: Low]
Is usleep_range() appropriate for a microsecond delay under 10us here?
According to the kernel timers-howto, usleep_range() is designed for
delays greater than 10us due to timer setup and context switching overhead.
For delays as short as 3-4us, udelay() is generally recommended to avoid
unnecessary performance inefficiency.
[Severity: Low]
Is there a missing #include <linux/delay.h> for this usleep_range() call?
Relying on implicit includes from other headers (like <linux/i2c.h>) is
fragile and could cause build breakages on certain architectures or
configurations.
> + gpiod_set_value_cansleep(reset_gpio, 0);
> + usleep_range(1500, 1600);
> + }
> +
> chip = devm_kzalloc(dev, sizeof(*chip), GFP_KERNEL);
--
Sashiko AI review · https://sashiko.dev/#/patchset/6d3600f99c77c31166f0b6a5ccfb7f518b53c4c9.1788350618.git.nora.schiffer@ew.tq-group.com?part=3
next prev parent reply other threads:[~2026-09-02 12:41 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-02 12:22 [PATCH 1/7] dt-bindings: leds: pca995x: describe reset-gpios property Nora Schiffer
2026-09-02 12:22 ` [PATCH 2/7] dt-bindings: leds: pca995x: describe output-gain property Nora Schiffer
2026-09-02 12:31 ` sashiko-bot
2026-09-02 13:10 ` Nora Schiffer
2026-09-03 8:34 ` Lee Jones
2026-09-03 13:09 ` Krzysztof Kozlowski
2026-09-02 12:22 ` [PATCH 3/7] leds: pca995x: add support for reset GPIO Nora Schiffer
2026-09-02 12:41 ` sashiko-bot [this message]
2026-09-02 12:22 ` [PATCH 4/7] leds: pca995x: make output gain configurable Nora Schiffer
2026-09-02 12:35 ` sashiko-bot
2026-09-02 12:22 ` [PATCH 5/7] leds: pca995x: add sysfs files for error reporting Nora Schiffer
2026-09-02 12:40 ` sashiko-bot
2026-09-02 12:22 ` [PATCH 6/7] leds: pca995x: do not use full on LED mode Nora Schiffer
2026-09-02 12:39 ` sashiko-bot
2026-09-02 12:22 ` [PATCH 7/7] leds: pca995x: add support for group brightness control Nora Schiffer
2026-09-02 12:43 ` sashiko-bot
2026-09-02 12:37 ` [PATCH 1/7] dt-bindings: leds: pca995x: describe reset-gpios property sashiko-bot
2026-09-02 16:16 ` Lee Jones
2026-09-03 6:42 ` Nora Schiffer
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=20260902124158.19F441F00A3A@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=lee@kernel.org \
--cc=linux-leds@vger.kernel.org \
--cc=nora.schiffer@ew.tq-group.com \
--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