blob: 1c19a2ee415cfc7db75225d4e52e4731cb796ac5 [file] [log] [blame]
Guenter Roeck83f76492011-03-17 13:16:01 -07001/*
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
18#include <linux/kernel.h>
19#include <linux/module.h>
20#include <linux/init.h>
21#include <linux/err.h>
22#include <linux/slab.h>
23#include <linux/i2c.h>
Guenter Roeck99b41602015-07-04 09:19:48 -070024#include <linux/bitops.h>
Guenter Roeck83f76492011-03-17 13:16:01 -070025#include "pmbus.h"
26
Guenter Roeck92711262012-02-24 03:40:53 -080027enum chips { adm1075, adm1275, adm1276 };
Guenter Roeck5cf231a2011-07-14 11:55:35 -070028
Guenter Roeckc576e302011-07-09 11:17:33 -070029#define ADM1275_PEAK_IOUT 0xd0
30#define ADM1275_PEAK_VIN 0xd1
31#define ADM1275_PEAK_VOUT 0xd2
Guenter Roeck83f76492011-03-17 13:16:01 -070032#define ADM1275_PMON_CONFIG 0xd4
33
Guenter Roeck99b41602015-07-04 09:19:48 -070034#define ADM1275_VIN_VOUT_SELECT BIT(6)
35#define ADM1275_VRANGE BIT(5)
36#define ADM1075_IRANGE_50 BIT(4)
37#define ADM1075_IRANGE_25 BIT(3)
38#define ADM1075_IRANGE_MASK (BIT(3) | BIT(4))
Guenter Roeck83f76492011-03-17 13:16:01 -070039
Guenter Roeckc5e67632011-08-02 11:08:57 -070040#define ADM1275_IOUT_WARN2_LIMIT 0xd7
41#define ADM1275_DEVICE_CONFIG 0xd8
42
Guenter Roeck99b41602015-07-04 09:19:48 -070043#define ADM1275_IOUT_WARN2_SELECT BIT(4)
Guenter Roeckc5e67632011-08-02 11:08:57 -070044
Guenter Roeck5cf231a2011-07-14 11:55:35 -070045#define ADM1276_PEAK_PIN 0xda
46
Guenter Roeck99b41602015-07-04 09:19:48 -070047#define ADM1275_MFR_STATUS_IOUT_WARN2 BIT(0)
Guenter Roeckc5e67632011-08-02 11:08:57 -070048
Guenter Roeck92711262012-02-24 03:40:53 -080049#define ADM1075_READ_VAUX 0xdd
50#define ADM1075_VAUX_OV_WARN_LIMIT 0xde
51#define ADM1075_VAUX_UV_WARN_LIMIT 0xdf
52#define ADM1075_VAUX_STATUS 0xf6
53
Guenter Roeck99b41602015-07-04 09:19:48 -070054#define ADM1075_VAUX_OV_WARN BIT(7)
55#define ADM1075_VAUX_UV_WARN BIT(6)
Guenter Roeck92711262012-02-24 03:40:53 -080056
Guenter Roeckc5e67632011-08-02 11:08:57 -070057struct adm1275_data {
Guenter Roeck5cf231a2011-07-14 11:55:35 -070058 int id;
Guenter Roeckc5e67632011-08-02 11:08:57 -070059 bool have_oc_fault;
Guenter Roeck90485392015-07-04 10:09:54 -070060 bool have_uc_fault;
61 bool have_vout;
62 bool have_vaux_status;
63 bool have_pin_max;
Guenter Roeckc5e67632011-08-02 11:08:57 -070064 struct pmbus_driver_info info;
65};
66
67#define to_adm1275_data(x) container_of(x, struct adm1275_data, info)
68
Guenter Roeck904b2962015-07-04 08:39:18 -070069struct coefficients {
70 s16 m;
71 s16 b;
72 s16 R;
73};
74
75static const struct coefficients adm1075_coefficients[] = {
76 [0] = { 27169, 0, -1 }, /* voltage */
77 [1] = { 806, 20475, -1 }, /* current, irange25 */
78 [2] = { 404, 20475, -1 }, /* current, irange50 */
79 [3] = { 0, -1, 8549 }, /* power, irange25 */
80 [4] = { 0, -1, 4279 }, /* power, irange50 */
81};
82
83static const struct coefficients adm1275_coefficients[] = {
84 [0] = { 19199, 0, -2 }, /* voltage, vrange set */
85 [1] = { 6720, 0, -1 }, /* voltage, vrange not set */
86 [2] = { 807, 20475, -1 }, /* current */
87};
88
89static const struct coefficients adm1276_coefficients[] = {
90 [0] = { 19199, 0, -2 }, /* voltage, vrange set */
91 [1] = { 6720, 0, -1 }, /* voltage, vrange not set */
92 [2] = { 807, 20475, -1 }, /* current */
93 [3] = { 6043, 0, -2 }, /* power, vrange set */
94 [4] = { 2115, 0, -1 }, /* power, vrange not set */
95};
96
Guenter Roeckc576e302011-07-09 11:17:33 -070097static int adm1275_read_word_data(struct i2c_client *client, int page, int reg)
98{
Guenter Roeckc5e67632011-08-02 11:08:57 -070099 const struct pmbus_driver_info *info = pmbus_get_driver_info(client);
100 const struct adm1275_data *data = to_adm1275_data(info);
Guenter Roeck5cf231a2011-07-14 11:55:35 -0700101 int ret = 0;
Guenter Roeckc576e302011-07-09 11:17:33 -0700102
103 if (page)
Guenter Roeckc5e67632011-08-02 11:08:57 -0700104 return -ENXIO;
Guenter Roeckc576e302011-07-09 11:17:33 -0700105
106 switch (reg) {
Guenter Roeckc5e67632011-08-02 11:08:57 -0700107 case PMBUS_IOUT_UC_FAULT_LIMIT:
Guenter Roeck90485392015-07-04 10:09:54 -0700108 if (!data->have_uc_fault)
109 return -ENXIO;
Guenter Roeckc5e67632011-08-02 11:08:57 -0700110 ret = pmbus_read_word_data(client, 0, ADM1275_IOUT_WARN2_LIMIT);
111 break;
112 case PMBUS_IOUT_OC_FAULT_LIMIT:
Guenter Roeck90485392015-07-04 10:09:54 -0700113 if (!data->have_oc_fault)
114 return -ENXIO;
Guenter Roeckc5e67632011-08-02 11:08:57 -0700115 ret = pmbus_read_word_data(client, 0, ADM1275_IOUT_WARN2_LIMIT);
116 break;
Guenter Roeck92711262012-02-24 03:40:53 -0800117 case PMBUS_VOUT_OV_WARN_LIMIT:
Guenter Roeck90485392015-07-04 10:09:54 -0700118 if (data->have_vout)
119 return -ENODATA;
Guenter Roeck92711262012-02-24 03:40:53 -0800120 ret = pmbus_read_word_data(client, 0,
121 ADM1075_VAUX_OV_WARN_LIMIT);
122 break;
123 case PMBUS_VOUT_UV_WARN_LIMIT:
Guenter Roeck90485392015-07-04 10:09:54 -0700124 if (data->have_vout)
125 return -ENODATA;
Guenter Roeck92711262012-02-24 03:40:53 -0800126 ret = pmbus_read_word_data(client, 0,
127 ADM1075_VAUX_UV_WARN_LIMIT);
128 break;
129 case PMBUS_READ_VOUT:
Guenter Roeck90485392015-07-04 10:09:54 -0700130 if (data->have_vout)
131 return -ENODATA;
Guenter Roeck92711262012-02-24 03:40:53 -0800132 ret = pmbus_read_word_data(client, 0, ADM1075_READ_VAUX);
133 break;
Guenter Roeckc576e302011-07-09 11:17:33 -0700134 case PMBUS_VIRT_READ_IOUT_MAX:
135 ret = pmbus_read_word_data(client, 0, ADM1275_PEAK_IOUT);
136 break;
137 case PMBUS_VIRT_READ_VOUT_MAX:
138 ret = pmbus_read_word_data(client, 0, ADM1275_PEAK_VOUT);
139 break;
140 case PMBUS_VIRT_READ_VIN_MAX:
141 ret = pmbus_read_word_data(client, 0, ADM1275_PEAK_VIN);
142 break;
Guenter Roeck5cf231a2011-07-14 11:55:35 -0700143 case PMBUS_VIRT_READ_PIN_MAX:
Guenter Roeck90485392015-07-04 10:09:54 -0700144 if (!data->have_pin_max)
145 return -ENXIO;
Guenter Roeck5cf231a2011-07-14 11:55:35 -0700146 ret = pmbus_read_word_data(client, 0, ADM1276_PEAK_PIN);
147 break;
Guenter Roeckc576e302011-07-09 11:17:33 -0700148 case PMBUS_VIRT_RESET_IOUT_HISTORY:
149 case PMBUS_VIRT_RESET_VOUT_HISTORY:
150 case PMBUS_VIRT_RESET_VIN_HISTORY:
Guenter Roeck5cf231a2011-07-14 11:55:35 -0700151 break;
152 case PMBUS_VIRT_RESET_PIN_HISTORY:
Guenter Roeck90485392015-07-04 10:09:54 -0700153 if (!data->have_pin_max)
154 return -ENXIO;
Guenter Roeckc576e302011-07-09 11:17:33 -0700155 break;
156 default:
157 ret = -ENODATA;
158 break;
159 }
160 return ret;
161}
162
163static int adm1275_write_word_data(struct i2c_client *client, int page, int reg,
164 u16 word)
165{
166 int ret;
167
168 if (page)
Guenter Roeckc5e67632011-08-02 11:08:57 -0700169 return -ENXIO;
Guenter Roeckc576e302011-07-09 11:17:33 -0700170
171 switch (reg) {
Guenter Roeckc5e67632011-08-02 11:08:57 -0700172 case PMBUS_IOUT_UC_FAULT_LIMIT:
173 case PMBUS_IOUT_OC_FAULT_LIMIT:
174 ret = pmbus_write_word_data(client, 0, ADM1275_IOUT_WARN2_LIMIT,
175 word);
176 break;
Guenter Roeckc576e302011-07-09 11:17:33 -0700177 case PMBUS_VIRT_RESET_IOUT_HISTORY:
178 ret = pmbus_write_word_data(client, 0, ADM1275_PEAK_IOUT, 0);
179 break;
180 case PMBUS_VIRT_RESET_VOUT_HISTORY:
181 ret = pmbus_write_word_data(client, 0, ADM1275_PEAK_VOUT, 0);
182 break;
183 case PMBUS_VIRT_RESET_VIN_HISTORY:
184 ret = pmbus_write_word_data(client, 0, ADM1275_PEAK_VIN, 0);
185 break;
Guenter Roeck5cf231a2011-07-14 11:55:35 -0700186 case PMBUS_VIRT_RESET_PIN_HISTORY:
187 ret = pmbus_write_word_data(client, 0, ADM1276_PEAK_PIN, 0);
188 break;
Guenter Roeckc576e302011-07-09 11:17:33 -0700189 default:
190 ret = -ENODATA;
191 break;
192 }
193 return ret;
194}
195
Guenter Roeckc5e67632011-08-02 11:08:57 -0700196static int adm1275_read_byte_data(struct i2c_client *client, int page, int reg)
197{
198 const struct pmbus_driver_info *info = pmbus_get_driver_info(client);
199 const struct adm1275_data *data = to_adm1275_data(info);
200 int mfr_status, ret;
201
Guenter Roeckda8e48a2011-07-29 22:19:39 -0700202 if (page > 0)
Guenter Roeckc5e67632011-08-02 11:08:57 -0700203 return -ENXIO;
204
205 switch (reg) {
206 case PMBUS_STATUS_IOUT:
207 ret = pmbus_read_byte_data(client, page, PMBUS_STATUS_IOUT);
208 if (ret < 0)
209 break;
Guenter Roeck90485392015-07-04 10:09:54 -0700210 if (!data->have_oc_fault && !data->have_uc_fault)
211 break;
Guenter Roeckc5e67632011-08-02 11:08:57 -0700212 mfr_status = pmbus_read_byte_data(client, page,
213 PMBUS_STATUS_MFR_SPECIFIC);
Guenter Roeck90485392015-07-04 10:09:54 -0700214 if (mfr_status < 0)
215 return mfr_status;
Guenter Roeckc5e67632011-08-02 11:08:57 -0700216 if (mfr_status & ADM1275_MFR_STATUS_IOUT_WARN2) {
217 ret |= data->have_oc_fault ?
218 PB_IOUT_OC_FAULT : PB_IOUT_UC_FAULT;
219 }
220 break;
Guenter Roeck92711262012-02-24 03:40:53 -0800221 case PMBUS_STATUS_VOUT:
Guenter Roeck90485392015-07-04 10:09:54 -0700222 if (data->have_vout)
223 return -ENODATA;
Guenter Roeck92711262012-02-24 03:40:53 -0800224 ret = 0;
Guenter Roeck90485392015-07-04 10:09:54 -0700225 if (data->have_vaux_status) {
226 mfr_status = pmbus_read_byte_data(client, 0,
227 ADM1075_VAUX_STATUS);
228 if (mfr_status < 0)
229 return mfr_status;
230 if (mfr_status & ADM1075_VAUX_OV_WARN)
231 ret |= PB_VOLTAGE_OV_WARNING;
232 if (mfr_status & ADM1075_VAUX_UV_WARN)
233 ret |= PB_VOLTAGE_UV_WARNING;
234 }
Guenter Roeck92711262012-02-24 03:40:53 -0800235 break;
Guenter Roeckc5e67632011-08-02 11:08:57 -0700236 default:
237 ret = -ENODATA;
238 break;
239 }
240 return ret;
241}
242
Guenter Roeck87102802011-09-30 11:53:25 -0700243static const struct i2c_device_id adm1275_id[] = {
Guenter Roeck92711262012-02-24 03:40:53 -0800244 { "adm1075", adm1075 },
Guenter Roeck87102802011-09-30 11:53:25 -0700245 { "adm1275", adm1275 },
246 { "adm1276", adm1276 },
247 { }
248};
249MODULE_DEVICE_TABLE(i2c, adm1275_id);
250
Guenter Roeck83f76492011-03-17 13:16:01 -0700251static int adm1275_probe(struct i2c_client *client,
252 const struct i2c_device_id *id)
253{
Guenter Roeck87102802011-09-30 11:53:25 -0700254 u8 block_buffer[I2C_SMBUS_BLOCK_MAX + 1];
Guenter Roeckc5e67632011-08-02 11:08:57 -0700255 int config, device_config;
Guenter Roeck3b33ca42011-06-30 02:30:03 -0700256 int ret;
Guenter Roeck83f76492011-03-17 13:16:01 -0700257 struct pmbus_driver_info *info;
Guenter Roeckc5e67632011-08-02 11:08:57 -0700258 struct adm1275_data *data;
Guenter Roeck87102802011-09-30 11:53:25 -0700259 const struct i2c_device_id *mid;
Guenter Roeck904b2962015-07-04 08:39:18 -0700260 const struct coefficients *coefficients;
261 int vindex = -1, cindex = -1, pindex = -1;
Guenter Roeck83f76492011-03-17 13:16:01 -0700262
263 if (!i2c_check_functionality(client->adapter,
Guenter Roeck87102802011-09-30 11:53:25 -0700264 I2C_FUNC_SMBUS_READ_BYTE_DATA
265 | I2C_FUNC_SMBUS_BLOCK_DATA))
Guenter Roeck83f76492011-03-17 13:16:01 -0700266 return -ENODEV;
267
Guenter Roeck87102802011-09-30 11:53:25 -0700268 ret = i2c_smbus_read_block_data(client, PMBUS_MFR_ID, block_buffer);
269 if (ret < 0) {
270 dev_err(&client->dev, "Failed to read Manufacturer ID\n");
271 return ret;
272 }
273 if (ret != 3 || strncmp(block_buffer, "ADI", 3)) {
274 dev_err(&client->dev, "Unsupported Manufacturer ID\n");
275 return -ENODEV;
276 }
277
278 ret = i2c_smbus_read_block_data(client, PMBUS_MFR_MODEL, block_buffer);
279 if (ret < 0) {
280 dev_err(&client->dev, "Failed to read Manufacturer Model\n");
281 return ret;
282 }
283 for (mid = adm1275_id; mid->name[0]; mid++) {
284 if (!strncasecmp(mid->name, block_buffer, strlen(mid->name)))
285 break;
286 }
287 if (!mid->name[0]) {
288 dev_err(&client->dev, "Unsupported device\n");
289 return -ENODEV;
290 }
291
292 if (id->driver_data != mid->driver_data)
293 dev_notice(&client->dev,
294 "Device mismatch: Configured %s, detected %s\n",
295 id->name, mid->name);
296
297 config = i2c_smbus_read_byte_data(client, ADM1275_PMON_CONFIG);
298 if (config < 0)
299 return config;
300
301 device_config = i2c_smbus_read_byte_data(client, ADM1275_DEVICE_CONFIG);
302 if (device_config < 0)
303 return device_config;
304
Guenter Roeck8b313ca2012-02-22 08:56:43 -0800305 data = devm_kzalloc(&client->dev, sizeof(struct adm1275_data),
306 GFP_KERNEL);
Guenter Roeckc5e67632011-08-02 11:08:57 -0700307 if (!data)
Guenter Roeck83f76492011-03-17 13:16:01 -0700308 return -ENOMEM;
309
Guenter Roeck87102802011-09-30 11:53:25 -0700310 data->id = mid->driver_data;
Guenter Roeck83f76492011-03-17 13:16:01 -0700311
Guenter Roeckc5e67632011-08-02 11:08:57 -0700312 info = &data->info;
313
Guenter Roeck83f76492011-03-17 13:16:01 -0700314 info->pages = 1;
Guenter Roeck1061d852011-06-25 11:21:49 -0700315 info->format[PSC_VOLTAGE_IN] = direct;
316 info->format[PSC_VOLTAGE_OUT] = direct;
317 info->format[PSC_CURRENT_OUT] = direct;
Guenter Roeck904b2962015-07-04 08:39:18 -0700318 info->format[PSC_POWER] = direct;
Guenter Roeck83f76492011-03-17 13:16:01 -0700319 info->func[0] = PMBUS_HAVE_IOUT | PMBUS_HAVE_STATUS_IOUT;
320
Guenter Roeckc576e302011-07-09 11:17:33 -0700321 info->read_word_data = adm1275_read_word_data;
Guenter Roeckc5e67632011-08-02 11:08:57 -0700322 info->read_byte_data = adm1275_read_byte_data;
Guenter Roeckc576e302011-07-09 11:17:33 -0700323 info->write_word_data = adm1275_write_word_data;
324
Guenter Roeck87102802011-09-30 11:53:25 -0700325 switch (data->id) {
Guenter Roeck92711262012-02-24 03:40:53 -0800326 case adm1075:
Guenter Roeck90485392015-07-04 10:09:54 -0700327 if (device_config & ADM1275_IOUT_WARN2_SELECT)
328 data->have_oc_fault = true;
329 else
330 data->have_uc_fault = true;
331 data->have_pin_max = true;
332 data->have_vaux_status = true;
333
Guenter Roeck904b2962015-07-04 08:39:18 -0700334 coefficients = adm1075_coefficients;
335 vindex = 0;
Guenter Roeck92711262012-02-24 03:40:53 -0800336 switch (config & ADM1075_IRANGE_MASK) {
337 case ADM1075_IRANGE_25:
Guenter Roeck904b2962015-07-04 08:39:18 -0700338 cindex = 1;
339 pindex = 3;
Guenter Roeck92711262012-02-24 03:40:53 -0800340 break;
341 case ADM1075_IRANGE_50:
Guenter Roeck904b2962015-07-04 08:39:18 -0700342 cindex = 2;
343 pindex = 4;
Guenter Roeck92711262012-02-24 03:40:53 -0800344 break;
345 default:
346 dev_err(&client->dev, "Invalid input current range");
Guenter Roeck92711262012-02-24 03:40:53 -0800347 break;
348 }
Guenter Roeck904b2962015-07-04 08:39:18 -0700349
Guenter Roeck92711262012-02-24 03:40:53 -0800350 info->func[0] |= PMBUS_HAVE_VIN | PMBUS_HAVE_PIN
351 | PMBUS_HAVE_STATUS_INPUT;
352 if (config & ADM1275_VIN_VOUT_SELECT)
353 info->func[0] |=
354 PMBUS_HAVE_VOUT | PMBUS_HAVE_STATUS_VOUT;
355 break;
Guenter Roeck5cf231a2011-07-14 11:55:35 -0700356 case adm1275:
Guenter Roeck90485392015-07-04 10:09:54 -0700357 if (device_config & ADM1275_IOUT_WARN2_SELECT)
358 data->have_oc_fault = true;
359 else
360 data->have_uc_fault = true;
361 data->have_vout = true;
362
Guenter Roeck904b2962015-07-04 08:39:18 -0700363 coefficients = adm1275_coefficients;
364 vindex = (config & ADM1275_VRANGE) ? 0 : 1;
365 cindex = 2;
366
Guenter Roeck5cf231a2011-07-14 11:55:35 -0700367 if (config & ADM1275_VIN_VOUT_SELECT)
368 info->func[0] |=
369 PMBUS_HAVE_VOUT | PMBUS_HAVE_STATUS_VOUT;
370 else
371 info->func[0] |=
372 PMBUS_HAVE_VIN | PMBUS_HAVE_STATUS_INPUT;
373 break;
374 case adm1276:
Guenter Roeck90485392015-07-04 10:09:54 -0700375 if (device_config & ADM1275_IOUT_WARN2_SELECT)
376 data->have_oc_fault = true;
377 else
378 data->have_uc_fault = true;
379 data->have_vout = true;
380 data->have_pin_max = true;
381
Guenter Roeck904b2962015-07-04 08:39:18 -0700382 coefficients = adm1276_coefficients;
383 vindex = (config & ADM1275_VRANGE) ? 0 : 1;
384 cindex = 2;
385 pindex = (config & ADM1275_VRANGE) ? 3 : 4;
386
Guenter Roeck5cf231a2011-07-14 11:55:35 -0700387 info->func[0] |= PMBUS_HAVE_VIN | PMBUS_HAVE_PIN
388 | PMBUS_HAVE_STATUS_INPUT;
389 if (config & ADM1275_VIN_VOUT_SELECT)
390 info->func[0] |=
391 PMBUS_HAVE_VOUT | PMBUS_HAVE_STATUS_VOUT;
Guenter Roeck5cf231a2011-07-14 11:55:35 -0700392 break;
Guenter Roeck904b2962015-07-04 08:39:18 -0700393 default:
394 dev_err(&client->dev, "Unsupported device\n");
395 return -ENODEV;
396 }
397 if (vindex >= 0) {
398 info->m[PSC_VOLTAGE_IN] = coefficients[vindex].m;
399 info->b[PSC_VOLTAGE_IN] = coefficients[vindex].b;
400 info->R[PSC_VOLTAGE_IN] = coefficients[vindex].R;
401 info->m[PSC_VOLTAGE_OUT] = coefficients[vindex].m;
402 info->b[PSC_VOLTAGE_OUT] = coefficients[vindex].b;
403 info->R[PSC_VOLTAGE_OUT] = coefficients[vindex].R;
404 }
405 if (cindex >= 0) {
406 info->m[PSC_CURRENT_OUT] = coefficients[cindex].m;
407 info->b[PSC_CURRENT_OUT] = coefficients[cindex].b;
408 info->R[PSC_CURRENT_OUT] = coefficients[cindex].R;
409 }
410 if (pindex >= 0) {
411 info->m[PSC_POWER] = coefficients[pindex].m;
412 info->b[PSC_POWER] = coefficients[pindex].b;
413 info->R[PSC_POWER] = coefficients[pindex].R;
Guenter Roeck5cf231a2011-07-14 11:55:35 -0700414 }
Guenter Roeck83f76492011-03-17 13:16:01 -0700415
Guenter Roeck8b313ca2012-02-22 08:56:43 -0800416 return pmbus_do_probe(client, id, info);
Guenter Roeck83f76492011-03-17 13:16:01 -0700417}
418
Guenter Roeck83f76492011-03-17 13:16:01 -0700419static struct i2c_driver adm1275_driver = {
420 .driver = {
421 .name = "adm1275",
422 },
423 .probe = adm1275_probe,
Guenter Roeckdd285ad2012-02-22 08:56:44 -0800424 .remove = pmbus_do_remove,
Guenter Roeck83f76492011-03-17 13:16:01 -0700425 .id_table = adm1275_id,
426};
427
Axel Linf0967ee2012-01-20 15:38:18 +0800428module_i2c_driver(adm1275_driver);
Guenter Roeck83f76492011-03-17 13:16:01 -0700429
430MODULE_AUTHOR("Guenter Roeck");
Guenter Roeck5cf231a2011-07-14 11:55:35 -0700431MODULE_DESCRIPTION("PMBus driver for Analog Devices ADM1275 and compatibles");
Guenter Roeck83f76492011-03-17 13:16:01 -0700432MODULE_LICENSE("GPL");