Merge tag 'io_uring-5.11-2021-01-16' of git://git.kernel.dk/linux-block
[linux/fpc-iii.git] / drivers / hwmon / emc2103.c
blobe4c95ca9e19fa094c8cf5363fb2cb070d8ea0043
1 // SPDX-License-Identifier: GPL-2.0-or-later
2 /*
3 * emc2103.c - Support for SMSC EMC2103
4 * Copyright (c) 2010 SMSC
5 */
7 #include <linux/module.h>
8 #include <linux/init.h>
9 #include <linux/slab.h>
10 #include <linux/jiffies.h>
11 #include <linux/i2c.h>
12 #include <linux/hwmon.h>
13 #include <linux/hwmon-sysfs.h>
14 #include <linux/err.h>
15 #include <linux/mutex.h>
17 /* Addresses scanned */
18 static const unsigned short normal_i2c[] = { 0x2E, I2C_CLIENT_END };
20 static const u8 REG_TEMP[4] = { 0x00, 0x02, 0x04, 0x06 };
21 static const u8 REG_TEMP_MIN[4] = { 0x3c, 0x38, 0x39, 0x3a };
22 static const u8 REG_TEMP_MAX[4] = { 0x34, 0x30, 0x31, 0x32 };
24 #define REG_CONF1 0x20
25 #define REG_TEMP_MAX_ALARM 0x24
26 #define REG_TEMP_MIN_ALARM 0x25
27 #define REG_FAN_CONF1 0x42
28 #define REG_FAN_TARGET_LO 0x4c
29 #define REG_FAN_TARGET_HI 0x4d
30 #define REG_FAN_TACH_HI 0x4e
31 #define REG_FAN_TACH_LO 0x4f
32 #define REG_PRODUCT_ID 0xfd
33 #define REG_MFG_ID 0xfe
35 /* equation 4 from datasheet: rpm = (3932160 * multipler) / count */
36 #define FAN_RPM_FACTOR 3932160
39 * 2103-2 and 2103-4's 3rd temperature sensor can be connected to two diodes
40 * in anti-parallel mode, and in this configuration both can be read
41 * independently (so we have 4 temperature inputs). The device can't
42 * detect if it's connected in this mode, so we have to manually enable
43 * it. Default is to leave the device in the state it's already in (-1).
44 * This parameter allows APD mode to be optionally forced on or off
46 static int apd = -1;
47 module_param(apd, bint, 0);
48 MODULE_PARM_DESC(apd, "Set to zero to disable anti-parallel diode mode");
50 struct temperature {
51 s8 degrees;
52 u8 fraction; /* 0-7 multiples of 0.125 */
55 struct emc2103_data {
56 struct i2c_client *client;
57 const struct attribute_group *groups[4];
58 struct mutex update_lock;
59 bool valid; /* registers are valid */
60 bool fan_rpm_control;
61 int temp_count; /* num of temp sensors */
62 unsigned long last_updated; /* in jiffies */
63 struct temperature temp[4]; /* internal + 3 external */
64 s8 temp_min[4]; /* no fractional part */
65 s8 temp_max[4]; /* no fractional part */
66 u8 temp_min_alarm;
67 u8 temp_max_alarm;
68 u8 fan_multiplier;
69 u16 fan_tach;
70 u16 fan_target;
73 static int read_u8_from_i2c(struct i2c_client *client, u8 i2c_reg, u8 *output)
75 int status = i2c_smbus_read_byte_data(client, i2c_reg);
76 if (status < 0) {
77 dev_warn(&client->dev, "reg 0x%02x, err %d\n",
78 i2c_reg, status);
79 } else {
80 *output = status;
82 return status;
85 static void read_temp_from_i2c(struct i2c_client *client, u8 i2c_reg,
86 struct temperature *temp)
88 u8 degrees, fractional;
90 if (read_u8_from_i2c(client, i2c_reg, &degrees) < 0)
91 return;
93 if (read_u8_from_i2c(client, i2c_reg + 1, &fractional) < 0)
94 return;
96 temp->degrees = degrees;
97 temp->fraction = (fractional & 0xe0) >> 5;
100 static void read_fan_from_i2c(struct i2c_client *client, u16 *output,
101 u8 hi_addr, u8 lo_addr)
103 u8 high_byte, lo_byte;
105 if (read_u8_from_i2c(client, hi_addr, &high_byte) < 0)
106 return;
108 if (read_u8_from_i2c(client, lo_addr, &lo_byte) < 0)
109 return;
111 *output = ((u16)high_byte << 5) | (lo_byte >> 3);
114 static void write_fan_target_to_i2c(struct i2c_client *client, u16 new_target)
116 u8 high_byte = (new_target & 0x1fe0) >> 5;
117 u8 low_byte = (new_target & 0x001f) << 3;
118 i2c_smbus_write_byte_data(client, REG_FAN_TARGET_LO, low_byte);
119 i2c_smbus_write_byte_data(client, REG_FAN_TARGET_HI, high_byte);
122 static void read_fan_config_from_i2c(struct i2c_client *client)
125 struct emc2103_data *data = i2c_get_clientdata(client);
126 u8 conf1;
128 if (read_u8_from_i2c(client, REG_FAN_CONF1, &conf1) < 0)
129 return;
131 data->fan_multiplier = 1 << ((conf1 & 0x60) >> 5);
132 data->fan_rpm_control = (conf1 & 0x80) != 0;
135 static struct emc2103_data *emc2103_update_device(struct device *dev)
137 struct emc2103_data *data = dev_get_drvdata(dev);
138 struct i2c_client *client = data->client;
140 mutex_lock(&data->update_lock);
142 if (time_after(jiffies, data->last_updated + HZ + HZ / 2)
143 || !data->valid) {
144 int i;
146 for (i = 0; i < data->temp_count; i++) {
147 read_temp_from_i2c(client, REG_TEMP[i], &data->temp[i]);
148 read_u8_from_i2c(client, REG_TEMP_MIN[i],
149 &data->temp_min[i]);
150 read_u8_from_i2c(client, REG_TEMP_MAX[i],
151 &data->temp_max[i]);
154 read_u8_from_i2c(client, REG_TEMP_MIN_ALARM,
155 &data->temp_min_alarm);
156 read_u8_from_i2c(client, REG_TEMP_MAX_ALARM,
157 &data->temp_max_alarm);
159 read_fan_from_i2c(client, &data->fan_tach,
160 REG_FAN_TACH_HI, REG_FAN_TACH_LO);
161 read_fan_from_i2c(client, &data->fan_target,
162 REG_FAN_TARGET_HI, REG_FAN_TARGET_LO);
163 read_fan_config_from_i2c(client);
165 data->last_updated = jiffies;
166 data->valid = true;
169 mutex_unlock(&data->update_lock);
171 return data;
174 static ssize_t
175 temp_show(struct device *dev, struct device_attribute *da, char *buf)
177 int nr = to_sensor_dev_attr(da)->index;
178 struct emc2103_data *data = emc2103_update_device(dev);
179 int millidegrees = data->temp[nr].degrees * 1000
180 + data->temp[nr].fraction * 125;
181 return sprintf(buf, "%d\n", millidegrees);
184 static ssize_t
185 temp_min_show(struct device *dev, struct device_attribute *da, char *buf)
187 int nr = to_sensor_dev_attr(da)->index;
188 struct emc2103_data *data = emc2103_update_device(dev);
189 int millidegrees = data->temp_min[nr] * 1000;
190 return sprintf(buf, "%d\n", millidegrees);
193 static ssize_t
194 temp_max_show(struct device *dev, struct device_attribute *da, char *buf)
196 int nr = to_sensor_dev_attr(da)->index;
197 struct emc2103_data *data = emc2103_update_device(dev);
198 int millidegrees = data->temp_max[nr] * 1000;
199 return sprintf(buf, "%d\n", millidegrees);
202 static ssize_t
203 temp_fault_show(struct device *dev, struct device_attribute *da, char *buf)
205 int nr = to_sensor_dev_attr(da)->index;
206 struct emc2103_data *data = emc2103_update_device(dev);
207 bool fault = (data->temp[nr].degrees == -128);
208 return sprintf(buf, "%d\n", fault ? 1 : 0);
211 static ssize_t
212 temp_min_alarm_show(struct device *dev, struct device_attribute *da,
213 char *buf)
215 int nr = to_sensor_dev_attr(da)->index;
216 struct emc2103_data *data = emc2103_update_device(dev);
217 bool alarm = data->temp_min_alarm & (1 << nr);
218 return sprintf(buf, "%d\n", alarm ? 1 : 0);
221 static ssize_t
222 temp_max_alarm_show(struct device *dev, struct device_attribute *da,
223 char *buf)
225 int nr = to_sensor_dev_attr(da)->index;
226 struct emc2103_data *data = emc2103_update_device(dev);
227 bool alarm = data->temp_max_alarm & (1 << nr);
228 return sprintf(buf, "%d\n", alarm ? 1 : 0);
231 static ssize_t temp_min_store(struct device *dev, struct device_attribute *da,
232 const char *buf, size_t count)
234 int nr = to_sensor_dev_attr(da)->index;
235 struct emc2103_data *data = dev_get_drvdata(dev);
236 struct i2c_client *client = data->client;
237 long val;
239 int result = kstrtol(buf, 10, &val);
240 if (result < 0)
241 return result;
243 val = DIV_ROUND_CLOSEST(clamp_val(val, -63000, 127000), 1000);
245 mutex_lock(&data->update_lock);
246 data->temp_min[nr] = val;
247 i2c_smbus_write_byte_data(client, REG_TEMP_MIN[nr], val);
248 mutex_unlock(&data->update_lock);
250 return count;
253 static ssize_t temp_max_store(struct device *dev, struct device_attribute *da,
254 const char *buf, size_t count)
256 int nr = to_sensor_dev_attr(da)->index;
257 struct emc2103_data *data = dev_get_drvdata(dev);
258 struct i2c_client *client = data->client;
259 long val;
261 int result = kstrtol(buf, 10, &val);
262 if (result < 0)
263 return result;
265 val = DIV_ROUND_CLOSEST(clamp_val(val, -63000, 127000), 1000);
267 mutex_lock(&data->update_lock);
268 data->temp_max[nr] = val;
269 i2c_smbus_write_byte_data(client, REG_TEMP_MAX[nr], val);
270 mutex_unlock(&data->update_lock);
272 return count;
275 static ssize_t
276 fan1_input_show(struct device *dev, struct device_attribute *da, char *buf)
278 struct emc2103_data *data = emc2103_update_device(dev);
279 int rpm = 0;
280 if (data->fan_tach != 0)
281 rpm = (FAN_RPM_FACTOR * data->fan_multiplier) / data->fan_tach;
282 return sprintf(buf, "%d\n", rpm);
285 static ssize_t
286 fan1_div_show(struct device *dev, struct device_attribute *da, char *buf)
288 struct emc2103_data *data = emc2103_update_device(dev);
289 int fan_div = 8 / data->fan_multiplier;
290 return sprintf(buf, "%d\n", fan_div);
294 * Note: we also update the fan target here, because its value is
295 * determined in part by the fan clock divider. This follows the principle
296 * of least surprise; the user doesn't expect the fan target to change just
297 * because the divider changed.
299 static ssize_t fan1_div_store(struct device *dev, struct device_attribute *da,
300 const char *buf, size_t count)
302 struct emc2103_data *data = emc2103_update_device(dev);
303 struct i2c_client *client = data->client;
304 int new_range_bits, old_div = 8 / data->fan_multiplier;
305 long new_div;
307 int status = kstrtol(buf, 10, &new_div);
308 if (status < 0)
309 return status;
311 if (new_div == old_div) /* No change */
312 return count;
314 switch (new_div) {
315 case 1:
316 new_range_bits = 3;
317 break;
318 case 2:
319 new_range_bits = 2;
320 break;
321 case 4:
322 new_range_bits = 1;
323 break;
324 case 8:
325 new_range_bits = 0;
326 break;
327 default:
328 return -EINVAL;
331 mutex_lock(&data->update_lock);
333 status = i2c_smbus_read_byte_data(client, REG_FAN_CONF1);
334 if (status < 0) {
335 dev_dbg(&client->dev, "reg 0x%02x, err %d\n",
336 REG_FAN_CONF1, status);
337 mutex_unlock(&data->update_lock);
338 return status;
340 status &= 0x9F;
341 status |= (new_range_bits << 5);
342 i2c_smbus_write_byte_data(client, REG_FAN_CONF1, status);
344 data->fan_multiplier = 8 / new_div;
346 /* update fan target if high byte is not disabled */
347 if ((data->fan_target & 0x1fe0) != 0x1fe0) {
348 u16 new_target = (data->fan_target * old_div) / new_div;
349 data->fan_target = min(new_target, (u16)0x1fff);
350 write_fan_target_to_i2c(client, data->fan_target);
353 /* invalidate data to force re-read from hardware */
354 data->valid = false;
356 mutex_unlock(&data->update_lock);
357 return count;
360 static ssize_t
361 fan1_target_show(struct device *dev, struct device_attribute *da, char *buf)
363 struct emc2103_data *data = emc2103_update_device(dev);
364 int rpm = 0;
366 /* high byte of 0xff indicates disabled so return 0 */
367 if ((data->fan_target != 0) && ((data->fan_target & 0x1fe0) != 0x1fe0))
368 rpm = (FAN_RPM_FACTOR * data->fan_multiplier)
369 / data->fan_target;
371 return sprintf(buf, "%d\n", rpm);
374 static ssize_t fan1_target_store(struct device *dev,
375 struct device_attribute *da, const char *buf,
376 size_t count)
378 struct emc2103_data *data = emc2103_update_device(dev);
379 struct i2c_client *client = data->client;
380 unsigned long rpm_target;
382 int result = kstrtoul(buf, 10, &rpm_target);
383 if (result < 0)
384 return result;
386 /* Datasheet states 16384 as maximum RPM target (table 3.2) */
387 rpm_target = clamp_val(rpm_target, 0, 16384);
389 mutex_lock(&data->update_lock);
391 if (rpm_target == 0)
392 data->fan_target = 0x1fff;
393 else
394 data->fan_target = clamp_val(
395 (FAN_RPM_FACTOR * data->fan_multiplier) / rpm_target,
396 0, 0x1fff);
398 write_fan_target_to_i2c(client, data->fan_target);
400 mutex_unlock(&data->update_lock);
401 return count;
404 static ssize_t
405 fan1_fault_show(struct device *dev, struct device_attribute *da, char *buf)
407 struct emc2103_data *data = emc2103_update_device(dev);
408 bool fault = ((data->fan_tach & 0x1fe0) == 0x1fe0);
409 return sprintf(buf, "%d\n", fault ? 1 : 0);
412 static ssize_t
413 pwm1_enable_show(struct device *dev, struct device_attribute *da, char *buf)
415 struct emc2103_data *data = emc2103_update_device(dev);
416 return sprintf(buf, "%d\n", data->fan_rpm_control ? 3 : 0);
419 static ssize_t pwm1_enable_store(struct device *dev,
420 struct device_attribute *da, const char *buf,
421 size_t count)
423 struct emc2103_data *data = dev_get_drvdata(dev);
424 struct i2c_client *client = data->client;
425 long new_value;
426 u8 conf_reg;
428 int result = kstrtol(buf, 10, &new_value);
429 if (result < 0)
430 return result;
432 mutex_lock(&data->update_lock);
433 switch (new_value) {
434 case 0:
435 data->fan_rpm_control = false;
436 break;
437 case 3:
438 data->fan_rpm_control = true;
439 break;
440 default:
441 count = -EINVAL;
442 goto err;
445 result = read_u8_from_i2c(client, REG_FAN_CONF1, &conf_reg);
446 if (result < 0) {
447 count = result;
448 goto err;
451 if (data->fan_rpm_control)
452 conf_reg |= 0x80;
453 else
454 conf_reg &= ~0x80;
456 i2c_smbus_write_byte_data(client, REG_FAN_CONF1, conf_reg);
457 err:
458 mutex_unlock(&data->update_lock);
459 return count;
462 static SENSOR_DEVICE_ATTR_RO(temp1_input, temp, 0);
463 static SENSOR_DEVICE_ATTR_RW(temp1_min, temp_min, 0);
464 static SENSOR_DEVICE_ATTR_RW(temp1_max, temp_max, 0);
465 static SENSOR_DEVICE_ATTR_RO(temp1_fault, temp_fault, 0);
466 static SENSOR_DEVICE_ATTR_RO(temp1_min_alarm, temp_min_alarm, 0);
467 static SENSOR_DEVICE_ATTR_RO(temp1_max_alarm, temp_max_alarm, 0);
469 static SENSOR_DEVICE_ATTR_RO(temp2_input, temp, 1);
470 static SENSOR_DEVICE_ATTR_RW(temp2_min, temp_min, 1);
471 static SENSOR_DEVICE_ATTR_RW(temp2_max, temp_max, 1);
472 static SENSOR_DEVICE_ATTR_RO(temp2_fault, temp_fault, 1);
473 static SENSOR_DEVICE_ATTR_RO(temp2_min_alarm, temp_min_alarm, 1);
474 static SENSOR_DEVICE_ATTR_RO(temp2_max_alarm, temp_max_alarm, 1);
476 static SENSOR_DEVICE_ATTR_RO(temp3_input, temp, 2);
477 static SENSOR_DEVICE_ATTR_RW(temp3_min, temp_min, 2);
478 static SENSOR_DEVICE_ATTR_RW(temp3_max, temp_max, 2);
479 static SENSOR_DEVICE_ATTR_RO(temp3_fault, temp_fault, 2);
480 static SENSOR_DEVICE_ATTR_RO(temp3_min_alarm, temp_min_alarm, 2);
481 static SENSOR_DEVICE_ATTR_RO(temp3_max_alarm, temp_max_alarm, 2);
483 static SENSOR_DEVICE_ATTR_RO(temp4_input, temp, 3);
484 static SENSOR_DEVICE_ATTR_RW(temp4_min, temp_min, 3);
485 static SENSOR_DEVICE_ATTR_RW(temp4_max, temp_max, 3);
486 static SENSOR_DEVICE_ATTR_RO(temp4_fault, temp_fault, 3);
487 static SENSOR_DEVICE_ATTR_RO(temp4_min_alarm, temp_min_alarm, 3);
488 static SENSOR_DEVICE_ATTR_RO(temp4_max_alarm, temp_max_alarm, 3);
490 static DEVICE_ATTR_RO(fan1_input);
491 static DEVICE_ATTR_RW(fan1_div);
492 static DEVICE_ATTR_RW(fan1_target);
493 static DEVICE_ATTR_RO(fan1_fault);
495 static DEVICE_ATTR_RW(pwm1_enable);
497 /* sensors present on all models */
498 static struct attribute *emc2103_attributes[] = {
499 &sensor_dev_attr_temp1_input.dev_attr.attr,
500 &sensor_dev_attr_temp1_min.dev_attr.attr,
501 &sensor_dev_attr_temp1_max.dev_attr.attr,
502 &sensor_dev_attr_temp1_fault.dev_attr.attr,
503 &sensor_dev_attr_temp1_min_alarm.dev_attr.attr,
504 &sensor_dev_attr_temp1_max_alarm.dev_attr.attr,
505 &sensor_dev_attr_temp2_input.dev_attr.attr,
506 &sensor_dev_attr_temp2_min.dev_attr.attr,
507 &sensor_dev_attr_temp2_max.dev_attr.attr,
508 &sensor_dev_attr_temp2_fault.dev_attr.attr,
509 &sensor_dev_attr_temp2_min_alarm.dev_attr.attr,
510 &sensor_dev_attr_temp2_max_alarm.dev_attr.attr,
511 &dev_attr_fan1_input.attr,
512 &dev_attr_fan1_div.attr,
513 &dev_attr_fan1_target.attr,
514 &dev_attr_fan1_fault.attr,
515 &dev_attr_pwm1_enable.attr,
516 NULL
519 /* extra temperature sensors only present on 2103-2 and 2103-4 */
520 static struct attribute *emc2103_attributes_temp3[] = {
521 &sensor_dev_attr_temp3_input.dev_attr.attr,
522 &sensor_dev_attr_temp3_min.dev_attr.attr,
523 &sensor_dev_attr_temp3_max.dev_attr.attr,
524 &sensor_dev_attr_temp3_fault.dev_attr.attr,
525 &sensor_dev_attr_temp3_min_alarm.dev_attr.attr,
526 &sensor_dev_attr_temp3_max_alarm.dev_attr.attr,
527 NULL
530 /* extra temperature sensors only present on 2103-2 and 2103-4 in APD mode */
531 static struct attribute *emc2103_attributes_temp4[] = {
532 &sensor_dev_attr_temp4_input.dev_attr.attr,
533 &sensor_dev_attr_temp4_min.dev_attr.attr,
534 &sensor_dev_attr_temp4_max.dev_attr.attr,
535 &sensor_dev_attr_temp4_fault.dev_attr.attr,
536 &sensor_dev_attr_temp4_min_alarm.dev_attr.attr,
537 &sensor_dev_attr_temp4_max_alarm.dev_attr.attr,
538 NULL
541 static const struct attribute_group emc2103_group = {
542 .attrs = emc2103_attributes,
545 static const struct attribute_group emc2103_temp3_group = {
546 .attrs = emc2103_attributes_temp3,
549 static const struct attribute_group emc2103_temp4_group = {
550 .attrs = emc2103_attributes_temp4,
553 static int
554 emc2103_probe(struct i2c_client *client)
556 struct emc2103_data *data;
557 struct device *hwmon_dev;
558 int status, idx = 0;
560 if (!i2c_check_functionality(client->adapter, I2C_FUNC_SMBUS_BYTE_DATA))
561 return -EIO;
563 data = devm_kzalloc(&client->dev, sizeof(struct emc2103_data),
564 GFP_KERNEL);
565 if (!data)
566 return -ENOMEM;
568 i2c_set_clientdata(client, data);
569 data->client = client;
570 mutex_init(&data->update_lock);
572 /* 2103-2 and 2103-4 have 3 external diodes, 2103-1 has 1 */
573 status = i2c_smbus_read_byte_data(client, REG_PRODUCT_ID);
574 if (status == 0x24) {
575 /* 2103-1 only has 1 external diode */
576 data->temp_count = 2;
577 } else {
578 /* 2103-2 and 2103-4 have 3 or 4 external diodes */
579 status = i2c_smbus_read_byte_data(client, REG_CONF1);
580 if (status < 0) {
581 dev_dbg(&client->dev, "reg 0x%02x, err %d\n", REG_CONF1,
582 status);
583 return status;
586 /* detect current state of hardware */
587 data->temp_count = (status & 0x01) ? 4 : 3;
589 /* force APD state if module parameter is set */
590 if (apd == 0) {
591 /* force APD mode off */
592 data->temp_count = 3;
593 status &= ~(0x01);
594 i2c_smbus_write_byte_data(client, REG_CONF1, status);
595 } else if (apd == 1) {
596 /* force APD mode on */
597 data->temp_count = 4;
598 status |= 0x01;
599 i2c_smbus_write_byte_data(client, REG_CONF1, status);
603 /* sysfs hooks */
604 data->groups[idx++] = &emc2103_group;
605 if (data->temp_count >= 3)
606 data->groups[idx++] = &emc2103_temp3_group;
607 if (data->temp_count == 4)
608 data->groups[idx++] = &emc2103_temp4_group;
610 hwmon_dev = devm_hwmon_device_register_with_groups(&client->dev,
611 client->name, data,
612 data->groups);
613 if (IS_ERR(hwmon_dev))
614 return PTR_ERR(hwmon_dev);
616 dev_info(&client->dev, "%s: sensor '%s'\n",
617 dev_name(hwmon_dev), client->name);
619 return 0;
622 static const struct i2c_device_id emc2103_ids[] = {
623 { "emc2103", 0, },
624 { /* LIST END */ }
626 MODULE_DEVICE_TABLE(i2c, emc2103_ids);
628 /* Return 0 if detection is successful, -ENODEV otherwise */
629 static int
630 emc2103_detect(struct i2c_client *new_client, struct i2c_board_info *info)
632 struct i2c_adapter *adapter = new_client->adapter;
633 int manufacturer, product;
635 if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE_DATA))
636 return -ENODEV;
638 manufacturer = i2c_smbus_read_byte_data(new_client, REG_MFG_ID);
639 if (manufacturer != 0x5D)
640 return -ENODEV;
642 product = i2c_smbus_read_byte_data(new_client, REG_PRODUCT_ID);
643 if ((product != 0x24) && (product != 0x26))
644 return -ENODEV;
646 strlcpy(info->type, "emc2103", I2C_NAME_SIZE);
648 return 0;
651 static struct i2c_driver emc2103_driver = {
652 .class = I2C_CLASS_HWMON,
653 .driver = {
654 .name = "emc2103",
656 .probe_new = emc2103_probe,
657 .id_table = emc2103_ids,
658 .detect = emc2103_detect,
659 .address_list = normal_i2c,
662 module_i2c_driver(emc2103_driver);
664 MODULE_AUTHOR("Steve Glendinning <steve.glendinning@shawell.net>");
665 MODULE_DESCRIPTION("SMSC EMC2103 hwmon driver");
666 MODULE_LICENSE("GPL");