blob: 839ef84bb3d6f3c916fceba1177f80fa3378cee9 [file] [log] [blame]
Tomi Valkeinen562a0602011-04-21 19:53:59 +03001/* #define DEBUG */
2
3#include <linux/module.h>
4#include <linux/delay.h>
5#include <linux/slab.h>
6#include <linux/gpio.h>
7#include <linux/spi/spi.h>
8#include <linux/backlight.h>
9#include <linux/fb.h>
10
11#include <video/omapdss.h>
12#include <video/omap-panel-n8x0.h>
13
14#define BLIZZARD_REV_CODE 0x00
15#define BLIZZARD_CONFIG 0x02
16#define BLIZZARD_PLL_DIV 0x04
17#define BLIZZARD_PLL_LOCK_RANGE 0x06
18#define BLIZZARD_PLL_CLOCK_SYNTH_0 0x08
19#define BLIZZARD_PLL_CLOCK_SYNTH_1 0x0a
20#define BLIZZARD_PLL_MODE 0x0c
21#define BLIZZARD_CLK_SRC 0x0e
22#define BLIZZARD_MEM_BANK0_ACTIVATE 0x10
23#define BLIZZARD_MEM_BANK0_STATUS 0x14
24#define BLIZZARD_PANEL_CONFIGURATION 0x28
25#define BLIZZARD_HDISP 0x2a
26#define BLIZZARD_HNDP 0x2c
27#define BLIZZARD_VDISP0 0x2e
28#define BLIZZARD_VDISP1 0x30
29#define BLIZZARD_VNDP 0x32
30#define BLIZZARD_HSW 0x34
31#define BLIZZARD_VSW 0x38
32#define BLIZZARD_DISPLAY_MODE 0x68
33#define BLIZZARD_INPUT_WIN_X_START_0 0x6c
34#define BLIZZARD_DATA_SOURCE_SELECT 0x8e
35#define BLIZZARD_DISP_MEM_DATA_PORT 0x90
36#define BLIZZARD_DISP_MEM_READ_ADDR0 0x92
37#define BLIZZARD_POWER_SAVE 0xE6
38#define BLIZZARD_NDISP_CTRL_STATUS 0xE8
39
40/* Data source select */
41/* For S1D13745 */
42#define BLIZZARD_SRC_WRITE_LCD_BACKGROUND 0x00
43#define BLIZZARD_SRC_WRITE_LCD_DESTRUCTIVE 0x01
44#define BLIZZARD_SRC_WRITE_OVERLAY_ENABLE 0x04
45#define BLIZZARD_SRC_DISABLE_OVERLAY 0x05
46/* For S1D13744 */
47#define BLIZZARD_SRC_WRITE_LCD 0x00
48#define BLIZZARD_SRC_BLT_LCD 0x06
49
50#define BLIZZARD_COLOR_RGB565 0x01
51#define BLIZZARD_COLOR_YUV420 0x09
52
53#define BLIZZARD_VERSION_S1D13745 0x01 /* Hailstorm */
54#define BLIZZARD_VERSION_S1D13744 0x02 /* Blizzard */
55
56#define MIPID_CMD_READ_DISP_ID 0x04
57#define MIPID_CMD_READ_RED 0x06
58#define MIPID_CMD_READ_GREEN 0x07
59#define MIPID_CMD_READ_BLUE 0x08
60#define MIPID_CMD_READ_DISP_STATUS 0x09
61#define MIPID_CMD_RDDSDR 0x0F
62#define MIPID_CMD_SLEEP_IN 0x10
63#define MIPID_CMD_SLEEP_OUT 0x11
64#define MIPID_CMD_DISP_OFF 0x28
65#define MIPID_CMD_DISP_ON 0x29
66
67static struct panel_drv_data {
68 struct mutex lock;
69
70 struct omap_dss_device *dssdev;
71 struct spi_device *spidev;
72 struct backlight_device *bldev;
73
74 int blizzard_ver;
75} s_drv_data;
76
77
78static inline
79struct panel_n8x0_data *get_board_data(const struct omap_dss_device *dssdev)
80{
81 return dssdev->data;
82}
83
84static inline
85struct panel_drv_data *get_drv_data(const struct omap_dss_device *dssdev)
86{
87 return &s_drv_data;
88}
89
90
91static inline void blizzard_cmd(u8 cmd)
92{
93 omap_rfbi_write_command(&cmd, 1);
94}
95
96static inline void blizzard_write(u8 cmd, const u8 *buf, int len)
97{
98 omap_rfbi_write_command(&cmd, 1);
99 omap_rfbi_write_data(buf, len);
100}
101
102static inline void blizzard_read(u8 cmd, u8 *buf, int len)
103{
104 omap_rfbi_write_command(&cmd, 1);
105 omap_rfbi_read_data(buf, len);
106}
107
108static u8 blizzard_read_reg(u8 cmd)
109{
110 u8 data;
111 blizzard_read(cmd, &data, 1);
112 return data;
113}
114
115static void blizzard_ctrl_setup_update(struct omap_dss_device *dssdev,
116 int x, int y, int w, int h)
117{
118 struct panel_drv_data *ddata = get_drv_data(dssdev);
119 u8 tmp[18];
120 int x_end, y_end;
121
122 x_end = x + w - 1;
123 y_end = y + h - 1;
124
125 tmp[0] = x;
126 tmp[1] = x >> 8;
127 tmp[2] = y;
128 tmp[3] = y >> 8;
129 tmp[4] = x_end;
130 tmp[5] = x_end >> 8;
131 tmp[6] = y_end;
132 tmp[7] = y_end >> 8;
133
134 /* scaling? */
135 tmp[8] = x;
136 tmp[9] = x >> 8;
137 tmp[10] = y;
138 tmp[11] = y >> 8;
139 tmp[12] = x_end;
140 tmp[13] = x_end >> 8;
141 tmp[14] = y_end;
142 tmp[15] = y_end >> 8;
143
144 tmp[16] = BLIZZARD_COLOR_RGB565;
145
146 if (ddata->blizzard_ver == BLIZZARD_VERSION_S1D13745)
147 tmp[17] = BLIZZARD_SRC_WRITE_LCD_BACKGROUND;
148 else
149 tmp[17] = ddata->blizzard_ver == BLIZZARD_VERSION_S1D13744 ?
150 BLIZZARD_SRC_WRITE_LCD :
151 BLIZZARD_SRC_WRITE_LCD_DESTRUCTIVE;
152
153 omap_rfbi_configure(dssdev, 16, 8);
154
155 blizzard_write(BLIZZARD_INPUT_WIN_X_START_0, tmp, 18);
156
157 omap_rfbi_configure(dssdev, 16, 16);
158}
159
160static void mipid_transfer(struct spi_device *spi, int cmd, const u8 *wbuf,
161 int wlen, u8 *rbuf, int rlen)
162{
163 struct spi_message m;
164 struct spi_transfer *x, xfer[4];
165 u16 w;
166 int r;
167
168 spi_message_init(&m);
169
170 memset(xfer, 0, sizeof(xfer));
171 x = &xfer[0];
172
173 cmd &= 0xff;
174 x->tx_buf = &cmd;
175 x->bits_per_word = 9;
176 x->len = 2;
177 spi_message_add_tail(x, &m);
178
179 if (wlen) {
180 x++;
181 x->tx_buf = wbuf;
182 x->len = wlen;
183 x->bits_per_word = 9;
184 spi_message_add_tail(x, &m);
185 }
186
187 if (rlen) {
188 x++;
189 x->rx_buf = &w;
190 x->len = 1;
191 spi_message_add_tail(x, &m);
192
193 if (rlen > 1) {
194 /* Arrange for the extra clock before the first
195 * data bit.
196 */
197 x->bits_per_word = 9;
198 x->len = 2;
199
200 x++;
201 x->rx_buf = &rbuf[1];
202 x->len = rlen - 1;
203 spi_message_add_tail(x, &m);
204 }
205 }
206
207 r = spi_sync(spi, &m);
208 if (r < 0)
209 dev_dbg(&spi->dev, "spi_sync %d\n", r);
210
211 if (rlen)
212 rbuf[0] = w & 0xff;
213}
214
215static inline void mipid_cmd(struct spi_device *spi, int cmd)
216{
217 mipid_transfer(spi, cmd, NULL, 0, NULL, 0);
218}
219
220static inline void mipid_write(struct spi_device *spi,
221 int reg, const u8 *buf, int len)
222{
223 mipid_transfer(spi, reg, buf, len, NULL, 0);
224}
225
226static inline void mipid_read(struct spi_device *spi,
227 int reg, u8 *buf, int len)
228{
229 mipid_transfer(spi, reg, NULL, 0, buf, len);
230}
231
232static void set_data_lines(struct spi_device *spi, int data_lines)
233{
234 u16 par;
235
236 switch (data_lines) {
237 case 16:
238 par = 0x150;
239 break;
240 case 18:
241 par = 0x160;
242 break;
243 case 24:
244 par = 0x170;
245 break;
246 }
247
248 mipid_write(spi, 0x3a, (u8 *)&par, 2);
249}
250
251static void send_init_string(struct spi_device *spi)
252{
253 u16 initpar[] = { 0x0102, 0x0100, 0x0100 };
254 mipid_write(spi, 0xc2, (u8 *)initpar, sizeof(initpar));
255}
256
257static void send_display_on(struct spi_device *spi)
258{
259 mipid_cmd(spi, MIPID_CMD_DISP_ON);
260}
261
262static void send_display_off(struct spi_device *spi)
263{
264 mipid_cmd(spi, MIPID_CMD_DISP_OFF);
265}
266
267static void send_sleep_out(struct spi_device *spi)
268{
269 mipid_cmd(spi, MIPID_CMD_SLEEP_OUT);
270 msleep(120);
271}
272
273static void send_sleep_in(struct spi_device *spi)
274{
275 mipid_cmd(spi, MIPID_CMD_SLEEP_IN);
276 msleep(50);
277}
278
279static int n8x0_panel_power_on(struct omap_dss_device *dssdev)
280{
281 int r;
282 struct panel_n8x0_data *bdata = get_board_data(dssdev);
283 struct panel_drv_data *ddata = get_drv_data(dssdev);
284 struct spi_device *spi = ddata->spidev;
285 u8 rev, conf;
286 u8 display_id[3];
287 const char *panel_name;
288
289 if (dssdev->state == OMAP_DSS_DISPLAY_ACTIVE)
290 return 0;
291
292 gpio_direction_output(bdata->ctrl_pwrdown, 1);
293
294 if (bdata->platform_enable) {
295 r = bdata->platform_enable(dssdev);
296 if (r)
297 goto err_plat_en;
298 }
299
Archit Taneja6ff9dd52012-08-13 15:12:10 +0530300 omapdss_rfbi_set_size(dssdev, dssdev->panel.timings.x_res,
301 dssdev->panel.timings.y_res);
302
Tomi Valkeinen562a0602011-04-21 19:53:59 +0300303 r = omapdss_rfbi_display_enable(dssdev);
304 if (r)
305 goto err_rfbi_en;
306
307 rev = blizzard_read_reg(BLIZZARD_REV_CODE);
308 conf = blizzard_read_reg(BLIZZARD_CONFIG);
309
310 switch (rev & 0xfc) {
311 case 0x9c:
312 ddata->blizzard_ver = BLIZZARD_VERSION_S1D13744;
313 dev_info(&dssdev->dev, "s1d13744 LCD controller rev %d "
314 "initialized (CNF pins %x)\n", rev & 0x03, conf & 0x07);
315 break;
316 case 0xa4:
317 ddata->blizzard_ver = BLIZZARD_VERSION_S1D13745;
318 dev_info(&dssdev->dev, "s1d13745 LCD controller rev %d "
319 "initialized (CNF pins %x)\n", rev & 0x03, conf & 0x07);
320 break;
321 default:
322 dev_err(&dssdev->dev, "invalid s1d1374x revision %02x\n", rev);
323 r = -ENODEV;
324 goto err_inv_chip;
325 }
326
327 /* panel */
328
329 gpio_direction_output(bdata->panel_reset, 1);
330
331 mipid_read(spi, MIPID_CMD_READ_DISP_ID, display_id, 3);
332 dev_dbg(&spi->dev, "MIPI display ID: %02x%02x%02x\n",
333 display_id[0], display_id[1], display_id[2]);
334
335 switch (display_id[0]) {
336 case 0x45:
337 panel_name = "lph8923";
338 break;
339 case 0x83:
340 panel_name = "ls041y3";
341 break;
342 default:
343 dev_err(&dssdev->dev, "invalid display ID 0x%x\n",
344 display_id[0]);
345 r = -ENODEV;
346 goto err_inv_panel;
347 }
348
349 dev_info(&dssdev->dev, "%s rev %02x LCD detected\n",
350 panel_name, display_id[1]);
351
352 send_sleep_out(spi);
353 send_init_string(spi);
354 set_data_lines(spi, 24);
355 send_display_on(spi);
356
357 return 0;
358
359err_inv_panel:
360 /*
361 * HACK: we should turn off the panel here, but there is some problem
362 * with the initialization sequence, and we fail to init the panel if we
363 * have turned it off
364 */
365 /* gpio_direction_output(bdata->panel_reset, 0); */
366err_inv_chip:
367 omapdss_rfbi_display_disable(dssdev);
368err_rfbi_en:
369 if (bdata->platform_disable)
370 bdata->platform_disable(dssdev);
371err_plat_en:
372 gpio_direction_output(bdata->ctrl_pwrdown, 0);
373 return r;
374}
375
376static void n8x0_panel_power_off(struct omap_dss_device *dssdev)
377{
378 struct panel_n8x0_data *bdata = get_board_data(dssdev);
379 struct panel_drv_data *ddata = get_drv_data(dssdev);
380 struct spi_device *spi = ddata->spidev;
381
382 if (dssdev->state != OMAP_DSS_DISPLAY_ACTIVE)
383 return;
384
385 send_display_off(spi);
386 send_sleep_in(spi);
387
388 if (bdata->platform_disable)
389 bdata->platform_disable(dssdev);
390
391 /*
392 * HACK: we should turn off the panel here, but there is some problem
393 * with the initialization sequence, and we fail to init the panel if we
394 * have turned it off
395 */
396 /* gpio_direction_output(bdata->panel_reset, 0); */
397 gpio_direction_output(bdata->ctrl_pwrdown, 0);
398 omapdss_rfbi_display_disable(dssdev);
399}
400
401static const struct rfbi_timings n8x0_panel_timings = {
402 .cs_on_time = 0,
403
404 .we_on_time = 9000,
405 .we_off_time = 18000,
406 .we_cycle_time = 36000,
407
408 .re_on_time = 9000,
409 .re_off_time = 27000,
410 .re_cycle_time = 36000,
411
412 .access_time = 27000,
413 .cs_off_time = 36000,
414
415 .cs_pulse_width = 0,
416};
417
418static int n8x0_bl_update_status(struct backlight_device *dev)
419{
420 struct omap_dss_device *dssdev = dev_get_drvdata(&dev->dev);
421 struct panel_n8x0_data *bdata = get_board_data(dssdev);
422 struct panel_drv_data *ddata = get_drv_data(dssdev);
423 int r;
424 int level;
425
426 mutex_lock(&ddata->lock);
427
428 if (dev->props.fb_blank == FB_BLANK_UNBLANK &&
429 dev->props.power == FB_BLANK_UNBLANK)
430 level = dev->props.brightness;
431 else
432 level = 0;
433
434 dev_dbg(&dssdev->dev, "update brightness to %d\n", level);
435
436 if (!bdata->set_backlight)
437 r = -EINVAL;
438 else
439 r = bdata->set_backlight(dssdev, level);
440
441 mutex_unlock(&ddata->lock);
442
443 return r;
444}
445
446static int n8x0_bl_get_intensity(struct backlight_device *dev)
447{
448 if (dev->props.fb_blank == FB_BLANK_UNBLANK &&
449 dev->props.power == FB_BLANK_UNBLANK)
450 return dev->props.brightness;
451
452 return 0;
453}
454
455static const struct backlight_ops n8x0_bl_ops = {
456 .get_brightness = n8x0_bl_get_intensity,
457 .update_status = n8x0_bl_update_status,
458};
459
460static int n8x0_panel_probe(struct omap_dss_device *dssdev)
461{
462 struct panel_n8x0_data *bdata = get_board_data(dssdev);
463 struct panel_drv_data *ddata;
464 struct backlight_device *bldev;
465 struct backlight_properties props;
466 int r;
467
468 dev_dbg(&dssdev->dev, "probe\n");
469
470 if (!bdata)
471 return -EINVAL;
472
473 s_drv_data.dssdev = dssdev;
474
475 ddata = &s_drv_data;
476
477 mutex_init(&ddata->lock);
478
Tomi Valkeinen562a0602011-04-21 19:53:59 +0300479 dssdev->panel.timings.x_res = 800;
480 dssdev->panel.timings.y_res = 480;
481 dssdev->ctrl.pixel_size = 16;
482 dssdev->ctrl.rfbi_timings = n8x0_panel_timings;
483
484 memset(&props, 0, sizeof(props));
485 props.max_brightness = 127;
486 props.type = BACKLIGHT_PLATFORM;
487 bldev = backlight_device_register(dev_name(&dssdev->dev), &dssdev->dev,
488 dssdev, &n8x0_bl_ops, &props);
489 if (IS_ERR(bldev)) {
490 r = PTR_ERR(bldev);
491 dev_err(&dssdev->dev, "register backlight failed\n");
492 return r;
493 }
494
495 ddata->bldev = bldev;
496
497 bldev->props.fb_blank = FB_BLANK_UNBLANK;
498 bldev->props.power = FB_BLANK_UNBLANK;
499 bldev->props.brightness = 127;
500
501 n8x0_bl_update_status(bldev);
502
503 return 0;
504}
505
506static void n8x0_panel_remove(struct omap_dss_device *dssdev)
507{
508 struct panel_drv_data *ddata = get_drv_data(dssdev);
509 struct backlight_device *bldev;
510
511 dev_dbg(&dssdev->dev, "remove\n");
512
513 bldev = ddata->bldev;
514 bldev->props.power = FB_BLANK_POWERDOWN;
515 n8x0_bl_update_status(bldev);
516 backlight_device_unregister(bldev);
517
518 dev_set_drvdata(&dssdev->dev, NULL);
519}
520
521static int n8x0_panel_enable(struct omap_dss_device *dssdev)
522{
523 struct panel_drv_data *ddata = get_drv_data(dssdev);
524 int r;
525
526 dev_dbg(&dssdev->dev, "enable\n");
527
528 mutex_lock(&ddata->lock);
529
530 rfbi_bus_lock();
531
532 r = n8x0_panel_power_on(dssdev);
533
534 rfbi_bus_unlock();
535
536 if (r) {
537 mutex_unlock(&ddata->lock);
538 return r;
539 }
540
541 dssdev->state = OMAP_DSS_DISPLAY_ACTIVE;
542
543 mutex_unlock(&ddata->lock);
544
545 return 0;
546}
547
548static void n8x0_panel_disable(struct omap_dss_device *dssdev)
549{
550 struct panel_drv_data *ddata = get_drv_data(dssdev);
551
552 dev_dbg(&dssdev->dev, "disable\n");
553
554 mutex_lock(&ddata->lock);
555
556 rfbi_bus_lock();
557
558 n8x0_panel_power_off(dssdev);
559
560 rfbi_bus_unlock();
561
562 dssdev->state = OMAP_DSS_DISPLAY_DISABLED;
563
564 mutex_unlock(&ddata->lock);
565}
566
567static int n8x0_panel_suspend(struct omap_dss_device *dssdev)
568{
569 struct panel_drv_data *ddata = get_drv_data(dssdev);
570
571 dev_dbg(&dssdev->dev, "suspend\n");
572
573 mutex_lock(&ddata->lock);
574
575 rfbi_bus_lock();
576
577 n8x0_panel_power_off(dssdev);
578
579 rfbi_bus_unlock();
580
581 dssdev->state = OMAP_DSS_DISPLAY_SUSPENDED;
582
583 mutex_unlock(&ddata->lock);
584
585 return 0;
586}
587
588static int n8x0_panel_resume(struct omap_dss_device *dssdev)
589{
590 struct panel_drv_data *ddata = get_drv_data(dssdev);
591 int r;
592
593 dev_dbg(&dssdev->dev, "resume\n");
594
595 mutex_lock(&ddata->lock);
596
597 rfbi_bus_lock();
598
599 r = n8x0_panel_power_on(dssdev);
600
601 rfbi_bus_unlock();
602
603 if (r) {
604 mutex_unlock(&ddata->lock);
605 return r;
606 }
607
608 dssdev->state = OMAP_DSS_DISPLAY_ACTIVE;
609
610 mutex_unlock(&ddata->lock);
611
612 return 0;
613}
614
Tomi Valkeinen562a0602011-04-21 19:53:59 +0300615static void n8x0_panel_get_resolution(struct omap_dss_device *dssdev,
616 u16 *xres, u16 *yres)
617{
618 *xres = dssdev->panel.timings.x_res;
619 *yres = dssdev->panel.timings.y_res;
620}
621
622static void update_done(void *data)
623{
624 rfbi_bus_unlock();
625}
626
627static int n8x0_panel_update(struct omap_dss_device *dssdev,
628 u16 x, u16 y, u16 w, u16 h)
629{
630 struct panel_drv_data *ddata = get_drv_data(dssdev);
Archit Taneja43eab862012-08-13 12:24:53 +0530631 u16 dw, dh;
Tomi Valkeinen562a0602011-04-21 19:53:59 +0300632
633 dev_dbg(&dssdev->dev, "update\n");
634
Archit Taneja43eab862012-08-13 12:24:53 +0530635 dw = dssdev->panel.timings.x_res;
636 dh = dssdev->panel.timings.y_res;
637
638 if (x != 0 || y != 0 || w != dw || h != dh) {
639 dev_err(&dssdev->dev, "invaid update region %d, %d, %d, %d\n",
640 x, y, w, h);
641 return -EINVAL;
642 }
643
Tomi Valkeinen562a0602011-04-21 19:53:59 +0300644 mutex_lock(&ddata->lock);
645 rfbi_bus_lock();
646
Tomi Valkeinen562a0602011-04-21 19:53:59 +0300647 blizzard_ctrl_setup_update(dssdev, x, y, w, h);
648
Archit Taneja43eab862012-08-13 12:24:53 +0530649 omap_rfbi_update(dssdev, update_done, NULL);
Tomi Valkeinen562a0602011-04-21 19:53:59 +0300650
651 mutex_unlock(&ddata->lock);
652
653 return 0;
654}
655
656static int n8x0_panel_sync(struct omap_dss_device *dssdev)
657{
658 struct panel_drv_data *ddata = get_drv_data(dssdev);
659
660 dev_dbg(&dssdev->dev, "sync\n");
661
662 mutex_lock(&ddata->lock);
663 rfbi_bus_lock();
664 rfbi_bus_unlock();
665 mutex_unlock(&ddata->lock);
666
667 return 0;
668}
669
670static struct omap_dss_driver n8x0_panel_driver = {
671 .probe = n8x0_panel_probe,
672 .remove = n8x0_panel_remove,
673
674 .enable = n8x0_panel_enable,
675 .disable = n8x0_panel_disable,
676 .suspend = n8x0_panel_suspend,
677 .resume = n8x0_panel_resume,
678
679 .update = n8x0_panel_update,
680 .sync = n8x0_panel_sync,
681
682 .get_resolution = n8x0_panel_get_resolution,
683 .get_recommended_bpp = omapdss_default_get_recommended_bpp,
684
Tomi Valkeinen562a0602011-04-21 19:53:59 +0300685 .driver = {
686 .name = "n8x0_panel",
687 .owner = THIS_MODULE,
688 },
689};
690
691/* PANEL */
692
693static int mipid_spi_probe(struct spi_device *spi)
694{
695 dev_dbg(&spi->dev, "mipid_spi_probe\n");
696
697 spi->mode = SPI_MODE_0;
698
699 s_drv_data.spidev = spi;
700
701 return 0;
702}
703
704static int mipid_spi_remove(struct spi_device *spi)
705{
706 dev_dbg(&spi->dev, "mipid_spi_remove\n");
707 return 0;
708}
709
710static struct spi_driver mipid_spi_driver = {
711 .driver = {
712 .name = "lcd_mipid",
Tomi Valkeinen562a0602011-04-21 19:53:59 +0300713 .owner = THIS_MODULE,
714 },
715 .probe = mipid_spi_probe,
716 .remove = __devexit_p(mipid_spi_remove),
717};
718
719static int __init n8x0_panel_drv_init(void)
720{
721 int r;
722
723 r = spi_register_driver(&mipid_spi_driver);
724 if (r) {
725 pr_err("n8x0_panel: spi driver registration failed\n");
726 return r;
727 }
728
729 r = omap_dss_register_driver(&n8x0_panel_driver);
730 if (r) {
731 pr_err("n8x0_panel: dss driver registration failed\n");
732 spi_unregister_driver(&mipid_spi_driver);
733 return r;
734 }
735
736 return 0;
737}
738
739static void __exit n8x0_panel_drv_exit(void)
740{
741 spi_unregister_driver(&mipid_spi_driver);
742
743 omap_dss_unregister_driver(&n8x0_panel_driver);
744}
745
746module_init(n8x0_panel_drv_init);
747module_exit(n8x0_panel_drv_exit);
748MODULE_LICENSE("GPL");