i5k_amb.c 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615
  1. /*
  2. * A hwmon driver for the Intel 5000 series chipset FB-DIMM AMB
  3. * temperature sensors
  4. * Copyright (C) 2007 IBM
  5. *
  6. * Author: Darrick J. Wong <djwong@us.ibm.com>
  7. *
  8. * This program is free software; you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License as published by
  10. * the Free Software Foundation; either version 2 of the License, or
  11. * (at your option) any later version.
  12. *
  13. * This program is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public License
  19. * along with this program; if not, write to the Free Software
  20. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  21. */
  22. #include <linux/module.h>
  23. #include <linux/jiffies.h>
  24. #include <linux/hwmon.h>
  25. #include <linux/hwmon-sysfs.h>
  26. #include <linux/err.h>
  27. #include <linux/mutex.h>
  28. #include <linux/delay.h>
  29. #include <linux/log2.h>
  30. #include <linux/pci.h>
  31. #include <linux/platform_device.h>
  32. #include <linux/slab.h>
  33. #define DRVNAME "i5k_amb"
  34. #define I5K_REG_AMB_BASE_ADDR 0x48
  35. #define I5K_REG_AMB_LEN_ADDR 0x50
  36. #define I5K_REG_CHAN0_PRESENCE_ADDR 0x64
  37. #define I5K_REG_CHAN1_PRESENCE_ADDR 0x66
  38. #define AMB_REG_TEMP_MIN_ADDR 0x80
  39. #define AMB_REG_TEMP_MID_ADDR 0x81
  40. #define AMB_REG_TEMP_MAX_ADDR 0x82
  41. #define AMB_REG_TEMP_STATUS_ADDR 0x84
  42. #define AMB_REG_TEMP_ADDR 0x85
  43. #define AMB_CONFIG_SIZE 2048
  44. #define AMB_FUNC_3_OFFSET 768
  45. static unsigned long amb_reg_temp_status(unsigned int amb)
  46. {
  47. return AMB_FUNC_3_OFFSET + AMB_REG_TEMP_STATUS_ADDR +
  48. AMB_CONFIG_SIZE * amb;
  49. }
  50. static unsigned long amb_reg_temp_min(unsigned int amb)
  51. {
  52. return AMB_FUNC_3_OFFSET + AMB_REG_TEMP_MIN_ADDR +
  53. AMB_CONFIG_SIZE * amb;
  54. }
  55. static unsigned long amb_reg_temp_mid(unsigned int amb)
  56. {
  57. return AMB_FUNC_3_OFFSET + AMB_REG_TEMP_MID_ADDR +
  58. AMB_CONFIG_SIZE * amb;
  59. }
  60. static unsigned long amb_reg_temp_max(unsigned int amb)
  61. {
  62. return AMB_FUNC_3_OFFSET + AMB_REG_TEMP_MAX_ADDR +
  63. AMB_CONFIG_SIZE * amb;
  64. }
  65. static unsigned long amb_reg_temp(unsigned int amb)
  66. {
  67. return AMB_FUNC_3_OFFSET + AMB_REG_TEMP_ADDR +
  68. AMB_CONFIG_SIZE * amb;
  69. }
  70. #define MAX_MEM_CHANNELS 4
  71. #define MAX_AMBS_PER_CHANNEL 16
  72. #define MAX_AMBS (MAX_MEM_CHANNELS * \
  73. MAX_AMBS_PER_CHANNEL)
  74. #define CHANNEL_SHIFT 4
  75. #define DIMM_MASK 0xF
  76. /*
  77. * Ugly hack: For some reason the highest bit is set if there
  78. * are _any_ DIMMs in the channel. Attempting to read from
  79. * this "high-order" AMB results in a memory bus error, so
  80. * for now we'll just ignore that top bit, even though that
  81. * might prevent us from seeing the 16th DIMM in the channel.
  82. */
  83. #define REAL_MAX_AMBS_PER_CHANNEL 15
  84. #define KNOBS_PER_AMB 6
  85. static unsigned long amb_num_from_reg(unsigned int byte_num, unsigned int bit)
  86. {
  87. return byte_num * MAX_AMBS_PER_CHANNEL + bit;
  88. }
  89. #define AMB_SYSFS_NAME_LEN 16
  90. struct i5k_device_attribute {
  91. struct sensor_device_attribute s_attr;
  92. char name[AMB_SYSFS_NAME_LEN];
  93. };
  94. struct i5k_amb_data {
  95. struct device *hwmon_dev;
  96. unsigned long amb_base;
  97. unsigned long amb_len;
  98. u16 amb_present[MAX_MEM_CHANNELS];
  99. void __iomem *amb_mmio;
  100. struct i5k_device_attribute *attrs;
  101. unsigned int num_attrs;
  102. unsigned long chipset_id;
  103. };
  104. static ssize_t show_name(struct device *dev, struct device_attribute *devattr,
  105. char *buf)
  106. {
  107. return sprintf(buf, "%s\n", DRVNAME);
  108. }
  109. static DEVICE_ATTR(name, S_IRUGO, show_name, NULL);
  110. static struct platform_device *amb_pdev;
  111. static u8 amb_read_byte(struct i5k_amb_data *data, unsigned long offset)
  112. {
  113. return ioread8(data->amb_mmio + offset);
  114. }
  115. static void amb_write_byte(struct i5k_amb_data *data, unsigned long offset,
  116. u8 val)
  117. {
  118. iowrite8(val, data->amb_mmio + offset);
  119. }
  120. static ssize_t show_amb_alarm(struct device *dev,
  121. struct device_attribute *devattr,
  122. char *buf)
  123. {
  124. struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
  125. struct i5k_amb_data *data = dev_get_drvdata(dev);
  126. if (!(amb_read_byte(data, amb_reg_temp_status(attr->index)) & 0x20) &&
  127. (amb_read_byte(data, amb_reg_temp_status(attr->index)) & 0x8))
  128. return sprintf(buf, "1\n");
  129. else
  130. return sprintf(buf, "0\n");
  131. }
  132. static ssize_t store_amb_min(struct device *dev,
  133. struct device_attribute *devattr,
  134. const char *buf,
  135. size_t count)
  136. {
  137. struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
  138. struct i5k_amb_data *data = dev_get_drvdata(dev);
  139. unsigned long temp = simple_strtoul(buf, NULL, 10) / 500;
  140. if (temp > 255)
  141. temp = 255;
  142. amb_write_byte(data, amb_reg_temp_min(attr->index), temp);
  143. return count;
  144. }
  145. static ssize_t store_amb_mid(struct device *dev,
  146. struct device_attribute *devattr,
  147. const char *buf,
  148. size_t count)
  149. {
  150. struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
  151. struct i5k_amb_data *data = dev_get_drvdata(dev);
  152. unsigned long temp = simple_strtoul(buf, NULL, 10) / 500;
  153. if (temp > 255)
  154. temp = 255;
  155. amb_write_byte(data, amb_reg_temp_mid(attr->index), temp);
  156. return count;
  157. }
  158. static ssize_t store_amb_max(struct device *dev,
  159. struct device_attribute *devattr,
  160. const char *buf,
  161. size_t count)
  162. {
  163. struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
  164. struct i5k_amb_data *data = dev_get_drvdata(dev);
  165. unsigned long temp = simple_strtoul(buf, NULL, 10) / 500;
  166. if (temp > 255)
  167. temp = 255;
  168. amb_write_byte(data, amb_reg_temp_max(attr->index), temp);
  169. return count;
  170. }
  171. static ssize_t show_amb_min(struct device *dev,
  172. struct device_attribute *devattr,
  173. char *buf)
  174. {
  175. struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
  176. struct i5k_amb_data *data = dev_get_drvdata(dev);
  177. return sprintf(buf, "%d\n",
  178. 500 * amb_read_byte(data, amb_reg_temp_min(attr->index)));
  179. }
  180. static ssize_t show_amb_mid(struct device *dev,
  181. struct device_attribute *devattr,
  182. char *buf)
  183. {
  184. struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
  185. struct i5k_amb_data *data = dev_get_drvdata(dev);
  186. return sprintf(buf, "%d\n",
  187. 500 * amb_read_byte(data, amb_reg_temp_mid(attr->index)));
  188. }
  189. static ssize_t show_amb_max(struct device *dev,
  190. struct device_attribute *devattr,
  191. char *buf)
  192. {
  193. struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
  194. struct i5k_amb_data *data = dev_get_drvdata(dev);
  195. return sprintf(buf, "%d\n",
  196. 500 * amb_read_byte(data, amb_reg_temp_max(attr->index)));
  197. }
  198. static ssize_t show_amb_temp(struct device *dev,
  199. struct device_attribute *devattr,
  200. char *buf)
  201. {
  202. struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
  203. struct i5k_amb_data *data = dev_get_drvdata(dev);
  204. return sprintf(buf, "%d\n",
  205. 500 * amb_read_byte(data, amb_reg_temp(attr->index)));
  206. }
  207. static ssize_t show_label(struct device *dev,
  208. struct device_attribute *devattr,
  209. char *buf)
  210. {
  211. struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
  212. return sprintf(buf, "Ch. %d DIMM %d\n", attr->index >> CHANNEL_SHIFT,
  213. attr->index & DIMM_MASK);
  214. }
  215. static int __devinit i5k_amb_hwmon_init(struct platform_device *pdev)
  216. {
  217. int i, j, k, d = 0;
  218. u16 c;
  219. int res = 0;
  220. int num_ambs = 0;
  221. struct i5k_amb_data *data = platform_get_drvdata(pdev);
  222. /* Count the number of AMBs found */
  223. /* ignore the high-order bit, see "Ugly hack" comment above */
  224. for (i = 0; i < MAX_MEM_CHANNELS; i++)
  225. num_ambs += hweight16(data->amb_present[i] & 0x7fff);
  226. /* Set up sysfs stuff */
  227. data->attrs = kzalloc(sizeof(*data->attrs) * num_ambs * KNOBS_PER_AMB,
  228. GFP_KERNEL);
  229. if (!data->attrs)
  230. return -ENOMEM;
  231. data->num_attrs = 0;
  232. for (i = 0; i < MAX_MEM_CHANNELS; i++) {
  233. c = data->amb_present[i];
  234. for (j = 0; j < REAL_MAX_AMBS_PER_CHANNEL; j++, c >>= 1) {
  235. struct i5k_device_attribute *iattr;
  236. k = amb_num_from_reg(i, j);
  237. if (!(c & 0x1))
  238. continue;
  239. d++;
  240. /* sysfs label */
  241. iattr = data->attrs + data->num_attrs;
  242. snprintf(iattr->name, AMB_SYSFS_NAME_LEN,
  243. "temp%d_label", d);
  244. iattr->s_attr.dev_attr.attr.name = iattr->name;
  245. iattr->s_attr.dev_attr.attr.mode = S_IRUGO;
  246. iattr->s_attr.dev_attr.show = show_label;
  247. iattr->s_attr.index = k;
  248. res = device_create_file(&pdev->dev,
  249. &iattr->s_attr.dev_attr);
  250. if (res)
  251. goto exit_remove;
  252. data->num_attrs++;
  253. /* Temperature sysfs knob */
  254. iattr = data->attrs + data->num_attrs;
  255. snprintf(iattr->name, AMB_SYSFS_NAME_LEN,
  256. "temp%d_input", d);
  257. iattr->s_attr.dev_attr.attr.name = iattr->name;
  258. iattr->s_attr.dev_attr.attr.mode = S_IRUGO;
  259. iattr->s_attr.dev_attr.show = show_amb_temp;
  260. iattr->s_attr.index = k;
  261. res = device_create_file(&pdev->dev,
  262. &iattr->s_attr.dev_attr);
  263. if (res)
  264. goto exit_remove;
  265. data->num_attrs++;
  266. /* Temperature min sysfs knob */
  267. iattr = data->attrs + data->num_attrs;
  268. snprintf(iattr->name, AMB_SYSFS_NAME_LEN,
  269. "temp%d_min", d);
  270. iattr->s_attr.dev_attr.attr.name = iattr->name;
  271. iattr->s_attr.dev_attr.attr.mode = S_IWUSR | S_IRUGO;
  272. iattr->s_attr.dev_attr.show = show_amb_min;
  273. iattr->s_attr.dev_attr.store = store_amb_min;
  274. iattr->s_attr.index = k;
  275. res = device_create_file(&pdev->dev,
  276. &iattr->s_attr.dev_attr);
  277. if (res)
  278. goto exit_remove;
  279. data->num_attrs++;
  280. /* Temperature mid sysfs knob */
  281. iattr = data->attrs + data->num_attrs;
  282. snprintf(iattr->name, AMB_SYSFS_NAME_LEN,
  283. "temp%d_mid", d);
  284. iattr->s_attr.dev_attr.attr.name = iattr->name;
  285. iattr->s_attr.dev_attr.attr.mode = S_IWUSR | S_IRUGO;
  286. iattr->s_attr.dev_attr.show = show_amb_mid;
  287. iattr->s_attr.dev_attr.store = store_amb_mid;
  288. iattr->s_attr.index = k;
  289. res = device_create_file(&pdev->dev,
  290. &iattr->s_attr.dev_attr);
  291. if (res)
  292. goto exit_remove;
  293. data->num_attrs++;
  294. /* Temperature max sysfs knob */
  295. iattr = data->attrs + data->num_attrs;
  296. snprintf(iattr->name, AMB_SYSFS_NAME_LEN,
  297. "temp%d_max", d);
  298. iattr->s_attr.dev_attr.attr.name = iattr->name;
  299. iattr->s_attr.dev_attr.attr.mode = S_IWUSR | S_IRUGO;
  300. iattr->s_attr.dev_attr.show = show_amb_max;
  301. iattr->s_attr.dev_attr.store = store_amb_max;
  302. iattr->s_attr.index = k;
  303. res = device_create_file(&pdev->dev,
  304. &iattr->s_attr.dev_attr);
  305. if (res)
  306. goto exit_remove;
  307. data->num_attrs++;
  308. /* Temperature alarm sysfs knob */
  309. iattr = data->attrs + data->num_attrs;
  310. snprintf(iattr->name, AMB_SYSFS_NAME_LEN,
  311. "temp%d_alarm", d);
  312. iattr->s_attr.dev_attr.attr.name = iattr->name;
  313. iattr->s_attr.dev_attr.attr.mode = S_IRUGO;
  314. iattr->s_attr.dev_attr.show = show_amb_alarm;
  315. iattr->s_attr.index = k;
  316. res = device_create_file(&pdev->dev,
  317. &iattr->s_attr.dev_attr);
  318. if (res)
  319. goto exit_remove;
  320. data->num_attrs++;
  321. }
  322. }
  323. res = device_create_file(&pdev->dev, &dev_attr_name);
  324. if (res)
  325. goto exit_remove;
  326. data->hwmon_dev = hwmon_device_register(&pdev->dev);
  327. if (IS_ERR(data->hwmon_dev)) {
  328. res = PTR_ERR(data->hwmon_dev);
  329. goto exit_remove;
  330. }
  331. return res;
  332. exit_remove:
  333. device_remove_file(&pdev->dev, &dev_attr_name);
  334. for (i = 0; i < data->num_attrs; i++)
  335. device_remove_file(&pdev->dev, &data->attrs[i].s_attr.dev_attr);
  336. kfree(data->attrs);
  337. return res;
  338. }
  339. static int __devinit i5k_amb_add(void)
  340. {
  341. int res = -ENODEV;
  342. /* only ever going to be one of these */
  343. amb_pdev = platform_device_alloc(DRVNAME, 0);
  344. if (!amb_pdev)
  345. return -ENOMEM;
  346. res = platform_device_add(amb_pdev);
  347. if (res)
  348. goto err;
  349. return 0;
  350. err:
  351. platform_device_put(amb_pdev);
  352. return res;
  353. }
  354. static int __devinit i5k_find_amb_registers(struct i5k_amb_data *data,
  355. unsigned long devid)
  356. {
  357. struct pci_dev *pcidev;
  358. u32 val32;
  359. int res = -ENODEV;
  360. /* Find AMB register memory space */
  361. pcidev = pci_get_device(PCI_VENDOR_ID_INTEL,
  362. devid,
  363. NULL);
  364. if (!pcidev)
  365. return -ENODEV;
  366. if (pci_read_config_dword(pcidev, I5K_REG_AMB_BASE_ADDR, &val32))
  367. goto out;
  368. data->amb_base = val32;
  369. if (pci_read_config_dword(pcidev, I5K_REG_AMB_LEN_ADDR, &val32))
  370. goto out;
  371. data->amb_len = val32;
  372. /* Is it big enough? */
  373. if (data->amb_len < AMB_CONFIG_SIZE * MAX_AMBS) {
  374. dev_err(&pcidev->dev, "AMB region too small!\n");
  375. goto out;
  376. }
  377. data->chipset_id = devid;
  378. res = 0;
  379. out:
  380. pci_dev_put(pcidev);
  381. return res;
  382. }
  383. static int __devinit i5k_channel_probe(u16 *amb_present, unsigned long dev_id)
  384. {
  385. struct pci_dev *pcidev;
  386. u16 val16;
  387. int res = -ENODEV;
  388. /* Copy the DIMM presence map for these two channels */
  389. pcidev = pci_get_device(PCI_VENDOR_ID_INTEL, dev_id, NULL);
  390. if (!pcidev)
  391. return -ENODEV;
  392. if (pci_read_config_word(pcidev, I5K_REG_CHAN0_PRESENCE_ADDR, &val16))
  393. goto out;
  394. amb_present[0] = val16;
  395. if (pci_read_config_word(pcidev, I5K_REG_CHAN1_PRESENCE_ADDR, &val16))
  396. goto out;
  397. amb_present[1] = val16;
  398. res = 0;
  399. out:
  400. pci_dev_put(pcidev);
  401. return res;
  402. }
  403. static unsigned long i5k_channel_pci_id(struct i5k_amb_data *data,
  404. unsigned long channel)
  405. {
  406. switch (data->chipset_id) {
  407. case PCI_DEVICE_ID_INTEL_5000_ERR:
  408. return PCI_DEVICE_ID_INTEL_5000_FBD0 + channel;
  409. case PCI_DEVICE_ID_INTEL_5400_ERR:
  410. return PCI_DEVICE_ID_INTEL_5400_FBD0 + channel;
  411. default:
  412. BUG();
  413. }
  414. }
  415. static unsigned long chipset_ids[] = {
  416. PCI_DEVICE_ID_INTEL_5000_ERR,
  417. PCI_DEVICE_ID_INTEL_5400_ERR,
  418. 0
  419. };
  420. static struct pci_device_id i5k_amb_ids[] __devinitdata = {
  421. { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_5000_ERR) },
  422. { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_5400_ERR) },
  423. { 0, }
  424. };
  425. MODULE_DEVICE_TABLE(pci, i5k_amb_ids);
  426. static int __devinit i5k_amb_probe(struct platform_device *pdev)
  427. {
  428. struct i5k_amb_data *data;
  429. struct resource *reso;
  430. int i;
  431. int res = -ENODEV;
  432. data = kzalloc(sizeof(*data), GFP_KERNEL);
  433. if (!data)
  434. return -ENOMEM;
  435. /* Figure out where the AMB registers live */
  436. i = 0;
  437. do {
  438. res = i5k_find_amb_registers(data, chipset_ids[i]);
  439. i++;
  440. } while (res && chipset_ids[i]);
  441. if (res)
  442. goto err;
  443. /* Copy the DIMM presence map for the first two channels */
  444. res = i5k_channel_probe(&data->amb_present[0],
  445. i5k_channel_pci_id(data, 0));
  446. if (res)
  447. goto err;
  448. /* Copy the DIMM presence map for the optional second two channels */
  449. i5k_channel_probe(&data->amb_present[2],
  450. i5k_channel_pci_id(data, 1));
  451. /* Set up resource regions */
  452. reso = request_mem_region(data->amb_base, data->amb_len, DRVNAME);
  453. if (!reso) {
  454. res = -EBUSY;
  455. goto err;
  456. }
  457. data->amb_mmio = ioremap_nocache(data->amb_base, data->amb_len);
  458. if (!data->amb_mmio) {
  459. res = -EBUSY;
  460. goto err_map_failed;
  461. }
  462. platform_set_drvdata(pdev, data);
  463. res = i5k_amb_hwmon_init(pdev);
  464. if (res)
  465. goto err_init_failed;
  466. return res;
  467. err_init_failed:
  468. iounmap(data->amb_mmio);
  469. platform_set_drvdata(pdev, NULL);
  470. err_map_failed:
  471. release_mem_region(data->amb_base, data->amb_len);
  472. err:
  473. kfree(data);
  474. return res;
  475. }
  476. static int __devexit i5k_amb_remove(struct platform_device *pdev)
  477. {
  478. int i;
  479. struct i5k_amb_data *data = platform_get_drvdata(pdev);
  480. hwmon_device_unregister(data->hwmon_dev);
  481. device_remove_file(&pdev->dev, &dev_attr_name);
  482. for (i = 0; i < data->num_attrs; i++)
  483. device_remove_file(&pdev->dev, &data->attrs[i].s_attr.dev_attr);
  484. kfree(data->attrs);
  485. iounmap(data->amb_mmio);
  486. release_mem_region(data->amb_base, data->amb_len);
  487. platform_set_drvdata(pdev, NULL);
  488. kfree(data);
  489. return 0;
  490. }
  491. static struct platform_driver i5k_amb_driver = {
  492. .driver = {
  493. .owner = THIS_MODULE,
  494. .name = DRVNAME,
  495. },
  496. .probe = i5k_amb_probe,
  497. .remove = __devexit_p(i5k_amb_remove),
  498. };
  499. static int __init i5k_amb_init(void)
  500. {
  501. int res;
  502. res = platform_driver_register(&i5k_amb_driver);
  503. if (res)
  504. return res;
  505. res = i5k_amb_add();
  506. if (res)
  507. platform_driver_unregister(&i5k_amb_driver);
  508. return res;
  509. }
  510. static void __exit i5k_amb_exit(void)
  511. {
  512. platform_device_unregister(amb_pdev);
  513. platform_driver_unregister(&i5k_amb_driver);
  514. }
  515. MODULE_AUTHOR("Darrick J. Wong <djwong@us.ibm.com>");
  516. MODULE_DESCRIPTION("Intel 5000 chipset FB-DIMM AMB temperature sensor");
  517. MODULE_LICENSE("GPL");
  518. module_init(i5k_amb_init);
  519. module_exit(i5k_amb_exit);