i5k_amb.c 16 KB

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