Merge "drivers: thermal: MAX31760: add to distinguish fan quantity in resume"

This commit is contained in:
qctecmdr 2024-05-24 20:48:04 -07:00 committed by Gerrit - the friendly Code Review server
commit 7dd5e2f090

View File

@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
* Copyright (c) 2022-2024 Qualcomm Innovation Center, Inc. All rights reserved.
*/
#include <linux/delay.h>
@ -530,7 +530,10 @@ static int max31760_resume(struct device *dev)
max31760_write_byte(pdata, MAX31760_CTRL_REG1, 0x19);
max31760_write_byte(pdata, MAX31760_CTRL_REG2, 0x11);
max31760_write_byte(pdata, MAX31760_CTRL_REG3, 0x31);
if (pdata->fan_num == 1)
max31760_write_byte(pdata, MAX31760_CTRL_REG3, 0x31);
else if (pdata->fan_num == 2)
max31760_write_byte(pdata, MAX31760_CTRL_REG3, 0x33);
max31760_set_cur_state_common(pdata, pdata->cur_state);
mutex_unlock(&pdata->update_lock);
}