From 58cc4d1d14d9ff04ce169815b6c4a88766bc5c73 Mon Sep 17 00:00:00 2001 From: Seung-Woo Kim Date: Wed, 27 Jan 2021 16:25:16 +0900 Subject: [PATCH] misc: khadas-mcu: fan: enable as auto mode by default Without sysfs contron, by default enable khadas fan as auto mode. It will check cpu temperature per every 5 seconds. Change-Id: I111b542ee62b2fdda0f65124f030db4f13b85c5f Signed-off-by: Seung-Woo Kim --- drivers/misc/khadas-mcu.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/misc/khadas-mcu.c b/drivers/misc/khadas-mcu.c index 1a6d810..41861a7 100644 --- a/drivers/misc/khadas-mcu.c +++ b/drivers/misc/khadas-mcu.c @@ -694,10 +694,12 @@ static int mcu_probe(struct i2c_client *client, const struct i2c_device_id *id) if (is_mcu_fan_control_supported()) { g_mcu_data->fan_data.mode = MCU_FAN_MODE_AUTO; g_mcu_data->fan_data.level = MCU_FAN_LEVEL_0; - g_mcu_data->fan_data.enable = MCU_FAN_STATUS_DISABLE; + g_mcu_data->fan_data.enable = MCU_FAN_STATUS_ENABLE; INIT_DELAYED_WORK(&g_mcu_data->fan_data.work, fan_work_func); mcu_fan_level_set(&g_mcu_data->fan_data, 0); + khadas_fan_set(&g_mcu_data->fan_data); + printk("%s: fan enabled as auto mode\n",__func__); } create_mcu_attrs(); printk("%s,wol enable=%d\n",__func__ ,g_mcu_data->wol_enable); -- 2.7.4