From: sashiko-bot@kernel.org
To: "Jinseob Kim" <kimjinseob88@gmail.com>
Cc: conor+dt@kernel.org, devicetree@vger.kernel.org, robh@kernel.org
Subject: Re: [PATCH v8 5/5] iio: osf: add UART IIO driver
Date: Thu, 20 Aug 2026 05:27:22 +0000 [thread overview]
Message-ID: <20260820052722.D73391F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260820050608.5440-6-kimjinseob88@gmail.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] Hardware Initialization Order: Regulator enabled before UART is configured, risking loss of initial capability report.
--
--- Patch [5]: [PATCH v8 5/5] iio: osf: add UART IIO driver ---
commit 9c6fb720e1ae8c10cafcfaeb63c04248f654050d
Author: Jinseob Kim <kimjinseob88@gmail.com>
iio: osf: add UART IIO driver
This commit adds the Open Sensor Fusion (OSF) UART IIO driver. It handles
receiving OSF frames over a serdev UART, registers IIO devices based on
capability reports, and exposes sensor samples via direct reads and buffers.
> diff --git a/drivers/iio/opensensorfusion/osf_serdev.c b/drivers/iio/opensensorfusion/osf_serdev.c
> --- /dev/null
> +++ b/drivers/iio/opensensorfusion/osf_serdev.c
[ ... ]
> +static int osf_serdev_probe(struct serdev_device *serdev)
> +{
[ ... ]
> + serdev_device_set_drvdata(serdev, osf_uart);
> + serdev_device_set_client_ops(serdev, &osf_serdev_ops);
> +
> + ret = devm_regulator_get_enable(dev, "vcc");
> + if (ret)
> + return dev_err_probe(dev, ret,
> + "failed to enable vcc regulator\n");
> +
> + ret = serdev_device_open(serdev);
> + if (ret)
> + return ret;
> +
> + baudrate = serdev_device_set_baudrate(serdev, OSF_SERDEV_BAUD);
[Severity: High]
Could this hardware initialization order lead to a race condition where the
sensor's initial capability report is lost?
Since the vcc regulator is enabled before the serdev UART port is opened
and its baud rate configured, if the sensor boots quickly and transmits
its capability report immediately upon power-up, the host UART might not
be ready to receive it.
Because the driver relies on autonomously transmitted capability reports to
register IIO devices, missing this initial report could leave the driver
completely non-functional.
Would it be safer to open and configure the serdev UART before enabling
the regulator?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260820050608.5440-1-kimjinseob88@gmail.com?part=5
prev parent reply other threads:[~2026-08-20 5:27 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-20 5:06 [PATCH v8 0/5] iio: add Open Sensor Fusion IIO driver Jinseob Kim
2026-08-20 5:06 ` [PATCH v8 1/5] dt-bindings: iio: add Open Sensor Fusion device Jinseob Kim
2026-08-20 5:06 ` [PATCH v8 2/5] Documentation: iio: add Open Sensor Fusion driver overview Jinseob Kim
2026-08-20 5:06 ` [PATCH v8 3/5] iio: osf: add protocol decoding Jinseob Kim
2026-08-20 5:06 ` [PATCH v8 4/5] iio: osf: add authenticated stream parser Jinseob Kim
2026-08-20 5:06 ` [PATCH v8 5/5] iio: osf: add UART IIO driver Jinseob Kim
2026-08-20 5:27 ` 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=20260820052722.D73391F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=kimjinseob88@gmail.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