mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 04:10:18 +09:00
hwmon: (it87) Ensure that pwm control cache is current before updating values
am: 6c95eba9ca
Change-Id: I5f06541ef3e2cbe962135210fa90372fcb495994
This commit is contained in:
@@ -1354,6 +1354,7 @@ static ssize_t set_pwm(struct device *dev, struct device_attribute *attr,
|
||||
return -EINVAL;
|
||||
|
||||
mutex_lock(&data->update_lock);
|
||||
it87_update_pwm_ctrl(data, nr);
|
||||
if (has_newer_autopwm(data)) {
|
||||
/*
|
||||
* If we are in automatic mode, the PWM duty cycle register
|
||||
@@ -1466,6 +1467,7 @@ static ssize_t set_pwm_temp_map(struct device *dev,
|
||||
}
|
||||
|
||||
mutex_lock(&data->update_lock);
|
||||
it87_update_pwm_ctrl(data, nr);
|
||||
data->pwm_temp_map[nr] = reg;
|
||||
/*
|
||||
* If we are in automatic mode, write the temp mapping immediately;
|
||||
|
||||
Reference in New Issue
Block a user