Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

[aa2218]: drivers / input / si / gcn-si.c Maximize Restore History

Download this file

gcn-si.c    754 lines (619 with data), 16.7 kB

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
/*
* drivers/input/gcn-si.c
*
* Nintendo GameCube/Wii Serial Interface (SI) driver.
* Copyright (C) 2004-2009 The GameCube Linux Team
* Copyright (C) 2004 Steven Looman
* Copyright (C) 2005,2008,2009 Albert Herranz
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
*/
/* #define SI_DEBUG */
#include <linux/delay.h>
#include <linux/init.h>
#include <linux/input.h>
#include <linux/io.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/of_platform.h>
#include <linux/timer.h>
/*
* This keymap is for a datel adapter + normal US keyboard.
*/
#include "gcn-keymap.h"
/*
* Defining HACK_FORCE_KEYBOARD_PORT allows one to specify a port that
* will be identified as a keyboard port in case the port gets incorrectly
* identified.
*/
#define HACK_FORCE_KEYBOARD_PORT
#define DRV_MODULE_NAME "gcn-si"
#define DRV_DESCRIPTION "Nintendo GameCube/Wii Serial Interface (SI) driver"
#define DRV_AUTHOR "Steven Looman <steven@krx.nl>, " \
"Albert Herranz"
static char si_driver_version[] = "1.0i";
#define drv_printk(level, format, arg...) \
printk(level DRV_MODULE_NAME ": " format , ## arg)
#define SI_MAX_PORTS 4 /* the four controller ports */
#define SI_REFRESH_TIME (HZ/100) /* polling interval */
/*
* Hardware registers
*/
#define SI_PORT_SPACING 12
#define SICOUTBUF(i) (0x00 + (i)*SI_PORT_SPACING)
#define SICINBUFH(i) (0x04 + (i)*SI_PORT_SPACING)
#define SICINBUFL(i) (0x08 + (i)*SI_PORT_SPACING)
#define SIPOLL 0x30
#define SICOMCSR 0x34
#define SISR 0x38
#define SIEXILK 0x3c
#define ID_PAD 0x0900
#define ID_KEYBOARD 0x0820
#define ID_WIRELESS_BIT (1 << 15)
#define ID_WAVEBIRD_BIT (1 << 8)
#define PAD_START (1 << 28)
#define PAD_Y (1 << 27)
#define PAD_X (1 << 26)
#define PAD_B (1 << 25)
#define PAD_A (1 << 24)
#define PAD_LT (1 << 22)
#define PAD_RT (1 << 21)
#define PAD_Z (1 << 20)
#define PAD_UP (1 << 19)
#define PAD_DOWN (1 << 18)
#define PAD_RIGHT (1 << 17)
#define PAD_LEFT (1 << 16)
struct si_keyboard_status {
unsigned char old[3];
};
enum si_control_type {
CTL_PAD,
CTL_KEYBOARD,
CTL_UNKNOWN
};
struct si_drvdata;
struct si_port {
unsigned int index;
struct si_drvdata *drvdata;
u32 id; /* SI id */
enum si_control_type type;
unsigned int raw[2];
struct input_dev *idev;
struct timer_list timer;
char name[32];
union {
struct si_keyboard_status keyboard;
};
};
struct si_drvdata {
unsigned long flags;
#define SI_QUIESCE (1<<0)
struct si_port ports[SI_MAX_PORTS];
void __iomem *io_base;
struct device *dev;
};
#ifdef HACK_FORCE_KEYBOARD_PORT
static int si_force_keyboard_port = -1;
#ifdef MODULE
module_param_named(force_keyboard_port, si_force_keyboard_port, int, 0644);
MODULE_PARM_DESC(force_keyboard_port, "port n becomes a keyboard port if"
" automatic identification fails");
#else
static int __init si_force_keyboard_port_setup(char *line)
{
if (sscanf(line, "%d", &si_force_keyboard_port) != 1)
si_force_keyboard_port = -1;
return 1;
}
__setup("force_keyboard_port=", si_force_keyboard_port_setup);
#endif /* MODULE */
#endif /* HACK_FORCE_KEYBOARD_PORT */
/*
* Hardware.
*
*/
static void si_reset_all(void __iomem *io_base)
{
int i;
/* clear all SI registers */
for (i = 0; i < SI_MAX_PORTS; ++i)
out_be32(io_base + SICOUTBUF(i), 0);
for (i = 0; i < SI_MAX_PORTS; ++i)
out_be32(io_base + SICINBUFH(i), 0);
for (i = 0; i < SI_MAX_PORTS; ++i)
out_be32(io_base + SICINBUFL(i), 0);
out_be32(io_base + SIPOLL, 0);
out_be32(io_base + SICOMCSR, 0);
out_be32(io_base + SISR, 0);
/* these too... */
out_be32(io_base + 0x80, 0);
out_be32(io_base + 0x84, 0);
out_be32(io_base + 0x88, 0);
out_be32(io_base + 0x8c, 0);
out_be32(io_base + 0x90, 0);
out_be32(io_base + 0x94, 0);
out_be32(io_base + 0x98, 0);
out_be32(io_base + 0x9c, 0);
out_be32(io_base + 0xa0, 0);
out_be32(io_base + 0xa4, 0);
out_be32(io_base + 0xa8, 0);
out_be32(io_base + 0xac, 0);
}
static void si_set_rumbling(void __iomem *io_base, unsigned int index,
int rumble)
{
out_be32(io_base + SICOUTBUF(index), 0x00400000 | (rumble) ? 1 : 0);
out_be32(io_base + SISR, 0x80000000);
}
static void si_wait_transfer_done(void __iomem *io_base)
{
unsigned long deadline = jiffies + 2*HZ;
int borked = 0;
while (!(in_be32(io_base + SICOMCSR) & (1 << 31)) && !borked) {
cpu_relax();
borked = time_after(jiffies, deadline);
}
if (borked) {
drv_printk(KERN_ERR, "serial transfer took too long, "
"is your hardware ok?");
}
out_be32(io_base + SICOMCSR,
in_be32(io_base + SICOMCSR) | (1 << 31)); /* ack IRQ */
}
static u32 si_get_controller_id(void __iomem *io_base,
unsigned int index)
{
out_be32(io_base + SICOUTBUF(index), 0);
out_be32(io_base + SIPOLL, 0);
out_be32(io_base + SISR, 0x80000000);
out_be32(io_base + SICOMCSR, 0xd0010001 | index << 1);
si_wait_transfer_done(io_base);
return in_be32(io_base + 0x80) >> 16;
}
static void si_setup_polling(struct si_drvdata *drvdata)
{
void __iomem *io_base = drvdata->io_base;
unsigned long pad_bits = 0;
int i;
for (i = 0; i < SI_MAX_PORTS; ++i) {
switch (drvdata->ports[i].type) {
case CTL_PAD:
out_be32(io_base + SICOUTBUF(i), 0x00400300);
break;
case CTL_KEYBOARD:
out_be32(io_base + SICOUTBUF(i), 0x00540000);
break;
default:
continue;
}
pad_bits |= 1 << (7 - i);
}
out_be32(io_base + SIPOLL, 0x00f70200 | pad_bits);
out_be32(io_base + SISR, 0x80000000);
out_be32(io_base + SICOMCSR, 0xc0010801);
si_wait_transfer_done(io_base);
}
static void si_timer(unsigned long data)
{
struct si_port *port = (struct si_port *)data;
unsigned int index = port->index;
void __iomem *io_base = port->drvdata->io_base;
unsigned long raw[2];
unsigned char key[3];
unsigned char oldkey;
int i;
raw[0] = in_be32(io_base + SICINBUFH(index));
raw[1] = in_be32(io_base + SICINBUFL(index));
switch (port->type) {
case CTL_PAD:
/* buttons */
input_report_key(port->idev, BTN_A, raw[0] & PAD_A);
input_report_key(port->idev, BTN_B, raw[0] & PAD_B);
input_report_key(port->idev, BTN_X, raw[0] & PAD_X);
input_report_key(port->idev, BTN_Y, raw[0] & PAD_Y);
input_report_key(port->idev, BTN_Z, raw[0] & PAD_Z);
input_report_key(port->idev, BTN_TL,
raw[0] & PAD_LT);
input_report_key(port->idev, BTN_TR,
raw[0] & PAD_RT);
input_report_key(port->idev, BTN_START,
raw[0] & PAD_START);
input_report_key(port->idev, BTN_0, raw[0] & PAD_UP);
input_report_key(port->idev, BTN_1, raw[0] & PAD_RIGHT);
input_report_key(port->idev, BTN_2, raw[0] & PAD_DOWN);
input_report_key(port->idev, BTN_3, raw[0] & PAD_LEFT);
/* axis */
/* a stick */
input_report_abs(port->idev, ABS_X,
raw[0] >> 8 & 0xFF);
input_report_abs(port->idev, ABS_Y,
0xFF - (raw[0] >> 0 & 0xFF));
/* b pad */
if (raw[0] & PAD_RIGHT)
input_report_abs(port->idev, ABS_HAT0X, 1);
else if (raw[0] & PAD_LEFT)
input_report_abs(port->idev, ABS_HAT0X, -1);
else
input_report_abs(port->idev, ABS_HAT0X, 0);
if (raw[0] & PAD_DOWN)
input_report_abs(port->idev, ABS_HAT0Y, 1);
else if (raw[0] & PAD_UP)
input_report_abs(port->idev, ABS_HAT0Y, -1);
else
input_report_abs(port->idev, ABS_HAT0Y, 0);
/* c stick */
input_report_abs(port->idev, ABS_RX,
raw[1] >> 24 & 0xFF);
input_report_abs(port->idev, ABS_RY,
raw[1] >> 16 & 0xFF);
/* triggers */
input_report_abs(port->idev, ABS_BRAKE,
raw[1] >> 8 & 0xFF);
input_report_abs(port->idev, ABS_GAS,
raw[1] >> 0 & 0xFF);
break;
case CTL_KEYBOARD:
/*
raw nibbles:
[4]<C>[0][0][0][0][0][0] <1H><1L><2H><2L><3H><3L><X><C>
where:
[n] = fixed to n
<nH> <nL> = high / low nibble of n-th key pressed
(0 if not pressed)
<X> = <1H> xor <2H> xor <3H>
<C> = counter: 0, 0, 1, 1, 2, 2, ..., F, F, 0, 0, ...
*/
key[0] = (raw[1] >> 24) & 0xFF;
key[1] = (raw[1] >> 16) & 0xFF;
key[2] = (raw[1] >> 8) & 0xFF;
/* check if anything was released */
for (i = 0; i < 3; ++i) {
oldkey = port->keyboard.old[i];
if (oldkey != key[0] &&
oldkey != key[1] && oldkey != key[2])
input_report_key(port->idev,
gamecube_keymap[oldkey], 0);
}
/* report keys */
for (i = 0; i < 3; ++i) {
if (key[i])
input_report_key(port->idev,
gamecube_keymap[key[i]], 1);
port->keyboard.old[i] = key[i];
}
break;
default:
break;
}
input_sync(port->idev);
if (!(port->drvdata->flags & SI_QUIESCE))
mod_timer(&port->timer, jiffies + SI_REFRESH_TIME);
}
/*
* Input driver hooks.
*
*/
static int si_open(struct input_dev *idev)
{
struct si_port *port = input_get_drvdata(idev);
init_timer(&port->timer);
port->timer.function = si_timer;
port->timer.data = (unsigned long)port;
port->timer.expires = jiffies + SI_REFRESH_TIME;
add_timer(&port->timer);
return 0;
}
static void si_close(struct input_dev *idev)
{
struct si_port *port = input_get_drvdata(idev);
del_timer(&port->timer);
}
static int si_event(struct input_dev *idev, unsigned int type,
unsigned int code, int value)
{
struct si_port *port = input_get_drvdata(idev);
unsigned int index = port->index;
void __iomem *io_base = port->drvdata->io_base;
if (type == EV_FF) {
if (code == FF_RUMBLE)
si_set_rumbling(io_base, index, value);
}
return value;
}
static int si_setup_pad(struct input_dev *idev)
{
struct ff_device *ff;
int retval;
set_bit(EV_KEY, idev->evbit);
set_bit(EV_ABS, idev->evbit);
set_bit(BTN_A, idev->keybit);
set_bit(BTN_B, idev->keybit);
set_bit(BTN_X, idev->keybit);
set_bit(BTN_Y, idev->keybit);
set_bit(BTN_Z, idev->keybit);
set_bit(BTN_TL, idev->keybit);
set_bit(BTN_TR, idev->keybit);
set_bit(BTN_START, idev->keybit);
set_bit(BTN_0, idev->keybit);
set_bit(BTN_1, idev->keybit);
set_bit(BTN_2, idev->keybit);
set_bit(BTN_3, idev->keybit);
/* a stick */
set_bit(ABS_X, idev->absbit);
idev->absmin[ABS_X] = 0;
idev->absmax[ABS_X] = 255;
idev->absfuzz[ABS_X] = 8;
idev->absflat[ABS_X] = 8;
set_bit(ABS_Y, idev->absbit);
idev->absmin[ABS_Y] = 0;
idev->absmax[ABS_Y] = 255;
idev->absfuzz[ABS_Y] = 8;
idev->absflat[ABS_Y] = 8;
/* b pad */
input_set_abs_params(idev, ABS_HAT0X, -1, 1, 0, 0);
input_set_abs_params(idev, ABS_HAT0Y, -1, 1, 0, 0);
/* c stick */
set_bit(ABS_RX, idev->absbit);
idev->absmin[ABS_RX] = 0;
idev->absmax[ABS_RX] = 255;
idev->absfuzz[ABS_RX] = 8;
idev->absflat[ABS_RX] = 8;
set_bit(ABS_RY, idev->absbit);
idev->absmin[ABS_RY] = 0;
idev->absmax[ABS_RY] = 255;
idev->absfuzz[ABS_RY] = 8;
idev->absflat[ABS_RY] = 8;
/* triggers */
set_bit(ABS_GAS, idev->absbit);
idev->absmin[ABS_GAS] = -255;
idev->absmax[ABS_GAS] = 255;
idev->absfuzz[ABS_GAS] = 16;
idev->absflat[ABS_GAS] = 16;
set_bit(ABS_BRAKE, idev->absbit);
idev->absmin[ABS_BRAKE] = -255;
idev->absmax[ABS_BRAKE] = 255;
idev->absfuzz[ABS_BRAKE] = 16;
idev->absflat[ABS_BRAKE] = 16;
/* rumbling */
set_bit(EV_FF, idev->evbit);
set_bit(FF_RUMBLE, idev->ffbit);
retval = input_ff_create(idev, 1);
if (retval)
return retval;
ff = idev->ff;
idev->event = si_event;
return 0;
}
static void si_setup_keyboard(struct input_dev *idev)
{
int i;
set_bit(EV_KEY, idev->evbit);
set_bit(EV_REP, idev->evbit);
for (i = 0; i < 255; ++i)
set_bit(gamecube_keymap[i], idev->keybit);
}
static int si_port_probe(struct si_port *port)
{
unsigned int index = port->index;
void __iomem *io_base = port->drvdata->io_base;
struct input_dev *idev;
int retval = 0;
/*
* Determine input device type from SI id.
*/
port->id = si_get_controller_id(io_base, index);
if (port->id == ID_PAD) {
port->type = CTL_PAD;
strcpy(port->name, "standard pad");
} else if (port->id & ID_WIRELESS_BIT) {
/* wireless pad */
port->type = CTL_PAD;
strcpy(port->name, (port->id & ID_WAVEBIRD_BIT) ?
"Nintendo Wavebird" : "wireless pad");
} else if (port->id == ID_KEYBOARD) {
port->type = CTL_KEYBOARD;
strcpy(port->name, "keyboard");
} else {
port->type = CTL_UNKNOWN;
if (port->id) {
sprintf(port->name, "unknown (%x)",
port->id);
#ifdef HACK_FORCE_KEYBOARD_PORT
if (index+1 == si_force_keyboard_port) {
drv_printk(KERN_WARNING,
"port %d forced to keyboard mode\n",
index+1);
port->id = ID_KEYBOARD;
port->type = CTL_KEYBOARD;
strcpy(port->name, "keyboard (forced)");
}
#endif /* HACK_FORCE_KEYBOARD_PORT */
} else {
strcpy(port->name, "not present");
}
}
if (port->type == CTL_UNKNOWN) {
retval = -ENODEV;
goto done;
}
idev = input_allocate_device();
if (!idev) {
drv_printk(KERN_ERR, "failed to allocate input_dev\n");
retval = -ENOMEM;
goto done;
}
idev->open = si_open;
idev->close = si_close;
idev->name = port->name;
switch (port->type) {
case CTL_PAD:
retval = si_setup_pad(idev);
break;
case CTL_KEYBOARD:
si_setup_keyboard(idev);
break;
default:
break;
}
if (retval) {
input_free_device(idev);
goto done;
}
input_set_drvdata(idev, port);
port->idev = idev;
done:
return retval;
}
/*
* Setup routines.
*
*/
static int si_init(struct si_drvdata *drvdata, struct resource *mem)
{
struct si_port *port;
int index;
int retval;
int error;
drvdata->io_base = ioremap(mem->start, mem->end - mem->start + 1);
si_reset_all(drvdata->io_base);
for (index = 0; index < SI_MAX_PORTS; ++index) {
port = &drvdata->ports[index];
memset(port, 0, sizeof(*port));
port->index = index;
port->drvdata = drvdata;
retval = si_port_probe(port);
if (!retval) {
error = input_register_device(port->idev);
if (error) {
drv_printk(KERN_ERR,
"input device registration failed"
" (%d) for port %d", error, index+1);
port->idev = NULL;
} else
drv_printk(KERN_INFO, "port %d: %s\n",
index+1, port->name);
}
}
si_setup_polling(drvdata);
return 0;
}
static void si_exit(struct si_drvdata *drvdata)
{
struct si_port *port;
int index;
for (index = 0; index < SI_MAX_PORTS; ++index) {
port = &drvdata->ports[index];
if (port->idev)
input_unregister_device(port->idev);
}
if (drvdata->io_base) {
iounmap(drvdata->io_base);
drvdata->io_base = NULL;
}
}
/*
* Driver model helper routines.
*
*/
static int si_do_probe(struct device *dev, struct resource *mem)
{
struct si_drvdata *drvdata;
int retval;
drvdata = kzalloc(sizeof(*drvdata), GFP_KERNEL);
if (!drvdata) {
drv_printk(KERN_ERR, "failed to allocate si_drvdata\n");
return -ENOMEM;
}
dev_set_drvdata(dev, drvdata);
drvdata->dev = dev;
retval = si_init(drvdata, mem);
if (retval) {
dev_set_drvdata(dev, NULL);
kfree(drvdata);
}
return retval;
}
static int si_do_remove(struct device *dev)
{
struct si_drvdata *drvdata = dev_get_drvdata(dev);
if (drvdata) {
si_exit(drvdata);
dev_set_drvdata(dev, NULL);
kfree(drvdata);
return 0;
}
return -ENODEV;
}
static int si_do_shutdown(struct device *dev)
{
struct si_drvdata *drvdata = dev_get_drvdata(dev);
int i;
if (drvdata) {
drvdata->flags |= SI_QUIESCE;
for (i = 0; i < SI_MAX_PORTS; ++i)
del_timer_sync(&drvdata->ports[i].timer);
si_reset_all(drvdata->io_base);
}
return 0;
}
/*
* OF platform driver hooks.
*
*/
static int __init si_of_probe(struct of_device *odev,
const struct of_device_id *match)
{
struct resource mem;
int retval;
retval = of_address_to_resource(odev->node, 0, &mem);
if (retval) {
drv_printk(KERN_ERR, "no io memory range found\n");
return -ENODEV;
}
return si_do_probe(&odev->dev, &mem);
}
static int __exit si_of_remove(struct of_device *odev)
{
return si_do_remove(&odev->dev);
}
static int si_of_shutdown(struct of_device *odev)
{
return si_do_shutdown(&odev->dev);
}
static struct of_device_id si_of_match[] = {
{ .compatible = "nintendo,flipper-serial" },
{ .compatible = "nintendo,hollywood-serial" },
{ },
};
MODULE_DEVICE_TABLE(of, si_of_match);
static struct of_platform_driver si_of_driver = {
.owner = THIS_MODULE,
.name = DRV_MODULE_NAME,
.match_table = si_of_match,
.probe = si_of_probe,
.remove = si_of_remove,
.shutdown = si_of_shutdown,
};
/*
* Module interface hooks.
*
*/
static int __init si_init_module(void)
{
drv_printk(KERN_INFO, "%s - version %s\n", DRV_DESCRIPTION,
si_driver_version);
return of_register_platform_driver(&si_of_driver);
}
static void __exit si_exit_module(void)
{
of_unregister_platform_driver(&si_of_driver);
}
module_init(si_init_module);
module_exit(si_exit_module);
MODULE_DESCRIPTION(DRV_DESCRIPTION);
MODULE_AUTHOR(DRV_AUTHOR);
MODULE_LICENSE("GPL");