Re: [PATCH 2/2] iio: proximity: Add driver for ST STHS34PF80
From: Siratul Islam
Date: Sun Dec 06 2026 - 15:01:41 EST
> On Dec 3, 2026, at 6:50 AM, Donggeun Yoo <donggeunyoo.kernel@xxxxxxxxx> wrote:
>
> Add a driver for the STMicroelectronics STHS34PF80, an infrared sensor
> for presence and motion detection, connected over I2C.
>
> Each read triggers a one-shot measurement. The driver exposes the
> ambient temperature and the object temperature. The object temperature
> is not linear in the raw readings. The driver computes it from the raw
> object and ambient readings and the sensitivity stored in the device,
> as described in AN5867, and reports it as a processed value.
>
> Presence and motion detection, the interrupt, buffered capture and SPI
> are not supported yet.
>
> Datasheet: https://www.st.com/resource/en/datasheet/sths34pf80.pdf
> Assisted-by: LLM
> Signed-off-by: Donggeun Yoo <donggeunyoo.kernel@xxxxxxxxx>
> ---
...
> +
> + ret = regmap_read(regmap, STHS34PF80_REG_WHO_AM_I, &whoami);
> + if (ret)
> + return dev_err_probe(dev, ret, "Failed to read WHO_AM_I\n");
> +
> + if (whoami != STHS34PF80_WHO_AM_I_VAL)
> + dev_info(dev, "Unknown WHO_AM_I: 0x%02x\n", whoami);
How about say here something more conventional like unknown "device id"
instead of naming the register? Users would have to look into datasheets
to know what's "WHO_AM_I".
This is also, I think, serious enough to at least deserve a "dev_warn" instead of "dev_info"
> +
...
> +
> +MODULE_AUTHOR("Donggeun Yoo <donggeunyoo.kernel@xxxxxxxxx>");
> +MODULE_DESCRIPTION("STMicroelectronics STHS34PF80 presence and motion sensor driver");
> +MODULE_LICENSE("GPL");
> --
> 2.53.0
>
>
Best regards,
Sirat