blob: 2845653f394a5f32776b4391d093b9370c93b802 [file] [log] [blame]
Rabin Vincentd88b25b2010-05-10 23:43:47 +02001/*
2 * Copyright (C) ST-Ericsson SA 2010
3 *
4 * License Terms: GNU General Public License, version 2
5 * Author: Hanumath Prasad <hanumath.prasad@stericsson.com> for ST-Ericsson
6 * Author: Rabin Vincent <rabin.vincent@stericsson.com> for ST-Ericsson
7 */
8
9#include <linux/module.h>
10#include <linux/init.h>
11#include <linux/platform_device.h>
12#include <linux/slab.h>
Linus Walleijcee1b402016-04-05 15:09:09 +020013#include <linux/gpio/driver.h>
Lee Jones3113e672012-09-07 12:14:59 +010014#include <linux/of.h>
Rabin Vincentd88b25b2010-05-10 23:43:47 +020015#include <linux/interrupt.h>
Sundar Iyerc6eda6c2010-12-13 09:33:12 +053016#include <linux/mfd/tc3589x.h>
Linus Walleijcee1b402016-04-05 15:09:09 +020017#include <linux/bitops.h>
Rabin Vincentd88b25b2010-05-10 23:43:47 +020018
19/*
20 * These registers are modified under the irq bus lock and cached to avoid
21 * unnecessary writes in bus_sync_unlock.
22 */
23enum { REG_IBE, REG_IEV, REG_IS, REG_IE };
24
25#define CACHE_NR_REGS 4
26#define CACHE_NR_BANKS 3
27
Sundar Iyer20406eb2010-12-13 09:33:14 +053028struct tc3589x_gpio {
Rabin Vincentd88b25b2010-05-10 23:43:47 +020029 struct gpio_chip chip;
Sundar Iyer20406eb2010-12-13 09:33:14 +053030 struct tc3589x *tc3589x;
Rabin Vincentd88b25b2010-05-10 23:43:47 +020031 struct device *dev;
32 struct mutex irq_lock;
Rabin Vincentd88b25b2010-05-10 23:43:47 +020033 /* Caches of interrupt control registers for bus_lock */
34 u8 regs[CACHE_NR_REGS][CACHE_NR_BANKS];
35 u8 oldregs[CACHE_NR_REGS][CACHE_NR_BANKS];
36};
37
Sundar Iyer20406eb2010-12-13 09:33:14 +053038static int tc3589x_gpio_get(struct gpio_chip *chip, unsigned offset)
Rabin Vincentd88b25b2010-05-10 23:43:47 +020039{
Linus Walleijb0d38472015-12-03 15:37:29 +010040 struct tc3589x_gpio *tc3589x_gpio = gpiochip_get_data(chip);
Sundar Iyer20406eb2010-12-13 09:33:14 +053041 struct tc3589x *tc3589x = tc3589x_gpio->tc3589x;
42 u8 reg = TC3589x_GPIODATA0 + (offset / 8) * 2;
Linus Walleijcee1b402016-04-05 15:09:09 +020043 u8 mask = BIT(offset % 8);
Rabin Vincentd88b25b2010-05-10 23:43:47 +020044 int ret;
45
Sundar Iyer20406eb2010-12-13 09:33:14 +053046 ret = tc3589x_reg_read(tc3589x, reg);
Rabin Vincentd88b25b2010-05-10 23:43:47 +020047 if (ret < 0)
48 return ret;
49
Linus Walleij27ca2262015-12-21 11:42:30 +010050 return !!(ret & mask);
Rabin Vincentd88b25b2010-05-10 23:43:47 +020051}
52
Sundar Iyer20406eb2010-12-13 09:33:14 +053053static void tc3589x_gpio_set(struct gpio_chip *chip, unsigned offset, int val)
Rabin Vincentd88b25b2010-05-10 23:43:47 +020054{
Linus Walleijb0d38472015-12-03 15:37:29 +010055 struct tc3589x_gpio *tc3589x_gpio = gpiochip_get_data(chip);
Sundar Iyer20406eb2010-12-13 09:33:14 +053056 struct tc3589x *tc3589x = tc3589x_gpio->tc3589x;
57 u8 reg = TC3589x_GPIODATA0 + (offset / 8) * 2;
Rabin Vincentd88b25b2010-05-10 23:43:47 +020058 unsigned pos = offset % 8;
Linus Walleijcee1b402016-04-05 15:09:09 +020059 u8 data[] = {val ? BIT(pos) : 0, BIT(pos)};
Rabin Vincentd88b25b2010-05-10 23:43:47 +020060
Sundar Iyer20406eb2010-12-13 09:33:14 +053061 tc3589x_block_write(tc3589x, reg, ARRAY_SIZE(data), data);
Rabin Vincentd88b25b2010-05-10 23:43:47 +020062}
63
Sundar Iyer20406eb2010-12-13 09:33:14 +053064static int tc3589x_gpio_direction_output(struct gpio_chip *chip,
Rabin Vincentd88b25b2010-05-10 23:43:47 +020065 unsigned offset, int val)
66{
Linus Walleijb0d38472015-12-03 15:37:29 +010067 struct tc3589x_gpio *tc3589x_gpio = gpiochip_get_data(chip);
Sundar Iyer20406eb2010-12-13 09:33:14 +053068 struct tc3589x *tc3589x = tc3589x_gpio->tc3589x;
69 u8 reg = TC3589x_GPIODIR0 + offset / 8;
Rabin Vincentd88b25b2010-05-10 23:43:47 +020070 unsigned pos = offset % 8;
71
Sundar Iyer20406eb2010-12-13 09:33:14 +053072 tc3589x_gpio_set(chip, offset, val);
Rabin Vincentd88b25b2010-05-10 23:43:47 +020073
Linus Walleijcee1b402016-04-05 15:09:09 +020074 return tc3589x_set_bits(tc3589x, reg, BIT(pos), BIT(pos));
Rabin Vincentd88b25b2010-05-10 23:43:47 +020075}
76
Sundar Iyer20406eb2010-12-13 09:33:14 +053077static int tc3589x_gpio_direction_input(struct gpio_chip *chip,
Rabin Vincentd88b25b2010-05-10 23:43:47 +020078 unsigned offset)
79{
Linus Walleijb0d38472015-12-03 15:37:29 +010080 struct tc3589x_gpio *tc3589x_gpio = gpiochip_get_data(chip);
Sundar Iyer20406eb2010-12-13 09:33:14 +053081 struct tc3589x *tc3589x = tc3589x_gpio->tc3589x;
82 u8 reg = TC3589x_GPIODIR0 + offset / 8;
Rabin Vincentd88b25b2010-05-10 23:43:47 +020083 unsigned pos = offset % 8;
84
Linus Walleijcee1b402016-04-05 15:09:09 +020085 return tc3589x_set_bits(tc3589x, reg, BIT(pos), 0);
Rabin Vincentd88b25b2010-05-10 23:43:47 +020086}
87
Rabin Vincentd88b25b2010-05-10 23:43:47 +020088static struct gpio_chip template_chip = {
Sundar Iyer20406eb2010-12-13 09:33:14 +053089 .label = "tc3589x",
Rabin Vincentd88b25b2010-05-10 23:43:47 +020090 .owner = THIS_MODULE,
Sundar Iyer20406eb2010-12-13 09:33:14 +053091 .direction_input = tc3589x_gpio_direction_input,
92 .get = tc3589x_gpio_get,
93 .direction_output = tc3589x_gpio_direction_output,
94 .set = tc3589x_gpio_set,
Linus Walleij9fb1f392013-12-04 14:42:46 +010095 .can_sleep = true,
Rabin Vincentd88b25b2010-05-10 23:43:47 +020096};
97
Lennert Buytenhek33fcc1b2011-01-12 17:00:19 -080098static int tc3589x_gpio_irq_set_type(struct irq_data *d, unsigned int type)
Rabin Vincentd88b25b2010-05-10 23:43:47 +020099{
Linus Walleijcf42f1c2014-04-09 13:38:33 +0200100 struct gpio_chip *gc = irq_data_get_irq_chip_data(d);
Linus Walleijb0d38472015-12-03 15:37:29 +0100101 struct tc3589x_gpio *tc3589x_gpio = gpiochip_get_data(gc);
Lee Jonesefe4c942012-09-07 12:14:58 +0100102 int offset = d->hwirq;
Rabin Vincentd88b25b2010-05-10 23:43:47 +0200103 int regoffset = offset / 8;
Linus Walleijcee1b402016-04-05 15:09:09 +0200104 int mask = BIT(offset % 8);
Rabin Vincentd88b25b2010-05-10 23:43:47 +0200105
106 if (type == IRQ_TYPE_EDGE_BOTH) {
Sundar Iyer20406eb2010-12-13 09:33:14 +0530107 tc3589x_gpio->regs[REG_IBE][regoffset] |= mask;
Rabin Vincentd88b25b2010-05-10 23:43:47 +0200108 return 0;
109 }
110
Sundar Iyer20406eb2010-12-13 09:33:14 +0530111 tc3589x_gpio->regs[REG_IBE][regoffset] &= ~mask;
Rabin Vincentd88b25b2010-05-10 23:43:47 +0200112
113 if (type == IRQ_TYPE_LEVEL_LOW || type == IRQ_TYPE_LEVEL_HIGH)
Sundar Iyer20406eb2010-12-13 09:33:14 +0530114 tc3589x_gpio->regs[REG_IS][regoffset] |= mask;
Rabin Vincentd88b25b2010-05-10 23:43:47 +0200115 else
Sundar Iyer20406eb2010-12-13 09:33:14 +0530116 tc3589x_gpio->regs[REG_IS][regoffset] &= ~mask;
Rabin Vincentd88b25b2010-05-10 23:43:47 +0200117
118 if (type == IRQ_TYPE_EDGE_RISING || type == IRQ_TYPE_LEVEL_HIGH)
Sundar Iyer20406eb2010-12-13 09:33:14 +0530119 tc3589x_gpio->regs[REG_IEV][regoffset] |= mask;
Rabin Vincentd88b25b2010-05-10 23:43:47 +0200120 else
Sundar Iyer20406eb2010-12-13 09:33:14 +0530121 tc3589x_gpio->regs[REG_IEV][regoffset] &= ~mask;
Rabin Vincentd88b25b2010-05-10 23:43:47 +0200122
123 return 0;
124}
125
Lennert Buytenhek33fcc1b2011-01-12 17:00:19 -0800126static void tc3589x_gpio_irq_lock(struct irq_data *d)
Rabin Vincentd88b25b2010-05-10 23:43:47 +0200127{
Linus Walleijcf42f1c2014-04-09 13:38:33 +0200128 struct gpio_chip *gc = irq_data_get_irq_chip_data(d);
Linus Walleijb0d38472015-12-03 15:37:29 +0100129 struct tc3589x_gpio *tc3589x_gpio = gpiochip_get_data(gc);
Rabin Vincentd88b25b2010-05-10 23:43:47 +0200130
Sundar Iyer20406eb2010-12-13 09:33:14 +0530131 mutex_lock(&tc3589x_gpio->irq_lock);
Rabin Vincentd88b25b2010-05-10 23:43:47 +0200132}
133
Lennert Buytenhek33fcc1b2011-01-12 17:00:19 -0800134static void tc3589x_gpio_irq_sync_unlock(struct irq_data *d)
Rabin Vincentd88b25b2010-05-10 23:43:47 +0200135{
Linus Walleijcf42f1c2014-04-09 13:38:33 +0200136 struct gpio_chip *gc = irq_data_get_irq_chip_data(d);
Linus Walleijb0d38472015-12-03 15:37:29 +0100137 struct tc3589x_gpio *tc3589x_gpio = gpiochip_get_data(gc);
Sundar Iyer20406eb2010-12-13 09:33:14 +0530138 struct tc3589x *tc3589x = tc3589x_gpio->tc3589x;
Rabin Vincentd88b25b2010-05-10 23:43:47 +0200139 static const u8 regmap[] = {
Sundar Iyer20406eb2010-12-13 09:33:14 +0530140 [REG_IBE] = TC3589x_GPIOIBE0,
141 [REG_IEV] = TC3589x_GPIOIEV0,
142 [REG_IS] = TC3589x_GPIOIS0,
143 [REG_IE] = TC3589x_GPIOIE0,
Rabin Vincentd88b25b2010-05-10 23:43:47 +0200144 };
145 int i, j;
146
147 for (i = 0; i < CACHE_NR_REGS; i++) {
148 for (j = 0; j < CACHE_NR_BANKS; j++) {
Sundar Iyer20406eb2010-12-13 09:33:14 +0530149 u8 old = tc3589x_gpio->oldregs[i][j];
150 u8 new = tc3589x_gpio->regs[i][j];
Rabin Vincentd88b25b2010-05-10 23:43:47 +0200151
152 if (new == old)
153 continue;
154
Sundar Iyer20406eb2010-12-13 09:33:14 +0530155 tc3589x_gpio->oldregs[i][j] = new;
156 tc3589x_reg_write(tc3589x, regmap[i] + j * 8, new);
Rabin Vincentd88b25b2010-05-10 23:43:47 +0200157 }
158 }
159
Sundar Iyer20406eb2010-12-13 09:33:14 +0530160 mutex_unlock(&tc3589x_gpio->irq_lock);
Rabin Vincentd88b25b2010-05-10 23:43:47 +0200161}
162
Lennert Buytenhek33fcc1b2011-01-12 17:00:19 -0800163static void tc3589x_gpio_irq_mask(struct irq_data *d)
Rabin Vincentd88b25b2010-05-10 23:43:47 +0200164{
Linus Walleijcf42f1c2014-04-09 13:38:33 +0200165 struct gpio_chip *gc = irq_data_get_irq_chip_data(d);
Linus Walleijb0d38472015-12-03 15:37:29 +0100166 struct tc3589x_gpio *tc3589x_gpio = gpiochip_get_data(gc);
Lee Jonesefe4c942012-09-07 12:14:58 +0100167 int offset = d->hwirq;
Rabin Vincentd88b25b2010-05-10 23:43:47 +0200168 int regoffset = offset / 8;
Linus Walleijcee1b402016-04-05 15:09:09 +0200169 int mask = BIT(offset % 8);
Rabin Vincentd88b25b2010-05-10 23:43:47 +0200170
Sundar Iyer20406eb2010-12-13 09:33:14 +0530171 tc3589x_gpio->regs[REG_IE][regoffset] &= ~mask;
Rabin Vincentd88b25b2010-05-10 23:43:47 +0200172}
173
Lennert Buytenhek33fcc1b2011-01-12 17:00:19 -0800174static void tc3589x_gpio_irq_unmask(struct irq_data *d)
Rabin Vincentd88b25b2010-05-10 23:43:47 +0200175{
Linus Walleijcf42f1c2014-04-09 13:38:33 +0200176 struct gpio_chip *gc = irq_data_get_irq_chip_data(d);
Linus Walleijb0d38472015-12-03 15:37:29 +0100177 struct tc3589x_gpio *tc3589x_gpio = gpiochip_get_data(gc);
Lee Jonesefe4c942012-09-07 12:14:58 +0100178 int offset = d->hwirq;
Rabin Vincentd88b25b2010-05-10 23:43:47 +0200179 int regoffset = offset / 8;
Linus Walleijcee1b402016-04-05 15:09:09 +0200180 int mask = BIT(offset % 8);
Rabin Vincentd88b25b2010-05-10 23:43:47 +0200181
Sundar Iyer20406eb2010-12-13 09:33:14 +0530182 tc3589x_gpio->regs[REG_IE][regoffset] |= mask;
Rabin Vincentd88b25b2010-05-10 23:43:47 +0200183}
184
Sundar Iyer20406eb2010-12-13 09:33:14 +0530185static struct irq_chip tc3589x_gpio_irq_chip = {
186 .name = "tc3589x-gpio",
Lennert Buytenhek33fcc1b2011-01-12 17:00:19 -0800187 .irq_bus_lock = tc3589x_gpio_irq_lock,
188 .irq_bus_sync_unlock = tc3589x_gpio_irq_sync_unlock,
189 .irq_mask = tc3589x_gpio_irq_mask,
190 .irq_unmask = tc3589x_gpio_irq_unmask,
191 .irq_set_type = tc3589x_gpio_irq_set_type,
Rabin Vincentd88b25b2010-05-10 23:43:47 +0200192};
193
Sundar Iyer20406eb2010-12-13 09:33:14 +0530194static irqreturn_t tc3589x_gpio_irq(int irq, void *dev)
Rabin Vincentd88b25b2010-05-10 23:43:47 +0200195{
Sundar Iyer20406eb2010-12-13 09:33:14 +0530196 struct tc3589x_gpio *tc3589x_gpio = dev;
197 struct tc3589x *tc3589x = tc3589x_gpio->tc3589x;
Rabin Vincentd88b25b2010-05-10 23:43:47 +0200198 u8 status[CACHE_NR_BANKS];
199 int ret;
200 int i;
201
Sundar Iyer20406eb2010-12-13 09:33:14 +0530202 ret = tc3589x_block_read(tc3589x, TC3589x_GPIOMIS0,
Rabin Vincentd88b25b2010-05-10 23:43:47 +0200203 ARRAY_SIZE(status), status);
204 if (ret < 0)
205 return IRQ_NONE;
206
207 for (i = 0; i < ARRAY_SIZE(status); i++) {
208 unsigned int stat = status[i];
209 if (!stat)
210 continue;
211
212 while (stat) {
213 int bit = __ffs(stat);
214 int line = i * 8 + bit;
Linus Walleijcf42f1c2014-04-09 13:38:33 +0200215 int irq = irq_find_mapping(tc3589x_gpio->chip.irqdomain,
216 line);
Rabin Vincentd88b25b2010-05-10 23:43:47 +0200217
Linus Walleije3003762013-10-11 19:06:12 +0200218 handle_nested_irq(irq);
Rabin Vincentd88b25b2010-05-10 23:43:47 +0200219 stat &= ~(1 << bit);
220 }
221
Sundar Iyer20406eb2010-12-13 09:33:14 +0530222 tc3589x_reg_write(tc3589x, TC3589x_GPIOIC0 + i, status[i]);
Rabin Vincentd88b25b2010-05-10 23:43:47 +0200223 }
224
225 return IRQ_HANDLED;
226}
227
Bill Pemberton38363092012-11-19 13:22:34 -0500228static int tc3589x_gpio_probe(struct platform_device *pdev)
Rabin Vincentd88b25b2010-05-10 23:43:47 +0200229{
Sundar Iyer20406eb2010-12-13 09:33:14 +0530230 struct tc3589x *tc3589x = dev_get_drvdata(pdev->dev.parent);
Lee Jones3113e672012-09-07 12:14:59 +0100231 struct device_node *np = pdev->dev.of_node;
Sundar Iyer20406eb2010-12-13 09:33:14 +0530232 struct tc3589x_gpio *tc3589x_gpio;
Rabin Vincentd88b25b2010-05-10 23:43:47 +0200233 int ret;
234 int irq;
235
Linus Walleij53e41f52014-12-15 10:39:47 +0100236 if (!np) {
237 dev_err(&pdev->dev, "No Device Tree node found\n");
Lee Jones3113e672012-09-07 12:14:59 +0100238 return -EINVAL;
239 }
Rabin Vincentd88b25b2010-05-10 23:43:47 +0200240
241 irq = platform_get_irq(pdev, 0);
242 if (irq < 0)
243 return irq;
244
Linus Walleij033f2752014-04-09 12:38:56 +0200245 tc3589x_gpio = devm_kzalloc(&pdev->dev, sizeof(struct tc3589x_gpio),
246 GFP_KERNEL);
Sundar Iyer20406eb2010-12-13 09:33:14 +0530247 if (!tc3589x_gpio)
Rabin Vincentd88b25b2010-05-10 23:43:47 +0200248 return -ENOMEM;
249
Sundar Iyer20406eb2010-12-13 09:33:14 +0530250 mutex_init(&tc3589x_gpio->irq_lock);
Rabin Vincentd88b25b2010-05-10 23:43:47 +0200251
Sundar Iyer20406eb2010-12-13 09:33:14 +0530252 tc3589x_gpio->dev = &pdev->dev;
253 tc3589x_gpio->tc3589x = tc3589x;
Rabin Vincentd88b25b2010-05-10 23:43:47 +0200254
Sundar Iyer20406eb2010-12-13 09:33:14 +0530255 tc3589x_gpio->chip = template_chip;
256 tc3589x_gpio->chip.ngpio = tc3589x->num_gpio;
Linus Walleij58383c782015-11-04 09:56:26 +0100257 tc3589x_gpio->chip.parent = &pdev->dev;
Linus Walleij90f2d0f2014-10-28 11:06:56 +0100258 tc3589x_gpio->chip.base = -1;
Laurent Navete90c6362013-03-20 13:16:02 +0100259 tc3589x_gpio->chip.of_node = np;
Rabin Vincentd88b25b2010-05-10 23:43:47 +0200260
261 /* Bring the GPIO module out of reset */
Sundar Iyer20406eb2010-12-13 09:33:14 +0530262 ret = tc3589x_set_bits(tc3589x, TC3589x_RSTCTRL,
263 TC3589x_RSTCTRL_GPIRST, 0);
Rabin Vincentd88b25b2010-05-10 23:43:47 +0200264 if (ret < 0)
Linus Walleij033f2752014-04-09 12:38:56 +0200265 return ret;
Rabin Vincentd88b25b2010-05-10 23:43:47 +0200266
Linus Walleij033f2752014-04-09 12:38:56 +0200267 ret = devm_request_threaded_irq(&pdev->dev,
268 irq, NULL, tc3589x_gpio_irq,
269 IRQF_ONESHOT, "tc3589x-gpio",
270 tc3589x_gpio);
Rabin Vincentd88b25b2010-05-10 23:43:47 +0200271 if (ret) {
272 dev_err(&pdev->dev, "unable to get irq: %d\n", ret);
Linus Walleij033f2752014-04-09 12:38:56 +0200273 return ret;
Rabin Vincentd88b25b2010-05-10 23:43:47 +0200274 }
275
Laxman Dewanganf3378b62016-02-22 17:43:28 +0530276 ret = devm_gpiochip_add_data(&pdev->dev, &tc3589x_gpio->chip,
277 tc3589x_gpio);
Rabin Vincentd88b25b2010-05-10 23:43:47 +0200278 if (ret) {
279 dev_err(&pdev->dev, "unable to add gpiochip: %d\n", ret);
Linus Walleij033f2752014-04-09 12:38:56 +0200280 return ret;
Rabin Vincentd88b25b2010-05-10 23:43:47 +0200281 }
282
Linus Walleijcf42f1c2014-04-09 13:38:33 +0200283 ret = gpiochip_irqchip_add(&tc3589x_gpio->chip,
284 &tc3589x_gpio_irq_chip,
285 0,
286 handle_simple_irq,
287 IRQ_TYPE_NONE);
288 if (ret) {
289 dev_err(&pdev->dev,
290 "could not connect irqchip to gpiochip\n");
291 return ret;
292 }
293
Linus Walleij3f97d5fc2014-09-26 14:19:52 +0200294 gpiochip_set_chained_irqchip(&tc3589x_gpio->chip,
295 &tc3589x_gpio_irq_chip,
296 irq,
297 NULL);
298
Sundar Iyer20406eb2010-12-13 09:33:14 +0530299 platform_set_drvdata(pdev, tc3589x_gpio);
Rabin Vincentd88b25b2010-05-10 23:43:47 +0200300
301 return 0;
Rabin Vincentd88b25b2010-05-10 23:43:47 +0200302}
303
Sundar Iyer20406eb2010-12-13 09:33:14 +0530304static struct platform_driver tc3589x_gpio_driver = {
305 .driver.name = "tc3589x-gpio",
Rabin Vincentd88b25b2010-05-10 23:43:47 +0200306 .driver.owner = THIS_MODULE,
Sundar Iyer20406eb2010-12-13 09:33:14 +0530307 .probe = tc3589x_gpio_probe,
Rabin Vincentd88b25b2010-05-10 23:43:47 +0200308};
309
Sundar Iyer20406eb2010-12-13 09:33:14 +0530310static int __init tc3589x_gpio_init(void)
Rabin Vincentd88b25b2010-05-10 23:43:47 +0200311{
Sundar Iyer20406eb2010-12-13 09:33:14 +0530312 return platform_driver_register(&tc3589x_gpio_driver);
Rabin Vincentd88b25b2010-05-10 23:43:47 +0200313}
Sundar Iyer20406eb2010-12-13 09:33:14 +0530314subsys_initcall(tc3589x_gpio_init);
Rabin Vincentd88b25b2010-05-10 23:43:47 +0200315
Sundar Iyer20406eb2010-12-13 09:33:14 +0530316static void __exit tc3589x_gpio_exit(void)
Rabin Vincentd88b25b2010-05-10 23:43:47 +0200317{
Sundar Iyer20406eb2010-12-13 09:33:14 +0530318 platform_driver_unregister(&tc3589x_gpio_driver);
Rabin Vincentd88b25b2010-05-10 23:43:47 +0200319}
Sundar Iyer20406eb2010-12-13 09:33:14 +0530320module_exit(tc3589x_gpio_exit);
Rabin Vincentd88b25b2010-05-10 23:43:47 +0200321
322MODULE_LICENSE("GPL v2");
Sundar Iyer20406eb2010-12-13 09:33:14 +0530323MODULE_DESCRIPTION("TC3589x GPIO driver");
Rabin Vincentd88b25b2010-05-10 23:43:47 +0200324MODULE_AUTHOR("Hanumath Prasad, Rabin Vincent");