~ubuntu-branches/debian/wheezy/linux-2.6/wheezy

« back to all changes in this revision

Viewing changes to drivers/hwmon/lm90.c

  • Committer: Bazaar Package Importer
  • Author(s): Ben Hutchings, Ben Hutchings, Aurelien Jarno
  • Date: 2011-06-07 12:14:05 UTC
  • mfrom: (43.1.9 sid)
  • Revision ID: james.westby@ubuntu.com-20110607121405-i3h1rd7nrnd2b73h
Tags: 2.6.39-2
[ Ben Hutchings ]
* [x86] Enable BACKLIGHT_APPLE, replacing BACKLIGHT_MBP_NVIDIA
  (Closes: #627492)
* cgroups: Disable memory resource controller by default. Allow it
  to be enabled using kernel parameter 'cgroup_enable=memory'.
* rt2800usb: Enable support for more USB devices including
  Linksys WUSB600N (Closes: #596626) (this change was accidentally
  omitted from 2.6.39-1)
* [x86] Remove Celeron from list of processors supporting PAE. Most
  'Celeron M' models do not.
* Update debconf template translations:
  - Swedish (Martin Bagge) (Closes: #628932)
  - French (David Prévot) (Closes: #628191)
* aufs: Update for 2.6.39 (Closes: #627837)
* Add stable 2.6.39.1, including:
  - ext4: dont set PageUptodate in ext4_end_bio()
  - pata_cmd64x: fix boot crash on parisc (Closes: #622997, #622745)
  - ext3: Fix fs corruption when make_indexed_dir() fails
  - netfilter: nf_ct_sip: validate Content-Length in TCP SIP messages
  - sctp: fix race between sctp_bind_addr_free() and
    sctp_bind_addr_conflict()
  - sctp: fix memory leak of the ASCONF queue when free asoc
  - md/bitmap: fix saving of events_cleared and other state
  - cdc_acm: Fix oops when Droids MuIn LCD is connected
  - cx88: Fix conversion from BKL to fine-grained locks (Closes: #619827)
  - keys: Set cred->user_ns in key_replace_session_keyring (CVE-2011-2184)
  - tmpfs: fix race between truncate and writepage
  - nfs41: Correct offset for LAYOUTCOMMIT
  - xen/mmu: fix a race window causing leave_mm BUG()
  - ext4: fix possible use-after-free in ext4_remove_li_request()
  For the complete list of changes, see:
   http://www.kernel.org/pub/linux/kernel/v2.6/ChangeLog-2.6.39.1
* Bump ABI to 2
* netfilter: Enable IP_SET, IP_SET_BITMAP_IP, IP_SET_BITMAP_IPMAC,
  IP_SET_BITMAP_PORT, IP_SET_HASH_IP, IP_SET_HASH_IPPORT,
  IP_SET_HASH_IPPORTIP, IP_SET_HASH_IPPORTNET, IP_SET_HASH_NET,
  IP_SET_HASH_NETPORT, IP_SET_LIST_SET, NETFILTER_XT_SET as modules
  (Closes: #629401)

[ Aurelien Jarno ]
* [mipsel/loongson-2f] Disable_SCSI_LPFC to workaround GCC ICE.

Show diffs side-by-side

added added

removed removed

Lines of Context:
49
49
 * chips, but support three temperature sensors instead of two. MAX6695
50
50
 * and MAX6696 only differ in the pinout so they can be treated identically.
51
51
 *
52
 
 * This driver also supports the ADT7461 chip from Analog Devices.
53
 
 * It's supported in both compatibility and extended mode. It is mostly
54
 
 * compatible with LM90 except for a data format difference for the
55
 
 * temperature value registers.
 
52
 * This driver also supports ADT7461 and ADT7461A from Analog Devices as well as
 
53
 * NCT1008 from ON Semiconductor. The chips are supported in both compatibility
 
54
 * and extended mode. They are mostly compatible with LM90 except for a data
 
55
 * format difference for the temperature value registers.
56
56
 *
57
57
 * Since the LM90 was the first chipset supported by this driver, most
58
58
 * comments will refer to this chipset, but are actually general and
88
88
 * Addresses to scan
89
89
 * Address is fully defined internally and cannot be changed except for
90
90
 * MAX6659, MAX6680 and MAX6681.
91
 
 * LM86, LM89, LM90, LM99, ADM1032, ADM1032-1, ADT7461, MAX6649, MAX6657,
92
 
 * MAX6658 and W83L771 have address 0x4c.
93
 
 * ADM1032-2, ADT7461-2, LM89-1, LM99-1 and MAX6646 have address 0x4d.
 
91
 * LM86, LM89, LM90, LM99, ADM1032, ADM1032-1, ADT7461, ADT7461A, MAX6649,
 
92
 * MAX6657, MAX6658, NCT1008 and W83L771 have address 0x4c.
 
93
 * ADM1032-2, ADT7461-2, ADT7461A-2, LM89-1, LM99-1, MAX6646, and NCT1008D
 
94
 * have address 0x4d.
94
95
 * MAX6647 has address 0x4e.
95
96
 * MAX6659 can have address 0x4c, 0x4d or 0x4e.
96
97
 * MAX6680 and MAX6681 can have address 0x18, 0x19, 0x1a, 0x29, 0x2a, 0x2b,
174
175
static const struct i2c_device_id lm90_id[] = {
175
176
        { "adm1032", adm1032 },
176
177
        { "adt7461", adt7461 },
 
178
        { "adt7461a", adt7461 },
177
179
        { "lm90", lm90 },
178
180
        { "lm86", lm86 },
179
181
        { "lm89", lm86 },
188
190
        { "max6681", max6680 },
189
191
        { "max6695", max6696 },
190
192
        { "max6696", max6696 },
 
193
        { "nct1008", adt7461 },
191
194
        { "w83l771", w83l771 },
192
195
        { }
193
196
};
356
359
        /*
357
360
         * There is a trick here. We have to read two registers to have the
358
361
         * sensor temperature, but we have to beware a conversion could occur
359
 
         * inbetween the readings. The datasheet says we should either use
 
362
         * between the readings. The datasheet says we should either use
360
363
         * the one-shot conversion register, which we don't want to do
361
364
         * (disables hardware monitoring) or monitor the busy bit, which is
362
365
         * impossible (we can't read the values and monitor that bit at the
1153
1156
                 && (reg_config1 & 0x1B) == 0x00
1154
1157
                 && reg_convrate <= 0x0A) {
1155
1158
                        name = "adt7461";
 
1159
                } else
 
1160
                if (chip_id == 0x57 /* ADT7461A, NCT1008 */
 
1161
                 && (reg_config1 & 0x1B) == 0x00
 
1162
                 && reg_convrate <= 0x0A) {
 
1163
                        name = "adt7461a";
1156
1164
                }
1157
1165
        } else
1158
1166
        if (man_id == 0x4D) { /* Maxim */