nouveau_hwmon: migrate to hwmon_device_register_with_info
Get series with b4
b4 am 20170413090706.qlmph5y4g5iac45l@linux-3potVersions newest first
- v1 Latest4 patches 5 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | nouveau_hwmon: migrate to hwmon_device_register_with_infodrivers/ | +160 | 2 replies | |
| 1/4 | nouveau_hwmon: migrate to hwmon_device_register_with_infodrivers/ | +72 | 0 replies | |
| 2/4 | nouveau_hwmon: migrate to hwmon_device_register_with_infodrivers/ | +310 | 0 replies | |
| 3/4 | nouveau_hwmon: migrate to hwmon_device_register_with_infodrivers/ | +28 | 0 replies | |
| 4/4 | nouveau_hwmon: migrate to hwmon_device_register_with_infodrivers/ | +7 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/4] nouveau_hwmon: migrate to hwmon_device_register_with_info
Hi again,
I've split the patches as Karol Herbst suggested.
I hope now it's fine.
This series of patches introduce the new hwmon_device_register_with_info and gets rid of the old hwmon_device_register.
This patch adds the default sensors with their possible config values. Just to prepare for the next patches
drivers/gpu/drm/nouveau/nouveau_hwmon.c renamed from drivers/gpu/drm/nouveau/nouveau_hwmon.c.orig +72 -0
@@ -692,6 +692,78 @@ static const struct attribute_group hwmostatic const struct attribute_group hwmon_power_caps_attrgroup = { .attrs = hwmon_power_caps_attributes, }; + +static const u32 nouveau_config_chip[] = { +HWMON_C_UPDATE_INTERVAL , +0 +}; + +static const u32 nouveau_config_in[] = { +HWMON_I_INPUT |HWMON_I_MIN |HWMON_I_MAX |HWMON_I_LABEL , +0 +}; + +static const u32 nouveau_config_temp[] = { +HWMON_T_INPUT |HWMON_T_MAX |HWMON_T_MAX_HYST | +HWMON_T_CRIT |HWMON_T_CRIT_HYST |HWMON_T_EMERGENCY | +HWMON_T_EMERGENCY_HYST , +0 +}; + +static const u32 nouveau_config_fan[] = { +HWMON_F_INPUT , +0 +}; + +static const u32 nouveau_config_pwm[] = { +HWMON_PWM_INPUT |HWMON_PWM_ENABLE , +0 +}; + +static const u32 nouveau_config_power[] = { +HWMON_P_INPUT |HWMON_P_CAP_MAX |HWMON_P_CRIT , +0 +}; + +static const struct hwmon_channel_info nouveau_chip = { + .type = hwmon_chip, + .config = nouveau_config_chip, +}; + +static const struct hwmon_channel_info nouveau_temp = { + .type = hwmon_temp, + .config = nouveau_config_temp, +}; + +static const struct hwmon_channel_info nouveau_fan = { + .type = hwmon_fan, + .config = nouveau_config_fan, +}; + +static const struct hwmon_channel_info nouveau_in = { + .type = hwmon_in, + .config = nouveau_config_in, +}; + +static const struct hwmon_channel_info nouveau_pwm = { + .type = hwmon_pwm, + .config = nouveau_config_pwm, +}; + +static const struct hwmon_channel_info nouveau_power = { + .type = hwmon_power, + .config = nouveau_config_power, +}; + +static const struct hwmon_channel_info *nouveau_info[] = { + &nouveau_chip, + &nouveau_temp, + &nouveau_fan, + &nouveau_in, + &nouveau_pwm, + &nouveau_power, +NULL +};#endif int
_______________________________________________
Nouveau mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/nouveau