Oscar Salvador
2017-Apr-13 09:07 UTC
[Nouveau] [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 --- linux/drivers/gpu/drm/nouveau/nouveau_hwmon.c.orig 2017-04-12 19:18:09.638073562 +0200 +++ linux/drivers/gpu/drm/nouveau/nouveau_hwmon.c 2017-04-12 19:19:44.244797202 +0200 @@ -692,6 +692,78 @@ static const struct attribute_group hwmo static 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
Roy Spliet
2017-Apr-13 22:16 UTC
[Nouveau] [PATCH 0/4] nouveau_hwmon: migrate to hwmon_device_register_with_info
Just a non-technical (but important!) point: if you send four patches, make sure their title (the first line of your git commit messages) describes the content. Given you re-used the same title four times, I dare to say it's too generic. Also, I noticed that this is not the standard git patch format as produced by git format-patch. I don't know whether this is a concern (or whether you tweaked the format yourself), but in the off chance that you are relatively new to git, I recommend you to look up the "git format-patch" and "git send-email" commands. They make life a lot easier in our mailing-list based work-flow! This being said, thanks for the work! I'm sure with a bit of minor tweaking this is suitable for upstream. Roy Op 13-04-17 om 10:07 schreef Oscar Salvador:> 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 > > > --- linux/drivers/gpu/drm/nouveau/nouveau_hwmon.c.orig 2017-04-12 19:18:09.638073562 +0200 > +++ linux/drivers/gpu/drm/nouveau/nouveau_hwmon.c 2017-04-12 19:19:44.244797202 +0200 > @@ -692,6 +692,78 @@ static const struct attribute_group hwmo > static 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 > Nouveau at lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/nouveau-------------- next part -------------- An HTML attachment was scrubbed... URL: <https://lists.freedesktop.org/archives/nouveau/attachments/20170413/b3935d54/attachment.html>
Karol Herbst
2017-Apr-13 22:26 UTC
[Nouveau] [PATCH 0/4] nouveau_hwmon: migrate to hwmon_device_register_with_info
Hi Oscar, this is a cover letter, there should be no patch attached to it, but a stat of the following patches and an explenation what the series is doing. 2017-04-13 11:07 GMT+02:00 Oscar Salvador <osalvador.vilardaga at gmail.com>:> 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 > > > --- linux/drivers/gpu/drm/nouveau/nouveau_hwmon.c.orig 2017-04-12 19:18:09.638073562 +0200 > +++ linux/drivers/gpu/drm/nouveau/nouveau_hwmon.c 2017-04-12 19:19:44.244797202 +0200 > @@ -692,6 +692,78 @@ static const struct attribute_group hwmo > static 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 > Nouveau at lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/nouveau
Karol Herbst
2017-Apr-13 22:38 UTC
[Nouveau] [PATCH 0/4] nouveau_hwmon: migrate to hwmon_device_register_with_info
Also your series got a little messed up, there are two 1/4 patches, and both are different. 2017-04-13 11:07 GMT+02:00 Oscar Salvador <osalvador.vilardaga at gmail.com>:> 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 > > > --- linux/drivers/gpu/drm/nouveau/nouveau_hwmon.c.orig 2017-04-12 19:18:09.638073562 +0200 > +++ linux/drivers/gpu/drm/nouveau/nouveau_hwmon.c 2017-04-12 19:19:44.244797202 +0200 > @@ -692,6 +692,78 @@ static const struct attribute_group hwmo > static 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 > Nouveau at lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/nouveau
Seemingly Similar Threads
- [PATCH v2 1/5] nouveau_hwmon: Add config for all sensors and their settings
- [PATCH v2 0/5] replace hwmon_device_register for hwmon_device_register_with_info
- [PATCH 1/4] nouveau_hwmon: migrate to hwmon_device_register_with_info
- [PATCH v2 1/5] nouveau_hwmon: Add config for all sensors and their settings
- [PATCH 1/1] nouveau_hwmon: migrate to hwmon_device_register_with_info