Re: [PATCH v7 3/4] hwmon: (sht3x) Add devicetree support
From: Guenter Roeck
Date: Sun Jul 19 2026 - 10:18:16 EST
On Mon, Jul 13, 2026 at 03:45:58PM +0800, Zaixiang Xu wrote:
> Add an of_device_id table to support devicetree based instantiation
> of the supported sensors.
>
> The devicetree binding models all higher accuracy parts with a
> fallback to the base part of their group, so only the two base
> compatibles need to be listed. The match data distinguishes the
> humidity and temperature parts (SHT3x) from the temperature-only
> parts (STS3x), which require different configuration.
>
> Start enum sht3x_chips at 1: with sht3x equal to 0, the OF match
> data for the SHT devices would be NULL, causing i2c_get_match_data()
> to fall back to i2c_device_id name matching, which fails for
> devicetree names. The devices would then only work because the
> resulting chip id 0 happens to equal sht3x. Non-zero match data
> avoids relying on that coincidence.
>
> Signed-off-by: Zaixiang Xu <zaixiang.xu.dev@xxxxxxxxx>
Applied.
Thanks,
Guenter