]> www.infradead.org Git - users/jedix/linux-maple.git/commit
hwmon: (g762) Initialize fans after configuring clock
authorGuenter Roeck <linux@roeck-us.net>
Tue, 9 Jul 2024 22:41:07 +0000 (15:41 -0700)
committerGuenter Roeck <linux@roeck-us.net>
Tue, 9 Jul 2024 22:45:48 +0000 (15:45 -0700)
commitf4a180247e06c69e7d8fac4eb14d172c3a5d43a3
tree5452f961f1334d922b0d1973006d92ce6fad46df
parent4814241a5817ce8140dda8f1375bf76f99e68697
hwmon: (g762) Initialize fans after configuring clock

Adding support for G761 included adding support for an internal clock.
Enabling the internal clock requires setting a bit in the FAN_CMD2
register. This is implemented in g762_fan_init(). However, g762_fan_init()
is called before clock support is selected, and the flag indicating that
the internal clock should be used is not yet set.

Initialize the clock before initializing the fan to solve the problem.
While at it, also add "g7621" to the i2c_device_id array.

Cc: Christian Marangi <ansuelsmth@gmail.com>
Fixes: 6ce402327a6f ("hwmon: g672: add support for g761")
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/g762.c