2 * Mainly by David Woodhouse, somewhat modified by Jordan Crouse
4 * Copyright © 2006-2007 Red Hat, Inc.
5 * Copyright © 2006-2007 Advanced Micro Devices, Inc.
6 * Copyright © 2009 VIA Technology, Inc.
7 * Copyright (c) 2010 Andres Salomon <dilinger@queued.net>
9 * This program is free software. You can redistribute it and/or
10 * modify it under the terms of version 2 of the GNU General Public
11 * License as published by the Free Software Foundation.
15 #include <linux/kernel.h>
17 #include <linux/console.h>
18 #include <linux/i2c.h>
19 #include <linux/platform_device.h>
20 #include <linux/pci.h>
21 #include <linux/pci_ids.h>
22 #include <linux/interrupt.h>
23 #include <linux/delay.h>
24 #include <linux/backlight.h>
25 #include <linux/device.h>
26 #include <linux/notifier.h>
27 #include <linux/uaccess.h>
28 #include <linux/ctype.h>
29 #include <linux/reboot.h>
33 #include "olpc_dcon.h"
35 /* Module definitions */
37 static int resumeline = 898;
38 module_param(resumeline, int, 0444);
41 module_param(noinit, int, 0444);
43 /* Default off since it doesn't work on DCON ASIC in B-test OLPC board */
45 module_param(useaa, int, 0444);
47 struct dcon_platform_data {
49 void (*bus_stabilize_wiggle)(void);
50 void (*set_dconload)(int);
51 u8 (*read_status)(void);
54 static struct dcon_platform_data *pdata;
57 struct i2c_client *client;
59 struct work_struct switch_source;
60 struct notifier_block reboot_nb;
61 struct notifier_block fbevent_nb;
63 /* Shadow register for the DCON_REG_MODE register */
66 /* Current output type; true == mono, false == color */
73 static struct i2c_driver dcon_driver;
75 /* Platform devices */
76 static struct platform_device *dcon_device;
78 /* Backlight device */
79 static struct backlight_device *dcon_bl_dev;
81 static struct fb_info *fbinfo;
83 /* set this to 1 while controlling fb blank state from this driver */
84 static int ignore_fb_events = 0;
86 /* Current source, initialized at probe time */
87 static int dcon_source;
90 static int dcon_pending;
92 /* Variables used during switches */
93 static int dcon_switched;
94 static struct timespec dcon_irq_time;
95 static struct timespec dcon_load_time;
97 static DECLARE_WAIT_QUEUE_HEAD(dcon_wait_queue);
99 static unsigned short normal_i2c[] = { 0x0d, I2C_CLIENT_END };
101 static s32 dcon_write(struct dcon_priv *dcon, u8 reg, u16 val)
103 return i2c_smbus_write_word_data(dcon->client, reg, val);
106 static s32 dcon_read(struct dcon_priv *dcon, u8 reg)
108 return i2c_smbus_read_word_data(dcon->client, reg);
111 /* The current backlight value - this saves us some smbus traffic */
112 static int bl_val = -1;
114 /* ===== API functions - these are called by a variety of users ==== */
116 static int dcon_hw_init(struct dcon_priv *dcon, int is_init)
118 struct i2c_client *client = dcon->client;
122 ver = i2c_smbus_read_word_data(client, DCON_REG_ID);
123 if ((ver >> 8) != 0xDC) {
124 printk(KERN_ERR "olpc-dcon: DCON ID not 0xDCxx: 0x%04x "
131 printk(KERN_INFO "olpc-dcon: Discovered DCON version %x\n",
135 printk(KERN_ERR "olpc-dcon: Unable to init.\n");
140 if (ver < 0xdc02 && !noinit) {
141 /* Initialize the DCON registers */
143 /* Start with work-arounds for DCON ASIC */
144 i2c_smbus_write_word_data(client, 0x4b, 0x00cc);
145 i2c_smbus_write_word_data(client, 0x4b, 0x00cc);
146 i2c_smbus_write_word_data(client, 0x4b, 0x00cc);
147 i2c_smbus_write_word_data(client, 0x0b, 0x007a);
148 i2c_smbus_write_word_data(client, 0x36, 0x025c);
149 i2c_smbus_write_word_data(client, 0x37, 0x025e);
151 /* Initialise SDRAM */
153 i2c_smbus_write_word_data(client, 0x3b, 0x002b);
154 i2c_smbus_write_word_data(client, 0x41, 0x0101);
155 i2c_smbus_write_word_data(client, 0x42, 0x0101);
156 } else if (!noinit) {
157 /* SDRAM setup/hold time */
158 i2c_smbus_write_word_data(client, 0x3a, 0xc040);
159 i2c_smbus_write_word_data(client, 0x41, 0x0000);
160 i2c_smbus_write_word_data(client, 0x41, 0x0101);
161 i2c_smbus_write_word_data(client, 0x42, 0x0101);
164 /* Colour swizzle, AA, no passthrough, backlight */
166 dcon->disp_mode = MODE_PASSTHRU | MODE_BL_ENABLE |
169 dcon->disp_mode |= MODE_COL_AA;
171 i2c_smbus_write_word_data(client, DCON_REG_MODE, dcon->disp_mode);
174 /* Set the scanline to interrupt on during resume */
175 i2c_smbus_write_word_data(client, DCON_REG_SCAN_INT, resumeline);
182 * The smbus doesn't always come back due to what is believed to be
183 * hardware (power rail) bugs. For older models where this is known to
184 * occur, our solution is to attempt to wait for the bus to stabilize;
185 * if it doesn't happen, cut power to the dcon, repower it, and wait
186 * for the bus to stabilize. Rinse, repeat until we have a working
187 * smbus. For newer models, we simply BUG(); we want to know if this
188 * still happens despite the power fixes that have been made!
190 static int dcon_bus_stabilize(struct dcon_priv *dcon, int is_powered_down)
192 unsigned long timeout;
196 if (is_powered_down) {
198 x = olpc_ec_cmd(0x26, (unsigned char *) &x, 1, NULL, 0);
200 printk(KERN_WARNING "olpc-dcon: unable to force dcon "
201 "to power up: %d!\n", x);
204 msleep(10); /* we'll be conservative */
207 pdata->bus_stabilize_wiggle();
209 for (x = -1, timeout = 50; timeout && x < 0; timeout--) {
211 x = dcon_read(dcon, DCON_REG_ID);
214 printk(KERN_ERR "olpc-dcon: unable to stabilize dcon's "
215 "smbus, reasserting power and praying.\n");
216 BUG_ON(olpc_board_at_least(olpc_board(0xc2)));
218 olpc_ec_cmd(0x26, (unsigned char *) &x, 1, NULL, 0);
221 goto power_up; /* argh, stupid hardware.. */
225 return dcon_hw_init(dcon, 0);
229 static int dcon_get_backlight(struct dcon_priv *dcon)
231 if (!dcon || !dcon->client)
235 bl_val = dcon_read(dcon, DCON_REG_BRIGHT) & 0x0F;
241 static void dcon_set_backlight_hw(struct dcon_priv *dcon, int level)
243 bl_val = level & 0x0F;
244 dcon_write(dcon, DCON_REG_BRIGHT, bl_val);
246 /* Purposely turn off the backlight when we go to level 0 */
248 dcon->disp_mode &= ~MODE_BL_ENABLE;
249 dcon_write(dcon, DCON_REG_MODE, dcon->disp_mode);
250 } else if (!(dcon->disp_mode & MODE_BL_ENABLE)) {
251 dcon->disp_mode |= MODE_BL_ENABLE;
252 dcon_write(dcon, DCON_REG_MODE, dcon->disp_mode);
256 static void dcon_set_backlight(struct dcon_priv *dcon, int level)
258 if (!dcon || !dcon->client)
261 if (bl_val == (level & 0x0F))
264 dcon_set_backlight_hw(dcon, level);
267 /* Set the output type to either color or mono */
268 static int dcon_set_mono_mode(struct dcon_priv *dcon, bool enable_mono)
270 if (dcon->mono == enable_mono)
273 dcon->mono = enable_mono;
276 dcon->disp_mode &= ~(MODE_CSWIZZLE | MODE_COL_AA);
277 dcon->disp_mode |= MODE_MONO_LUMA;
279 dcon->disp_mode &= ~(MODE_MONO_LUMA);
280 dcon->disp_mode |= MODE_CSWIZZLE;
282 dcon->disp_mode |= MODE_COL_AA;
285 dcon_write(dcon, DCON_REG_MODE, dcon->disp_mode);
289 /* For now, this will be really stupid - we need to address how
290 * DCONLOAD works in a sleep and account for it accordingly
293 static void dcon_sleep(struct dcon_priv *dcon, bool sleep)
297 /* Turn off the backlight and put the DCON to sleep */
299 if (dcon->asleep == sleep)
302 if (!olpc_board_at_least(olpc_board(0xc2)))
307 x = olpc_ec_cmd(0x26, (unsigned char *) &x, 1, NULL, 0);
309 printk(KERN_WARNING "olpc-dcon: unable to force dcon "
310 "to power down: %d!\n", x);
312 dcon->asleep = sleep;
314 /* Only re-enable the backlight if the backlight value is set */
316 dcon->disp_mode |= MODE_BL_ENABLE;
317 x = dcon_bus_stabilize(dcon, 1);
319 printk(KERN_WARNING "olpc-dcon: unable to reinit dcon"
320 " hardware: %d!\n", x);
322 dcon->asleep = sleep;
324 /* Restore backlight */
325 dcon_set_backlight_hw(dcon, bl_val);
328 /* We should turn off some stuff in the framebuffer - but what? */
331 /* the DCON seems to get confused if we change DCONLOAD too
332 * frequently -- i.e., approximately faster than frame time.
333 * normally we don't change it this fast, so in general we won't
336 void dcon_load_holdoff(void)
338 struct timespec delta_t, now;
340 getnstimeofday(&now);
341 delta_t = timespec_sub(now, dcon_load_time);
342 if (delta_t.tv_sec != 0 ||
343 delta_t.tv_nsec > NSEC_PER_MSEC * 20) {
349 /* Set the source of the display (CPU or DCON) */
351 static void dcon_source_switch(struct work_struct *work)
353 struct dcon_priv *dcon = container_of(work, struct dcon_priv,
355 DECLARE_WAITQUEUE(wait, current);
356 int source = dcon_pending;
358 if (dcon_source == source)
366 case DCON_SOURCE_CPU:
367 printk("dcon_source_switch to CPU\n");
368 /* Enable the scanline interrupt bit */
369 if (dcon_write(dcon, DCON_REG_MODE,
370 dcon->disp_mode | MODE_SCAN_INT))
372 "olpc-dcon: couldn't enable scanline interrupt!\n");
374 /* Wait up to one second for the scanline interrupt */
375 wait_event_timeout(dcon_wait_queue,
376 dcon_switched == 1, HZ);
380 printk(KERN_ERR "olpc-dcon: Timeout entering CPU mode; expect a screen glitch.\n");
382 /* Turn off the scanline interrupt */
383 if (dcon_write(dcon, DCON_REG_MODE, dcon->disp_mode))
384 printk(KERN_ERR "olpc-dcon: couldn't disable scanline interrupt!\n");
387 * Ideally we'd like to disable interrupts here so that the
388 * fb unblanking and DCON turn on happen at a known time value;
389 * however, we can't do that right now with fb_blank
390 * messing with semaphores.
392 * For now, we just hope..
395 ignore_fb_events = 1;
396 if (fb_blank(fbinfo, FB_BLANK_UNBLANK)) {
397 ignore_fb_events = 0;
399 printk(KERN_ERR "olpc-dcon: Failed to enter CPU mode\n");
400 dcon_pending = DCON_SOURCE_DCON;
403 ignore_fb_events = 0;
406 /* And turn off the DCON */
407 pdata->set_dconload(1);
408 getnstimeofday(&dcon_load_time);
410 printk(KERN_INFO "olpc-dcon: The CPU has control\n");
412 case DCON_SOURCE_DCON:
415 struct timespec delta_t;
417 printk(KERN_INFO "dcon_source_switch to DCON\n");
419 add_wait_queue(&dcon_wait_queue, &wait);
420 set_current_state(TASK_UNINTERRUPTIBLE);
422 /* Clear DCONLOAD - this implies that the DCON is in control */
423 pdata->set_dconload(0);
424 getnstimeofday(&dcon_load_time);
426 t = schedule_timeout(HZ/2);
427 remove_wait_queue(&dcon_wait_queue, &wait);
428 set_current_state(TASK_RUNNING);
430 if (!dcon_switched) {
431 printk(KERN_ERR "olpc-dcon: Timeout entering DCON mode; expect a screen glitch.\n");
433 /* sometimes the DCON doesn't follow its own rules,
434 * and doesn't wait for two vsync pulses before
435 * ack'ing the frame load with an IRQ. the result
436 * is that the display shows the *previously*
437 * loaded frame. we can detect this by looking at
438 * the time between asserting DCONLOAD and the IRQ --
439 * if it's less than 20msec, then the DCON couldn't
440 * have seen two VSYNC pulses. in that case we
441 * deassert and reassert, and hope for the best.
442 * see http://dev.laptop.org/ticket/9664
444 delta_t = timespec_sub(dcon_irq_time, dcon_load_time);
445 if (dcon_switched && delta_t.tv_sec == 0 &&
446 delta_t.tv_nsec < NSEC_PER_MSEC * 20) {
447 printk(KERN_ERR "olpc-dcon: missed loading, retrying\n");
448 pdata->set_dconload(1);
450 pdata->set_dconload(0);
451 getnstimeofday(&dcon_load_time);
457 ignore_fb_events = 1;
458 if (fb_blank(fbinfo, FB_BLANK_POWERDOWN))
459 printk(KERN_ERR "olpc-dcon: couldn't blank fb!\n");
460 ignore_fb_events = 0;
463 printk(KERN_INFO "olpc-dcon: The DCON has control\n");
470 dcon_source = source;
473 static void dcon_set_source(struct dcon_priv *dcon, int arg)
475 if (dcon_pending == arg)
480 if ((dcon_source != arg) && !work_pending(&dcon->switch_source))
481 schedule_work(&dcon->switch_source);
484 static void dcon_set_source_sync(struct dcon_priv *dcon, int arg)
486 dcon_set_source(dcon, arg);
487 flush_scheduled_work();
490 static int dconbl_set(struct backlight_device *dev)
492 struct dcon_priv *dcon = bl_get_data(dev);
493 int level = dev->props.brightness;
495 if (dev->props.power != FB_BLANK_UNBLANK)
498 dcon_set_backlight(dcon, level);
502 static int dconbl_get(struct backlight_device *dev)
504 struct dcon_priv *dcon = bl_get_data(dev);
505 return dcon_get_backlight(dcon);
508 static ssize_t dcon_mode_show(struct device *dev,
509 struct device_attribute *attr, char *buf)
511 struct dcon_priv *dcon = dev_get_drvdata(dev);
512 return sprintf(buf, "%4.4X\n", dcon->disp_mode);
515 static ssize_t dcon_sleep_show(struct device *dev,
516 struct device_attribute *attr, char *buf)
519 struct dcon_priv *dcon = dev_get_drvdata(dev);
520 return sprintf(buf, "%d\n", dcon->asleep);
523 static ssize_t dcon_freeze_show(struct device *dev,
524 struct device_attribute *attr, char *buf)
526 return sprintf(buf, "%d\n", dcon_source == DCON_SOURCE_DCON ? 1 : 0);
529 static ssize_t dcon_mono_show(struct device *dev,
530 struct device_attribute *attr, char *buf)
532 struct dcon_priv *dcon = dev_get_drvdata(dev);
533 return sprintf(buf, "%d\n", dcon->mono);
536 static ssize_t dcon_resumeline_show(struct device *dev,
537 struct device_attribute *attr, char *buf)
539 return sprintf(buf, "%d\n", resumeline);
542 static int _strtoul(const char *buf, int len, unsigned int *val)
546 unsigned int output = simple_strtoul(buf, &endp, 0);
547 int size = endp - buf;
549 if (*endp && isspace(*endp))
559 static ssize_t dcon_mono_store(struct device *dev,
560 struct device_attribute *attr, const char *buf, size_t count)
565 if (_strtoul(buf, count, &enable_mono))
568 dcon_set_mono_mode(dev_get_drvdata(dev), enable_mono ? true : false);
574 static ssize_t dcon_freeze_store(struct device *dev,
575 struct device_attribute *attr, const char *buf, size_t count)
577 struct dcon_priv *dcon = dev_get_drvdata(dev);
580 if (_strtoul(buf, count, &output))
583 printk(KERN_INFO "dcon_freeze_store: %d\n", output);
587 dcon_set_source(dcon, DCON_SOURCE_CPU);
590 dcon_set_source_sync(dcon, DCON_SOURCE_DCON);
592 case 2: /* normally unused */
593 dcon_set_source(dcon, DCON_SOURCE_DCON);
602 static ssize_t dcon_resumeline_store(struct device *dev,
603 struct device_attribute *attr, const char *buf, size_t count)
608 if (_strtoul(buf, count, &rl))
612 dcon_write(dev_get_drvdata(dev), DCON_REG_SCAN_INT, resumeline);
618 static ssize_t dcon_sleep_store(struct device *dev,
619 struct device_attribute *attr, const char *buf, size_t count)
623 if (_strtoul(buf, count, &output))
626 dcon_sleep(dev_get_drvdata(dev), output ? true : false);
630 static struct device_attribute dcon_device_files[] = {
631 __ATTR(mode, 0444, dcon_mode_show, NULL),
632 __ATTR(sleep, 0644, dcon_sleep_show, dcon_sleep_store),
633 __ATTR(freeze, 0644, dcon_freeze_show, dcon_freeze_store),
634 __ATTR(monochrome, 0644, dcon_mono_show, dcon_mono_store),
635 __ATTR(resumeline, 0644, dcon_resumeline_show, dcon_resumeline_store),
638 static const struct backlight_ops dcon_bl_ops = {
639 .get_brightness = dconbl_get,
640 .update_status = dconbl_set
644 static int dcon_reboot_notify(struct notifier_block *nb,
645 unsigned long foo, void *bar)
647 struct dcon_priv *dcon = container_of(nb, struct dcon_priv, reboot_nb);
649 if (!dcon || !dcon->client)
652 /* Turn off the DCON. Entirely. */
653 dcon_write(dcon, DCON_REG_MODE, 0x39);
654 dcon_write(dcon, DCON_REG_MODE, 0x32);
658 static int unfreeze_on_panic(struct notifier_block *nb,
659 unsigned long e, void *p)
661 pdata->set_dconload(1);
665 static struct notifier_block dcon_panic_nb = {
666 .notifier_call = unfreeze_on_panic,
670 * When the framebuffer sleeps due to external sources (e.g. user idle), power
671 * down the DCON as well. Power it back up when the fb comes back to life.
673 static int dcon_fb_notifier(struct notifier_block *self,
674 unsigned long event, void *data)
676 struct fb_event *evdata = data;
677 struct dcon_priv *dcon = container_of(self, struct dcon_priv,
679 int *blank = (int *) evdata->data;
680 if (((event != FB_EVENT_BLANK) && (event != FB_EVENT_CONBLANK)) ||
683 dcon_sleep(dcon, *blank ? true : false);
687 static int dcon_detect(struct i2c_client *client, struct i2c_board_info *info)
689 strlcpy(info->type, "olpc_dcon", I2C_NAME_SIZE);
694 static int dcon_probe(struct i2c_client *client, const struct i2c_device_id *id)
696 struct dcon_priv *dcon;
699 dcon = kzalloc(sizeof(*dcon), GFP_KERNEL);
703 dcon->client = client;
704 INIT_WORK(&dcon->switch_source, dcon_source_switch);
705 dcon->reboot_nb.notifier_call = dcon_reboot_notify;
706 dcon->reboot_nb.priority = -1;
707 dcon->fbevent_nb.notifier_call = dcon_fb_notifier;
709 i2c_set_clientdata(client, dcon);
711 if (num_registered_fb >= 1)
712 fbinfo = registered_fb[0];
714 rc = dcon_hw_init(dcon, 1);
718 /* Add the DCON device */
720 dcon_device = platform_device_alloc("dcon", -1);
722 if (dcon_device == NULL) {
723 printk(KERN_ERR "dcon: Unable to create the DCON device\n");
727 rc = platform_device_add(dcon_device);
728 platform_set_drvdata(dcon_device, dcon);
731 printk(KERN_ERR "dcon: Unable to add the DCON device\n");
735 for (i = 0; i < ARRAY_SIZE(dcon_device_files); i++) {
736 rc = device_create_file(&dcon_device->dev,
737 &dcon_device_files[i]);
739 dev_err(&dcon_device->dev, "Cannot create sysfs file\n");
744 /* Add the backlight device for the DCON */
745 dcon_bl_dev = backlight_device_register("dcon-bl", &dcon_device->dev,
746 dcon, &dcon_bl_ops, NULL);
748 if (IS_ERR(dcon_bl_dev)) {
749 printk(KERN_ERR "Cannot register the backlight device (%ld)\n",
750 PTR_ERR(dcon_bl_dev));
753 dcon_bl_dev->props.max_brightness = 15;
754 dcon_bl_dev->props.power = FB_BLANK_UNBLANK;
755 dcon_bl_dev->props.brightness = dcon_get_backlight(dcon);
757 backlight_update_status(dcon_bl_dev);
760 register_reboot_notifier(&dcon->reboot_nb);
761 atomic_notifier_chain_register(&panic_notifier_list, &dcon_panic_nb);
762 fb_register_client(&dcon->fbevent_nb);
767 for (j = 0; j < i; j++)
768 device_remove_file(&dcon_device->dev, &dcon_device_files[j]);
770 platform_device_unregister(dcon_device);
773 free_irq(DCON_IRQ, &dcon_driver);
775 i2c_set_clientdata(client, NULL);
780 static int dcon_remove(struct i2c_client *client)
782 struct dcon_priv *dcon = i2c_get_clientdata(client);
784 i2c_set_clientdata(client, NULL);
786 fb_unregister_client(&dcon->fbevent_nb);
787 unregister_reboot_notifier(&dcon->reboot_nb);
788 atomic_notifier_chain_unregister(&panic_notifier_list, &dcon_panic_nb);
790 free_irq(DCON_IRQ, &dcon_driver);
792 if (dcon_bl_dev != NULL)
793 backlight_device_unregister(dcon_bl_dev);
795 if (dcon_device != NULL)
796 platform_device_unregister(dcon_device);
797 cancel_work_sync(&dcon->switch_source);
805 static int dcon_suspend(struct i2c_client *client, pm_message_t state)
807 struct dcon_priv *dcon = i2c_get_clientdata(client);
810 /* Set up the DCON to have the source */
811 dcon_set_source_sync(dcon, DCON_SOURCE_DCON);
817 static int dcon_resume(struct i2c_client *client)
819 struct dcon_priv *dcon = i2c_get_clientdata(client);
822 dcon_bus_stabilize(dcon, 0);
823 dcon_set_source(dcon, DCON_SOURCE_CPU);
832 static irqreturn_t dcon_interrupt(int irq, void *id)
834 int status = pdata->read_status();
839 switch (status & 3) {
841 printk(KERN_DEBUG "olpc-dcon: DCONLOAD_MISSED interrupt\n");
844 case 2: /* switch to DCON mode */
845 case 1: /* switch to CPU mode */
847 getnstimeofday(&dcon_irq_time);
848 wake_up(&dcon_wait_queue);
852 /* workaround resume case: the DCON (on 1.5) doesn't
853 * ever assert status 0x01 when switching to CPU mode
854 * during resume. this is because DCONLOAD is de-asserted
855 * _immediately_ upon exiting S3, so the actual release
856 * of the DCON happened long before this point.
857 * see http://dev.laptop.org/ticket/9869
859 if (dcon_source != dcon_pending && !dcon_switched) {
861 getnstimeofday(&dcon_irq_time);
862 wake_up(&dcon_wait_queue);
863 printk(KERN_DEBUG "olpc-dcon: switching w/ status 0/0\n");
865 printk(KERN_DEBUG "olpc-dcon: scanline interrupt w/CPU\n");
872 static const struct i2c_device_id dcon_idtable[] = {
877 MODULE_DEVICE_TABLE(i2c, dcon_idtable);
879 static struct i2c_driver dcon_driver = {
883 .class = I2C_CLASS_DDC | I2C_CLASS_HWMON,
884 .id_table = dcon_idtable,
886 .remove = __devexit_p(dcon_remove),
887 .detect = dcon_detect,
888 .address_list = normal_i2c,
890 .suspend = dcon_suspend,
891 .resume = dcon_resume,
895 #include "olpc_dcon_xo_1.c"
897 static int __init olpc_dcon_init(void)
899 pdata = &dcon_pdata_xo_1;
901 return i2c_add_driver(&dcon_driver);
904 static void __exit olpc_dcon_exit(void)
906 i2c_del_driver(&dcon_driver);
909 module_init(olpc_dcon_init);
910 module_exit(olpc_dcon_exit);
912 MODULE_LICENSE("GPL");