diff for duplicates of <11123113943693@kroah.com> diff --git a/a/1.txt b/N1/1.txt index f5802a2..6fa2ea2 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -12,7 +12,7 @@ The patch also changes some macros to use the SCALE macro. I think that they become more readable this way. -Signed-off-by: Rafael ?vila de Esp?ndola <rafael.espindola@gmail.com> +Signed-off-by: Rafael Ávila de Espíndola <rafael.espindola@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> @@ -61,7 +61,7 @@ diff -Nru a/drivers/i2c/chips/lm85.c b/drivers/i2c/chips/lm85.c these macros are called: arguments may be evaluated more than once. */ --/* IN are scaled 1.000 = 0xc0, mag = 3 */ +-/* IN are scaled 1.000 == 0xc0, mag = 3 */ -#define IN_TO_REG(val) (SENSORS_LIMIT((((val)*0xc0+500)/1000),0,255)) -#define INEXT_FROM_REG(val,ext) (((val)*1000 + (ext)*250 + 96)/0xc0) -#define IN_FROM_REG(val) (INEXT_FROM_REG(val,0)) @@ -86,7 +86,7 @@ diff -Nru a/drivers/i2c/chips/lm85.c b/drivers/i2c/chips/lm85.c /* FAN speed is measured using 90kHz clock */ #define FAN_TO_REG(val) (SENSORS_LIMIT( (val)<=0?0: 5400000/(val),0,65534)) - #define FAN_FROM_REG(val) ((val)=0?-1:(val)=0xffff?0:5400000/(val)) + #define FAN_FROM_REG(val) ((val)==0?-1:(val)==0xffff?0:5400000/(val)) /* Temperature is reported in .001 degC increments */ -#define TEMP_TO_REG(val) (SENSORS_LIMIT(((val)+500)/1000,-127,127)) @@ -144,18 +144,18 @@ diff -Nru a/drivers/i2c/chips/lm85.c b/drivers/i2c/chips/lm85.c @@ -1109,6 +1122,9 @@ */ kind = emc6d100 ; - } else if( company = LM85_COMPANY_SMSC -+ && verstep = LM85_VERSTEP_EMC6D102) { + } else if( company == LM85_COMPANY_SMSC ++ && verstep == LM85_VERSTEP_EMC6D102) { + kind = emc6d102 ; -+ } else if( company = LM85_COMPANY_SMSC - && (verstep & LM85_VERSTEP_VMASK) = LM85_VERSTEP_GENERIC) { ++ } else if( company == LM85_COMPANY_SMSC + && (verstep & LM85_VERSTEP_VMASK) == LM85_VERSTEP_GENERIC) { dev_err(&adapter->dev, "lm85: Detected SMSC chip\n"); dev_err(&adapter->dev, "lm85: Unrecognized version/stepping 0x%02x" @@ -1144,6 +1160,8 @@ type_name = "adt7463"; - } else if ( kind = emc6d100){ + } else if ( kind == emc6d100){ type_name = "emc6d100"; -+ } else if ( kind = emc6d102 ) { ++ } else if ( kind == emc6d102 ) { + type_name = "emc6d102"; } strlcpy(new_client->name, type_name, I2C_NAME_SIZE); @@ -171,8 +171,9 @@ diff -Nru a/drivers/i2c/chips/lm85.c b/drivers/i2c/chips/lm85.c @@ -1365,10 +1382,25 @@ * more significant bits that are read later. */ - if ( (data->type = adm1027) || (data->type = adt7463) ) { -- data->extend_adc - lm85_read_value(client, ADM1027_REG_EXTEND_ADC1); + if ( (data->type == adm1027) || (data->type == adt7463) ) { +- data->extend_adc = +- lm85_read_value(client, ADM1027_REG_EXTEND_ADC1); + int ext1 = lm85_read_value(client, + ADM1027_REG_EXTEND_ADC1); + int ext2 = lm85_read_value(client, @@ -190,14 +191,16 @@ diff -Nru a/drivers/i2c/chips/lm85.c b/drivers/i2c/chips/lm85.c + the emc6d102 and 2 in the adt7463 and adm1027. In all + other chips ext is always 0 and the value of scale is + irrelevant. So it is left in 4*/ -+ data->adc_scale = (data->type = emc6d102 ) ? 16 : 4; ++ data->adc_scale = (data->type == emc6d102 ) ? 16 : 4; + for (i = 0; i <= 4; ++i) { - data->in[i] lm85_read_value(client, LM85_REG_IN(i)); + data->in[i] = + lm85_read_value(client, LM85_REG_IN(i)); @@ -1405,6 +1437,28 @@ /* More alarm bits */ - data->alarms | lm85_read_value(client, EMC6D100_REG_ALARM3) << 16; -+ } else if (data->type = emc6d102 ) { + data->alarms |= + lm85_read_value(client, EMC6D100_REG_ALARM3) << 16; ++ } else if (data->type == emc6d102 ) { + /* Have to read LSB bits after the MSB ones because + the reading of the MSB bits has frozen the + LSBs (backward from the ADM1027). diff --git a/a/content_digest b/N1/content_digest index 8a51be5..2aa552f 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -1,7 +1,7 @@ "ref\01112311394943@kroah.com\0" - "From\0gregkh@suse.de (Greg KH)\0" + "From\0Greg KH <gregkh@suse.de>\0" "Subject\0[PATCH] I2C: lsb in emc6d102 and adm1027\0" - "Date\0Thu, 19 May 2005 06:25:48 +0000\0" + "Date\0Thu, 31 Mar 2005 15:23:14 -0800\0" "To\0linux-kernel@vger.kernel.org" " sensors@stimpy.netroedge.com\0" "Cc\0rafael.espindola@gmail.com\0" @@ -21,7 +21,7 @@ "they become more readable this way.\n" "\n" "\n" - "Signed-off-by: Rafael ?vila de Esp?ndola <rafael.espindola@gmail.com>\n" + "Signed-off-by: Rafael \303\201vila de Esp\303\255ndola <rafael.espindola@gmail.com>\n" "Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>\n" "\n" "\n" @@ -70,7 +70,7 @@ " these macros are called: arguments may be evaluated more than once.\n" " */\n" " \n" - "-/* IN are scaled 1.000 = 0xc0, mag = 3 */\n" + "-/* IN are scaled 1.000 == 0xc0, mag = 3 */\n" "-#define IN_TO_REG(val)\t\t(SENSORS_LIMIT((((val)*0xc0+500)/1000),0,255))\n" "-#define INEXT_FROM_REG(val,ext) (((val)*1000 + (ext)*250 + 96)/0xc0)\n" "-#define IN_FROM_REG(val)\t(INEXT_FROM_REG(val,0))\n" @@ -95,7 +95,7 @@ " \n" " /* FAN speed is measured using 90kHz clock */\n" " #define FAN_TO_REG(val)\t\t(SENSORS_LIMIT( (val)<=0?0: 5400000/(val),0,65534))\n" - " #define FAN_FROM_REG(val)\t((val)=0?-1:(val)=0xffff?0:5400000/(val))\n" + " #define FAN_FROM_REG(val)\t((val)==0?-1:(val)==0xffff?0:5400000/(val))\n" " \n" " /* Temperature is reported in .001 degC increments */\n" "-#define TEMP_TO_REG(val)\t\t(SENSORS_LIMIT(((val)+500)/1000,-127,127))\n" @@ -153,18 +153,18 @@ "@@ -1109,6 +1122,9 @@\n" " \t\t\t */\n" " \t\t\tkind = emc6d100 ;\n" - " \t\t} else if( company = LM85_COMPANY_SMSC\n" - "+\t\t && verstep = LM85_VERSTEP_EMC6D102) {\n" + " \t\t} else if( company == LM85_COMPANY_SMSC\n" + "+\t\t && verstep == LM85_VERSTEP_EMC6D102) {\n" "+\t\t\tkind = emc6d102 ;\n" - "+\t\t} else if( company = LM85_COMPANY_SMSC\n" - " \t\t && (verstep & LM85_VERSTEP_VMASK) = LM85_VERSTEP_GENERIC) {\n" + "+\t\t} else if( company == LM85_COMPANY_SMSC\n" + " \t\t && (verstep & LM85_VERSTEP_VMASK) == LM85_VERSTEP_GENERIC) {\n" " \t\t\tdev_err(&adapter->dev, \"lm85: Detected SMSC chip\\n\");\n" " \t\t\tdev_err(&adapter->dev, \"lm85: Unrecognized version/stepping 0x%02x\"\n" "@@ -1144,6 +1160,8 @@\n" " \t\ttype_name = \"adt7463\";\n" - " \t} else if ( kind = emc6d100){\n" + " \t} else if ( kind == emc6d100){\n" " \t\ttype_name = \"emc6d100\";\n" - "+\t} else if ( kind = emc6d102 ) {\n" + "+\t} else if ( kind == emc6d102 ) {\n" "+\t\ttype_name = \"emc6d102\";\n" " \t}\n" " \tstrlcpy(new_client->name, type_name, I2C_NAME_SIZE);\n" @@ -180,8 +180,9 @@ "@@ -1365,10 +1382,25 @@\n" " \t\t * more significant bits that are read later.\n" " \t\t */\n" - " \t\tif ( (data->type = adm1027) || (data->type = adt7463) ) {\n" - "-\t\t\tdata->extend_adc -\t\t\t lm85_read_value(client, ADM1027_REG_EXTEND_ADC1);\n" + " \t\tif ( (data->type == adm1027) || (data->type == adt7463) ) {\n" + "-\t\t\tdata->extend_adc =\n" + "-\t\t\t lm85_read_value(client, ADM1027_REG_EXTEND_ADC1);\n" "+\t\t\tint ext1 = lm85_read_value(client,\n" "+\t\t\t\t\t\t ADM1027_REG_EXTEND_ADC1);\n" "+\t\t\tint ext2 = lm85_read_value(client,\n" @@ -199,14 +200,16 @@ "+\t\t the emc6d102 and 2 in the adt7463 and adm1027. In all\n" "+\t\t other chips ext is always 0 and the value of scale is\n" "+\t\t irrelevant. So it is left in 4*/\n" - "+\t\tdata->adc_scale = (data->type = emc6d102 ) ? 16 : 4;\n" + "+\t\tdata->adc_scale = (data->type == emc6d102 ) ? 16 : 4;\n" "+\n" " \t\tfor (i = 0; i <= 4; ++i) {\n" - " \t\t\tdata->in[i] \t\t\t lm85_read_value(client, LM85_REG_IN(i));\n" + " \t\t\tdata->in[i] =\n" + " \t\t\t lm85_read_value(client, LM85_REG_IN(i));\n" "@@ -1405,6 +1437,28 @@\n" " \t\t\t/* More alarm bits */\n" - " \t\t\tdata->alarms | \t\t\t\tlm85_read_value(client, EMC6D100_REG_ALARM3) << 16;\n" - "+\t\t} else if (data->type = emc6d102 ) {\n" + " \t\t\tdata->alarms |=\n" + " \t\t\t\tlm85_read_value(client, EMC6D100_REG_ALARM3) << 16;\n" + "+\t\t} else if (data->type == emc6d102 ) {\n" "+\t\t\t/* Have to read LSB bits after the MSB ones because\n" "+\t\t\t the reading of the MSB bits has frozen the\n" "+\t\t\t LSBs (backward from the ADM1027).\n" @@ -232,4 +235,4 @@ " \n" " \t\tdata->last_reading = jiffies ;" -175f1c6faf7d924defd06c39c194f13a2b62edc4da3506362ec121a13bdf217d +8b98e55e2e784cd93fd2284d7d1c0739513b73ace8a135a5eda5b9bd1158fb99
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.