From: sashiko-bot@kernel.org
To: "Akshay Gupta" <Akshay.Gupta@amd.com>
Cc: linux-hwmon@vger.kernel.org
Subject: Re: [PATCH v3 1/8] hwmon/misc: amd-sbi: Move core sbtsi support from hwmon to misc
Date: Mon, 22 Jun 2026 14:12:36 +0000 [thread overview]
Message-ID: <20260622141237.5EAFA1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260622135821.2190260-2-Akshay.Gupta@amd.com>
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [High] Auxiliary device ID collision prevents probing multiple sensors with identical addresses on different buses.
- [Low] SENSORS_SBTSI selects AMD_SBTSI but fails to inherit its dependencies, causing Kconfig unmet dependency warnings and potential build failures.
--
commit 66b0cf6c2e144993bdd6fedccce15184c3257aaf
Author: Prathima <Prathima.Lk@amd.com>
hwmon/misc: amd-sbi: Move core sbtsi support from hwmon to misc
This commit moves the SBTSI core functionality out of the hwmon subsystem
and into drivers/misc/amd-sbi so it can be reused by non-hwmon consumers.
It registers an auxiliary device that the hwmon driver can bind to.
> diff --git a/drivers/hwmon/Kconfig b/drivers/hwmon/Kconfig
> index e4c4f2b09732d..8f204cf49b6e0 100644
> --- a/drivers/hwmon/Kconfig
> +++ b/drivers/hwmon/Kconfig
> @@ -1963,7 +1963,7 @@ config SENSORS_SL28CPLD
>
> config SENSORS_SBTSI
> tristate "Emulated SB-TSI temperature sensor"
> - depends on I2C
> + select AMD_SBTSI
[Severity: Low]
Will this cause a Kconfig unmet dependency warning?
Because the target config depends on I2C and ARM || ARM64 || COMPILE_TEST,
selecting it here without those same dependencies means SENSORS_SBTSI can
be enabled on unsupported architectures or when I2C is disabled.
This forces the target to be built despite its unsatisfied dependencies,
which could lead to build or link errors.
> help
> If you say yes here you get support for emulated temperature
> sensors on AMD SoCs with SB-TSI interface connected to a BMC device.
[ ... ]
> diff --git a/drivers/misc/amd-sbi/tsi.c b/drivers/misc/amd-sbi/tsi.c
> new file mode 100644
> index 0000000000000..dfdd730b906af
> --- /dev/null
> +++ b/drivers/misc/amd-sbi/tsi.c
> @@ -0,0 +1,134 @@
[ ... ]
> +static int sbtsi_create_hwmon_adev(struct device *dev, u8 dev_addr)
> +{
> + struct auxiliary_device *adev;
> + int ret;
> +
> + adev = kzalloc_obj(*adev);
> + if (!adev)
> + return -ENOMEM;
> +
> + adev->name = AMD_SBTSI_AUX_HWMON;
> + /*
> + * In a multi-socket system, otherwise identical devices do not
> + * share the same static address; each instance has its own address,
> + * which must be supplied via the device tree (DTS).
> + */
> + adev->id = dev_addr;
[Severity: High]
Does this risk a sysfs name collision on systems with multiple I2C buses?
If multiple independent I2C buses each have a sensor at the same address,
the assigned id will be identical for both.
Because the auxiliary device name is constructed as
amd-sbtsi.temp-sensor.<id>, the second device to probe might fail the
device addition with a sysfs duplicate name warning, leaving the sensor
unusable.
Could a globally unique ID be generated here instead, perhaps using the
IDA framework?
> + adev->dev.parent = dev;
> + adev->dev.release = sbtsi_adev_release;
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260622135821.2190260-1-Akshay.Gupta@amd.com?part=1
next prev parent reply other threads:[~2026-06-22 14:12 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-22 13:58 [PATCH v3 0/8] misc: amd-sbi: Refactor SBTSI driver with I3C support and ioctl interface Akshay Gupta
2026-06-22 13:58 ` [PATCH v3 1/8] hwmon/misc: amd-sbi: Move core sbtsi support from hwmon to misc Akshay Gupta
2026-06-22 14:12 ` sashiko-bot [this message]
2026-06-22 13:58 ` [PATCH v3 2/8] hwmon: sbtsi_temp: Refactor temperature register access into helpers Akshay Gupta
2026-06-22 14:11 ` sashiko-bot
2026-06-22 13:58 ` [PATCH v3 3/8] hwmon/misc: amd-sbi: Move sbtsi register transfer to core abstraction Akshay Gupta
2026-06-22 14:18 ` sashiko-bot
2026-06-22 13:58 ` [PATCH v3 4/8] misc: amd-sbi: Consolidate Common SBTSI Probe Path for I2C and I3C Akshay Gupta
2026-06-22 14:11 ` sashiko-bot
2026-06-22 13:58 ` [PATCH v3 5/8] misc: amd-sbi: Add support for SB-TSI over I3C Akshay Gupta
2026-06-22 14:19 ` sashiko-bot
2026-06-22 13:58 ` [PATCH v3 6/8] misc: amd-sbi: Add SBTSI ioctl register transfer interface Akshay Gupta
2026-06-22 14:15 ` sashiko-bot
2026-06-22 13:58 ` [PATCH v3 7/8] hwmon: Add mutex protecting for sbtsi read/write through hwmon Akshay Gupta
2026-06-22 14:17 ` sashiko-bot
2026-06-22 13:58 ` [PATCH v3 8/8] docs: misc: amd-sbi: Document SBTSI userspace interface Akshay Gupta
2026-06-22 14:12 ` sashiko-bot
2026-06-22 16:57 ` Randy Dunlap
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=20260622141237.5EAFA1F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=Akshay.Gupta@amd.com \
--cc=linux-hwmon@vger.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.