blob: 85e5b3355be42c5b93c1222f2b1611a00ec16680 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/*
Guenter Roeck02fe2fd2012-01-14 13:42:20 -08002 * lm77.c - Part of lm_sensors, Linux kernel modules for hardware
3 * monitoring
4 *
5 * Copyright (c) 2004 Andras BALI <drewie@freemail.hu>
6 *
7 * Heavily based on lm75.c by Frodo Looijaard <frodol@dds.nl>. The LM77
8 * is a temperature sensor and thermal window comparator with 0.5 deg
9 * resolution made by National Semiconductor. Complete datasheet can be
10 * obtained at their site:
11 * http://www.national.com/pf/LM/LM77.html
12 *
13 * This program is free software; you can redistribute it and/or modify
14 * it under the terms of the GNU General Public License as published by
15 * the Free Software Foundation; either version 2 of the License, or
16 * (at your option) any later version.
17 *
18 * This program is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU General Public License for more details.
Guenter Roeck02fe2fd2012-01-14 13:42:20 -080022 */
Linus Torvalds1da177e2005-04-16 15:20:36 -070023
Linus Torvalds1da177e2005-04-16 15:20:36 -070024#include <linux/module.h>
25#include <linux/init.h>
26#include <linux/slab.h>
27#include <linux/jiffies.h>
28#include <linux/i2c.h>
Mark M. Hoffman943b0832005-07-15 21:39:18 -040029#include <linux/hwmon.h>
Jean Delvare1f52af02008-01-03 23:35:33 +010030#include <linux/hwmon-sysfs.h>
Mark M. Hoffman943b0832005-07-15 21:39:18 -040031#include <linux/err.h>
Ingo Molnar9a61bf62006-01-18 23:19:26 +010032#include <linux/mutex.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070033
34/* Addresses to scan */
Mark M. Hoffman25e9c862008-02-17 22:28:03 -050035static const unsigned short normal_i2c[] = { 0x48, 0x49, 0x4a, 0x4b,
36 I2C_CLIENT_END };
Linus Torvalds1da177e2005-04-16 15:20:36 -070037
Linus Torvalds1da177e2005-04-16 15:20:36 -070038/* The LM77 registers */
39#define LM77_REG_TEMP 0x00
40#define LM77_REG_CONF 0x01
41#define LM77_REG_TEMP_HYST 0x02
42#define LM77_REG_TEMP_CRIT 0x03
43#define LM77_REG_TEMP_MIN 0x04
44#define LM77_REG_TEMP_MAX 0x05
45
46/* Each client has this additional data */
47struct lm77_data {
Guenter Roeck02fe2fd2012-01-14 13:42:20 -080048 struct device *hwmon_dev;
Ingo Molnar9a61bf62006-01-18 23:19:26 +010049 struct mutex update_lock;
Linus Torvalds1da177e2005-04-16 15:20:36 -070050 char valid;
51 unsigned long last_updated; /* In jiffies */
52 int temp_input; /* Temperatures */
53 int temp_crit;
54 int temp_min;
55 int temp_max;
56 int temp_hyst;
57 u8 alarms;
58};
59
Linus Torvalds1da177e2005-04-16 15:20:36 -070060/* straight from the datasheet */
61#define LM77_TEMP_MIN (-55000)
62#define LM77_TEMP_MAX 125000
63
Guenter Roeck02fe2fd2012-01-14 13:42:20 -080064/*
65 * In the temperature registers, the low 3 bits are not part of the
66 * temperature values; they are the status bits.
67 */
Jean Delvare413b6452006-01-09 22:43:08 +010068static inline s16 LM77_TEMP_TO_REG(int temp)
Linus Torvalds1da177e2005-04-16 15:20:36 -070069{
Guenter Roeck2a844c12013-01-09 08:09:34 -080070 int ntemp = clamp_val(temp, LM77_TEMP_MIN, LM77_TEMP_MAX);
Jean Delvare413b6452006-01-09 22:43:08 +010071 return (ntemp / 500) * 8;
Linus Torvalds1da177e2005-04-16 15:20:36 -070072}
73
Jean Delvare413b6452006-01-09 22:43:08 +010074static inline int LM77_TEMP_FROM_REG(s16 reg)
Linus Torvalds1da177e2005-04-16 15:20:36 -070075{
Jean Delvare413b6452006-01-09 22:43:08 +010076 return (reg / 8) * 500;
Linus Torvalds1da177e2005-04-16 15:20:36 -070077}
78
Guenter Roeck9f9edcd2014-04-12 08:45:20 -070079/*
80 * All registers are word-sized, except for the configuration register.
81 * The LM77 uses the high-byte first convention.
82 */
83static u16 lm77_read_value(struct i2c_client *client, u8 reg)
84{
85 if (reg == LM77_REG_CONF)
86 return i2c_smbus_read_byte_data(client, reg);
87 else
88 return i2c_smbus_read_word_swapped(client, reg);
89}
90
91static int lm77_write_value(struct i2c_client *client, u8 reg, u16 value)
92{
93 if (reg == LM77_REG_CONF)
94 return i2c_smbus_write_byte_data(client, reg, value);
95 else
96 return i2c_smbus_write_word_swapped(client, reg, value);
97}
98
99static struct lm77_data *lm77_update_device(struct device *dev)
100{
101 struct i2c_client *client = to_i2c_client(dev);
102 struct lm77_data *data = i2c_get_clientdata(client);
103
104 mutex_lock(&data->update_lock);
105
106 if (time_after(jiffies, data->last_updated + HZ + HZ / 2)
107 || !data->valid) {
108 dev_dbg(&client->dev, "Starting lm77 update\n");
109 data->temp_input =
110 LM77_TEMP_FROM_REG(lm77_read_value(client,
111 LM77_REG_TEMP));
112 data->temp_hyst =
113 LM77_TEMP_FROM_REG(lm77_read_value(client,
114 LM77_REG_TEMP_HYST));
115 data->temp_crit =
116 LM77_TEMP_FROM_REG(lm77_read_value(client,
117 LM77_REG_TEMP_CRIT));
118 data->temp_min =
119 LM77_TEMP_FROM_REG(lm77_read_value(client,
120 LM77_REG_TEMP_MIN));
121 data->temp_max =
122 LM77_TEMP_FROM_REG(lm77_read_value(client,
123 LM77_REG_TEMP_MAX));
124 data->alarms =
125 lm77_read_value(client, LM77_REG_TEMP) & 0x0007;
126 data->last_updated = jiffies;
127 data->valid = 1;
128 }
129
130 mutex_unlock(&data->update_lock);
131
132 return data;
133}
134
Linus Torvalds1da177e2005-04-16 15:20:36 -0700135/* sysfs stuff */
136
137/* read routines for temperature limits */
138#define show(value) \
Guenter Roeck02fe2fd2012-01-14 13:42:20 -0800139static ssize_t show_##value(struct device *dev, \
140 struct device_attribute *attr, \
141 char *buf) \
Linus Torvalds1da177e2005-04-16 15:20:36 -0700142{ \
143 struct lm77_data *data = lm77_update_device(dev); \
144 return sprintf(buf, "%d\n", data->value); \
145}
146
147show(temp_input);
148show(temp_crit);
149show(temp_min);
150show(temp_max);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700151
152/* read routines for hysteresis values */
Guenter Roeck02fe2fd2012-01-14 13:42:20 -0800153static ssize_t show_temp_crit_hyst(struct device *dev,
154 struct device_attribute *attr, char *buf)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700155{
156 struct lm77_data *data = lm77_update_device(dev);
157 return sprintf(buf, "%d\n", data->temp_crit - data->temp_hyst);
158}
Guenter Roeck02fe2fd2012-01-14 13:42:20 -0800159static ssize_t show_temp_min_hyst(struct device *dev,
160 struct device_attribute *attr, char *buf)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700161{
162 struct lm77_data *data = lm77_update_device(dev);
163 return sprintf(buf, "%d\n", data->temp_min + data->temp_hyst);
164}
Guenter Roeck02fe2fd2012-01-14 13:42:20 -0800165static ssize_t show_temp_max_hyst(struct device *dev,
166 struct device_attribute *attr, char *buf)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700167{
168 struct lm77_data *data = lm77_update_device(dev);
169 return sprintf(buf, "%d\n", data->temp_max - data->temp_hyst);
170}
171
172/* write routines */
173#define set(value, reg) \
Guenter Roeck02fe2fd2012-01-14 13:42:20 -0800174static ssize_t set_##value(struct device *dev, struct device_attribute *attr, \
175 const char *buf, size_t count) \
176{ \
177 struct i2c_client *client = to_i2c_client(dev); \
178 struct lm77_data *data = i2c_get_clientdata(client); \
179 long val; \
180 int err = kstrtol(buf, 10, &val); \
181 if (err) \
182 return err; \
183 \
184 mutex_lock(&data->update_lock); \
185 data->value = val; \
186 lm77_write_value(client, reg, LM77_TEMP_TO_REG(data->value)); \
187 mutex_unlock(&data->update_lock); \
188 return count; \
Linus Torvalds1da177e2005-04-16 15:20:36 -0700189}
190
191set(temp_min, LM77_REG_TEMP_MIN);
192set(temp_max, LM77_REG_TEMP_MAX);
193
Guenter Roeck02fe2fd2012-01-14 13:42:20 -0800194/*
195 * hysteresis is stored as a relative value on the chip, so it has to be
196 * converted first
197 */
198static ssize_t set_temp_crit_hyst(struct device *dev,
199 struct device_attribute *attr,
200 const char *buf, size_t count)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700201{
202 struct i2c_client *client = to_i2c_client(dev);
203 struct lm77_data *data = i2c_get_clientdata(client);
Guenter Roeck02fe2fd2012-01-14 13:42:20 -0800204 unsigned long val;
205 int err;
206
207 err = kstrtoul(buf, 10, &val);
208 if (err)
209 return err;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700210
Ingo Molnar9a61bf62006-01-18 23:19:26 +0100211 mutex_lock(&data->update_lock);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700212 data->temp_hyst = data->temp_crit - val;
213 lm77_write_value(client, LM77_REG_TEMP_HYST,
214 LM77_TEMP_TO_REG(data->temp_hyst));
Ingo Molnar9a61bf62006-01-18 23:19:26 +0100215 mutex_unlock(&data->update_lock);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700216 return count;
217}
218
Guenter Roeck02fe2fd2012-01-14 13:42:20 -0800219static ssize_t set_temp_crit(struct device *dev, struct device_attribute *attr,
220 const char *buf, size_t count)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700221{
222 struct i2c_client *client = to_i2c_client(dev);
223 struct lm77_data *data = i2c_get_clientdata(client);
Guenter Roeck02fe2fd2012-01-14 13:42:20 -0800224 unsigned long val;
225 int err;
226
227 err = kstrtoul(buf, 10, &val);
228 if (err)
229 return err;
230
Ingo Molnar9a61bf62006-01-18 23:19:26 +0100231 mutex_lock(&data->update_lock);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700232 data->temp_crit = val;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700233 lm77_write_value(client, LM77_REG_TEMP_CRIT,
234 LM77_TEMP_TO_REG(data->temp_crit));
Ingo Molnar9a61bf62006-01-18 23:19:26 +0100235 mutex_unlock(&data->update_lock);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700236 return count;
237}
238
Jean Delvare1f52af02008-01-03 23:35:33 +0100239static ssize_t show_alarm(struct device *dev, struct device_attribute *attr,
240 char *buf)
241{
242 int bitnr = to_sensor_dev_attr(attr)->index;
243 struct lm77_data *data = lm77_update_device(dev);
244 return sprintf(buf, "%u\n", (data->alarms >> bitnr) & 1);
245}
246
Linus Torvalds1da177e2005-04-16 15:20:36 -0700247static DEVICE_ATTR(temp1_input, S_IRUGO,
248 show_temp_input, NULL);
249static DEVICE_ATTR(temp1_crit, S_IWUSR | S_IRUGO,
250 show_temp_crit, set_temp_crit);
251static DEVICE_ATTR(temp1_min, S_IWUSR | S_IRUGO,
252 show_temp_min, set_temp_min);
253static DEVICE_ATTR(temp1_max, S_IWUSR | S_IRUGO,
254 show_temp_max, set_temp_max);
255
256static DEVICE_ATTR(temp1_crit_hyst, S_IWUSR | S_IRUGO,
257 show_temp_crit_hyst, set_temp_crit_hyst);
258static DEVICE_ATTR(temp1_min_hyst, S_IRUGO,
259 show_temp_min_hyst, NULL);
260static DEVICE_ATTR(temp1_max_hyst, S_IRUGO,
261 show_temp_max_hyst, NULL);
262
Jean Delvare1f52af02008-01-03 23:35:33 +0100263static SENSOR_DEVICE_ATTR(temp1_crit_alarm, S_IRUGO, show_alarm, NULL, 2);
264static SENSOR_DEVICE_ATTR(temp1_min_alarm, S_IRUGO, show_alarm, NULL, 0);
265static SENSOR_DEVICE_ATTR(temp1_max_alarm, S_IRUGO, show_alarm, NULL, 1);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700266
Mark M. Hoffman0501a3812006-09-24 21:14:35 +0200267static struct attribute *lm77_attributes[] = {
268 &dev_attr_temp1_input.attr,
269 &dev_attr_temp1_crit.attr,
270 &dev_attr_temp1_min.attr,
271 &dev_attr_temp1_max.attr,
272 &dev_attr_temp1_crit_hyst.attr,
273 &dev_attr_temp1_min_hyst.attr,
274 &dev_attr_temp1_max_hyst.attr,
Jean Delvare1f52af02008-01-03 23:35:33 +0100275 &sensor_dev_attr_temp1_crit_alarm.dev_attr.attr,
276 &sensor_dev_attr_temp1_min_alarm.dev_attr.attr,
277 &sensor_dev_attr_temp1_max_alarm.dev_attr.attr,
Mark M. Hoffman0501a3812006-09-24 21:14:35 +0200278 NULL
279};
280
281static const struct attribute_group lm77_group = {
282 .attrs = lm77_attributes,
283};
284
Jean Delvarea189dd62008-07-16 19:30:13 +0200285/* Return 0 if detection is successful, -ENODEV otherwise */
Guenter Roeckefd2d112012-06-02 09:58:09 -0700286static int lm77_detect(struct i2c_client *client, struct i2c_board_info *info)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700287{
Guenter Roeckefd2d112012-06-02 09:58:09 -0700288 struct i2c_adapter *adapter = client->adapter;
Jean Delvare747d9be2009-12-09 20:35:52 +0100289 int i, cur, conf, hyst, crit, min, max;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700290
291 if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE_DATA |
292 I2C_FUNC_SMBUS_WORD_DATA))
Jean Delvarea189dd62008-07-16 19:30:13 +0200293 return -ENODEV;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700294
Guenter Roeck02fe2fd2012-01-14 13:42:20 -0800295 /*
296 * Here comes the remaining detection. Since the LM77 has no
297 * register dedicated to identification, we have to rely on the
298 * following tricks:
299 *
300 * 1. the high 4 bits represent the sign and thus they should
301 * always be the same
302 * 2. the high 3 bits are unused in the configuration register
303 * 3. addresses 0x06 and 0x07 return the last read value
304 * 4. registers cycling over 8-address boundaries
305 *
306 * Word-sized registers are high-byte first.
307 */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700308
Jean Delvare747d9be2009-12-09 20:35:52 +0100309 /* addresses cycling */
Guenter Roeckefd2d112012-06-02 09:58:09 -0700310 cur = i2c_smbus_read_word_data(client, 0);
311 conf = i2c_smbus_read_byte_data(client, 1);
312 hyst = i2c_smbus_read_word_data(client, 2);
313 crit = i2c_smbus_read_word_data(client, 3);
314 min = i2c_smbus_read_word_data(client, 4);
315 max = i2c_smbus_read_word_data(client, 5);
Jean Delvare747d9be2009-12-09 20:35:52 +0100316 for (i = 8; i <= 0xff; i += 8) {
Guenter Roeckefd2d112012-06-02 09:58:09 -0700317 if (i2c_smbus_read_byte_data(client, i + 1) != conf
318 || i2c_smbus_read_word_data(client, i + 2) != hyst
319 || i2c_smbus_read_word_data(client, i + 3) != crit
320 || i2c_smbus_read_word_data(client, i + 4) != min
321 || i2c_smbus_read_word_data(client, i + 5) != max)
Jean Delvarea189dd62008-07-16 19:30:13 +0200322 return -ENODEV;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700323 }
324
Jean Delvare747d9be2009-12-09 20:35:52 +0100325 /* sign bits */
326 if (((cur & 0x00f0) != 0xf0 && (cur & 0x00f0) != 0x0)
327 || ((hyst & 0x00f0) != 0xf0 && (hyst & 0x00f0) != 0x0)
328 || ((crit & 0x00f0) != 0xf0 && (crit & 0x00f0) != 0x0)
329 || ((min & 0x00f0) != 0xf0 && (min & 0x00f0) != 0x0)
330 || ((max & 0x00f0) != 0xf0 && (max & 0x00f0) != 0x0))
331 return -ENODEV;
332
333 /* unused bits */
334 if (conf & 0xe0)
335 return -ENODEV;
336
337 /* 0x06 and 0x07 return the last read value */
Guenter Roeckefd2d112012-06-02 09:58:09 -0700338 cur = i2c_smbus_read_word_data(client, 0);
339 if (i2c_smbus_read_word_data(client, 6) != cur
340 || i2c_smbus_read_word_data(client, 7) != cur)
Jean Delvare747d9be2009-12-09 20:35:52 +0100341 return -ENODEV;
Guenter Roeckefd2d112012-06-02 09:58:09 -0700342 hyst = i2c_smbus_read_word_data(client, 2);
343 if (i2c_smbus_read_word_data(client, 6) != hyst
344 || i2c_smbus_read_word_data(client, 7) != hyst)
Jean Delvare747d9be2009-12-09 20:35:52 +0100345 return -ENODEV;
Guenter Roeckefd2d112012-06-02 09:58:09 -0700346 min = i2c_smbus_read_word_data(client, 4);
347 if (i2c_smbus_read_word_data(client, 6) != min
348 || i2c_smbus_read_word_data(client, 7) != min)
Jean Delvare747d9be2009-12-09 20:35:52 +0100349 return -ENODEV;
350
Jean Delvarea189dd62008-07-16 19:30:13 +0200351 strlcpy(info->type, "lm77", I2C_NAME_SIZE);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700352
Jean Delvarea189dd62008-07-16 19:30:13 +0200353 return 0;
354}
355
Guenter Roeck9f9edcd2014-04-12 08:45:20 -0700356static void lm77_init_client(struct i2c_client *client)
357{
358 /* Initialize the LM77 chip - turn off shutdown mode */
359 int conf = lm77_read_value(client, LM77_REG_CONF);
360 if (conf & 1)
361 lm77_write_value(client, LM77_REG_CONF, conf & 0xfe);
362}
363
Guenter Roeckefd2d112012-06-02 09:58:09 -0700364static int lm77_probe(struct i2c_client *client, const struct i2c_device_id *id)
Jean Delvarea189dd62008-07-16 19:30:13 +0200365{
Guenter Roeckefd2d112012-06-02 09:58:09 -0700366 struct device *dev = &client->dev;
Jean Delvarea189dd62008-07-16 19:30:13 +0200367 struct lm77_data *data;
368 int err;
369
Guenter Roeck52714c02012-06-16 18:24:02 -0700370 data = devm_kzalloc(dev, sizeof(struct lm77_data), GFP_KERNEL);
371 if (!data)
372 return -ENOMEM;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700373
Guenter Roeckefd2d112012-06-02 09:58:09 -0700374 i2c_set_clientdata(client, data);
Ingo Molnar9a61bf62006-01-18 23:19:26 +0100375 mutex_init(&data->update_lock);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700376
Linus Torvalds1da177e2005-04-16 15:20:36 -0700377 /* Initialize the LM77 chip */
Guenter Roeckefd2d112012-06-02 09:58:09 -0700378 lm77_init_client(client);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700379
380 /* Register sysfs hooks */
Guenter Roeckefd2d112012-06-02 09:58:09 -0700381 err = sysfs_create_group(&dev->kobj, &lm77_group);
Guenter Roeck02fe2fd2012-01-14 13:42:20 -0800382 if (err)
Guenter Roeck52714c02012-06-16 18:24:02 -0700383 return err;
Mark M. Hoffman0501a3812006-09-24 21:14:35 +0200384
Guenter Roeckefd2d112012-06-02 09:58:09 -0700385 data->hwmon_dev = hwmon_device_register(dev);
Tony Jones1beeffe2007-08-20 13:46:20 -0700386 if (IS_ERR(data->hwmon_dev)) {
387 err = PTR_ERR(data->hwmon_dev);
Mark M. Hoffman0501a3812006-09-24 21:14:35 +0200388 goto exit_remove;
Mark M. Hoffman943b0832005-07-15 21:39:18 -0400389 }
390
Linus Torvalds1da177e2005-04-16 15:20:36 -0700391 return 0;
392
Mark M. Hoffman0501a3812006-09-24 21:14:35 +0200393exit_remove:
Guenter Roeckefd2d112012-06-02 09:58:09 -0700394 sysfs_remove_group(&dev->kobj, &lm77_group);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700395 return err;
396}
397
Jean Delvarea189dd62008-07-16 19:30:13 +0200398static int lm77_remove(struct i2c_client *client)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700399{
Mark M. Hoffman943b0832005-07-15 21:39:18 -0400400 struct lm77_data *data = i2c_get_clientdata(client);
Tony Jones1beeffe2007-08-20 13:46:20 -0700401 hwmon_device_unregister(data->hwmon_dev);
Mark M. Hoffman0501a3812006-09-24 21:14:35 +0200402 sysfs_remove_group(&client->dev.kobj, &lm77_group);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700403 return 0;
404}
405
Guenter Roeck9f9edcd2014-04-12 08:45:20 -0700406static const struct i2c_device_id lm77_id[] = {
407 { "lm77", 0 },
408 { }
409};
410MODULE_DEVICE_TABLE(i2c, lm77_id);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700411
Guenter Roeck9f9edcd2014-04-12 08:45:20 -0700412/* This is the driver that will be inserted */
413static struct i2c_driver lm77_driver = {
414 .class = I2C_CLASS_HWMON,
415 .driver = {
416 .name = "lm77",
417 },
418 .probe = lm77_probe,
419 .remove = lm77_remove,
420 .id_table = lm77_id,
421 .detect = lm77_detect,
422 .address_list = normal_i2c,
423};
Linus Torvalds1da177e2005-04-16 15:20:36 -0700424
Axel Linf0967ee2012-01-20 15:38:18 +0800425module_i2c_driver(lm77_driver);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700426
427MODULE_AUTHOR("Andras BALI <drewie@freemail.hu>");
428MODULE_DESCRIPTION("LM77 driver");
429MODULE_LICENSE("GPL");