From: sashiko-bot@kernel.org
To: "Nuno Sá via B4 Relay" <devnull+nuno.sa.analog.com@kernel.org>
Cc: linux-hwmon@vger.kernel.org
Subject: Re: [PATCH v12 3/3] gpio: gpio-ltc4283: Add support for the LTC4283 Swap Controller
Date: Thu, 30 Apr 2026 10:34:48 +0000 [thread overview]
Message-ID: <20260430103449.71F2BC2BCB3@smtp.kernel.org> (raw)
In-Reply-To: <20260430-ltc4283-support-v12-3-5dc9901f2567@analog.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] Hardware glitch due to setting GPIO direction to output before setting the output value.
--
commit 50e4fcc0438eacaeeb8d0e7b85d04586253d71c0
Author: Nuno Sá <nuno.sa@analog.com>
gpio: gpio-ltc4283: Add support for the LTC4283 Swap Controller
This commit adds GPIO support for the LTC4283 device. It registers an auxiliary
driver and a gpio_chip for up to 8 pins that can be configured as GPIOs.
[ ... ]
> diff --git a/drivers/gpio/gpio-ltc4283.c b/drivers/gpio/gpio-ltc4283.c
> new file mode 100644
> index 0000000000000..6609443c5d62c
> --- /dev/null
> +++ b/drivers/gpio/gpio-ltc4283.c
[ ... ]
> +static int ltc4283_gpio_direction_output(struct gpio_chip *gc, unsigned int off, int val)
> +{
> + struct ltc4283_gpio *st = gpiochip_get_data(gc);
> + int ret;
> +
> + ret = ltc4283_gpio_direction_set(st, off, false);
> + if (ret)
> + return ret;
> +
> + return __ltc4283_gpio_set_value(st, off, val);
Does this sequence cause a hardware glitch on the GPIO line?
By calling ltc4283_gpio_direction_set() before __ltc4283_gpio_set_value(),
the pin is configured as an output while holding whatever residual logic
level was previously stored in the output value register.
If the residual value differs from the requested val, the hardware might
momentarily drive the pin with an unintended electrical state.
Should the driver write the intended output value first, and then configure
the pin as an output?
> +}
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260430-ltc4283-support-v12-0-5dc9901f2567@analog.com?part=3
prev parent reply other threads:[~2026-04-30 10:34 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-30 8:52 [PATCH v12 0/3] hwmon: Add support for the LTC4283 Hot Swap Controller Nuno Sá via B4 Relay
2026-04-30 8:52 ` [PATCH v12 1/3] dt-bindings: hwmon: Document the LTC4283 " Nuno Sá via B4 Relay
2026-04-30 8:52 ` [PATCH v12 2/3] hwmon: ltc4283: Add support for " Nuno Sá via B4 Relay
2026-04-30 10:03 ` sashiko-bot
2026-04-30 14:52 ` Guenter Roeck
2026-04-30 16:50 ` Nuno Sá
2026-05-01 6:10 ` Guenter Roeck
2026-05-01 9:07 ` Nuno Sá
2026-04-30 8:52 ` [PATCH v12 3/3] gpio: gpio-ltc4283: " Nuno Sá via B4 Relay
2026-04-30 10:34 ` sashiko-bot [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=20260430103449.71F2BC2BCB3@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=devnull+nuno.sa.analog.com@kernel.org \
--cc=linux-hwmon@vger.kernel.org \
--cc=sashiko@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