]> git.sur5r.net Git - groeck-nct6775/commitdiff
Swap SETP_UP_TIME and STEP_DOWN_TIME for all chips but NCT6775
authorGuenter Roeck <linux@roeck-us.net>
Mon, 31 Aug 2015 23:16:17 +0000 (16:16 -0700)
committerGuenter Roeck <linux@roeck-us.net>
Mon, 31 Aug 2015 23:16:17 +0000 (16:16 -0700)
The register definition was changed (swapped) after NCT6776.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
nct6775.c

index 45b73627952e1bf822ad05ca39f527844f44598f..c0c03249b5ec9473bbab2f3d00c7246cfdf0aa40 100644 (file)
--- 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;