diff for duplicates of <1349148501.5876.22.camel@trivette> diff --git a/a/1.txt b/N1/1.txt index f3c740b..58666fa 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -145,7 +145,8 @@ Sounds like an abuse of the serial comma :-) > > > > 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; @@ -194,7 +195,7 @@ Good catch. > > - 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 { @@ -231,7 +232,7 @@ This exceeds 80 chars, but I'll find a shorter message. > > } > > > > + /* 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 { @@ -283,10 +284,3 @@ DIV_ROUND_CLOSEST. > > Thanks, Vivien - - - -_______________________________________________ -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 76882ac..8fe5e61 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -2,8 +2,8 @@ "ref\01349133384-5181-2-git-send-email-vivien.didelot@savoirfairelinux.com\0" "ref\020121002012007.GC2437@roeck-us.net\0" "From\0Vivien Didelot <vivien.didelot@savoirfairelinux.com>\0" - "Subject\0Re: [lm-sensors] [PATCH v2 2/2] hwmon: (ads7828) add support for ADS7830\0" - "Date\0Tue, 02 Oct 2012 03:28:21 +0000\0" + "Subject\0Re: [PATCH v2 2/2] hwmon: (ads7828) add support for ADS7830\0" + "Date\0Mon, 01 Oct 2012 23:28:21 -0400\0" "To\0Guenter Roeck <linux@roeck-us.net>\0" "Cc\0lm-sensors@lm-sensors.org" Guillaume Roguez <guillaume.roguez@savoirfairelinux.com> @@ -159,7 +159,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" @@ -208,7 +209,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" @@ -245,7 +246,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" @@ -296,13 +297,6 @@ "> > \n" "> > \n" "Thanks,\n" - "Vivien\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 + Vivien -5ac03f2fa7d2eb41e1f8149f6fcdaf6b2cdaca5189590a841e6a9a427a81a78d +9f470c0e43ff5407346e0d89bb70b3c8df95978146facb280810fe4fbcd9fe67
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.