Martyn Welch | a7fa985 | 2008-11-12 13:27:06 -0800 | [diff] [blame] | 1 | /* |
| 2 | * An I2C driver for the Epson RX8581 RTC |
| 3 | * |
Martyn Welch | 9756c4d | 2010-04-14 09:24:16 +0100 | [diff] [blame] | 4 | * Author: Martyn Welch <martyn.welch@ge.com> |
| 5 | * Copyright 2008 GE Intelligent Platforms Embedded Systems, Inc. |
Martyn Welch | a7fa985 | 2008-11-12 13:27:06 -0800 | [diff] [blame] | 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 version 2 as |
| 9 | * published by the Free Software Foundation. |
| 10 | * |
| 11 | * Based on: rtc-pcf8563.c (An I2C driver for the Philips PCF8563 RTC) |
| 12 | * Copyright 2005-06 Tower Technologies |
| 13 | */ |
| 14 | |
| 15 | #include <linux/module.h> |
| 16 | #include <linux/i2c.h> |
| 17 | #include <linux/bcd.h> |
| 18 | #include <linux/rtc.h> |
| 19 | #include <linux/log2.h> |
| 20 | |
Martyn Welch | a7fa985 | 2008-11-12 13:27:06 -0800 | [diff] [blame] | 21 | #define RX8581_REG_SC 0x00 /* Second in BCD */ |
| 22 | #define RX8581_REG_MN 0x01 /* Minute in BCD */ |
| 23 | #define RX8581_REG_HR 0x02 /* Hour in BCD */ |
| 24 | #define RX8581_REG_DW 0x03 /* Day of Week */ |
| 25 | #define RX8581_REG_DM 0x04 /* Day of Month in BCD */ |
| 26 | #define RX8581_REG_MO 0x05 /* Month in BCD */ |
| 27 | #define RX8581_REG_YR 0x06 /* Year in BCD */ |
| 28 | #define RX8581_REG_RAM 0x07 /* RAM */ |
| 29 | #define RX8581_REG_AMN 0x08 /* Alarm Min in BCD*/ |
| 30 | #define RX8581_REG_AHR 0x09 /* Alarm Hour in BCD */ |
| 31 | #define RX8581_REG_ADM 0x0A |
| 32 | #define RX8581_REG_ADW 0x0A |
| 33 | #define RX8581_REG_TMR0 0x0B |
| 34 | #define RX8581_REG_TMR1 0x0C |
| 35 | #define RX8581_REG_EXT 0x0D /* Extension Register */ |
| 36 | #define RX8581_REG_FLAG 0x0E /* Flag Register */ |
| 37 | #define RX8581_REG_CTRL 0x0F /* Control Register */ |
| 38 | |
| 39 | |
| 40 | /* Flag Register bit definitions */ |
| 41 | #define RX8581_FLAG_UF 0x20 /* Update */ |
| 42 | #define RX8581_FLAG_TF 0x10 /* Timer */ |
| 43 | #define RX8581_FLAG_AF 0x08 /* Alarm */ |
| 44 | #define RX8581_FLAG_VLF 0x02 /* Voltage Low */ |
| 45 | |
| 46 | /* Control Register bit definitions */ |
| 47 | #define RX8581_CTRL_UIE 0x20 /* Update Interrupt Enable */ |
| 48 | #define RX8581_CTRL_TIE 0x10 /* Timer Interrupt Enable */ |
| 49 | #define RX8581_CTRL_AIE 0x08 /* Alarm Interrupt Enable */ |
| 50 | #define RX8581_CTRL_STOP 0x02 /* STOP bit */ |
| 51 | #define RX8581_CTRL_RESET 0x01 /* RESET bit */ |
| 52 | |
Andreas Werner | d643a49 | 2014-01-23 15:55:20 -0800 | [diff] [blame] | 53 | struct rx8581 { |
| 54 | struct i2c_client *client; |
| 55 | struct rtc_device *rtc; |
| 56 | s32 (*read_block_data)(const struct i2c_client *client, u8 command, |
| 57 | u8 length, u8 *values); |
| 58 | s32 (*write_block_data)(const struct i2c_client *client, u8 command, |
| 59 | u8 length, const u8 *values); |
| 60 | }; |
| 61 | |
Andreas Werner | d643a49 | 2014-01-23 15:55:20 -0800 | [diff] [blame] | 62 | static int rx8581_read_block_data(const struct i2c_client *client, u8 command, |
| 63 | u8 length, u8 *values) |
| 64 | { |
| 65 | s32 i, data; |
| 66 | |
| 67 | for (i = 0; i < length; i++) { |
| 68 | data = i2c_smbus_read_byte_data(client, command + i); |
| 69 | if (data < 0) |
| 70 | return data; |
| 71 | values[i] = data; |
| 72 | } |
| 73 | return i; |
| 74 | } |
| 75 | |
| 76 | static int rx8581_write_block_data(const struct i2c_client *client, u8 command, |
| 77 | u8 length, const u8 *values) |
| 78 | { |
| 79 | s32 i, ret; |
| 80 | |
| 81 | for (i = 0; i < length; i++) { |
| 82 | ret = i2c_smbus_write_byte_data(client, command + i, |
| 83 | values[i]); |
| 84 | if (ret < 0) |
| 85 | return ret; |
| 86 | } |
| 87 | return length; |
| 88 | } |
| 89 | |
Martyn Welch | a7fa985 | 2008-11-12 13:27:06 -0800 | [diff] [blame] | 90 | /* |
| 91 | * In the routines that deal directly with the rx8581 hardware, we use |
| 92 | * rtc_time -- month 0-11, hour 0-23, yr = calendar year-epoch. |
| 93 | */ |
Alexandre Belloni | 2d2b300 | 2018-05-17 22:33:28 +0200 | [diff] [blame] | 94 | static int rx8581_rtc_read_time(struct device *dev, struct rtc_time *tm) |
Martyn Welch | a7fa985 | 2008-11-12 13:27:06 -0800 | [diff] [blame] | 95 | { |
Alexandre Belloni | 2d2b300 | 2018-05-17 22:33:28 +0200 | [diff] [blame] | 96 | struct i2c_client *client = to_i2c_client(dev); |
Martyn Welch | a7fa985 | 2008-11-12 13:27:06 -0800 | [diff] [blame] | 97 | unsigned char date[7]; |
| 98 | int data, err; |
Andreas Werner | d643a49 | 2014-01-23 15:55:20 -0800 | [diff] [blame] | 99 | struct rx8581 *rx8581 = i2c_get_clientdata(client); |
Martyn Welch | a7fa985 | 2008-11-12 13:27:06 -0800 | [diff] [blame] | 100 | |
| 101 | /* First we ensure that the "update flag" is not set, we read the |
| 102 | * time and date then re-read the "update flag". If the update flag |
| 103 | * has been set, we know that the time has changed during the read so |
| 104 | * we repeat the whole process again. |
| 105 | */ |
| 106 | data = i2c_smbus_read_byte_data(client, RX8581_REG_FLAG); |
| 107 | if (data < 0) { |
Alexandre Belloni | ed87c6d | 2018-05-17 22:33:29 +0200 | [diff] [blame^] | 108 | dev_err(dev, "Unable to read device flags\n"); |
Martyn Welch | a7fa985 | 2008-11-12 13:27:06 -0800 | [diff] [blame] | 109 | return -EIO; |
| 110 | } |
| 111 | |
| 112 | do { |
| 113 | /* If update flag set, clear it */ |
| 114 | if (data & RX8581_FLAG_UF) { |
| 115 | err = i2c_smbus_write_byte_data(client, |
| 116 | RX8581_REG_FLAG, (data & ~RX8581_FLAG_UF)); |
| 117 | if (err != 0) { |
Alexandre Belloni | ed87c6d | 2018-05-17 22:33:29 +0200 | [diff] [blame^] | 118 | dev_err(dev, "Unable to write device flags\n"); |
Martyn Welch | a7fa985 | 2008-11-12 13:27:06 -0800 | [diff] [blame] | 119 | return -EIO; |
| 120 | } |
| 121 | } |
| 122 | |
| 123 | /* Now read time and date */ |
Andreas Werner | d643a49 | 2014-01-23 15:55:20 -0800 | [diff] [blame] | 124 | err = rx8581->read_block_data(client, RX8581_REG_SC, |
Martyn Welch | a7fa985 | 2008-11-12 13:27:06 -0800 | [diff] [blame] | 125 | 7, date); |
| 126 | if (err < 0) { |
Alexandre Belloni | ed87c6d | 2018-05-17 22:33:29 +0200 | [diff] [blame^] | 127 | dev_err(dev, "Unable to read date\n"); |
Martyn Welch | a7fa985 | 2008-11-12 13:27:06 -0800 | [diff] [blame] | 128 | return -EIO; |
| 129 | } |
| 130 | |
| 131 | /* Check flag register */ |
| 132 | data = i2c_smbus_read_byte_data(client, RX8581_REG_FLAG); |
| 133 | if (data < 0) { |
Alexandre Belloni | ed87c6d | 2018-05-17 22:33:29 +0200 | [diff] [blame^] | 134 | dev_err(dev, "Unable to read device flags\n"); |
Martyn Welch | a7fa985 | 2008-11-12 13:27:06 -0800 | [diff] [blame] | 135 | return -EIO; |
| 136 | } |
| 137 | } while (data & RX8581_FLAG_UF); |
| 138 | |
| 139 | if (data & RX8581_FLAG_VLF) |
Alexandre Belloni | ed87c6d | 2018-05-17 22:33:29 +0200 | [diff] [blame^] | 140 | dev_info(dev, |
Martyn Welch | a7fa985 | 2008-11-12 13:27:06 -0800 | [diff] [blame] | 141 | "low voltage detected, date/time is not reliable.\n"); |
| 142 | |
Alexandre Belloni | ed87c6d | 2018-05-17 22:33:29 +0200 | [diff] [blame^] | 143 | dev_dbg(dev, "%s: raw data is sec=%02x, min=%02x, hr=%02x, " |
Martyn Welch | a7fa985 | 2008-11-12 13:27:06 -0800 | [diff] [blame] | 144 | "wday=%02x, mday=%02x, mon=%02x, year=%02x\n", |
| 145 | __func__, |
| 146 | date[0], date[1], date[2], date[3], date[4], date[5], date[6]); |
| 147 | |
| 148 | tm->tm_sec = bcd2bin(date[RX8581_REG_SC] & 0x7F); |
| 149 | tm->tm_min = bcd2bin(date[RX8581_REG_MN] & 0x7F); |
| 150 | tm->tm_hour = bcd2bin(date[RX8581_REG_HR] & 0x3F); /* rtc hr 0-23 */ |
| 151 | tm->tm_wday = ilog2(date[RX8581_REG_DW] & 0x7F); |
| 152 | tm->tm_mday = bcd2bin(date[RX8581_REG_DM] & 0x3F); |
| 153 | tm->tm_mon = bcd2bin(date[RX8581_REG_MO] & 0x1F) - 1; /* rtc mn 1-12 */ |
Alexandre Belloni | c6e3c29 | 2018-05-17 22:33:27 +0200 | [diff] [blame] | 154 | tm->tm_year = bcd2bin(date[RX8581_REG_YR]) + 100; |
Martyn Welch | a7fa985 | 2008-11-12 13:27:06 -0800 | [diff] [blame] | 155 | |
Alexandre Belloni | ed87c6d | 2018-05-17 22:33:29 +0200 | [diff] [blame^] | 156 | dev_dbg(dev, "%s: tm is secs=%d, mins=%d, hours=%d, " |
Martyn Welch | a7fa985 | 2008-11-12 13:27:06 -0800 | [diff] [blame] | 157 | "mday=%d, mon=%d, year=%d, wday=%d\n", |
| 158 | __func__, |
| 159 | tm->tm_sec, tm->tm_min, tm->tm_hour, |
| 160 | tm->tm_mday, tm->tm_mon, tm->tm_year, tm->tm_wday); |
| 161 | |
Alexandre Belloni | 24f421b | 2018-02-21 00:25:18 +0100 | [diff] [blame] | 162 | return 0; |
Martyn Welch | a7fa985 | 2008-11-12 13:27:06 -0800 | [diff] [blame] | 163 | } |
| 164 | |
Alexandre Belloni | 2d2b300 | 2018-05-17 22:33:28 +0200 | [diff] [blame] | 165 | static int rx8581_rtc_set_time(struct device *dev, struct rtc_time *tm) |
Martyn Welch | a7fa985 | 2008-11-12 13:27:06 -0800 | [diff] [blame] | 166 | { |
Alexandre Belloni | 2d2b300 | 2018-05-17 22:33:28 +0200 | [diff] [blame] | 167 | struct i2c_client *client = to_i2c_client(dev); |
Martyn Welch | a7fa985 | 2008-11-12 13:27:06 -0800 | [diff] [blame] | 168 | int data, err; |
| 169 | unsigned char buf[7]; |
Andreas Werner | d643a49 | 2014-01-23 15:55:20 -0800 | [diff] [blame] | 170 | struct rx8581 *rx8581 = i2c_get_clientdata(client); |
Martyn Welch | a7fa985 | 2008-11-12 13:27:06 -0800 | [diff] [blame] | 171 | |
Alexandre Belloni | ed87c6d | 2018-05-17 22:33:29 +0200 | [diff] [blame^] | 172 | dev_dbg(dev, "%s: secs=%d, mins=%d, hours=%d, " |
Martyn Welch | a7fa985 | 2008-11-12 13:27:06 -0800 | [diff] [blame] | 173 | "mday=%d, mon=%d, year=%d, wday=%d\n", |
| 174 | __func__, |
| 175 | tm->tm_sec, tm->tm_min, tm->tm_hour, |
| 176 | tm->tm_mday, tm->tm_mon, tm->tm_year, tm->tm_wday); |
| 177 | |
| 178 | /* hours, minutes and seconds */ |
| 179 | buf[RX8581_REG_SC] = bin2bcd(tm->tm_sec); |
| 180 | buf[RX8581_REG_MN] = bin2bcd(tm->tm_min); |
| 181 | buf[RX8581_REG_HR] = bin2bcd(tm->tm_hour); |
| 182 | |
| 183 | buf[RX8581_REG_DM] = bin2bcd(tm->tm_mday); |
| 184 | |
| 185 | /* month, 1 - 12 */ |
| 186 | buf[RX8581_REG_MO] = bin2bcd(tm->tm_mon + 1); |
| 187 | |
| 188 | /* year and century */ |
Alexandre Belloni | c6e3c29 | 2018-05-17 22:33:27 +0200 | [diff] [blame] | 189 | buf[RX8581_REG_YR] = bin2bcd(tm->tm_year - 100); |
Martyn Welch | a7fa985 | 2008-11-12 13:27:06 -0800 | [diff] [blame] | 190 | buf[RX8581_REG_DW] = (0x1 << tm->tm_wday); |
| 191 | |
| 192 | /* Stop the clock */ |
| 193 | data = i2c_smbus_read_byte_data(client, RX8581_REG_CTRL); |
| 194 | if (data < 0) { |
Alexandre Belloni | ed87c6d | 2018-05-17 22:33:29 +0200 | [diff] [blame^] | 195 | dev_err(dev, "Unable to read control register\n"); |
Martyn Welch | a7fa985 | 2008-11-12 13:27:06 -0800 | [diff] [blame] | 196 | return -EIO; |
| 197 | } |
| 198 | |
Rudolf Marek | 2884fce | 2010-07-27 13:18:02 -0700 | [diff] [blame] | 199 | err = i2c_smbus_write_byte_data(client, RX8581_REG_CTRL, |
Martyn Welch | a7fa985 | 2008-11-12 13:27:06 -0800 | [diff] [blame] | 200 | (data | RX8581_CTRL_STOP)); |
| 201 | if (err < 0) { |
Alexandre Belloni | ed87c6d | 2018-05-17 22:33:29 +0200 | [diff] [blame^] | 202 | dev_err(dev, "Unable to write control register\n"); |
Martyn Welch | a7fa985 | 2008-11-12 13:27:06 -0800 | [diff] [blame] | 203 | return -EIO; |
| 204 | } |
| 205 | |
| 206 | /* write register's data */ |
Andreas Werner | d643a49 | 2014-01-23 15:55:20 -0800 | [diff] [blame] | 207 | err = rx8581->write_block_data(client, RX8581_REG_SC, 7, buf); |
Martyn Welch | a7fa985 | 2008-11-12 13:27:06 -0800 | [diff] [blame] | 208 | if (err < 0) { |
Alexandre Belloni | ed87c6d | 2018-05-17 22:33:29 +0200 | [diff] [blame^] | 209 | dev_err(dev, "Unable to write to date registers\n"); |
Martyn Welch | a7fa985 | 2008-11-12 13:27:06 -0800 | [diff] [blame] | 210 | return -EIO; |
| 211 | } |
| 212 | |
Rudolf Marek | 2884fce | 2010-07-27 13:18:02 -0700 | [diff] [blame] | 213 | /* get VLF and clear it */ |
| 214 | data = i2c_smbus_read_byte_data(client, RX8581_REG_FLAG); |
| 215 | if (data < 0) { |
Alexandre Belloni | ed87c6d | 2018-05-17 22:33:29 +0200 | [diff] [blame^] | 216 | dev_err(dev, "Unable to read flag register\n"); |
Rudolf Marek | 2884fce | 2010-07-27 13:18:02 -0700 | [diff] [blame] | 217 | return -EIO; |
| 218 | } |
| 219 | |
| 220 | err = i2c_smbus_write_byte_data(client, RX8581_REG_FLAG, |
| 221 | (data & ~(RX8581_FLAG_VLF))); |
| 222 | if (err != 0) { |
Alexandre Belloni | ed87c6d | 2018-05-17 22:33:29 +0200 | [diff] [blame^] | 223 | dev_err(dev, "Unable to write flag register\n"); |
Rudolf Marek | 2884fce | 2010-07-27 13:18:02 -0700 | [diff] [blame] | 224 | return -EIO; |
| 225 | } |
| 226 | |
Martyn Welch | a7fa985 | 2008-11-12 13:27:06 -0800 | [diff] [blame] | 227 | /* Restart the clock */ |
| 228 | data = i2c_smbus_read_byte_data(client, RX8581_REG_CTRL); |
| 229 | if (data < 0) { |
Alexandre Belloni | ed87c6d | 2018-05-17 22:33:29 +0200 | [diff] [blame^] | 230 | dev_err(dev, "Unable to read control register\n"); |
Martyn Welch | a7fa985 | 2008-11-12 13:27:06 -0800 | [diff] [blame] | 231 | return -EIO; |
| 232 | } |
| 233 | |
Rudolf Marek | 2884fce | 2010-07-27 13:18:02 -0700 | [diff] [blame] | 234 | err = i2c_smbus_write_byte_data(client, RX8581_REG_CTRL, |
| 235 | (data & ~(RX8581_CTRL_STOP))); |
Martyn Welch | a7fa985 | 2008-11-12 13:27:06 -0800 | [diff] [blame] | 236 | if (err != 0) { |
Alexandre Belloni | ed87c6d | 2018-05-17 22:33:29 +0200 | [diff] [blame^] | 237 | dev_err(dev, "Unable to write control register\n"); |
Martyn Welch | a7fa985 | 2008-11-12 13:27:06 -0800 | [diff] [blame] | 238 | return -EIO; |
| 239 | } |
| 240 | |
| 241 | return 0; |
| 242 | } |
| 243 | |
Martyn Welch | a7fa985 | 2008-11-12 13:27:06 -0800 | [diff] [blame] | 244 | static const struct rtc_class_ops rx8581_rtc_ops = { |
| 245 | .read_time = rx8581_rtc_read_time, |
| 246 | .set_time = rx8581_rtc_set_time, |
| 247 | }; |
| 248 | |
Greg Kroah-Hartman | 5a167f4 | 2012-12-21 13:09:38 -0800 | [diff] [blame] | 249 | static int rx8581_probe(struct i2c_client *client, |
| 250 | const struct i2c_device_id *id) |
Martyn Welch | a7fa985 | 2008-11-12 13:27:06 -0800 | [diff] [blame] | 251 | { |
Andreas Werner | d643a49 | 2014-01-23 15:55:20 -0800 | [diff] [blame] | 252 | struct rx8581 *rx8581; |
Martyn Welch | a7fa985 | 2008-11-12 13:27:06 -0800 | [diff] [blame] | 253 | |
| 254 | dev_dbg(&client->dev, "%s\n", __func__); |
| 255 | |
Andreas Werner | d643a49 | 2014-01-23 15:55:20 -0800 | [diff] [blame] | 256 | if (!i2c_check_functionality(client->adapter, I2C_FUNC_SMBUS_BYTE_DATA) |
| 257 | && !i2c_check_functionality(client->adapter, I2C_FUNC_SMBUS_I2C_BLOCK)) |
| 258 | return -EIO; |
| 259 | |
| 260 | rx8581 = devm_kzalloc(&client->dev, sizeof(struct rx8581), GFP_KERNEL); |
| 261 | if (!rx8581) |
| 262 | return -ENOMEM; |
| 263 | |
| 264 | i2c_set_clientdata(client, rx8581); |
| 265 | rx8581->client = client; |
| 266 | |
| 267 | if (i2c_check_functionality(client->adapter, I2C_FUNC_SMBUS_I2C_BLOCK)) { |
| 268 | rx8581->read_block_data = i2c_smbus_read_i2c_block_data; |
| 269 | rx8581->write_block_data = i2c_smbus_write_i2c_block_data; |
| 270 | } else { |
| 271 | rx8581->read_block_data = rx8581_read_block_data; |
| 272 | rx8581->write_block_data = rx8581_write_block_data; |
| 273 | } |
Martyn Welch | a7fa985 | 2008-11-12 13:27:06 -0800 | [diff] [blame] | 274 | |
Alexandre Belloni | b815716 | 2018-05-17 22:33:25 +0200 | [diff] [blame] | 275 | rx8581->rtc = devm_rtc_allocate_device(&client->dev); |
| 276 | if (IS_ERR(rx8581->rtc)) |
Andreas Werner | d643a49 | 2014-01-23 15:55:20 -0800 | [diff] [blame] | 277 | return PTR_ERR(rx8581->rtc); |
Martyn Welch | a7fa985 | 2008-11-12 13:27:06 -0800 | [diff] [blame] | 278 | |
Alexandre Belloni | b815716 | 2018-05-17 22:33:25 +0200 | [diff] [blame] | 279 | rx8581->rtc->ops = &rx8581_rtc_ops; |
Alexandre Belloni | 86c54ef | 2018-05-17 22:33:26 +0200 | [diff] [blame] | 280 | rx8581->rtc->range_min = RTC_TIMESTAMP_BEGIN_2000; |
| 281 | rx8581->rtc->range_max = RTC_TIMESTAMP_END_2099; |
Alexandre Belloni | c6e3c29 | 2018-05-17 22:33:27 +0200 | [diff] [blame] | 282 | rx8581->rtc->start_secs = 0; |
| 283 | rx8581->rtc->set_start_time = true; |
Alexandre Belloni | b815716 | 2018-05-17 22:33:25 +0200 | [diff] [blame] | 284 | |
| 285 | return rtc_register_device(rx8581->rtc); |
Martyn Welch | a7fa985 | 2008-11-12 13:27:06 -0800 | [diff] [blame] | 286 | } |
| 287 | |
Martyn Welch | a7fa985 | 2008-11-12 13:27:06 -0800 | [diff] [blame] | 288 | static const struct i2c_device_id rx8581_id[] = { |
| 289 | { "rx8581", 0 }, |
| 290 | { } |
| 291 | }; |
| 292 | MODULE_DEVICE_TABLE(i2c, rx8581_id); |
| 293 | |
Javier Martinez Canillas | ffbecfb | 2017-03-03 11:29:22 -0300 | [diff] [blame] | 294 | static const struct of_device_id rx8581_of_match[] = { |
| 295 | { .compatible = "epson,rx8581" }, |
| 296 | { } |
| 297 | }; |
| 298 | MODULE_DEVICE_TABLE(of, rx8581_of_match); |
| 299 | |
Martyn Welch | a7fa985 | 2008-11-12 13:27:06 -0800 | [diff] [blame] | 300 | static struct i2c_driver rx8581_driver = { |
| 301 | .driver = { |
| 302 | .name = "rtc-rx8581", |
Javier Martinez Canillas | ffbecfb | 2017-03-03 11:29:22 -0300 | [diff] [blame] | 303 | .of_match_table = of_match_ptr(rx8581_of_match), |
Martyn Welch | a7fa985 | 2008-11-12 13:27:06 -0800 | [diff] [blame] | 304 | }, |
| 305 | .probe = rx8581_probe, |
Martyn Welch | a7fa985 | 2008-11-12 13:27:06 -0800 | [diff] [blame] | 306 | .id_table = rx8581_id, |
| 307 | }; |
| 308 | |
Axel Lin | 0abc920 | 2012-03-23 15:02:31 -0700 | [diff] [blame] | 309 | module_i2c_driver(rx8581_driver); |
Martyn Welch | a7fa985 | 2008-11-12 13:27:06 -0800 | [diff] [blame] | 310 | |
Martyn Welch | 9756c4d | 2010-04-14 09:24:16 +0100 | [diff] [blame] | 311 | MODULE_AUTHOR("Martyn Welch <martyn.welch@ge.com>"); |
Martyn Welch | a7fa985 | 2008-11-12 13:27:06 -0800 | [diff] [blame] | 312 | MODULE_DESCRIPTION("Epson RX-8581 RTC driver"); |
| 313 | MODULE_LICENSE("GPL"); |