diff for duplicates of <20050201121414.GA15219@bode.aurel32.net> diff --git a/a/1.txt b/N1/1.txt index 88dca20..4085601 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -56,7 +56,7 @@ diff -urN linux-2.6.11-rc2-mm2.orig/drivers/i2c/chips/sis5595.c linux-2.6.11-rc2 + for hardware monitoring + + Copyright (C) 1998 - 2001 Frodo Looijaard <frodol@dds.nl>, -+ Ky?sti M?lkki <kmalkki@cc.hut.fi>, and ++ Kyösti Mälkki <kmalkki@cc.hut.fi>, and + Mark D. Studebaker <mdsxyz123@yahoo.com> + Ported to Linux 2.6 by Aurelien Jarno <aurelien@aurel32.net> with + the help of Jean Delvare <khali@linux-fr.org> @@ -205,7 +205,7 @@ diff -urN linux-2.6.11-rc2-mm2.orig/drivers/i2c/chips/sis5595.c linux-2.6.11-rc2 + +static inline int FAN_FROM_REG(u8 val, int div) +{ -+ return val=0 ? -1 : val=255 ? 0 : 1350000/(val*div); ++ return val==0 ? -1 : val==255 ? 0 : 1350000/(val*div); +} + +/* TEMP: mC (-54.12C to +157.53C) @@ -224,7 +224,7 @@ diff -urN linux-2.6.11-rc2-mm2.orig/drivers/i2c/chips/sis5595.c linux-2.6.11-rc2 + REG: 0, 1, 2, or 3 (respectively) (defaults to 1) */ +static inline u8 DIV_TO_REG(int val) +{ -+ return val=8 ? 3 : val=4 ? 2 : val=1 ? 0 : 1; ++ return val==8 ? 3 : val==4 ? 2 : val==1 ? 0 : 1; +} +#define DIV_FROM_REG(val) (1 << (val)) + @@ -239,7 +239,7 @@ diff -urN linux-2.6.11-rc2-mm2.orig/drivers/i2c/chips/sis5595.c linux-2.6.11-rc2 + struct semaphore update_lock; + char valid; /* !=0 if following fields are valid */ + unsigned long last_updated; /* In jiffies */ -+ char maxins; /* = 3 if temp enabled, otherwise = 4 */ ++ char maxins; /* == 3 if temp enabled, otherwise == 4 */ + u8 revision; /* Reg. value */ + + u8 in[5]; /* Register value */ @@ -465,7 +465,8 @@ diff -urN linux-2.6.11-rc2-mm2.orig/drivers/i2c/chips/sis5595.c linux-2.6.11-rc2 + break; + } + sis5595_write_value(client, SIS5595_REG_FANDIV, reg); -+ data->fan_min[nr] + FAN_TO_REG(min, DIV_FROM_REG(data->fan_div[nr])); ++ data->fan_min[nr] = ++ FAN_TO_REG(min, DIV_FROM_REG(data->fan_div[nr])); + sis5595_write_value(client, SIS5595_REG_FAN_MIN(nr), data->fan_min[nr]); + return count; +} @@ -533,7 +534,8 @@ diff -urN linux-2.6.11-rc2-mm2.orig/drivers/i2c/chips/sis5595.c linux-2.6.11-rc2 + u16 val; + int *i; + -+ if (!(s_bridge + pci_get_device(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_503, NULL))) ++ if (!(s_bridge = ++ pci_get_device(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_503, NULL))) + return -ENODEV; + + /* Look for imposters */ @@ -544,11 +546,12 @@ diff -urN linux-2.6.11-rc2-mm2.orig/drivers/i2c/chips/sis5595.c linux-2.6.11-rc2 + } + } + -+ if (PCIBIOS_SUCCESSFUL !+ pci_read_config_word(s_bridge, SIS5595_BASE_REG, &val)) ++ if (PCIBIOS_SUCCESSFUL != ++ pci_read_config_word(s_bridge, SIS5595_BASE_REG, &val)) + return -ENODEV; + + *address = val & ~(SIS5595_EXTENT - 1); -+ if (*address = 0 && force_addr = 0) { ++ if (*address == 0 && force_addr == 0) { + dev_err(&s_bridge->dev, "base address not set - upgrade BIOS or use force_addr=0xaddr\n"); + return -ENODEV; + } @@ -580,25 +583,30 @@ diff -urN linux-2.6.11-rc2-mm2.orig/drivers/i2c/chips/sis5595.c linux-2.6.11-rc2 + } + if(force_addr) { + dev_warn(&adapter->dev, "forcing ISA address 0x%04X\n", address); -+ if (PCIBIOS_SUCCESSFUL !+ pci_write_config_word(s_bridge, SIS5595_BASE_REG, address)) ++ if (PCIBIOS_SUCCESSFUL != ++ pci_write_config_word(s_bridge, SIS5595_BASE_REG, address)) + goto exit_release; -+ if (PCIBIOS_SUCCESSFUL !+ pci_read_config_word(s_bridge, SIS5595_BASE_REG, &a)) ++ if (PCIBIOS_SUCCESSFUL != ++ pci_read_config_word(s_bridge, SIS5595_BASE_REG, &a)) + goto exit_release; + if ((a & ~(SIS5595_EXTENT - 1)) != address) + /* doesn't work for some chips? */ + goto exit_release; + } + -+ if (PCIBIOS_SUCCESSFUL !+ pci_read_config_byte(s_bridge, SIS5595_ENABLE_REG, &val)) { ++ if (PCIBIOS_SUCCESSFUL != ++ pci_read_config_byte(s_bridge, SIS5595_ENABLE_REG, &val)) { + goto exit_release; + } -+ if((val & 0x80) = 0) { -+ if (PCIBIOS_SUCCESSFUL !+ pci_write_config_byte(s_bridge, SIS5595_ENABLE_REG, ++ if((val & 0x80) == 0) { ++ if (PCIBIOS_SUCCESSFUL != ++ pci_write_config_byte(s_bridge, SIS5595_ENABLE_REG, + val | 0x80)) + goto exit_release; -+ if (PCIBIOS_SUCCESSFUL !+ pci_read_config_byte(s_bridge, SIS5595_ENABLE_REG, &val)) ++ if (PCIBIOS_SUCCESSFUL != ++ pci_read_config_byte(s_bridge, SIS5595_ENABLE_REG, &val)) + goto exit_release; -+ if((val & 0x80) = 0) ++ if((val & 0x80) == 0) + /* doesn't work for some chips! */ + goto exit_release; + } @@ -660,7 +668,7 @@ diff -urN linux-2.6.11-rc2-mm2.orig/drivers/i2c/chips/sis5595.c linux-2.6.11-rc2 + device_create_file(&new_client->dev, &dev_attr_in3_input); + device_create_file(&new_client->dev, &dev_attr_in3_min); + device_create_file(&new_client->dev, &dev_attr_in3_max); -+ if (data->maxins = 4) { ++ if (data->maxins == 4) { + device_create_file(&new_client->dev, &dev_attr_in4_input); + device_create_file(&new_client->dev, &dev_attr_in4_min); + device_create_file(&new_client->dev, &dev_attr_in4_max); @@ -672,7 +680,7 @@ diff -urN linux-2.6.11-rc2-mm2.orig/drivers/i2c/chips/sis5595.c linux-2.6.11-rc2 + device_create_file(&new_client->dev, &dev_attr_fan2_min); + device_create_file(&new_client->dev, &dev_attr_fan2_div); + device_create_file(&new_client->dev, &dev_attr_alarms); -+ if (data->maxins = 3) { ++ if (data->maxins == 3) { + device_create_file(&new_client->dev, &dev_attr_temp1_input); + device_create_file(&new_client->dev, &dev_attr_temp1_max); + device_create_file(&new_client->dev, &dev_attr_temp1_max_hyst); @@ -750,26 +758,35 @@ diff -urN linux-2.6.11-rc2-mm2.orig/drivers/i2c/chips/sis5595.c linux-2.6.11-rc2 + (jiffies < data->last_updated) || !data->valid) { + + for (i = 0; i <= data->maxins; i++) { -+ data->in[i] + sis5595_read_value(client, SIS5595_REG_IN(i)); -+ data->in_min[i] + sis5595_read_value(client, ++ data->in[i] = ++ sis5595_read_value(client, SIS5595_REG_IN(i)); ++ data->in_min[i] = ++ sis5595_read_value(client, + SIS5595_REG_IN_MIN(i)); -+ data->in_max[i] + sis5595_read_value(client, ++ data->in_max[i] = ++ sis5595_read_value(client, + SIS5595_REG_IN_MAX(i)); + } + for (i = 0; i < 2; i++) { -+ data->fan[i] + sis5595_read_value(client, SIS5595_REG_FAN(i)); -+ data->fan_min[i] + sis5595_read_value(client, ++ data->fan[i] = ++ sis5595_read_value(client, SIS5595_REG_FAN(i)); ++ data->fan_min[i] = ++ sis5595_read_value(client, + SIS5595_REG_FAN_MIN(i)); + } -+ if(data->maxins = 3) { -+ data->temp + sis5595_read_value(client, SIS5595_REG_TEMP); -+ data->temp_over + sis5595_read_value(client, SIS5595_REG_TEMP_OVER); -+ data->temp_hyst + sis5595_read_value(client, SIS5595_REG_TEMP_HYST); ++ if(data->maxins == 3) { ++ data->temp = ++ sis5595_read_value(client, SIS5595_REG_TEMP); ++ data->temp_over = ++ sis5595_read_value(client, SIS5595_REG_TEMP_OVER); ++ data->temp_hyst = ++ sis5595_read_value(client, SIS5595_REG_TEMP_HYST); + } + i = sis5595_read_value(client, SIS5595_REG_FANDIV); + data->fan_div[0] = (i >> 4) & 0x03; + data->fan_div[1] = i >> 6; -+ data->alarms + sis5595_read_value(client, SIS5595_REG_ALARM1) | ++ data->alarms = ++ sis5595_read_value(client, SIS5595_REG_ALARM1) | + (sis5595_read_value(client, SIS5595_REG_ALARM2) << 8); + data->last_updated = jiffies; + data->valid = 1; diff --git a/a/content_digest b/N1/content_digest index 94db703..33a1aec 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -1,7 +1,7 @@ "ref\0200502011420.17466.adobriyan@mail.ru\0" - "From\0aurelien@aurel32.net (Aurelien Jarno)\0" - "Subject\0[PATCH 2.6] I2C: New chip driver: sis5595\0" - "Date\0Thu, 19 May 2005 06:25:35 +0000\0" + "From\0Aurelien Jarno <aurelien@aurel32.net>\0" + "Subject\0Re: [PATCH 2.6] I2C: New chip driver: sis5595\0" + "Date\0Tue, 1 Feb 2005 13:14:14 +0100\0" "To\0Greg KH <greg@kroah.com>\0" "Cc\0Alexey Dobriyan <adobriyan@mail.ru>" linux-kernel@vger.kernel.org @@ -66,7 +66,7 @@ "+\t\tfor hardware monitoring\n" "+\n" "+ Copyright (C) 1998 - 2001 Frodo Looijaard <frodol@dds.nl>,\n" - "+\t\t\tKy?sti M?lkki <kmalkki@cc.hut.fi>, and\n" + "+\t\t\tKy\303\266sti M\303\244lkki <kmalkki@cc.hut.fi>, and\n" "+\t\t\tMark D. Studebaker <mdsxyz123@yahoo.com>\n" "+ Ported to Linux 2.6 by Aurelien Jarno <aurelien@aurel32.net> with\n" "+ the help of Jean Delvare <khali@linux-fr.org>\n" @@ -215,7 +215,7 @@ "+\n" "+static inline int FAN_FROM_REG(u8 val, int div)\n" "+{\n" - "+\treturn val=0 ? -1 : val=255 ? 0 : 1350000/(val*div);\n" + "+\treturn val==0 ? -1 : val==255 ? 0 : 1350000/(val*div);\n" "+}\n" "+\n" "+/* TEMP: mC (-54.12C to +157.53C)\n" @@ -234,7 +234,7 @@ "+ REG: 0, 1, 2, or 3 (respectively) (defaults to 1) */\n" "+static inline u8 DIV_TO_REG(int val)\n" "+{\n" - "+\treturn val=8 ? 3 : val=4 ? 2 : val=1 ? 0 : 1;\n" + "+\treturn val==8 ? 3 : val==4 ? 2 : val==1 ? 0 : 1;\n" "+}\n" "+#define DIV_FROM_REG(val) (1 << (val))\n" "+\n" @@ -249,7 +249,7 @@ "+\tstruct semaphore update_lock;\n" "+\tchar valid;\t\t/* !=0 if following fields are valid */\n" "+\tunsigned long last_updated;\t/* In jiffies */\n" - "+\tchar maxins;\t\t/* = 3 if temp enabled, otherwise = 4 */\n" + "+\tchar maxins;\t\t/* == 3 if temp enabled, otherwise == 4 */\n" "+\tu8 revision;\t\t/* Reg. value */\n" "+\n" "+\tu8 in[5];\t\t/* Register value */\n" @@ -475,7 +475,8 @@ "+\t\tbreak;\n" "+\t}\n" "+\tsis5595_write_value(client, SIS5595_REG_FANDIV, reg);\n" - "+\tdata->fan_min[nr] +\t\tFAN_TO_REG(min, DIV_FROM_REG(data->fan_div[nr]));\n" + "+\tdata->fan_min[nr] =\n" + "+\t\tFAN_TO_REG(min, DIV_FROM_REG(data->fan_div[nr]));\n" "+\tsis5595_write_value(client, SIS5595_REG_FAN_MIN(nr), data->fan_min[nr]);\n" "+\treturn count;\n" "+}\n" @@ -543,7 +544,8 @@ "+\tu16 val;\n" "+\tint *i;\n" "+\n" - "+\tif (!(s_bridge +\t pci_get_device(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_503, NULL)))\n" + "+\tif (!(s_bridge =\n" + "+\t pci_get_device(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_503, NULL)))\n" "+\t\treturn -ENODEV;\n" "+\n" "+\t/* Look for imposters */\n" @@ -554,11 +556,12 @@ "+\t\t}\n" "+\t}\n" "+\n" - "+\tif (PCIBIOS_SUCCESSFUL !+\t pci_read_config_word(s_bridge, SIS5595_BASE_REG, &val))\n" + "+\tif (PCIBIOS_SUCCESSFUL !=\n" + "+\t pci_read_config_word(s_bridge, SIS5595_BASE_REG, &val))\n" "+\t\treturn -ENODEV;\n" "+\n" "+\t*address = val & ~(SIS5595_EXTENT - 1);\n" - "+\tif (*address = 0 && force_addr = 0) {\n" + "+\tif (*address == 0 && force_addr == 0) {\n" "+\t\tdev_err(&s_bridge->dev, \"base address not set - upgrade BIOS or use force_addr=0xaddr\\n\");\n" "+\t\treturn -ENODEV;\n" "+\t}\n" @@ -590,25 +593,30 @@ "+\t}\n" "+\tif(force_addr) {\n" "+\t\tdev_warn(&adapter->dev, \"forcing ISA address 0x%04X\\n\", address);\n" - "+\t\tif (PCIBIOS_SUCCESSFUL !+\t\t pci_write_config_word(s_bridge, SIS5595_BASE_REG, address))\n" + "+\t\tif (PCIBIOS_SUCCESSFUL !=\n" + "+\t\t pci_write_config_word(s_bridge, SIS5595_BASE_REG, address))\n" "+\t\t\tgoto exit_release;\n" - "+\t\tif (PCIBIOS_SUCCESSFUL !+\t\t pci_read_config_word(s_bridge, SIS5595_BASE_REG, &a))\n" + "+\t\tif (PCIBIOS_SUCCESSFUL !=\n" + "+\t\t pci_read_config_word(s_bridge, SIS5595_BASE_REG, &a))\n" "+\t\t\tgoto exit_release;\n" "+\t\tif ((a & ~(SIS5595_EXTENT - 1)) != address)\n" "+\t\t\t/* doesn't work for some chips? */\n" "+\t\t\tgoto exit_release;\n" "+\t}\n" "+\n" - "+\tif (PCIBIOS_SUCCESSFUL !+\t pci_read_config_byte(s_bridge, SIS5595_ENABLE_REG, &val)) {\n" + "+\tif (PCIBIOS_SUCCESSFUL !=\n" + "+\t pci_read_config_byte(s_bridge, SIS5595_ENABLE_REG, &val)) {\n" "+\t\tgoto exit_release;\n" "+\t}\n" - "+\tif((val & 0x80) = 0) {\n" - "+\t\tif (PCIBIOS_SUCCESSFUL !+\t\t pci_write_config_byte(s_bridge, SIS5595_ENABLE_REG,\n" + "+\tif((val & 0x80) == 0) {\n" + "+\t\tif (PCIBIOS_SUCCESSFUL !=\n" + "+\t\t pci_write_config_byte(s_bridge, SIS5595_ENABLE_REG,\n" "+\t\t\t\t\t val | 0x80))\n" "+\t\t\tgoto exit_release;\n" - "+\t\tif (PCIBIOS_SUCCESSFUL !+\t\t pci_read_config_byte(s_bridge, SIS5595_ENABLE_REG, &val))\n" + "+\t\tif (PCIBIOS_SUCCESSFUL !=\n" + "+\t\t pci_read_config_byte(s_bridge, SIS5595_ENABLE_REG, &val))\n" "+\t\t\tgoto exit_release;\n" - "+\t\tif((val & 0x80) = 0) \n" + "+\t\tif((val & 0x80) == 0) \n" "+\t\t\t/* doesn't work for some chips! */\n" "+\t\t\tgoto exit_release;\n" "+\t}\n" @@ -670,7 +678,7 @@ "+\tdevice_create_file(&new_client->dev, &dev_attr_in3_input);\n" "+\tdevice_create_file(&new_client->dev, &dev_attr_in3_min);\n" "+\tdevice_create_file(&new_client->dev, &dev_attr_in3_max);\n" - "+\tif (data->maxins = 4) {\n" + "+\tif (data->maxins == 4) {\n" "+\t\tdevice_create_file(&new_client->dev, &dev_attr_in4_input);\n" "+\t\tdevice_create_file(&new_client->dev, &dev_attr_in4_min);\n" "+\t\tdevice_create_file(&new_client->dev, &dev_attr_in4_max);\n" @@ -682,7 +690,7 @@ "+\tdevice_create_file(&new_client->dev, &dev_attr_fan2_min);\n" "+\tdevice_create_file(&new_client->dev, &dev_attr_fan2_div);\n" "+\tdevice_create_file(&new_client->dev, &dev_attr_alarms);\n" - "+\tif (data->maxins = 3) {\n" + "+\tif (data->maxins == 3) {\n" "+\t\tdevice_create_file(&new_client->dev, &dev_attr_temp1_input);\n" "+\t\tdevice_create_file(&new_client->dev, &dev_attr_temp1_max);\n" "+\t\tdevice_create_file(&new_client->dev, &dev_attr_temp1_max_hyst);\n" @@ -760,26 +768,35 @@ "+\t (jiffies < data->last_updated) || !data->valid) {\n" "+\n" "+\t\tfor (i = 0; i <= data->maxins; i++) {\n" - "+\t\t\tdata->in[i] +\t\t\t sis5595_read_value(client, SIS5595_REG_IN(i));\n" - "+\t\t\tdata->in_min[i] +\t\t\t sis5595_read_value(client,\n" + "+\t\t\tdata->in[i] =\n" + "+\t\t\t sis5595_read_value(client, SIS5595_REG_IN(i));\n" + "+\t\t\tdata->in_min[i] =\n" + "+\t\t\t sis5595_read_value(client,\n" "+\t\t\t\t\t SIS5595_REG_IN_MIN(i));\n" - "+\t\t\tdata->in_max[i] +\t\t\t sis5595_read_value(client,\n" + "+\t\t\tdata->in_max[i] =\n" + "+\t\t\t sis5595_read_value(client,\n" "+\t\t\t\t\t SIS5595_REG_IN_MAX(i));\n" "+\t\t}\n" "+\t\tfor (i = 0; i < 2; i++) {\n" - "+\t\t\tdata->fan[i] +\t\t\t sis5595_read_value(client, SIS5595_REG_FAN(i));\n" - "+\t\t\tdata->fan_min[i] +\t\t\t sis5595_read_value(client,\n" + "+\t\t\tdata->fan[i] =\n" + "+\t\t\t sis5595_read_value(client, SIS5595_REG_FAN(i));\n" + "+\t\t\tdata->fan_min[i] =\n" + "+\t\t\t sis5595_read_value(client,\n" "+\t\t\t\t\t SIS5595_REG_FAN_MIN(i));\n" "+\t\t}\n" - "+\t\tif(data->maxins = 3) {\n" - "+\t\t\tdata->temp +\t\t\t sis5595_read_value(client, SIS5595_REG_TEMP);\n" - "+\t\t\tdata->temp_over +\t\t\t sis5595_read_value(client, SIS5595_REG_TEMP_OVER);\n" - "+\t\t\tdata->temp_hyst +\t\t\t sis5595_read_value(client, SIS5595_REG_TEMP_HYST);\n" + "+\t\tif(data->maxins == 3) {\n" + "+\t\t\tdata->temp =\n" + "+\t\t\t sis5595_read_value(client, SIS5595_REG_TEMP);\n" + "+\t\t\tdata->temp_over =\n" + "+\t\t\t sis5595_read_value(client, SIS5595_REG_TEMP_OVER);\n" + "+\t\t\tdata->temp_hyst =\n" + "+\t\t\t sis5595_read_value(client, SIS5595_REG_TEMP_HYST);\n" "+\t\t}\n" "+\t\ti = sis5595_read_value(client, SIS5595_REG_FANDIV);\n" "+\t\tdata->fan_div[0] = (i >> 4) & 0x03;\n" "+\t\tdata->fan_div[1] = i >> 6;\n" - "+\t\tdata->alarms +\t\t sis5595_read_value(client, SIS5595_REG_ALARM1) |\n" + "+\t\tdata->alarms =\n" + "+\t\t sis5595_read_value(client, SIS5595_REG_ALARM1) |\n" "+\t\t (sis5595_read_value(client, SIS5595_REG_ALARM2) << 8);\n" "+\t\tdata->last_updated = jiffies;\n" "+\t\tdata->valid = 1;\n" @@ -823,4 +840,4 @@ " `. `' aurel32@debian.org | aurelien@aurel32.net\n" `- people.debian.org/~aurel32 | www.aurel32.net -5c03cc735ce5dc31150874fa2b900bb266403d2271af9b25533a5318d2b62645 +12c648055fbac589515b6745ec0cdaff5a8da702643e862964659aed974bb5c4
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.