Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Judith Mendez" <jm@ti.com>
Cc: devicetree@vger.kernel.org, robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH v5 3/3] arm64: defconfig: Enable drivers for BeagleBadge
Date: Wed, 27 May 2026 00:50:01 +0000	[thread overview]
Message-ID: <20260527005002.439FD1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260526235417.1326187-4-jm@ti.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:

Pre-existing issues:
- [High] The sht4x hwmon driver registers sysfs attributes outside the core hwmon locking but fails to implement its own locks, leading to race conditions on driver state and I2C communications.
--

commit f3062b5d533df41f751a64a30b3c9b20072c21e4
Author: Judith Mendez <jm@ti.com>

arm64: defconfig: Enable drivers for BeagleBadge

This commit enables drivers used on the BeagleBadge as modules in the
arm64 defconfig. This includes drivers for the LED PWM Multicolor,
MCP SPI IO Expander, Seven Segment display GPIO, and Temperature Sensor.

Link: https://www.beagleboard.org/boards/beaglebadge

> diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig
> index d905a0777f939..5cfb7f6f2ae78 100644
> --- a/arch/arm64/configs/defconfig
> +++ b/arch/arm64/configs/defconfig

[ ... ]

> @@ -766,6 +767,7 @@ CONFIG_SENSORS_LM90=m
>  CONFIG_SENSORS_PWM_FAN=m
>  CONFIG_SENSORS_RASPBERRYPI_HWMON=m
>  CONFIG_SENSORS_SL28CPLD=m
> +CONFIG_SENSORS_SHT4x=m
[Severity: High]
This is a pre-existing issue, but does the sht4x driver lack locking for
its sysfs attributes?

The hardware monitoring subsystem guidelines state that drivers must
implement their own locking for attributes registered outside the core,
such as those in extra_groups. The sht4x driver registers heater attributes
like heater_enable via extra_groups but does not appear to provide locking.

If a write to heater_enable occurs during the usleep_range() of a
temperature read:

sht4x_read_values() {
    ret = i2c_master_send(client, cmd, SHT4X_CMD_LEN);
    ...
    usleep_range(SHT4X_MEAS_DELAY_HPM, ...);
    ...
    ret = i2c_master_recv(client, raw_data, SHT4X_RESPONSE_LENGTH);
}

Concurrent with a write to the heater:

heater_enable_store() {
    ret = i2c_master_send(data->client, &cmd, SHT4X_CMD_LEN);
    ...
    data->heating_complete = jiffies + msecs_to_jiffies(heating_time_bound);
    data->data_pending = true;
}

Could this interleave I2C traffic and cause the subsequent
i2c_master_recv() to read the wrong response or abort the measurement?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260526235417.1326187-1-jm@ti.com?part=3

      reply	other threads:[~2026-05-27  0:50 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-26 23:54 [PATCH v5 0/3] arm64: dts/bindings: Add support for BeagleBadge Judith Mendez
2026-05-26 23:54 ` [PATCH v5 1/3] dt-bindings: arm: ti: Add am62l3-beaglebadge Judith Mendez
2026-05-26 23:54 ` [PATCH v5 2/3] arm64: dts: ti: Add k3-am62l3-beaglebadge Judith Mendez
2026-05-27  0:28   ` sashiko-bot
2026-05-26 23:54 ` [PATCH v5 3/3] arm64: defconfig: Enable drivers for BeagleBadge Judith Mendez
2026-05-27  0:50   ` 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=20260527005002.439FD1F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=jm@ti.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