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 name_show(struct device *dev, struct device_attribute *devattr,
  102. char *buf)
  103. {
  104. return sprintf(buf, "%s\n", DRVNAME);
  105. }
  106. static DEVICE_ATTR_RO(name);
  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(array3_size(num_ambs, KNOBS_PER_AMB,
  237. sizeof(*data->attrs)),
  238. GFP_KERNEL);
  239. if (!data->attrs)
  240. return -ENOMEM;
  241. data->num_attrs = 0;
  242. for (i = 0; i < MAX_MEM_CHANNELS; i++) {
  243. c = data->amb_present[i];
  244. for (j = 0; j < REAL_MAX_AMBS_PER_CHANNEL; j++, c >>= 1) {
  245. struct i5k_device_attribute *iattr;
  246. k = amb_num_from_reg(i, j);
  247. if (!(c & 0x1))
  248. continue;
  249. d++;
  250. /* sysfs label */
  251. iattr = data->attrs + data->num_attrs;
  252. snprintf(iattr->name, AMB_SYSFS_NAME_LEN,
  253. "temp%d_label", d);
  254. iattr->s_attr.dev_attr.attr.name = iattr->name;
  255. iattr->s_attr.dev_attr.attr.mode = S_IRUGO;
  256. iattr->s_attr.dev_attr.show = show_label;
  257. iattr->s_attr.index = k;
  258. sysfs_attr_init(&iattr->s_attr.dev_attr.attr);
  259. res = device_create_file(&pdev->dev,
  260. &iattr->s_attr.dev_attr);
  261. if (res)
  262. goto exit_remove;
  263. data->num_attrs++;
  264. /* Temperature sysfs knob */
  265. iattr = data->attrs + data->num_attrs;
  266. snprintf(iattr->name, AMB_SYSFS_NAME_LEN,
  267. "temp%d_input", d);
  268. iattr->s_attr.dev_attr.attr.name = iattr->name;
  269. iattr->s_attr.dev_attr.attr.mode = S_IRUGO;
  270. iattr->s_attr.dev_attr.show = show_amb_temp;
  271. iattr->s_attr.index = k;
  272. sysfs_attr_init(&iattr->s_attr.dev_attr.attr);
  273. res = device_create_file(&pdev->dev,
  274. &iattr->s_attr.dev_attr);
  275. if (res)
  276. goto exit_remove;
  277. data->num_attrs++;
  278. /* Temperature min sysfs knob */
  279. iattr = data->attrs + data->num_attrs;
  280. snprintf(iattr->name, AMB_SYSFS_NAME_LEN,
  281. "temp%d_min", d);
  282. iattr->s_attr.dev_attr.attr.name = iattr->name;
  283. iattr->s_attr.dev_attr.attr.mode = S_IWUSR | S_IRUGO;
  284. iattr->s_attr.dev_attr.show = show_amb_min;
  285. iattr->s_attr.dev_attr.store = store_amb_min;
  286. iattr->s_attr.index = k;
  287. sysfs_attr_init(&iattr->s_attr.dev_attr.attr);
  288. res = device_create_file(&pdev->dev,
  289. &iattr->s_attr.dev_attr);
  290. if (res)
  291. goto exit_remove;
  292. data->num_attrs++;
  293. /* Temperature mid sysfs knob */
  294. iattr = data->attrs + data->num_attrs;
  295. snprintf(iattr->name, AMB_SYSFS_NAME_LEN,
  296. "temp%d_mid", d);
  297. iattr->s_attr.dev_attr.attr.name = iattr->name;
  298. iattr->s_attr.dev_attr.attr.mode = S_IWUSR | S_IRUGO;
  299. iattr->s_attr.dev_attr.show = show_amb_mid;
  300. iattr->s_attr.dev_attr.store = store_amb_mid;
  301. iattr->s_attr.index = k;
  302. sysfs_attr_init(&iattr->s_attr.dev_attr.attr);
  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 max sysfs knob */
  309. iattr = data->attrs + data->num_attrs;
  310. snprintf(iattr->name, AMB_SYSFS_NAME_LEN,
  311. "temp%d_max", d);
  312. iattr->s_attr.dev_attr.attr.name = iattr->name;
  313. iattr->s_attr.dev_attr.attr.mode = S_IWUSR | S_IRUGO;
  314. iattr->s_attr.dev_attr.show = show_amb_max;
  315. iattr->s_attr.dev_attr.store = store_amb_max;
  316. iattr->s_attr.index = k;
  317. sysfs_attr_init(&iattr->s_attr.dev_attr.attr);
  318. res = device_create_file(&pdev->dev,
  319. &iattr->s_attr.dev_attr);
  320. if (res)
  321. goto exit_remove;
  322. data->num_attrs++;
  323. /* Temperature alarm sysfs knob */
  324. iattr = data->attrs + data->num_attrs;
  325. snprintf(iattr->name, AMB_SYSFS_NAME_LEN,
  326. "temp%d_alarm", d);
  327. iattr->s_attr.dev_attr.attr.name = iattr->name;
  328. iattr->s_attr.dev_attr.attr.mode = S_IRUGO;
  329. iattr->s_attr.dev_attr.show = show_amb_alarm;
  330. iattr->s_attr.index = k;
  331. sysfs_attr_init(&iattr->s_attr.dev_attr.attr);
  332. res = device_create_file(&pdev->dev,
  333. &iattr->s_attr.dev_attr);
  334. if (res)
  335. goto exit_remove;
  336. data->num_attrs++;
  337. }
  338. }
  339. res = device_create_file(&pdev->dev, &dev_attr_name);
  340. if (res)
  341. goto exit_remove;
  342. data->hwmon_dev = hwmon_device_register(&pdev->dev);
  343. if (IS_ERR(data->hwmon_dev)) {
  344. res = PTR_ERR(data->hwmon_dev);
  345. goto exit_remove;
  346. }
  347. return res;
  348. exit_remove:
  349. device_remove_file(&pdev->dev, &dev_attr_name);
  350. for (i = 0; i < data->num_attrs; i++)
  351. device_remove_file(&pdev->dev, &data->attrs[i].s_attr.dev_attr);
  352. kfree(data->attrs);
  353. return res;
  354. }
  355. static int i5k_amb_add(void)
  356. {
  357. int res = -ENODEV;
  358. /* only ever going to be one of these */
  359. amb_pdev = platform_device_alloc(DRVNAME, 0);
  360. if (!amb_pdev)
  361. return -ENOMEM;
  362. res = platform_device_add(amb_pdev);
  363. if (res)
  364. goto err;
  365. return 0;
  366. err:
  367. platform_device_put(amb_pdev);
  368. return res;
  369. }
  370. static int i5k_find_amb_registers(struct i5k_amb_data *data,
  371. unsigned long devid)
  372. {
  373. struct pci_dev *pcidev;
  374. u32 val32;
  375. int res = -ENODEV;
  376. /* Find AMB register memory space */
  377. pcidev = pci_get_device(PCI_VENDOR_ID_INTEL,
  378. devid,
  379. NULL);
  380. if (!pcidev)
  381. return -ENODEV;
  382. if (pci_read_config_dword(pcidev, I5K_REG_AMB_BASE_ADDR, &val32))
  383. goto out;
  384. data->amb_base = val32;
  385. if (pci_read_config_dword(pcidev, I5K_REG_AMB_LEN_ADDR, &val32))
  386. goto out;
  387. data->amb_len = val32;
  388. /* Is it big enough? */
  389. if (data->amb_len < AMB_CONFIG_SIZE * MAX_AMBS) {
  390. dev_err(&pcidev->dev, "AMB region too small!\n");
  391. goto out;
  392. }
  393. res = 0;
  394. out:
  395. pci_dev_put(pcidev);
  396. return res;
  397. }
  398. static int i5k_channel_probe(u16 *amb_present, unsigned long dev_id)
  399. {
  400. struct pci_dev *pcidev;
  401. u16 val16;
  402. int res = -ENODEV;
  403. /* Copy the DIMM presence map for these two channels */
  404. pcidev = pci_get_device(PCI_VENDOR_ID_INTEL, dev_id, NULL);
  405. if (!pcidev)
  406. return -ENODEV;
  407. if (pci_read_config_word(pcidev, I5K_REG_CHAN0_PRESENCE_ADDR, &val16))
  408. goto out;
  409. amb_present[0] = val16;
  410. if (pci_read_config_word(pcidev, I5K_REG_CHAN1_PRESENCE_ADDR, &val16))
  411. goto out;
  412. amb_present[1] = val16;
  413. res = 0;
  414. out:
  415. pci_dev_put(pcidev);
  416. return res;
  417. }
  418. static struct {
  419. unsigned long err;
  420. unsigned long fbd0;
  421. } chipset_ids[] = {
  422. { PCI_DEVICE_ID_INTEL_5000_ERR, PCI_DEVICE_ID_INTEL_5000_FBD0 },
  423. { PCI_DEVICE_ID_INTEL_5400_ERR, PCI_DEVICE_ID_INTEL_5400_FBD0 },
  424. { 0, 0 }
  425. };
  426. #ifdef MODULE
  427. static const struct pci_device_id i5k_amb_ids[] = {
  428. { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_5000_ERR) },
  429. { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_5400_ERR) },
  430. { 0, }
  431. };
  432. MODULE_DEVICE_TABLE(pci, i5k_amb_ids);
  433. #endif
  434. static int i5k_amb_probe(struct platform_device *pdev)
  435. {
  436. struct i5k_amb_data *data;
  437. struct resource *reso;
  438. int i, res;
  439. data = kzalloc(sizeof(*data), GFP_KERNEL);
  440. if (!data)
  441. return -ENOMEM;
  442. /* Figure out where the AMB registers live */
  443. i = 0;
  444. do {
  445. res = i5k_find_amb_registers(data, chipset_ids[i].err);
  446. if (res == 0)
  447. break;
  448. i++;
  449. } while (chipset_ids[i].err);
  450. if (res)
  451. goto err;
  452. /* Copy the DIMM presence map for the first two channels */
  453. res = i5k_channel_probe(&data->amb_present[0], chipset_ids[i].fbd0);
  454. if (res)
  455. goto err;
  456. /* Copy the DIMM presence map for the optional second two channels */
  457. i5k_channel_probe(&data->amb_present[2], chipset_ids[i].fbd0 + 1);
  458. /* Set up resource regions */
  459. reso = request_mem_region(data->amb_base, data->amb_len, DRVNAME);
  460. if (!reso) {
  461. res = -EBUSY;
  462. goto err;
  463. }
  464. data->amb_mmio = ioremap_nocache(data->amb_base, data->amb_len);
  465. if (!data->amb_mmio) {
  466. res = -EBUSY;
  467. goto err_map_failed;
  468. }
  469. platform_set_drvdata(pdev, data);
  470. res = i5k_amb_hwmon_init(pdev);
  471. if (res)
  472. goto err_init_failed;
  473. return res;
  474. err_init_failed:
  475. iounmap(data->amb_mmio);
  476. err_map_failed:
  477. release_mem_region(data->amb_base, data->amb_len);
  478. err:
  479. kfree(data);
  480. return res;
  481. }
  482. static int i5k_amb_remove(struct platform_device *pdev)
  483. {
  484. int i;
  485. struct i5k_amb_data *data = platform_get_drvdata(pdev);
  486. hwmon_device_unregister(data->hwmon_dev);
  487. device_remove_file(&pdev->dev, &dev_attr_name);
  488. for (i = 0; i < data->num_attrs; i++)
  489. device_remove_file(&pdev->dev, &data->attrs[i].s_attr.dev_attr);
  490. kfree(data->attrs);
  491. iounmap(data->amb_mmio);
  492. release_mem_region(data->amb_base, data->amb_len);
  493. kfree(data);
  494. return 0;
  495. }
  496. static struct platform_driver i5k_amb_driver = {
  497. .driver = {
  498. .name = DRVNAME,
  499. },
  500. .probe = i5k_amb_probe,
  501. .remove = i5k_amb_remove,
  502. };
  503. static int __init i5k_amb_init(void)
  504. {
  505. int res;
  506. res = platform_driver_register(&i5k_amb_driver);
  507. if (res)
  508. return res;
  509. res = i5k_amb_add();
  510. if (res)
  511. platform_driver_unregister(&i5k_amb_driver);
  512. return res;
  513. }
  514. static void __exit i5k_amb_exit(void)
  515. {
  516. platform_device_unregister(amb_pdev);
  517. platform_driver_unregister(&i5k_amb_driver);
  518. }
  519. MODULE_AUTHOR("Darrick J. Wong <darrick.wong@oracle.com>");
  520. MODULE_DESCRIPTION("Intel 5000 chipset FB-DIMM AMB temperature sensor");
  521. MODULE_LICENSE("GPL");
  522. module_init(i5k_amb_init);
  523. module_exit(i5k_amb_exit);