]> git.sur5r.net Git - groeck-nct6775/blobdiff - nct6775.c
Fix fan count registers for NCT6779
[groeck-nct6775] / nct6775.c
index 6e21ffbd34d5372538d07acbde5971b84fa572cd..76ecaa4780da1fa4bd350a4c8bc618849afebf6e 100644 (file)
--- a/nct6775.c
+++ b/nct6775.c
@@ -256,7 +256,7 @@ static const u16 NCT6776_REG_FAN_MIN[] = { 0x63a, 0x63c, 0x63e, 0x640, 0x642};
 static const u16 NCT6779_REG_TOLERANCE_H[]
        = { 0x10c, 0x20c, 0x30c, 0x80c, 0x90c };
 
-static const u16 NCT6779_REG_FAN[] = { 0x4c0, 0x4c2, 0x4c4, 0x4c6, 0x4c8 };
+static const u16 NCT6779_REG_FAN[] = { 0x4b0, 0x4b2, 0x4b4, 0x4b6, 0x4b8 };
 
 static const u16 NCT6775_REG_TEMP[]
        = { 0x27, 0x150, 0x250, 0x62b, 0x62c, 0x62d };
@@ -661,7 +661,7 @@ static bool is_word_sized(struct nct6775_data *data, u16 reg)
                  reg == 0x73 || reg == 0x75 || reg == 0x77;
        case nct6779:
                return reg == 0x150 || reg == 0x153 || reg == 0x155 ||
-                 ((reg & 0xfff0) == 0x4c0 && (reg & 0x000f) < 0x09) ||
+                 ((reg & 0xfff0) == 0x4b0 && (reg & 0x000f) < 0x09) ||
                  reg == 0x402 ||
                  reg == 0x63a || reg == 0x63c || reg == 0x63e ||
                  reg == 0x640 || reg == 0x642 ||
@@ -3332,7 +3332,9 @@ static int __devinit nct6775_probe(struct platform_device *pdev)
 
                if (src >= data->temp_label_num ||
                    !strlen(data->temp_label[src])) {
-                       dev_info(dev, "Invalid temperature source %d\n", src);
+                       dev_info(dev,
+                                "Invalid temperature source %d at index %d, source register 0x%x, temp register 0x%x\n",
+                                src, i, data->REG_TEMP_SOURCE[i], reg_temp[i]);
                        continue;
                }