Re: [PATCH v2 2/4] hwmon: (cros_ec) Add support for fan target speed

From: Tzung-Bi Shih

Date: Wed Jan 21 2026 - 04:20:00 EST


On Sun, Jan 18, 2026 at 10:45:56AM +0100, Thomas Weißschuh wrote:
> @@ -259,8 +278,13 @@ static umode_t cros_ec_hwmon_is_visible(const void *data, enum hwmon_sensor_type
> u32 attr, int channel)
> {
> const struct cros_ec_hwmon_priv *priv = data;
> + u16 speed;
>
> if (type == hwmon_fan) {
> + if (attr == hwmon_fan_target &&
> + cros_ec_hwmon_read_fan_target(priv->cros_ec, &speed) == -EOPNOTSUPP)

[v2 4/4] patch uses is_cros_ec_cmd_available() for the purpose. Can't it
also use here?