diff for duplicates of <20121002012007.GC2437@roeck-us.net> diff --git a/a/1.txt b/N1/1.txt index 38de4cb..6975ff0 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -141,7 +141,8 @@ tree. But that is for later ... just something to keep in mind. > > for (ch = 0; ch < ADS7828_NCH; ch++) { > u8 cmd = channel_cmd_byte(ch); -> - data->adc_input[ch] > - i2c_smbus_read_word_swapped(client, cmd); +> - data->adc_input[ch] = +> - i2c_smbus_read_word_swapped(client, cmd); > + data->adc_input[ch] = data->read_channel(client, cmd); > } > data->last_updated = jiffies; @@ -189,7 +190,7 @@ is no longer the case). > - pr_debug("%s : Doesn't look like an ads7828 device\n", > - __func__); > - return -ENODEV; -> + if ((in_data >> 8) = (in_data & 0xFF)) { +> + if ((in_data >> 8) == (in_data & 0xFF)) { > + /* Seems to be an ADS7830 (8-bit sample) */ > + is_8bit = true; > + } else { @@ -223,7 +224,7 @@ Better: > } > > + /* ADS7828 uses 12-bit samples, while ADS7830 is 8-bit */ -> + if (id->driver_data = ads7828) { +> + if (id->driver_data == ads7828) { > + data->read_channel = i2c_smbus_read_word_swapped; > + data->lsb_resol = (vref_mv * 1000) / 4096; > + } else { @@ -270,9 +271,4 @@ Would DIV_ROUND_CLOSEST be better ? > -- > 1.7.11.4 > -> - -_______________________________________________ -lm-sensors mailing list -lm-sensors@lm-sensors.org -http://lists.lm-sensors.org/mailman/listinfo/lm-sensors +> diff --git a/a/content_digest b/N1/content_digest index d1aa140..c0f442e 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -1,8 +1,8 @@ "ref\01349133384-5181-1-git-send-email-vivien.didelot@savoirfairelinux.com\0" "ref\01349133384-5181-2-git-send-email-vivien.didelot@savoirfairelinux.com\0" "From\0Guenter Roeck <linux@roeck-us.net>\0" - "Subject\0Re: [lm-sensors] [PATCH v2 2/2] hwmon: (ads7828) add support for ADS7830\0" - "Date\0Tue, 02 Oct 2012 01:20:07 +0000\0" + "Subject\0Re: [PATCH v2 2/2] hwmon: (ads7828) add support for ADS7830\0" + "Date\0Mon, 1 Oct 2012 18:20:07 -0700\0" "To\0Vivien Didelot <vivien.didelot@savoirfairelinux.com>\0" "Cc\0lm-sensors@lm-sensors.org" Guillaume Roguez <guillaume.roguez@savoirfairelinux.com> @@ -154,7 +154,8 @@ "> \n" "> \t\tfor (ch = 0; ch < ADS7828_NCH; ch++) {\n" "> \t\t\tu8 cmd = channel_cmd_byte(ch);\n" - "> -\t\t\tdata->adc_input[ch] > -\t\t\t\ti2c_smbus_read_word_swapped(client, cmd);\n" + "> -\t\t\tdata->adc_input[ch] =\n" + "> -\t\t\t\ti2c_smbus_read_word_swapped(client, cmd);\n" "> +\t\t\tdata->adc_input[ch] = data->read_channel(client, cmd);\n" "> \t\t}\n" "> \t\tdata->last_updated = jiffies;\n" @@ -202,7 +203,7 @@ "> -\t\t\tpr_debug(\"%s : Doesn't look like an ads7828 device\\n\",\n" "> -\t\t\t\t __func__);\n" "> -\t\t\treturn -ENODEV;\n" - "> +\t\t\tif ((in_data >> 8) = (in_data & 0xFF)) {\n" + "> +\t\t\tif ((in_data >> 8) == (in_data & 0xFF)) {\n" "> +\t\t\t\t/* Seems to be an ADS7830 (8-bit sample) */\n" "> +\t\t\t\tis_8bit = true;\n" "> +\t\t\t} else {\n" @@ -236,7 +237,7 @@ "> \t}\n" "> \n" "> +\t/* ADS7828 uses 12-bit samples, while ADS7830 is 8-bit */\n" - "> +\tif (id->driver_data = ads7828) {\n" + "> +\tif (id->driver_data == ads7828) {\n" "> +\t\tdata->read_channel = i2c_smbus_read_word_swapped;\n" "> +\t\tdata->lsb_resol = (vref_mv * 1000) / 4096;\n" "> +\t} else {\n" @@ -283,11 +284,6 @@ "> -- \n" "> 1.7.11.4\n" "> \n" - "> \n" - "\n" - "_______________________________________________\n" - "lm-sensors mailing list\n" - "lm-sensors@lm-sensors.org\n" - http://lists.lm-sensors.org/mailman/listinfo/lm-sensors + > -9ff442533a1321023bd65ac33b807f035f62d9169e1d9110b36164b5db84ea5e +815ba45b0043a358e999ba8c9162266e4d163db0b0356e2c702e2aadd3f4e26c
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.