From: Guenter Roeck Date: Mon, 31 Aug 2015 23:16:17 +0000 (-0700) Subject: Swap SETP_UP_TIME and STEP_DOWN_TIME for all chips but NCT6775 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=cf0541c0b9557045ec4b0e6b4314caac28f28fc5;p=groeck-nct6775 Swap SETP_UP_TIME and STEP_DOWN_TIME for all chips but NCT6775 The register definition was changed (swapped) after NCT6776. Signed-off-by: Guenter Roeck --- diff --git a/nct6775.c b/nct6775.c index 45b7362..c0c0324 100644 --- a/nct6775.c +++ b/nct6775.c @@ -256,6 +256,7 @@ static const u16 NCT6775_REG_TARGET[] = { 0x101, 0x201, 0x301, 0x801, 0x901, 0xa01 }; static const u16 NCT6775_REG_FAN_MODE[] = { 0x102, 0x202, 0x302, 0x802, 0x902, 0xa02 }; +/* STEP_DOWN_TIME and STEP_UP_TIME regs are swapped for all chips but NCT6775 */ static const u16 NCT6775_REG_FAN_STEP_DOWN_TIME[] = { 0x103, 0x203, 0x303, 0x803, 0x903, 0xa03 }; static const u16 NCT6775_REG_FAN_STEP_UP_TIME[] = { @@ -3560,8 +3561,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] = NCT6775_REG_FAN_STEP_DOWN_TIME; + data->REG_FAN_TIME[2] = NCT6775_REG_FAN_STEP_UP_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; @@ -3632,8 +3633,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] = NCT6775_REG_FAN_STEP_DOWN_TIME; + data->REG_FAN_TIME[2] = NCT6775_REG_FAN_STEP_UP_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; @@ -3710,8 +3711,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] = NCT6775_REG_FAN_STEP_DOWN_TIME; + data->REG_FAN_TIME[2] = NCT6775_REG_FAN_STEP_UP_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;