1 // SPDX-License-Identifier: GPL-2.0+
4 * Dirk Eibach, Guntermann & Drunck GmbH, dirk.eibach@gdsys.cc
7 #ifdef CONFIG_GDSYS_LEGACY_DRIVERS
14 FAN_TACHLIM_LSB = 0x48,
15 FAN_TACHLIM_MSB = 0x49,
19 void init_fan_controller(u8 addr)
23 /* set PWM Frequency to 2.5% resolution */
24 i2c_reg_write(addr, FAN_PWM_FREQ, 20);
26 /* set Tachometer Limit */
27 i2c_reg_write(addr, FAN_TACHLIM_LSB, 0x10);
28 i2c_reg_write(addr, FAN_TACHLIM_MSB, 0x0a);
30 /* enable Tach input */
31 val = i2c_reg_read(addr, FAN_CONFIG) | 0x04;
32 i2c_reg_write(addr, FAN_CONFIG, val);
35 #endif /* CONFIG_GDSYS_LEGACY_DRIVERS */