[PATCH v2] drm/xe/hwmon: expose fan speed
Raag Jadav
raag.jadav at intel.com
Sat Mar 8 16:12:16 UTC 2025
On Fri, Mar 07, 2025 at 09:33:05AM -0500, Rodrigo Vivi wrote:
> On Fri, Mar 07, 2025 at 06:21:12PM +0530, Raag Jadav wrote:
...
> > @@ -454,6 +485,7 @@ static const struct hwmon_channel_info * const hwmon_info[] = {
> > HWMON_CHANNEL_INFO(curr, HWMON_C_LABEL, HWMON_C_CRIT | HWMON_C_LABEL),
> > HWMON_CHANNEL_INFO(in, HWMON_I_INPUT | HWMON_I_LABEL, HWMON_I_INPUT | HWMON_I_LABEL),
> > HWMON_CHANNEL_INFO(energy, HWMON_E_INPUT | HWMON_E_LABEL, HWMON_E_INPUT | HWMON_E_LABEL),
> > + HWMON_CHANNEL_INFO(fan, HWMON_F_INPUT, HWMON_F_INPUT, HWMON_F_INPUT),
>
> here as well... I believe we should not expose the fan files if !has_fan_control
I'm not sure if I'm following here. We'll still to define channel attributes
to be able to let hwmon expose them at runtime based on has_fan_control flag.
One way I could think of is to do a manual sysfs_create_file(), but at that
point it defeats the purpose of having hwmon.
Raag
More information about the Intel-xe
mailing list