From: sashiko-bot@kernel.org
To: "Kyle Hsieh" <kylehsieh1995@gmail.com>
Cc: robh@kernel.org, devicetree@vger.kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH v7 2/2] iio: adc: ti-ads112c04: Add support for TI ADS112C04
Date: Mon, 24 Aug 2026 08:56:36 +0000 [thread overview]
Message-ID: <20260824085636.A14C11F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260824-ti-ads112c04-driver-v7-2-6b3c9c87d0e4@gmail.com>
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Medium] Incomplete device reset sequence on unbind/rebind or warm boot.
- [Medium] Missing reset line assertion on driver teardown creates a backpowering risk.
--
--- Patch [2]: [PATCH v7 2/2] iio: adc: ti-ads112c04: Add support for TI ADS112C04 ---
commit 9f7a1feb19e31e75ff62fee357a6a2a6f50b0866
Author: Kyle Hsieh <kylehsieh1995@gmail.com>
iio: adc: ti-ads112c04: Add support for TI ADS112C04
This commit adds IIO driver support for the Texas Instruments ADS112C04
16-bit delta-sigma ADC. It implements single-shot conversions, dynamic
channel parsing, and hardware reset via the reset controller framework.
> diff --git a/drivers/iio/adc/ti-ads112c04.c b/drivers/iio/adc/ti-ads112c04.c
> new file mode 100644
> --- /dev/null
> +++ b/drivers/iio/adc/ti-ads112c04.c
[ ... ]
> +static int ads112c04_probe(struct i2c_client *client)
> +{
[ ... ]
> + reset = devm_reset_control_get_optional_exclusive(dev, NULL);
> + if (IS_ERR(reset))
> + return dev_err_probe(dev, PTR_ERR(reset), "failed to get reset\n");
> +
> + if (reset) {
> + /* Datasheet: tw(RSL), the RESET low pulse, is 250ns minimum */
> + fsleep(1);
> +
> + ret = reset_control_deassert(reset);
[Severity: Medium]
Is it possible for the hardware reset sequence to be skipped entirely on
driver rebind or warm boot?
If the reset controller is present, the software reset in the 'else' block
is skipped. However, if the reset line is already deasserted, calling
reset_control_deassert() without first calling reset_control_assert() (or
using reset_control_reset()) means no reset pulse is actually generated.
This could leave the device with stale register settings from prior
operations (such as continuous conversion mode) when the driver is bound.
> + if (ret)
> + return dev_err_probe(dev, ret, "failed to deassert reset\n");
[Severity: Medium]
Does the reset line need to be explicitly asserted when the driver unbinds?
The devres framework will automatically disable the AVDD and DVDD regulators
on driver teardown. Because there is no cleanup action registered (e.g., via
devm_add_action_or_reset()) to assert the reset line before the regulators
are turned off, the SoC might continue driving the reset pin high while the
ADC's power supplies are disconnected.
Could this violate absolute maximum ratings and create a backpowering risk
for the ADC?
> + } else {
> + ret = ads112c04_write_cmd(client, ADS112C04_CMD_RESET);
> + if (ret < 0)
> + return ret;
> + }
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260824-ti-ads112c04-driver-v7-0-6b3c9c87d0e4@gmail.com?part=2
next prev parent reply other threads:[~2026-08-24 8:56 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-24 8:49 [PATCH v7 0/2] iio: adc: Add support for Texas Instruments ADS112C04 Kyle Hsieh
2026-08-24 8:49 ` [PATCH v7 1/2] dt-bindings: iio: adc: ti,ads112c04: Add binding for ADS112C04 Kyle Hsieh
2026-08-24 8:56 ` sashiko-bot
2026-08-24 8:49 ` [PATCH v7 2/2] iio: adc: ti-ads112c04: Add support for TI ADS112C04 Kyle Hsieh
2026-08-24 8:56 ` sashiko-bot [this message]
2026-08-24 9:54 ` Andy Shevchenko
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=20260824085636.A14C11F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=kylehsieh1995@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