]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blob - drivers/input/touchscreen/ads7846.c
ads7846: fix endianness on coordinate values
[linux-2.6-omap-h63xx.git] / drivers / input / touchscreen / ads7846.c
1 /*
2  * ADS7846 based touchscreen and sensor driver
3  *
4  * Copyright (c) 2005 David Brownell
5  *
6  * Using code from:
7  *  - corgi_ts.c
8  *      Copyright (C) 2004-2005 Richard Purdie
9  *  - omap_ts.[hc], ads7846.h, ts_osk.c
10  *      Copyright (C) 2002 MontaVista Software
11  *      Copyright (C) 2004 Texas Instruments
12  *      Copyright (C) 2005 Dirk Behme
13  *
14  *  This program is free software; you can redistribute it and/or modify
15  *  it under the terms of the GNU General Public License version 2 as
16  *  published by the Free Software Foundation.
17  */
18 #include <linux/device.h>
19 #include <linux/init.h>
20 #include <linux/delay.h>
21 #include <linux/input.h>
22 #include <linux/interrupt.h>
23 #include <linux/slab.h>
24 #include <linux/spi/spi.h>
25 #include <linux/spi/ads7846.h>
26
27 #ifdef  CONFIG_ARM
28 #include <asm/mach-types.h>
29 #ifdef  CONFIG_ARCH_OMAP
30 #include <asm/arch/gpio.h>
31 #endif
32 #endif
33
34
35 /*
36  * This code has been lightly tested on an ads7846.
37  * Support for ads7843 and ads7845 has only been stubbed in.
38  *
39  * Not yet done:  investigate the values reported.  Are x/y/pressure
40  * event values sane enough for X11?  How accurate are the temperature
41  * and voltage readings?  (System-specific calibration should support
42  * accuracy of 0.3 degrees C; otherwise it's 2.0 degrees.)
43  *
44  * app note sbaa036 talks in more detail about accurate sampling...
45  * that ought to help in situations like LCDs inducing noise (which
46  * can also be helped by using synch signals) and more generally.
47  */
48
49 #define TS_POLL_PERIOD  msecs_to_jiffies(10)
50
51 /* this driver doesn't aim at the peak continuous sample rate */
52 #define SAMPLE_BITS     (8 /*cmd*/ + 16 /*sample*/ + 2 /* before, after */)
53
54 struct ts_event {
55         /* For portability, we can't read 12 bit values using SPI (which
56          * would make the controller deliver them as native byteorder u16
57          * with msbs zeroed).  Instead, we read them as two 8-bit values,
58          * which need byteswapping then range adjustment.
59          */
60         __be16 x;
61         __be16 y;
62         __be16 z1, z2;
63 };
64
65 struct ads7846 {
66         struct input_dev        *input;
67         char                    phys[32];
68
69         struct spi_device       *spi;
70         u16                     model;
71         u16                     vref_delay_usecs;
72         u16                     x_plate_ohms;
73
74         u8                      read_x, read_y, read_z1, read_z2, pwrdown;
75         u16                     dummy;          /* for the pwrdown read */
76         struct ts_event         tc;
77
78         struct spi_transfer     xfer[10];
79         struct spi_message      msg;
80
81         spinlock_t              lock;
82         struct timer_list       timer;          /* P: lock */
83         unsigned                pendown:1;      /* P: lock */
84         unsigned                pending:1;      /* P: lock */
85 // FIXME remove "irq_disabled"
86         unsigned                irq_disabled:1; /* P: lock */
87 };
88
89 /* leave chip selected when we're done, for quicker re-select? */
90 #if     0
91 #define CS_CHANGE(xfer) ((xfer).cs_change = 1)
92 #else
93 #define CS_CHANGE(xfer) ((xfer).cs_change = 0)
94 #endif
95
96 /*--------------------------------------------------------------------------*/
97
98 /* The ADS7846 has touchscreen and other sensors.
99  * Earlier ads784x chips are somewhat compatible.
100  */
101 #define ADS_START               (1 << 7)
102 #define ADS_A2A1A0_d_y          (1 << 4)        /* differential */
103 #define ADS_A2A1A0_d_z1         (3 << 4)        /* differential */
104 #define ADS_A2A1A0_d_z2         (4 << 4)        /* differential */
105 #define ADS_A2A1A0_d_x          (5 << 4)        /* differential */
106 #define ADS_A2A1A0_temp0        (0 << 4)        /* non-differential */
107 #define ADS_A2A1A0_vbatt        (2 << 4)        /* non-differential */
108 #define ADS_A2A1A0_vaux         (6 << 4)        /* non-differential */
109 #define ADS_A2A1A0_temp1        (7 << 4)        /* non-differential */
110 #define ADS_8_BIT               (1 << 3)
111 #define ADS_12_BIT              (0 << 3)
112 #define ADS_SER                 (1 << 2)        /* non-differential */
113 #define ADS_DFR                 (0 << 2)        /* differential */
114 #define ADS_PD10_PDOWN          (0 << 0)        /* lowpower mode + penirq */
115 #define ADS_PD10_ADC_ON         (1 << 0)        /* ADC on */
116 #define ADS_PD10_REF_ON         (2 << 0)        /* vREF on + penirq */
117 #define ADS_PD10_ALL_ON         (3 << 0)        /* ADC + vREF on */
118
119 #define MAX_12BIT       ((1<<12)-1)
120
121 /* leave ADC powered up (disables penirq) between differential samples */
122 #define READ_12BIT_DFR(x) (ADS_START | ADS_A2A1A0_d_ ## x \
123         | ADS_12_BIT | ADS_DFR)
124
125 #define READ_Y  (READ_12BIT_DFR(y)  | ADS_PD10_ADC_ON)
126 #define READ_Z1 (READ_12BIT_DFR(z1) | ADS_PD10_ADC_ON)
127 #define READ_Z2 (READ_12BIT_DFR(z2) | ADS_PD10_ADC_ON)
128
129 #define READ_X  (READ_12BIT_DFR(x)  | ADS_PD10_ADC_ON)
130 #define PWRDOWN (READ_12BIT_DFR(y)  | ADS_PD10_PDOWN)   /* LAST */
131
132 /* single-ended samples need to first power up reference voltage;
133  * we leave both ADC and VREF powered
134  */
135 #define READ_12BIT_SER(x) (ADS_START | ADS_A2A1A0_ ## x \
136         | ADS_12_BIT | ADS_SER)
137
138 #define REF_ON  (READ_12BIT_DFR(x) | ADS_PD10_ALL_ON)
139 #define REF_OFF (READ_12BIT_DFR(y) | ADS_PD10_PDOWN)
140
141 /*--------------------------------------------------------------------------*/
142
143 /*
144  * Non-touchscreen sensors only use single-ended conversions.
145  */
146
147 struct ser_req {
148         u8                      ref_on;
149         u8                      command;
150         u8                      ref_off;
151         u16                     scratch;
152         __be16                  sample;
153         struct spi_message      msg;
154         struct spi_transfer     xfer[6];
155 };
156
157 static int ads7846_read12_ser(struct device *dev, unsigned command)
158 {
159         struct spi_device       *spi = to_spi_device(dev);
160         struct ads7846          *ts = dev_get_drvdata(dev);
161         struct ser_req          *req = kzalloc(sizeof *req, SLAB_KERNEL);
162         int                     status;
163         int                     sample;
164         int                     i;
165
166         if (!req)
167                 return -ENOMEM;
168
169         spi_message_init(&req->msg);
170
171         /* activate reference, so it has time to settle; */
172         req->ref_on = REF_ON;
173         req->xfer[0].tx_buf = &req->ref_on;
174         req->xfer[0].len = 1;
175         req->xfer[1].rx_buf = &req->scratch;
176         req->xfer[1].len = 2;
177
178         /*
179          * for external VREF, 0 usec (and assume it's always on);
180          * for 1uF, use 800 usec;
181          * no cap, 100 usec.
182          */
183         req->xfer[1].delay_usecs = ts->vref_delay_usecs;
184
185         /* take sample */
186         req->command = (u8) command;
187         req->xfer[2].tx_buf = &req->command;
188         req->xfer[2].len = 1;
189         req->xfer[3].rx_buf = &req->sample;
190         req->xfer[3].len = 2;
191
192         /* REVISIT:  take a few more samples, and compare ... */
193
194         /* turn off reference */
195         req->ref_off = REF_OFF;
196         req->xfer[4].tx_buf = &req->ref_off;
197         req->xfer[4].len = 1;
198         req->xfer[5].rx_buf = &req->scratch;
199         req->xfer[5].len = 2;
200
201         CS_CHANGE(req->xfer[5]);
202
203         /* group all the transfers together, so we can't interfere with
204          * reading touchscreen state; disable penirq while sampling
205          */
206         for (i = 0; i < 6; i++)
207                 spi_message_add_tail(&req->xfer[i], &req->msg);
208
209         disable_irq(spi->irq);
210         status = spi_sync(spi, &req->msg);
211         enable_irq(spi->irq);
212
213         if (req->msg.status)
214                 status = req->msg.status;
215         sample = be16_to_cpu(req->sample);
216         sample = sample >> 4;
217         kfree(req);
218
219         return status ? status : sample;
220 }
221
222 #define SHOW(name) static ssize_t \
223 name ## _show(struct device *dev, struct device_attribute *attr, char *buf) \
224 { \
225         ssize_t v = ads7846_read12_ser(dev, \
226                         READ_12BIT_SER(name) | ADS_PD10_ALL_ON); \
227         if (v < 0) \
228                 return v; \
229         return sprintf(buf, "%u\n", (unsigned) v); \
230 } \
231 static DEVICE_ATTR(name, S_IRUGO, name ## _show, NULL);
232
233 SHOW(temp0)
234 SHOW(temp1)
235 SHOW(vaux)
236 SHOW(vbatt)
237
238 /*--------------------------------------------------------------------------*/
239
240 /*
241  * PENIRQ only kicks the timer.  The timer only reissues the SPI transfer,
242  * to retrieve touchscreen status.
243  *
244  * The SPI transfer completion callback does the real work.  It reports
245  * touchscreen events and reactivates the timer (or IRQ) as appropriate.
246  */
247
248 static void ads7846_rx(void *ads)
249 {
250         struct ads7846          *ts = ads;
251         struct input_dev        *input_dev = ts->input;
252         unsigned                Rt;
253         unsigned                sync = 0;
254         u16                     x, y, z1, z2;
255         unsigned long           flags;
256
257         /* adjust:  12 bit samples (left aligned), built from
258          * two 8 bit values writen msb-first.
259          */
260         x = ts->tc.x >> 3;
261         y = ts->tc.y >> 3;
262         z1 = ts->tc.z1 >> 3;
263         z2 = ts->tc.z2 >> 3;
264
265         /* range filtering */
266         if (x == MAX_12BIT)
267                 x = 0;
268
269         if (x && z1 && ts->spi->dev.power.power_state.event == PM_EVENT_ON) {
270                 /* compute touch pressure resistance using equation #2 */
271                 Rt = z2;
272                 Rt -= z1;
273                 Rt *= x;
274                 Rt *= ts->x_plate_ohms;
275                 Rt /= z1;
276                 Rt = (Rt + 2047) >> 12;
277         } else
278                 Rt = 0;
279
280         /* NOTE:  "pendown" is inferred from pressure; we don't rely on
281          * being able to check nPENIRQ status, or "friendly" trigger modes
282          * (both-edges is much better than just-falling or low-level).
283          *
284          * REVISIT:  some boards may require reading nPENIRQ; it's
285          * needed on 7843.  and 7845 reads pressure differently...
286          *
287          * REVISIT:  the touchscreen might not be connected; this code
288          * won't notice that, even if nPENIRQ never fires ...
289          */
290         if (!ts->pendown && Rt != 0) {
291                 input_report_key(input_dev, BTN_TOUCH, 1);
292                 sync = 1;
293         } else if (ts->pendown && Rt == 0) {
294                 input_report_key(input_dev, BTN_TOUCH, 0);
295                 sync = 1;
296         }
297
298         if (Rt) {
299                 input_report_abs(input_dev, ABS_X, x);
300                 input_report_abs(input_dev, ABS_Y, y);
301                 input_report_abs(input_dev, ABS_PRESSURE, Rt);
302                 sync = 1;
303         }
304         if (sync)
305                 input_sync(input_dev);
306
307 #ifdef  VERBOSE
308         if (Rt || ts->pendown)
309                 pr_debug("%s: %d/%d/%d%s\n", ts->spi->dev.bus_id,
310                         x, y, Rt, Rt ? "" : " UP");
311 #endif
312
313         /* don't retrigger while we're suspended */
314         spin_lock_irqsave(&ts->lock, flags);
315
316         ts->pendown = (Rt != 0);
317         ts->pending = 0;
318
319         if (ts->spi->dev.power.power_state.event == PM_EVENT_ON) {
320                 if (ts->pendown)
321                         mod_timer(&ts->timer, jiffies + TS_POLL_PERIOD);
322                 else if (ts->irq_disabled) {
323                         ts->irq_disabled = 0;
324                         enable_irq(ts->spi->irq);
325                 }
326         }
327
328         spin_unlock_irqrestore(&ts->lock, flags);
329 }
330
331 static void ads7846_timer(unsigned long handle)
332 {
333         struct ads7846  *ts = (void *)handle;
334         int             status = 0;
335         unsigned long   flags;
336
337         spin_lock_irqsave(&ts->lock, flags);
338         if (!ts->pending) {
339                 ts->pending = 1;
340                 if (!ts->irq_disabled) {
341                         ts->irq_disabled = 1;
342                         disable_irq(ts->spi->irq);
343                 }
344                 status = spi_async(ts->spi, &ts->msg);
345                 if (status)
346                         dev_err(&ts->spi->dev, "spi_async --> %d\n",
347                                         status);
348         }
349         spin_unlock_irqrestore(&ts->lock, flags);
350 }
351
352 static irqreturn_t ads7846_irq(int irq, void *handle, struct pt_regs *regs)
353 {
354         ads7846_timer((unsigned long) handle);
355         return IRQ_HANDLED;
356 }
357
358 /*--------------------------------------------------------------------------*/
359
360 static int
361 ads7846_suspend(struct spi_device *spi, pm_message_t message)
362 {
363         struct ads7846 *ts = dev_get_drvdata(&spi->dev);
364         unsigned long   flags;
365
366         spin_lock_irqsave(&ts->lock, flags);
367
368         spi->dev.power.power_state = message;
369
370         /* are we waiting for IRQ, or polling? */
371         if (!ts->pendown) {
372                 if (!ts->irq_disabled) {
373                         ts->irq_disabled = 1;
374                         disable_irq(ts->spi->irq);
375                 }
376         } else {
377                 /* polling; force a final SPI completion;
378                  * that will clean things up neatly
379                  */
380                 if (!ts->pending)
381                         mod_timer(&ts->timer, jiffies);
382
383                 while (ts->pendown || ts->pending) {
384                         spin_unlock_irqrestore(&ts->lock, flags);
385                         udelay(10);
386                         spin_lock_irqsave(&ts->lock, flags);
387                 }
388         }
389
390         /* we know the chip's in lowpower mode since we always
391          * leave it that way after every request
392          */
393
394         spin_unlock_irqrestore(&ts->lock, flags);
395         return 0;
396 }
397
398 static int ads7846_resume(struct spi_device *spi)
399 {
400         struct ads7846 *ts = dev_get_drvdata(&spi->dev);
401
402         ts->irq_disabled = 0;
403         enable_irq(ts->spi->irq);
404         spi->dev.power.power_state = PMSG_ON;
405         return 0;
406 }
407
408 static int __devinit ads7846_probe(struct spi_device *spi)
409 {
410         struct ads7846                  *ts;
411         struct input_dev                *input_dev;
412         struct ads7846_platform_data    *pdata = spi->dev.platform_data;
413         struct spi_transfer             *x;
414         int                             err;
415
416         if (!spi->irq) {
417                 dev_dbg(&spi->dev, "no IRQ?\n");
418                 return -ENODEV;
419         }
420
421         if (!pdata) {
422                 dev_dbg(&spi->dev, "no platform data?\n");
423                 return -ENODEV;
424         }
425
426         /* don't exceed max specified sample rate */
427         if (spi->max_speed_hz > (125000 * SAMPLE_BITS)) {
428                 dev_dbg(&spi->dev, "f(sample) %d KHz?\n",
429                                 (spi->max_speed_hz/SAMPLE_BITS)/1000);
430                 return -EINVAL;
431         }
432
433         /* We'd set the wordsize to 12 bits ... except that some controllers
434          * will then treat the 8 bit command words as 12 bits (and drop the
435          * four MSBs of the 12 bit result).  Result: inputs must be shifted
436          * to discard the four garbage LSBs.
437          */
438
439         ts = kzalloc(sizeof(struct ads7846), GFP_KERNEL);
440         input_dev = input_allocate_device();
441         if (!ts || !input_dev) {
442                 err = -ENOMEM;
443                 goto err_free_mem;
444         }
445
446         dev_set_drvdata(&spi->dev, ts);
447         spi->dev.power.power_state = PMSG_ON;
448
449         ts->spi = spi;
450         ts->input = input_dev;
451
452         init_timer(&ts->timer);
453         ts->timer.data = (unsigned long) ts;
454         ts->timer.function = ads7846_timer;
455
456         ts->model = pdata->model ? : 7846;
457         ts->vref_delay_usecs = pdata->vref_delay_usecs ? : 100;
458         ts->x_plate_ohms = pdata->x_plate_ohms ? : 400;
459
460         snprintf(ts->phys, sizeof(ts->phys), "%s/input0", spi->dev.bus_id);
461
462         input_dev->name = "ADS784x Touchscreen";
463         input_dev->phys = ts->phys;
464         input_dev->cdev.dev = &spi->dev;
465
466         input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_ABS);
467         input_dev->keybit[LONG(BTN_TOUCH)] = BIT(BTN_TOUCH);
468         input_set_abs_params(input_dev, ABS_X,
469                         pdata->x_min ? : 0,
470                         pdata->x_max ? : MAX_12BIT,
471                         0, 0);
472         input_set_abs_params(input_dev, ABS_Y,
473                         pdata->y_min ? : 0,
474                         pdata->y_max ? : MAX_12BIT,
475                         0, 0);
476         input_set_abs_params(input_dev, ABS_PRESSURE,
477                         pdata->pressure_min, pdata->pressure_max, 0, 0);
478
479         /* set up the transfers to read touchscreen state; this assumes we
480          * use formula #2 for pressure, not #3.
481          */
482         spi_message_init(&ts->msg);
483         x = ts->xfer;
484
485         /* y- still on; turn on only y+ (and ADC) */
486         ts->read_y = READ_Y;
487         x->tx_buf = &ts->read_y;
488         x->len = 1;
489         spi_message_add_tail(x, &ts->msg);
490
491         x++;
492         x->rx_buf = &ts->tc.y;
493         x->len = 2;
494         spi_message_add_tail(x, &ts->msg);
495
496         /* turn y+ off, x- on; we'll use formula #2 */
497         if (ts->model == 7846) {
498                 x++;
499                 ts->read_z1 = READ_Z1;
500                 x->tx_buf = &ts->read_z1;
501                 x->len = 1;
502                 spi_message_add_tail(x, &ts->msg);
503
504                 x++;
505                 x->rx_buf = &ts->tc.z1;
506                 x->len = 2;
507                 spi_message_add_tail(x, &ts->msg);
508
509                 x++;
510                 ts->read_z2 = READ_Z2;
511                 x->tx_buf = &ts->read_z2;
512                 x->len = 1;
513                 spi_message_add_tail(x, &ts->msg);
514
515                 x++;
516                 x->rx_buf = &ts->tc.z2;
517                 x->len = 2;
518                 spi_message_add_tail(x, &ts->msg);
519         }
520
521         /* turn y- off, x+ on, then leave in lowpower */
522         x++;
523         ts->read_x = READ_X;
524         x->tx_buf = &ts->read_x;
525         x->len = 1;
526         spi_message_add_tail(x, &ts->msg);
527
528         x++;
529         x->rx_buf = &ts->tc.x;
530         x->len = 2;
531         spi_message_add_tail(x, &ts->msg);
532
533         /* power down */
534         x++;
535         ts->pwrdown = PWRDOWN;
536         x->tx_buf = &ts->pwrdown;
537         x->len = 1;
538         spi_message_add_tail(x, &ts->msg);
539
540         x++;
541         x->rx_buf = &ts->dummy;
542         x->len = 2;
543         CS_CHANGE(*x);
544         spi_message_add_tail(x, &ts->msg);
545
546         ts->msg.complete = ads7846_rx;
547         ts->msg.context = ts;
548
549         if (request_irq(spi->irq, ads7846_irq,
550                         SA_SAMPLE_RANDOM | SA_TRIGGER_FALLING,
551                         spi->dev.bus_id, ts)) {
552                 dev_dbg(&spi->dev, "irq %d busy?\n", spi->irq);
553                 err = -EBUSY;
554                 goto err_free_mem;
555         }
556
557         dev_info(&spi->dev, "touchscreen, irq %d\n", spi->irq);
558
559         /* take a first sample, leaving nPENIRQ active; avoid
560          * the touchscreen, in case it's not connected.
561          */
562         (void) ads7846_read12_ser(&spi->dev,
563                           READ_12BIT_SER(vaux) | ADS_PD10_ALL_ON);
564
565         /* ads7843/7845 don't have temperature sensors, and
566          * use the other sensors a bit differently too
567          */
568         if (ts->model == 7846) {
569                 device_create_file(&spi->dev, &dev_attr_temp0);
570                 device_create_file(&spi->dev, &dev_attr_temp1);
571         }
572         if (ts->model != 7845)
573                 device_create_file(&spi->dev, &dev_attr_vbatt);
574         device_create_file(&spi->dev, &dev_attr_vaux);
575
576         err = input_register_device(input_dev);
577         if (err)
578                 goto err_free_irq;
579
580         return 0;
581
582  err_free_irq:
583         free_irq(spi->irq, ts);
584  err_free_mem:
585         input_free_device(input_dev);
586         kfree(ts);
587         return err;
588 }
589
590 static int __devexit ads7846_remove(struct spi_device *spi)
591 {
592         struct ads7846          *ts = dev_get_drvdata(&spi->dev);
593
594         ads7846_suspend(spi, PMSG_SUSPEND);
595         free_irq(ts->spi->irq, ts);
596         if (ts->irq_disabled)
597                 enable_irq(ts->spi->irq);
598
599         if (ts->model == 7846) {
600                 device_remove_file(&spi->dev, &dev_attr_temp0);
601                 device_remove_file(&spi->dev, &dev_attr_temp1);
602         }
603         if (ts->model != 7845)
604                 device_remove_file(&spi->dev, &dev_attr_vbatt);
605         device_remove_file(&spi->dev, &dev_attr_vaux);
606
607         input_unregister_device(ts->input);
608         kfree(ts);
609
610         dev_dbg(&spi->dev, "unregistered touchscreen\n");
611         return 0;
612 }
613
614 static struct spi_driver ads7846_driver = {
615         .driver = {
616                 .name   = "ads7846",
617                 .bus    = &spi_bus_type,
618                 .owner  = THIS_MODULE,
619         },
620         .probe          = ads7846_probe,
621         .remove         = __devexit_p(ads7846_remove),
622         .suspend        = ads7846_suspend,
623         .resume         = ads7846_resume,
624 };
625
626 static int __init ads7846_init(void)
627 {
628         /* grr, board-specific init should stay out of drivers!! */
629
630 #ifdef  CONFIG_ARCH_OMAP
631         if (machine_is_omap_osk()) {
632                 /* GPIO4 = PENIRQ; GPIO6 = BUSY */
633                 omap_request_gpio(4);
634                 omap_set_gpio_direction(4, 1);
635                 omap_request_gpio(6);
636                 omap_set_gpio_direction(6, 1);
637         }
638         // also TI 1510 Innovator, bitbanging through FPGA
639         // also Nokia 770
640         // also Palm Tungsten T2
641 #endif
642
643         // PXA:
644         // also Dell Axim X50
645         // also HP iPaq H191x/H192x/H415x/H435x
646         // also Intel Lubbock (additional to UCB1400; as temperature sensor)
647         // also Sharp Zaurus C7xx, C8xx (corgi/sheperd/husky)
648
649         // Atmel at91sam9261-EK uses ads7843
650
651         // also various AMD Au1x00 devel boards
652
653         return spi_register_driver(&ads7846_driver);
654 }
655 module_init(ads7846_init);
656
657 static void __exit ads7846_exit(void)
658 {
659         spi_unregister_driver(&ads7846_driver);
660
661 #ifdef  CONFIG_ARCH_OMAP
662         if (machine_is_omap_osk()) {
663                 omap_free_gpio(4);
664                 omap_free_gpio(6);
665         }
666 #endif
667
668 }
669 module_exit(ads7846_exit);
670
671 MODULE_DESCRIPTION("ADS7846 TouchScreen Driver");
672 MODULE_LICENSE("GPL");