Re: [PATCH v4 2/4] hwmon: (gpd-fan): Initialize EC before registering hwmon device
From: Guenter Roeck
Date: Wed Jun 10 2026 - 09:16:37 EST
On Wed, Jun 10, 2026 at 09:49:10AM +0800, Pei Xiao wrote:
> Move the gpd_init_ec() call to before devm_hwmon_device_register_with_info
> in the probe function. With the previous ordering the hwmon device was
> registered and exposed to userspace before the EC initialization
> completes, creating a window where sysfs reads could return invalid values.
>
> Some buggy firmware won't initialize EC properly on boot. Before its
> initialization, reading RPM will always return 0, and writing PWM will have
> no effect. So move gpd_init_ec to before hwmon device register.
>
> Fixes: 0ab88e239439 ("hwmon: add GPD devices sensor driver")
> Signed-off-by: Pei Xiao <xiaopei01@xxxxxxxxxx>
Applied.
Thanks,
Guenter