adm1275.c 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557
  1. /*
  2. * Hardware monitoring driver for Analog Devices ADM1275 Hot-Swap Controller
  3. * and Digital Power Monitor
  4. *
  5. * Copyright (c) 2011 Ericsson AB.
  6. *
  7. * This program is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License as published by
  9. * the Free Software Foundation; either version 2 of the License, or
  10. * (at your option) any later version.
  11. *
  12. * This program is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. * GNU General Public License for more details.
  16. */
  17. #include <linux/kernel.h>
  18. #include <linux/module.h>
  19. #include <linux/init.h>
  20. #include <linux/err.h>
  21. #include <linux/slab.h>
  22. #include <linux/i2c.h>
  23. #include <linux/bitops.h>
  24. #include "pmbus.h"
  25. enum chips { adm1075, adm1275, adm1276, adm1293, adm1294 };
  26. #define ADM1275_MFR_STATUS_IOUT_WARN2 BIT(0)
  27. #define ADM1293_MFR_STATUS_VAUX_UV_WARN BIT(5)
  28. #define ADM1293_MFR_STATUS_VAUX_OV_WARN BIT(6)
  29. #define ADM1275_PEAK_IOUT 0xd0
  30. #define ADM1275_PEAK_VIN 0xd1
  31. #define ADM1275_PEAK_VOUT 0xd2
  32. #define ADM1275_PMON_CONFIG 0xd4
  33. #define ADM1275_VIN_VOUT_SELECT BIT(6)
  34. #define ADM1275_VRANGE BIT(5)
  35. #define ADM1075_IRANGE_50 BIT(4)
  36. #define ADM1075_IRANGE_25 BIT(3)
  37. #define ADM1075_IRANGE_MASK (BIT(3) | BIT(4))
  38. #define ADM1293_IRANGE_25 0
  39. #define ADM1293_IRANGE_50 BIT(6)
  40. #define ADM1293_IRANGE_100 BIT(7)
  41. #define ADM1293_IRANGE_200 (BIT(6) | BIT(7))
  42. #define ADM1293_IRANGE_MASK (BIT(6) | BIT(7))
  43. #define ADM1293_VIN_SEL_012 BIT(2)
  44. #define ADM1293_VIN_SEL_074 BIT(3)
  45. #define ADM1293_VIN_SEL_210 (BIT(2) | BIT(3))
  46. #define ADM1293_VIN_SEL_MASK (BIT(2) | BIT(3))
  47. #define ADM1293_VAUX_EN BIT(1)
  48. #define ADM1275_IOUT_WARN2_LIMIT 0xd7
  49. #define ADM1275_DEVICE_CONFIG 0xd8
  50. #define ADM1275_IOUT_WARN2_SELECT BIT(4)
  51. #define ADM1276_PEAK_PIN 0xda
  52. #define ADM1075_READ_VAUX 0xdd
  53. #define ADM1075_VAUX_OV_WARN_LIMIT 0xde
  54. #define ADM1075_VAUX_UV_WARN_LIMIT 0xdf
  55. #define ADM1293_IOUT_MIN 0xe3
  56. #define ADM1293_PIN_MIN 0xe4
  57. #define ADM1075_VAUX_STATUS 0xf6
  58. #define ADM1075_VAUX_OV_WARN BIT(7)
  59. #define ADM1075_VAUX_UV_WARN BIT(6)
  60. struct adm1275_data {
  61. int id;
  62. bool have_oc_fault;
  63. bool have_uc_fault;
  64. bool have_vout;
  65. bool have_vaux_status;
  66. bool have_mfr_vaux_status;
  67. bool have_iout_min;
  68. bool have_pin_min;
  69. bool have_pin_max;
  70. struct pmbus_driver_info info;
  71. };
  72. #define to_adm1275_data(x) container_of(x, struct adm1275_data, info)
  73. struct coefficients {
  74. s16 m;
  75. s16 b;
  76. s16 R;
  77. };
  78. static const struct coefficients adm1075_coefficients[] = {
  79. [0] = { 27169, 0, -1 }, /* voltage */
  80. [1] = { 806, 20475, -1 }, /* current, irange25 */
  81. [2] = { 404, 20475, -1 }, /* current, irange50 */
  82. [3] = { 8549, 0, -1 }, /* power, irange25 */
  83. [4] = { 4279, 0, -1 }, /* power, irange50 */
  84. };
  85. static const struct coefficients adm1275_coefficients[] = {
  86. [0] = { 19199, 0, -2 }, /* voltage, vrange set */
  87. [1] = { 6720, 0, -1 }, /* voltage, vrange not set */
  88. [2] = { 807, 20475, -1 }, /* current */
  89. };
  90. static const struct coefficients adm1276_coefficients[] = {
  91. [0] = { 19199, 0, -2 }, /* voltage, vrange set */
  92. [1] = { 6720, 0, -1 }, /* voltage, vrange not set */
  93. [2] = { 807, 20475, -1 }, /* current */
  94. [3] = { 6043, 0, -2 }, /* power, vrange set */
  95. [4] = { 2115, 0, -1 }, /* power, vrange not set */
  96. };
  97. static const struct coefficients adm1293_coefficients[] = {
  98. [0] = { 3333, -1, 0 }, /* voltage, vrange 1.2V */
  99. [1] = { 5552, -5, -1 }, /* voltage, vrange 7.4V */
  100. [2] = { 19604, -50, -2 }, /* voltage, vrange 21V */
  101. [3] = { 8000, -100, -2 }, /* current, irange25 */
  102. [4] = { 4000, -100, -2 }, /* current, irange50 */
  103. [5] = { 20000, -1000, -3 }, /* current, irange100 */
  104. [6] = { 10000, -1000, -3 }, /* current, irange200 */
  105. [7] = { 10417, 0, -1 }, /* power, 1.2V, irange25 */
  106. [8] = { 5208, 0, -1 }, /* power, 1.2V, irange50 */
  107. [9] = { 26042, 0, -2 }, /* power, 1.2V, irange100 */
  108. [10] = { 13021, 0, -2 }, /* power, 1.2V, irange200 */
  109. [11] = { 17351, 0, -2 }, /* power, 7.4V, irange25 */
  110. [12] = { 8676, 0, -2 }, /* power, 7.4V, irange50 */
  111. [13] = { 4338, 0, -2 }, /* power, 7.4V, irange100 */
  112. [14] = { 21689, 0, -3 }, /* power, 7.4V, irange200 */
  113. [15] = { 6126, 0, -2 }, /* power, 21V, irange25 */
  114. [16] = { 30631, 0, -3 }, /* power, 21V, irange50 */
  115. [17] = { 15316, 0, -3 }, /* power, 21V, irange100 */
  116. [18] = { 7658, 0, -3 }, /* power, 21V, irange200 */
  117. };
  118. static int adm1275_read_word_data(struct i2c_client *client, int page, int reg)
  119. {
  120. const struct pmbus_driver_info *info = pmbus_get_driver_info(client);
  121. const struct adm1275_data *data = to_adm1275_data(info);
  122. int ret = 0;
  123. if (page > 0)
  124. return -ENXIO;
  125. switch (reg) {
  126. case PMBUS_IOUT_UC_FAULT_LIMIT:
  127. if (!data->have_uc_fault)
  128. return -ENXIO;
  129. ret = pmbus_read_word_data(client, 0, ADM1275_IOUT_WARN2_LIMIT);
  130. break;
  131. case PMBUS_IOUT_OC_FAULT_LIMIT:
  132. if (!data->have_oc_fault)
  133. return -ENXIO;
  134. ret = pmbus_read_word_data(client, 0, ADM1275_IOUT_WARN2_LIMIT);
  135. break;
  136. case PMBUS_VOUT_OV_WARN_LIMIT:
  137. if (data->have_vout)
  138. return -ENODATA;
  139. ret = pmbus_read_word_data(client, 0,
  140. ADM1075_VAUX_OV_WARN_LIMIT);
  141. break;
  142. case PMBUS_VOUT_UV_WARN_LIMIT:
  143. if (data->have_vout)
  144. return -ENODATA;
  145. ret = pmbus_read_word_data(client, 0,
  146. ADM1075_VAUX_UV_WARN_LIMIT);
  147. break;
  148. case PMBUS_READ_VOUT:
  149. if (data->have_vout)
  150. return -ENODATA;
  151. ret = pmbus_read_word_data(client, 0, ADM1075_READ_VAUX);
  152. break;
  153. case PMBUS_VIRT_READ_IOUT_MIN:
  154. if (!data->have_iout_min)
  155. return -ENXIO;
  156. ret = pmbus_read_word_data(client, 0, ADM1293_IOUT_MIN);
  157. break;
  158. case PMBUS_VIRT_READ_IOUT_MAX:
  159. ret = pmbus_read_word_data(client, 0, ADM1275_PEAK_IOUT);
  160. break;
  161. case PMBUS_VIRT_READ_VOUT_MAX:
  162. ret = pmbus_read_word_data(client, 0, ADM1275_PEAK_VOUT);
  163. break;
  164. case PMBUS_VIRT_READ_VIN_MAX:
  165. ret = pmbus_read_word_data(client, 0, ADM1275_PEAK_VIN);
  166. break;
  167. case PMBUS_VIRT_READ_PIN_MIN:
  168. if (!data->have_pin_min)
  169. return -ENXIO;
  170. ret = pmbus_read_word_data(client, 0, ADM1293_PIN_MIN);
  171. break;
  172. case PMBUS_VIRT_READ_PIN_MAX:
  173. if (!data->have_pin_max)
  174. return -ENXIO;
  175. ret = pmbus_read_word_data(client, 0, ADM1276_PEAK_PIN);
  176. break;
  177. case PMBUS_VIRT_RESET_IOUT_HISTORY:
  178. case PMBUS_VIRT_RESET_VOUT_HISTORY:
  179. case PMBUS_VIRT_RESET_VIN_HISTORY:
  180. break;
  181. case PMBUS_VIRT_RESET_PIN_HISTORY:
  182. if (!data->have_pin_max)
  183. return -ENXIO;
  184. break;
  185. default:
  186. ret = -ENODATA;
  187. break;
  188. }
  189. return ret;
  190. }
  191. static int adm1275_write_word_data(struct i2c_client *client, int page, int reg,
  192. u16 word)
  193. {
  194. const struct pmbus_driver_info *info = pmbus_get_driver_info(client);
  195. const struct adm1275_data *data = to_adm1275_data(info);
  196. int ret;
  197. if (page > 0)
  198. return -ENXIO;
  199. switch (reg) {
  200. case PMBUS_IOUT_UC_FAULT_LIMIT:
  201. case PMBUS_IOUT_OC_FAULT_LIMIT:
  202. ret = pmbus_write_word_data(client, 0, ADM1275_IOUT_WARN2_LIMIT,
  203. word);
  204. break;
  205. case PMBUS_VIRT_RESET_IOUT_HISTORY:
  206. ret = pmbus_write_word_data(client, 0, ADM1275_PEAK_IOUT, 0);
  207. if (!ret && data->have_iout_min)
  208. ret = pmbus_write_word_data(client, 0,
  209. ADM1293_IOUT_MIN, 0);
  210. break;
  211. case PMBUS_VIRT_RESET_VOUT_HISTORY:
  212. ret = pmbus_write_word_data(client, 0, ADM1275_PEAK_VOUT, 0);
  213. break;
  214. case PMBUS_VIRT_RESET_VIN_HISTORY:
  215. ret = pmbus_write_word_data(client, 0, ADM1275_PEAK_VIN, 0);
  216. break;
  217. case PMBUS_VIRT_RESET_PIN_HISTORY:
  218. ret = pmbus_write_word_data(client, 0, ADM1276_PEAK_PIN, 0);
  219. if (!ret && data->have_pin_min)
  220. ret = pmbus_write_word_data(client, 0,
  221. ADM1293_PIN_MIN, 0);
  222. break;
  223. default:
  224. ret = -ENODATA;
  225. break;
  226. }
  227. return ret;
  228. }
  229. static int adm1275_read_byte_data(struct i2c_client *client, int page, int reg)
  230. {
  231. const struct pmbus_driver_info *info = pmbus_get_driver_info(client);
  232. const struct adm1275_data *data = to_adm1275_data(info);
  233. int mfr_status, ret;
  234. if (page > 0)
  235. return -ENXIO;
  236. switch (reg) {
  237. case PMBUS_STATUS_IOUT:
  238. ret = pmbus_read_byte_data(client, page, PMBUS_STATUS_IOUT);
  239. if (ret < 0)
  240. break;
  241. if (!data->have_oc_fault && !data->have_uc_fault)
  242. break;
  243. mfr_status = pmbus_read_byte_data(client, page,
  244. PMBUS_STATUS_MFR_SPECIFIC);
  245. if (mfr_status < 0)
  246. return mfr_status;
  247. if (mfr_status & ADM1275_MFR_STATUS_IOUT_WARN2) {
  248. ret |= data->have_oc_fault ?
  249. PB_IOUT_OC_FAULT : PB_IOUT_UC_FAULT;
  250. }
  251. break;
  252. case PMBUS_STATUS_VOUT:
  253. if (data->have_vout)
  254. return -ENODATA;
  255. ret = 0;
  256. if (data->have_vaux_status) {
  257. mfr_status = pmbus_read_byte_data(client, 0,
  258. ADM1075_VAUX_STATUS);
  259. if (mfr_status < 0)
  260. return mfr_status;
  261. if (mfr_status & ADM1075_VAUX_OV_WARN)
  262. ret |= PB_VOLTAGE_OV_WARNING;
  263. if (mfr_status & ADM1075_VAUX_UV_WARN)
  264. ret |= PB_VOLTAGE_UV_WARNING;
  265. } else if (data->have_mfr_vaux_status) {
  266. mfr_status = pmbus_read_byte_data(client, page,
  267. PMBUS_STATUS_MFR_SPECIFIC);
  268. if (mfr_status < 0)
  269. return mfr_status;
  270. if (mfr_status & ADM1293_MFR_STATUS_VAUX_OV_WARN)
  271. ret |= PB_VOLTAGE_OV_WARNING;
  272. if (mfr_status & ADM1293_MFR_STATUS_VAUX_UV_WARN)
  273. ret |= PB_VOLTAGE_UV_WARNING;
  274. }
  275. break;
  276. default:
  277. ret = -ENODATA;
  278. break;
  279. }
  280. return ret;
  281. }
  282. static const struct i2c_device_id adm1275_id[] = {
  283. { "adm1075", adm1075 },
  284. { "adm1275", adm1275 },
  285. { "adm1276", adm1276 },
  286. { "adm1293", adm1293 },
  287. { "adm1294", adm1294 },
  288. { }
  289. };
  290. MODULE_DEVICE_TABLE(i2c, adm1275_id);
  291. static int adm1275_probe(struct i2c_client *client,
  292. const struct i2c_device_id *id)
  293. {
  294. u8 block_buffer[I2C_SMBUS_BLOCK_MAX + 1];
  295. int config, device_config;
  296. int ret;
  297. struct pmbus_driver_info *info;
  298. struct adm1275_data *data;
  299. const struct i2c_device_id *mid;
  300. const struct coefficients *coefficients;
  301. int vindex = -1, voindex = -1, cindex = -1, pindex = -1;
  302. if (!i2c_check_functionality(client->adapter,
  303. I2C_FUNC_SMBUS_READ_BYTE_DATA
  304. | I2C_FUNC_SMBUS_BLOCK_DATA))
  305. return -ENODEV;
  306. ret = i2c_smbus_read_block_data(client, PMBUS_MFR_ID, block_buffer);
  307. if (ret < 0) {
  308. dev_err(&client->dev, "Failed to read Manufacturer ID\n");
  309. return ret;
  310. }
  311. if (ret != 3 || strncmp(block_buffer, "ADI", 3)) {
  312. dev_err(&client->dev, "Unsupported Manufacturer ID\n");
  313. return -ENODEV;
  314. }
  315. ret = i2c_smbus_read_block_data(client, PMBUS_MFR_MODEL, block_buffer);
  316. if (ret < 0) {
  317. dev_err(&client->dev, "Failed to read Manufacturer Model\n");
  318. return ret;
  319. }
  320. for (mid = adm1275_id; mid->name[0]; mid++) {
  321. if (!strncasecmp(mid->name, block_buffer, strlen(mid->name)))
  322. break;
  323. }
  324. if (!mid->name[0]) {
  325. dev_err(&client->dev, "Unsupported device\n");
  326. return -ENODEV;
  327. }
  328. if (id->driver_data != mid->driver_data)
  329. dev_notice(&client->dev,
  330. "Device mismatch: Configured %s, detected %s\n",
  331. id->name, mid->name);
  332. config = i2c_smbus_read_byte_data(client, ADM1275_PMON_CONFIG);
  333. if (config < 0)
  334. return config;
  335. device_config = i2c_smbus_read_byte_data(client, ADM1275_DEVICE_CONFIG);
  336. if (device_config < 0)
  337. return device_config;
  338. data = devm_kzalloc(&client->dev, sizeof(struct adm1275_data),
  339. GFP_KERNEL);
  340. if (!data)
  341. return -ENOMEM;
  342. data->id = mid->driver_data;
  343. info = &data->info;
  344. info->pages = 1;
  345. info->format[PSC_VOLTAGE_IN] = direct;
  346. info->format[PSC_VOLTAGE_OUT] = direct;
  347. info->format[PSC_CURRENT_OUT] = direct;
  348. info->format[PSC_POWER] = direct;
  349. info->func[0] = PMBUS_HAVE_IOUT | PMBUS_HAVE_STATUS_IOUT;
  350. info->read_word_data = adm1275_read_word_data;
  351. info->read_byte_data = adm1275_read_byte_data;
  352. info->write_word_data = adm1275_write_word_data;
  353. switch (data->id) {
  354. case adm1075:
  355. if (device_config & ADM1275_IOUT_WARN2_SELECT)
  356. data->have_oc_fault = true;
  357. else
  358. data->have_uc_fault = true;
  359. data->have_pin_max = true;
  360. data->have_vaux_status = true;
  361. coefficients = adm1075_coefficients;
  362. vindex = 0;
  363. switch (config & ADM1075_IRANGE_MASK) {
  364. case ADM1075_IRANGE_25:
  365. cindex = 1;
  366. pindex = 3;
  367. break;
  368. case ADM1075_IRANGE_50:
  369. cindex = 2;
  370. pindex = 4;
  371. break;
  372. default:
  373. dev_err(&client->dev, "Invalid input current range");
  374. break;
  375. }
  376. info->func[0] |= PMBUS_HAVE_VIN | PMBUS_HAVE_PIN
  377. | PMBUS_HAVE_STATUS_INPUT;
  378. if (config & ADM1275_VIN_VOUT_SELECT)
  379. info->func[0] |=
  380. PMBUS_HAVE_VOUT | PMBUS_HAVE_STATUS_VOUT;
  381. break;
  382. case adm1275:
  383. if (device_config & ADM1275_IOUT_WARN2_SELECT)
  384. data->have_oc_fault = true;
  385. else
  386. data->have_uc_fault = true;
  387. data->have_vout = true;
  388. coefficients = adm1275_coefficients;
  389. vindex = (config & ADM1275_VRANGE) ? 0 : 1;
  390. cindex = 2;
  391. if (config & ADM1275_VIN_VOUT_SELECT)
  392. info->func[0] |=
  393. PMBUS_HAVE_VOUT | PMBUS_HAVE_STATUS_VOUT;
  394. else
  395. info->func[0] |=
  396. PMBUS_HAVE_VIN | PMBUS_HAVE_STATUS_INPUT;
  397. break;
  398. case adm1276:
  399. if (device_config & ADM1275_IOUT_WARN2_SELECT)
  400. data->have_oc_fault = true;
  401. else
  402. data->have_uc_fault = true;
  403. data->have_vout = true;
  404. data->have_pin_max = true;
  405. coefficients = adm1276_coefficients;
  406. vindex = (config & ADM1275_VRANGE) ? 0 : 1;
  407. cindex = 2;
  408. pindex = (config & ADM1275_VRANGE) ? 3 : 4;
  409. info->func[0] |= PMBUS_HAVE_VIN | PMBUS_HAVE_PIN
  410. | PMBUS_HAVE_STATUS_INPUT;
  411. if (config & ADM1275_VIN_VOUT_SELECT)
  412. info->func[0] |=
  413. PMBUS_HAVE_VOUT | PMBUS_HAVE_STATUS_VOUT;
  414. break;
  415. case adm1293:
  416. case adm1294:
  417. data->have_iout_min = true;
  418. data->have_pin_min = true;
  419. data->have_pin_max = true;
  420. data->have_mfr_vaux_status = true;
  421. coefficients = adm1293_coefficients;
  422. voindex = 0;
  423. switch (config & ADM1293_VIN_SEL_MASK) {
  424. case ADM1293_VIN_SEL_012: /* 1.2V */
  425. vindex = 0;
  426. break;
  427. case ADM1293_VIN_SEL_074: /* 7.4V */
  428. vindex = 1;
  429. break;
  430. case ADM1293_VIN_SEL_210: /* 21V */
  431. vindex = 2;
  432. break;
  433. default: /* disabled */
  434. break;
  435. }
  436. switch (config & ADM1293_IRANGE_MASK) {
  437. case ADM1293_IRANGE_25:
  438. cindex = 3;
  439. break;
  440. case ADM1293_IRANGE_50:
  441. cindex = 4;
  442. break;
  443. case ADM1293_IRANGE_100:
  444. cindex = 5;
  445. break;
  446. case ADM1293_IRANGE_200:
  447. cindex = 6;
  448. break;
  449. }
  450. if (vindex >= 0)
  451. pindex = 7 + vindex * 4 + (cindex - 3);
  452. if (config & ADM1293_VAUX_EN)
  453. info->func[0] |=
  454. PMBUS_HAVE_VOUT | PMBUS_HAVE_STATUS_VOUT;
  455. info->func[0] |= PMBUS_HAVE_PIN |
  456. PMBUS_HAVE_VIN | PMBUS_HAVE_STATUS_INPUT;
  457. break;
  458. default:
  459. dev_err(&client->dev, "Unsupported device\n");
  460. return -ENODEV;
  461. }
  462. if (voindex < 0)
  463. voindex = vindex;
  464. if (vindex >= 0) {
  465. info->m[PSC_VOLTAGE_IN] = coefficients[vindex].m;
  466. info->b[PSC_VOLTAGE_IN] = coefficients[vindex].b;
  467. info->R[PSC_VOLTAGE_IN] = coefficients[vindex].R;
  468. }
  469. if (voindex >= 0) {
  470. info->m[PSC_VOLTAGE_OUT] = coefficients[voindex].m;
  471. info->b[PSC_VOLTAGE_OUT] = coefficients[voindex].b;
  472. info->R[PSC_VOLTAGE_OUT] = coefficients[voindex].R;
  473. }
  474. if (cindex >= 0) {
  475. info->m[PSC_CURRENT_OUT] = coefficients[cindex].m;
  476. info->b[PSC_CURRENT_OUT] = coefficients[cindex].b;
  477. info->R[PSC_CURRENT_OUT] = coefficients[cindex].R;
  478. }
  479. if (pindex >= 0) {
  480. info->m[PSC_POWER] = coefficients[pindex].m;
  481. info->b[PSC_POWER] = coefficients[pindex].b;
  482. info->R[PSC_POWER] = coefficients[pindex].R;
  483. }
  484. return pmbus_do_probe(client, id, info);
  485. }
  486. static struct i2c_driver adm1275_driver = {
  487. .driver = {
  488. .name = "adm1275",
  489. },
  490. .probe = adm1275_probe,
  491. .remove = pmbus_do_remove,
  492. .id_table = adm1275_id,
  493. };
  494. module_i2c_driver(adm1275_driver);
  495. MODULE_AUTHOR("Guenter Roeck");
  496. MODULE_DESCRIPTION("PMBus driver for Analog Devices ADM1275 and compatibles");
  497. MODULE_LICENSE("GPL");