Re: [PATCH v7] asus-wmi: Add support for custom fan curves

From: Barnabás Pőcze
Date: Wed Sep 01 2021 - 10:40:29 EST


> Hi Barnabás,
>
> I did another refactor using hwmon_device_register_with_info() and
> HWMON_CHANNEL_INFO(). I'm unsure if this is what you were looking for
> so I'm going to attach the patch instead of submitting as a V8 for now.
>
> My main concern as that the use of the above removes the
> pwm1_auto_point1_pwm + pwm1_auto_point1_temp format and gives two
> hwmon<num>, one per cpu/gpu fan with:
>
> device power
> fan1_input subsystem
> fan2_input temp1_input
> fan3_input temp2_input
> fan4_input temp3_input
> fan5_input temp4_input
> fan6_input temp5_input
> fan7_input temp6_input
> fan8_input temp7_input
> in0_enable temp8_input
> name uevent
>
> cat -p /sys/devices/platform/asus-nb-wmi/hwmon/hwmon7/name
> asus_cpu_fan_custom_curve
>
> I've named the root name of each as descriptive as possible to convey
> exactly what each is
>
> Oh and `sensors` now shows:
>
> asus_cpu_fan_curve-isa-0000
> Adapter: ISA adapter
> fan1: 8 RPM
> fan2: 10 RPM
> fan3: 18 RPM
> fan4: 20 RPM
> fan5: 28 RPM
> fan6: 34 RPM
> fan7: 44 RPM
> fan8: 56 RPM
> temp1: +0.0°C
> temp2: +0.1°C
> temp3: +0.1°C
> temp4: +0.1°C
> temp5: +0.1°C
> temp6: +0.1°C
> temp7: +0.1°C
> temp8: +0.1°C
>
>
> > FYI, the pwmX_enable attributes can be created by the hwmon
> > subsystem itself if you use [devm_]hwmon_device_register_with_info()
> > with appropriately populated `struct hwmon_chip_info`.
>
> So when you say this, did you mean *just* for the pwmX_enable
> attributes?
> [...]

Yes, that's right.


Best regards,
Barnabás Pőcze