From: sashiko-bot@kernel.org
To: "Salih Erim" <salih.erim@amd.com>
Cc: robh@kernel.org, conor+dt@kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH v7 5/5] iio: adc: versal-sysmon: add oversampling support
Date: Sun, 14 Jun 2026 23:47:37 +0000 [thread overview]
Message-ID: <20260614234738.127091F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260614233722.2603459-6-salih.erim@amd.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] Software cache for oversampling ratio is not synchronized with hardware state.
--
commit 10aa21fe8c20849d9568e9f27df70f27c183249f
Author: Salih Erim <salih.erim@amd.com>
iio: adc: versal-sysmon: add oversampling support
Add support for reading and writing the oversampling ratio through
the IIO oversampling_ratio attribute. The hardware supports averaging
2, 4, 8, or 16 samples, plus a ratio of 1 (no averaging).
> diff --git a/drivers/iio/adc/versal-sysmon-core.c b/drivers/iio/adc/versal-sysmon-core.c
> index 16feb373bc704..d9599a7bc8978 100644
> --- a/drivers/iio/adc/versal-sysmon-core.c
> +++ b/drivers/iio/adc/versal-sysmon-core.c
[ ... ]
> @@ -839,6 +988,8 @@ int sysmon_core_probe(struct device *dev, struct regmap *regmap)
>
> sysmon = iio_priv(indio_dev);
> sysmon->regmap = regmap;
> + sysmon->temp_oversampling = 1;
> + sysmon->supply_oversampling = 1;
[Severity: Medium]
Will this cause the software cache to be out of sync with the hardware if the
bootloader or firmware previously enabled oversampling?
Since these defaults are not written to the hardware registers during probe,
and the actual hardware state is not read back to populate the cache, the IIO
sysfs interface might incorrectly report a ratio of 1 while the hardware is
actually averaging samples.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260614233722.2603459-1-salih.erim@amd.com?part=5
prev parent reply other threads:[~2026-06-14 23:47 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-14 23:37 [PATCH v7 0/5] iio: adc: add AMD/Xilinx Versal SysMon driver Salih Erim
2026-06-14 23:37 ` [PATCH v7 1/5] dt-bindings: iio: adc: add xlnx,versal-sysmon binding Salih Erim
2026-06-14 23:37 ` [PATCH v7 2/5] iio: adc: add Versal SysMon driver Salih Erim
2026-06-14 23:37 ` [PATCH v7 3/5] iio: adc: versal-sysmon: add I2C driver Salih Erim
2026-06-14 23:37 ` [PATCH v7 4/5] iio: adc: versal-sysmon: add threshold event support Salih Erim
2026-06-14 23:48 ` sashiko-bot
2026-06-14 23:37 ` [PATCH v7 5/5] iio: adc: versal-sysmon: add oversampling support Salih Erim
2026-06-14 23:47 ` 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=20260614234738.127091F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=robh@kernel.org \
--cc=salih.erim@amd.com \
--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