mirror of https://gitee.com/openkylin/linux.git
hwmon: (nct6775) Swap STEP_UP_TIME and STEP_DOWN_TIME registers for most chips
The STEP_UP_TIME and STEP_DOWN_TIME registers are swapped for all chips but NCT6775. Reported-by: Grazvydas Ignotas <notasas@gmail.com> Reviewed-by: Jean Delvare <jdelvare@suse.de> Cc: stable@vger.kernel.org # v3.10+ Signed-off-by: Guenter Roeck <linux@roeck-us.net>
This commit is contained in:
parent
6ff33f3902
commit
728d294004
|
@ -354,6 +354,10 @@ static const u16 NCT6775_REG_TEMP_CRIT[ARRAY_SIZE(nct6775_temp_label) - 1]
|
|||
|
||||
/* NCT6776 specific data */
|
||||
|
||||
/* STEP_UP_TIME and STEP_DOWN_TIME regs are swapped for all chips but NCT6775 */
|
||||
#define NCT6776_REG_FAN_STEP_UP_TIME NCT6775_REG_FAN_STEP_DOWN_TIME
|
||||
#define NCT6776_REG_FAN_STEP_DOWN_TIME NCT6775_REG_FAN_STEP_UP_TIME
|
||||
|
||||
static const s8 NCT6776_ALARM_BITS[] = {
|
||||
0, 1, 2, 3, 8, 21, 20, 16, /* in0.. in7 */
|
||||
17, -1, -1, -1, -1, -1, -1, /* in8..in14 */
|
||||
|
@ -3528,8 +3532,8 @@ static int nct6775_probe(struct platform_device *pdev)
|
|||
data->REG_FAN_PULSES = NCT6776_REG_FAN_PULSES;
|
||||
data->FAN_PULSE_SHIFT = NCT6775_FAN_PULSE_SHIFT;
|
||||
data->REG_FAN_TIME[0] = NCT6775_REG_FAN_STOP_TIME;
|
||||
data->REG_FAN_TIME[1] = NCT6775_REG_FAN_STEP_UP_TIME;
|
||||
data->REG_FAN_TIME[2] = NCT6775_REG_FAN_STEP_DOWN_TIME;
|
||||
data->REG_FAN_TIME[1] = NCT6776_REG_FAN_STEP_UP_TIME;
|
||||
data->REG_FAN_TIME[2] = NCT6776_REG_FAN_STEP_DOWN_TIME;
|
||||
data->REG_TOLERANCE_H = NCT6776_REG_TOLERANCE_H;
|
||||
data->REG_PWM[0] = NCT6775_REG_PWM;
|
||||
data->REG_PWM[1] = NCT6775_REG_FAN_START_OUTPUT;
|
||||
|
@ -3600,8 +3604,8 @@ static int nct6775_probe(struct platform_device *pdev)
|
|||
data->REG_FAN_PULSES = NCT6779_REG_FAN_PULSES;
|
||||
data->FAN_PULSE_SHIFT = NCT6775_FAN_PULSE_SHIFT;
|
||||
data->REG_FAN_TIME[0] = NCT6775_REG_FAN_STOP_TIME;
|
||||
data->REG_FAN_TIME[1] = NCT6775_REG_FAN_STEP_UP_TIME;
|
||||
data->REG_FAN_TIME[2] = NCT6775_REG_FAN_STEP_DOWN_TIME;
|
||||
data->REG_FAN_TIME[1] = NCT6776_REG_FAN_STEP_UP_TIME;
|
||||
data->REG_FAN_TIME[2] = NCT6776_REG_FAN_STEP_DOWN_TIME;
|
||||
data->REG_TOLERANCE_H = NCT6776_REG_TOLERANCE_H;
|
||||
data->REG_PWM[0] = NCT6775_REG_PWM;
|
||||
data->REG_PWM[1] = NCT6775_REG_FAN_START_OUTPUT;
|
||||
|
@ -3677,8 +3681,8 @@ static int nct6775_probe(struct platform_device *pdev)
|
|||
data->REG_FAN_PULSES = NCT6779_REG_FAN_PULSES;
|
||||
data->FAN_PULSE_SHIFT = NCT6775_FAN_PULSE_SHIFT;
|
||||
data->REG_FAN_TIME[0] = NCT6775_REG_FAN_STOP_TIME;
|
||||
data->REG_FAN_TIME[1] = NCT6775_REG_FAN_STEP_UP_TIME;
|
||||
data->REG_FAN_TIME[2] = NCT6775_REG_FAN_STEP_DOWN_TIME;
|
||||
data->REG_FAN_TIME[1] = NCT6776_REG_FAN_STEP_UP_TIME;
|
||||
data->REG_FAN_TIME[2] = NCT6776_REG_FAN_STEP_DOWN_TIME;
|
||||
data->REG_TOLERANCE_H = NCT6776_REG_TOLERANCE_H;
|
||||
data->REG_PWM[0] = NCT6775_REG_PWM;
|
||||
data->REG_PWM[1] = NCT6775_REG_FAN_START_OUTPUT;
|
||||
|
|
Loading…
Reference in New Issue