emc1403.c 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499
  1. /*
  2. * emc1403.c - SMSC Thermal Driver
  3. *
  4. * Copyright (C) 2008 Intel Corp
  5. *
  6. * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  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; version 2 of the License.
  11. *
  12. * This program is distributed in the hope that it will be useful, but
  13. * WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  15. * General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU General Public License along
  18. * with this program; if not, write to the Free Software Foundation, Inc.,
  19. * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
  20. * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  21. */
  22. #include <linux/module.h>
  23. #include <linux/init.h>
  24. #include <linux/slab.h>
  25. #include <linux/i2c.h>
  26. #include <linux/hwmon.h>
  27. #include <linux/hwmon-sysfs.h>
  28. #include <linux/err.h>
  29. #include <linux/sysfs.h>
  30. #include <linux/mutex.h>
  31. #include <linux/regmap.h>
  32. #define THERMAL_PID_REG 0xfd
  33. #define THERMAL_SMSC_ID_REG 0xfe
  34. #define THERMAL_REVISION_REG 0xff
  35. enum emc1403_chip { emc1402, emc1403, emc1404 };
  36. struct thermal_data {
  37. struct regmap *regmap;
  38. struct mutex mutex;
  39. const struct attribute_group *groups[4];
  40. };
  41. static ssize_t show_temp(struct device *dev,
  42. struct device_attribute *attr, char *buf)
  43. {
  44. struct sensor_device_attribute *sda = to_sensor_dev_attr(attr);
  45. struct thermal_data *data = dev_get_drvdata(dev);
  46. unsigned int val;
  47. int retval;
  48. retval = regmap_read(data->regmap, sda->index, &val);
  49. if (retval < 0)
  50. return retval;
  51. return sprintf(buf, "%d000\n", val);
  52. }
  53. static ssize_t show_bit(struct device *dev,
  54. struct device_attribute *attr, char *buf)
  55. {
  56. struct sensor_device_attribute_2 *sda = to_sensor_dev_attr_2(attr);
  57. struct thermal_data *data = dev_get_drvdata(dev);
  58. unsigned int val;
  59. int retval;
  60. retval = regmap_read(data->regmap, sda->nr, &val);
  61. if (retval < 0)
  62. return retval;
  63. return sprintf(buf, "%d\n", !!(val & sda->index));
  64. }
  65. static ssize_t store_temp(struct device *dev,
  66. struct device_attribute *attr, const char *buf, size_t count)
  67. {
  68. struct sensor_device_attribute *sda = to_sensor_dev_attr(attr);
  69. struct thermal_data *data = dev_get_drvdata(dev);
  70. unsigned long val;
  71. int retval;
  72. if (kstrtoul(buf, 10, &val))
  73. return -EINVAL;
  74. retval = regmap_write(data->regmap, sda->index,
  75. DIV_ROUND_CLOSEST(val, 1000));
  76. if (retval < 0)
  77. return retval;
  78. return count;
  79. }
  80. static ssize_t store_bit(struct device *dev,
  81. struct device_attribute *attr, const char *buf, size_t count)
  82. {
  83. struct sensor_device_attribute_2 *sda = to_sensor_dev_attr_2(attr);
  84. struct thermal_data *data = dev_get_drvdata(dev);
  85. unsigned long val;
  86. int retval;
  87. if (kstrtoul(buf, 10, &val))
  88. return -EINVAL;
  89. retval = regmap_update_bits(data->regmap, sda->nr, sda->index,
  90. val ? sda->index : 0);
  91. if (retval < 0)
  92. return retval;
  93. return count;
  94. }
  95. static ssize_t show_hyst_common(struct device *dev,
  96. struct device_attribute *attr, char *buf,
  97. bool is_min)
  98. {
  99. struct sensor_device_attribute *sda = to_sensor_dev_attr(attr);
  100. struct thermal_data *data = dev_get_drvdata(dev);
  101. struct regmap *regmap = data->regmap;
  102. unsigned int limit;
  103. unsigned int hyst;
  104. int retval;
  105. retval = regmap_read(regmap, sda->index, &limit);
  106. if (retval < 0)
  107. return retval;
  108. retval = regmap_read(regmap, 0x21, &hyst);
  109. if (retval < 0)
  110. return retval;
  111. return sprintf(buf, "%d000\n", is_min ? limit + hyst : limit - hyst);
  112. }
  113. static ssize_t show_hyst(struct device *dev,
  114. struct device_attribute *attr, char *buf)
  115. {
  116. return show_hyst_common(dev, attr, buf, false);
  117. }
  118. static ssize_t show_min_hyst(struct device *dev,
  119. struct device_attribute *attr, char *buf)
  120. {
  121. return show_hyst_common(dev, attr, buf, true);
  122. }
  123. static ssize_t store_hyst(struct device *dev,
  124. struct device_attribute *attr, const char *buf, size_t count)
  125. {
  126. struct sensor_device_attribute *sda = to_sensor_dev_attr(attr);
  127. struct thermal_data *data = dev_get_drvdata(dev);
  128. struct regmap *regmap = data->regmap;
  129. unsigned int limit;
  130. int retval;
  131. int hyst;
  132. unsigned long val;
  133. if (kstrtoul(buf, 10, &val))
  134. return -EINVAL;
  135. mutex_lock(&data->mutex);
  136. retval = regmap_read(regmap, sda->index, &limit);
  137. if (retval < 0)
  138. goto fail;
  139. hyst = limit * 1000 - val;
  140. hyst = clamp_val(DIV_ROUND_CLOSEST(hyst, 1000), 0, 255);
  141. retval = regmap_write(regmap, 0x21, hyst);
  142. if (retval == 0)
  143. retval = count;
  144. fail:
  145. mutex_unlock(&data->mutex);
  146. return retval;
  147. }
  148. /*
  149. * Sensors. We pass the actual i2c register to the methods.
  150. */
  151. static SENSOR_DEVICE_ATTR(temp1_min, S_IRUGO | S_IWUSR,
  152. show_temp, store_temp, 0x06);
  153. static SENSOR_DEVICE_ATTR(temp1_max, S_IRUGO | S_IWUSR,
  154. show_temp, store_temp, 0x05);
  155. static SENSOR_DEVICE_ATTR(temp1_crit, S_IRUGO | S_IWUSR,
  156. show_temp, store_temp, 0x20);
  157. static SENSOR_DEVICE_ATTR(temp1_input, S_IRUGO, show_temp, NULL, 0x00);
  158. static SENSOR_DEVICE_ATTR_2(temp1_min_alarm, S_IRUGO,
  159. show_bit, NULL, 0x36, 0x01);
  160. static SENSOR_DEVICE_ATTR_2(temp1_max_alarm, S_IRUGO,
  161. show_bit, NULL, 0x35, 0x01);
  162. static SENSOR_DEVICE_ATTR_2(temp1_crit_alarm, S_IRUGO,
  163. show_bit, NULL, 0x37, 0x01);
  164. static SENSOR_DEVICE_ATTR(temp1_min_hyst, S_IRUGO, show_min_hyst, NULL, 0x06);
  165. static SENSOR_DEVICE_ATTR(temp1_max_hyst, S_IRUGO, show_hyst, NULL, 0x05);
  166. static SENSOR_DEVICE_ATTR(temp1_crit_hyst, S_IRUGO | S_IWUSR,
  167. show_hyst, store_hyst, 0x20);
  168. static SENSOR_DEVICE_ATTR(temp2_min, S_IRUGO | S_IWUSR,
  169. show_temp, store_temp, 0x08);
  170. static SENSOR_DEVICE_ATTR(temp2_max, S_IRUGO | S_IWUSR,
  171. show_temp, store_temp, 0x07);
  172. static SENSOR_DEVICE_ATTR(temp2_crit, S_IRUGO | S_IWUSR,
  173. show_temp, store_temp, 0x19);
  174. static SENSOR_DEVICE_ATTR(temp2_input, S_IRUGO, show_temp, NULL, 0x01);
  175. static SENSOR_DEVICE_ATTR_2(temp2_fault, S_IRUGO, show_bit, NULL, 0x1b, 0x02);
  176. static SENSOR_DEVICE_ATTR_2(temp2_min_alarm, S_IRUGO,
  177. show_bit, NULL, 0x36, 0x02);
  178. static SENSOR_DEVICE_ATTR_2(temp2_max_alarm, S_IRUGO,
  179. show_bit, NULL, 0x35, 0x02);
  180. static SENSOR_DEVICE_ATTR_2(temp2_crit_alarm, S_IRUGO,
  181. show_bit, NULL, 0x37, 0x02);
  182. static SENSOR_DEVICE_ATTR(temp2_min_hyst, S_IRUGO, show_min_hyst, NULL, 0x08);
  183. static SENSOR_DEVICE_ATTR(temp2_max_hyst, S_IRUGO, show_hyst, NULL, 0x07);
  184. static SENSOR_DEVICE_ATTR(temp2_crit_hyst, S_IRUGO, show_hyst, NULL, 0x19);
  185. static SENSOR_DEVICE_ATTR(temp3_min, S_IRUGO | S_IWUSR,
  186. show_temp, store_temp, 0x16);
  187. static SENSOR_DEVICE_ATTR(temp3_max, S_IRUGO | S_IWUSR,
  188. show_temp, store_temp, 0x15);
  189. static SENSOR_DEVICE_ATTR(temp3_crit, S_IRUGO | S_IWUSR,
  190. show_temp, store_temp, 0x1A);
  191. static SENSOR_DEVICE_ATTR(temp3_input, S_IRUGO, show_temp, NULL, 0x23);
  192. static SENSOR_DEVICE_ATTR_2(temp3_fault, S_IRUGO, show_bit, NULL, 0x1b, 0x04);
  193. static SENSOR_DEVICE_ATTR_2(temp3_min_alarm, S_IRUGO,
  194. show_bit, NULL, 0x36, 0x04);
  195. static SENSOR_DEVICE_ATTR_2(temp3_max_alarm, S_IRUGO,
  196. show_bit, NULL, 0x35, 0x04);
  197. static SENSOR_DEVICE_ATTR_2(temp3_crit_alarm, S_IRUGO,
  198. show_bit, NULL, 0x37, 0x04);
  199. static SENSOR_DEVICE_ATTR(temp3_min_hyst, S_IRUGO, show_min_hyst, NULL, 0x16);
  200. static SENSOR_DEVICE_ATTR(temp3_max_hyst, S_IRUGO, show_hyst, NULL, 0x15);
  201. static SENSOR_DEVICE_ATTR(temp3_crit_hyst, S_IRUGO, show_hyst, NULL, 0x1A);
  202. static SENSOR_DEVICE_ATTR(temp4_min, S_IRUGO | S_IWUSR,
  203. show_temp, store_temp, 0x2D);
  204. static SENSOR_DEVICE_ATTR(temp4_max, S_IRUGO | S_IWUSR,
  205. show_temp, store_temp, 0x2C);
  206. static SENSOR_DEVICE_ATTR(temp4_crit, S_IRUGO | S_IWUSR,
  207. show_temp, store_temp, 0x30);
  208. static SENSOR_DEVICE_ATTR(temp4_input, S_IRUGO, show_temp, NULL, 0x2A);
  209. static SENSOR_DEVICE_ATTR_2(temp4_fault, S_IRUGO, show_bit, NULL, 0x1b, 0x08);
  210. static SENSOR_DEVICE_ATTR_2(temp4_min_alarm, S_IRUGO,
  211. show_bit, NULL, 0x36, 0x08);
  212. static SENSOR_DEVICE_ATTR_2(temp4_max_alarm, S_IRUGO,
  213. show_bit, NULL, 0x35, 0x08);
  214. static SENSOR_DEVICE_ATTR_2(temp4_crit_alarm, S_IRUGO,
  215. show_bit, NULL, 0x37, 0x08);
  216. static SENSOR_DEVICE_ATTR(temp4_min_hyst, S_IRUGO, show_min_hyst, NULL, 0x2D);
  217. static SENSOR_DEVICE_ATTR(temp4_max_hyst, S_IRUGO, show_hyst, NULL, 0x2C);
  218. static SENSOR_DEVICE_ATTR(temp4_crit_hyst, S_IRUGO, show_hyst, NULL, 0x30);
  219. static SENSOR_DEVICE_ATTR_2(power_state, S_IRUGO | S_IWUSR,
  220. show_bit, store_bit, 0x03, 0x40);
  221. static struct attribute *emc1402_attrs[] = {
  222. &sensor_dev_attr_temp1_min.dev_attr.attr,
  223. &sensor_dev_attr_temp1_max.dev_attr.attr,
  224. &sensor_dev_attr_temp1_crit.dev_attr.attr,
  225. &sensor_dev_attr_temp1_input.dev_attr.attr,
  226. &sensor_dev_attr_temp1_min_hyst.dev_attr.attr,
  227. &sensor_dev_attr_temp1_max_hyst.dev_attr.attr,
  228. &sensor_dev_attr_temp1_crit_hyst.dev_attr.attr,
  229. &sensor_dev_attr_temp2_min.dev_attr.attr,
  230. &sensor_dev_attr_temp2_max.dev_attr.attr,
  231. &sensor_dev_attr_temp2_crit.dev_attr.attr,
  232. &sensor_dev_attr_temp2_input.dev_attr.attr,
  233. &sensor_dev_attr_temp2_min_hyst.dev_attr.attr,
  234. &sensor_dev_attr_temp2_max_hyst.dev_attr.attr,
  235. &sensor_dev_attr_temp2_crit_hyst.dev_attr.attr,
  236. &sensor_dev_attr_power_state.dev_attr.attr,
  237. NULL
  238. };
  239. static const struct attribute_group emc1402_group = {
  240. .attrs = emc1402_attrs,
  241. };
  242. static struct attribute *emc1403_attrs[] = {
  243. &sensor_dev_attr_temp1_min_alarm.dev_attr.attr,
  244. &sensor_dev_attr_temp1_max_alarm.dev_attr.attr,
  245. &sensor_dev_attr_temp1_crit_alarm.dev_attr.attr,
  246. &sensor_dev_attr_temp2_fault.dev_attr.attr,
  247. &sensor_dev_attr_temp2_min_alarm.dev_attr.attr,
  248. &sensor_dev_attr_temp2_max_alarm.dev_attr.attr,
  249. &sensor_dev_attr_temp2_crit_alarm.dev_attr.attr,
  250. &sensor_dev_attr_temp3_min.dev_attr.attr,
  251. &sensor_dev_attr_temp3_max.dev_attr.attr,
  252. &sensor_dev_attr_temp3_crit.dev_attr.attr,
  253. &sensor_dev_attr_temp3_input.dev_attr.attr,
  254. &sensor_dev_attr_temp3_fault.dev_attr.attr,
  255. &sensor_dev_attr_temp3_min_alarm.dev_attr.attr,
  256. &sensor_dev_attr_temp3_max_alarm.dev_attr.attr,
  257. &sensor_dev_attr_temp3_crit_alarm.dev_attr.attr,
  258. &sensor_dev_attr_temp3_min_hyst.dev_attr.attr,
  259. &sensor_dev_attr_temp3_max_hyst.dev_attr.attr,
  260. &sensor_dev_attr_temp3_crit_hyst.dev_attr.attr,
  261. NULL
  262. };
  263. static const struct attribute_group emc1403_group = {
  264. .attrs = emc1403_attrs,
  265. };
  266. static struct attribute *emc1404_attrs[] = {
  267. &sensor_dev_attr_temp4_min.dev_attr.attr,
  268. &sensor_dev_attr_temp4_max.dev_attr.attr,
  269. &sensor_dev_attr_temp4_crit.dev_attr.attr,
  270. &sensor_dev_attr_temp4_input.dev_attr.attr,
  271. &sensor_dev_attr_temp4_fault.dev_attr.attr,
  272. &sensor_dev_attr_temp4_min_alarm.dev_attr.attr,
  273. &sensor_dev_attr_temp4_max_alarm.dev_attr.attr,
  274. &sensor_dev_attr_temp4_crit_alarm.dev_attr.attr,
  275. &sensor_dev_attr_temp4_min_hyst.dev_attr.attr,
  276. &sensor_dev_attr_temp4_max_hyst.dev_attr.attr,
  277. &sensor_dev_attr_temp4_crit_hyst.dev_attr.attr,
  278. NULL
  279. };
  280. static const struct attribute_group emc1404_group = {
  281. .attrs = emc1404_attrs,
  282. };
  283. /*
  284. * EMC14x2 uses a different register and different bits to report alarm and
  285. * fault status. For simplicity, provide a separate attribute group for this
  286. * chip series.
  287. * Since we can not re-use the same attribute names, create a separate attribute
  288. * array.
  289. */
  290. static struct sensor_device_attribute_2 emc1402_alarms[] = {
  291. SENSOR_ATTR_2(temp1_min_alarm, S_IRUGO, show_bit, NULL, 0x02, 0x20),
  292. SENSOR_ATTR_2(temp1_max_alarm, S_IRUGO, show_bit, NULL, 0x02, 0x40),
  293. SENSOR_ATTR_2(temp1_crit_alarm, S_IRUGO, show_bit, NULL, 0x02, 0x01),
  294. SENSOR_ATTR_2(temp2_fault, S_IRUGO, show_bit, NULL, 0x02, 0x04),
  295. SENSOR_ATTR_2(temp2_min_alarm, S_IRUGO, show_bit, NULL, 0x02, 0x08),
  296. SENSOR_ATTR_2(temp2_max_alarm, S_IRUGO, show_bit, NULL, 0x02, 0x10),
  297. SENSOR_ATTR_2(temp2_crit_alarm, S_IRUGO, show_bit, NULL, 0x02, 0x02),
  298. };
  299. static struct attribute *emc1402_alarm_attrs[] = {
  300. &emc1402_alarms[0].dev_attr.attr,
  301. &emc1402_alarms[1].dev_attr.attr,
  302. &emc1402_alarms[2].dev_attr.attr,
  303. &emc1402_alarms[3].dev_attr.attr,
  304. &emc1402_alarms[4].dev_attr.attr,
  305. &emc1402_alarms[5].dev_attr.attr,
  306. &emc1402_alarms[6].dev_attr.attr,
  307. NULL,
  308. };
  309. static const struct attribute_group emc1402_alarm_group = {
  310. .attrs = emc1402_alarm_attrs,
  311. };
  312. static int emc1403_detect(struct i2c_client *client,
  313. struct i2c_board_info *info)
  314. {
  315. int id;
  316. /* Check if thermal chip is SMSC and EMC1403 or EMC1423 */
  317. id = i2c_smbus_read_byte_data(client, THERMAL_SMSC_ID_REG);
  318. if (id != 0x5d)
  319. return -ENODEV;
  320. id = i2c_smbus_read_byte_data(client, THERMAL_PID_REG);
  321. switch (id) {
  322. case 0x20:
  323. strlcpy(info->type, "emc1402", I2C_NAME_SIZE);
  324. break;
  325. case 0x21:
  326. strlcpy(info->type, "emc1403", I2C_NAME_SIZE);
  327. break;
  328. case 0x22:
  329. strlcpy(info->type, "emc1422", I2C_NAME_SIZE);
  330. break;
  331. case 0x23:
  332. strlcpy(info->type, "emc1423", I2C_NAME_SIZE);
  333. break;
  334. case 0x25:
  335. strlcpy(info->type, "emc1404", I2C_NAME_SIZE);
  336. break;
  337. case 0x27:
  338. strlcpy(info->type, "emc1424", I2C_NAME_SIZE);
  339. break;
  340. default:
  341. return -ENODEV;
  342. }
  343. id = i2c_smbus_read_byte_data(client, THERMAL_REVISION_REG);
  344. if (id < 0x01 || id > 0x04)
  345. return -ENODEV;
  346. return 0;
  347. }
  348. static bool emc1403_regmap_is_volatile(struct device *dev, unsigned int reg)
  349. {
  350. switch (reg) {
  351. case 0x00: /* internal diode high byte */
  352. case 0x01: /* external diode 1 high byte */
  353. case 0x02: /* status */
  354. case 0x10: /* external diode 1 low byte */
  355. case 0x1b: /* external diode fault */
  356. case 0x23: /* external diode 2 high byte */
  357. case 0x24: /* external diode 2 low byte */
  358. case 0x29: /* internal diode low byte */
  359. case 0x2a: /* externl diode 3 high byte */
  360. case 0x2b: /* external diode 3 low byte */
  361. case 0x35: /* high limit status */
  362. case 0x36: /* low limit status */
  363. case 0x37: /* therm limit status */
  364. return true;
  365. default:
  366. return false;
  367. }
  368. }
  369. static const struct regmap_config emc1403_regmap_config = {
  370. .reg_bits = 8,
  371. .val_bits = 8,
  372. .cache_type = REGCACHE_RBTREE,
  373. .volatile_reg = emc1403_regmap_is_volatile,
  374. };
  375. static int emc1403_probe(struct i2c_client *client,
  376. const struct i2c_device_id *id)
  377. {
  378. struct thermal_data *data;
  379. struct device *hwmon_dev;
  380. data = devm_kzalloc(&client->dev, sizeof(struct thermal_data),
  381. GFP_KERNEL);
  382. if (data == NULL)
  383. return -ENOMEM;
  384. data->regmap = devm_regmap_init_i2c(client, &emc1403_regmap_config);
  385. if (IS_ERR(data->regmap))
  386. return PTR_ERR(data->regmap);
  387. mutex_init(&data->mutex);
  388. switch (id->driver_data) {
  389. case emc1404:
  390. data->groups[2] = &emc1404_group;
  391. case emc1403:
  392. data->groups[1] = &emc1403_group;
  393. case emc1402:
  394. data->groups[0] = &emc1402_group;
  395. }
  396. if (id->driver_data == emc1402)
  397. data->groups[1] = &emc1402_alarm_group;
  398. hwmon_dev = devm_hwmon_device_register_with_groups(&client->dev,
  399. client->name, data,
  400. data->groups);
  401. if (IS_ERR(hwmon_dev))
  402. return PTR_ERR(hwmon_dev);
  403. dev_info(&client->dev, "%s Thermal chip found\n", id->name);
  404. return 0;
  405. }
  406. static const unsigned short emc1403_address_list[] = {
  407. 0x18, 0x1c, 0x29, 0x4c, 0x4d, 0x5c, I2C_CLIENT_END
  408. };
  409. /* Last digit of chip name indicates number of channels */
  410. static const struct i2c_device_id emc1403_idtable[] = {
  411. { "emc1402", emc1402 },
  412. { "emc1403", emc1403 },
  413. { "emc1404", emc1404 },
  414. { "emc1412", emc1402 },
  415. { "emc1413", emc1403 },
  416. { "emc1414", emc1404 },
  417. { "emc1422", emc1402 },
  418. { "emc1423", emc1403 },
  419. { "emc1424", emc1404 },
  420. { }
  421. };
  422. MODULE_DEVICE_TABLE(i2c, emc1403_idtable);
  423. static struct i2c_driver sensor_emc1403 = {
  424. .class = I2C_CLASS_HWMON,
  425. .driver = {
  426. .name = "emc1403",
  427. },
  428. .detect = emc1403_detect,
  429. .probe = emc1403_probe,
  430. .id_table = emc1403_idtable,
  431. .address_list = emc1403_address_list,
  432. };
  433. module_i2c_driver(sensor_emc1403);
  434. MODULE_AUTHOR("Kalhan Trisal <kalhan.trisal@intel.com");
  435. MODULE_DESCRIPTION("emc1403 Thermal Driver");
  436. MODULE_LICENSE("GPL v2");