From: fredrick.kim Date: Fri, 12 Aug 2011 06:51:11 +0000 (+0900) Subject: /sys/class/lcd/emulator node is created. X-Git-Tag: 2.2.1_release^2~182^2~46^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=98eea483f1fdce87c30f37ab26aeae46aae35215;p=sdk%2Femulator%2Femulator-kernel.git /sys/class/lcd/emulator node is created. --- diff --git a/arch/x86/configs/i386_emul_defconfig b/arch/x86/configs/i386_emul_defconfig index 1d849b5a4127..edffcde1750e 100644 --- a/arch/x86/configs/i386_emul_defconfig +++ b/arch/x86/configs/i386_emul_defconfig @@ -1718,6 +1718,7 @@ CONFIG_BACKLIGHT_EMUL=y # Display device support # # CONFIG_DISPLAY_SUPPORT is not set +CONFIG_EMUL_LCD=y # # Console display driver support diff --git a/drivers/samsung/Kconfig b/drivers/samsung/Kconfig index 400342a93e68..e44331110b12 100755 --- a/drivers/samsung/Kconfig +++ b/drivers/samsung/Kconfig @@ -3,5 +3,9 @@ menu "Virtual_3D_Accelerator" config HW_ACCELERATOR tristate "Samsung Virtual 3D Accelerator driver" default n + +config EMUL_LCD + tristate "Samsung emulator LCD driver" + default n endmenu diff --git a/drivers/samsung/Makefile b/drivers/samsung/Makefile index a7c9c57efbaa..61a5227b334b 100755 --- a/drivers/samsung/Makefile +++ b/drivers/samsung/Makefile @@ -1,2 +1,3 @@ obj-$(CONFIG_HW_ACCELERATOR) += Accelerator.o +obj-$(CONFIG_EMUL_LCD) += emul_lcd.o diff --git a/drivers/samsung/emul_lcd.c b/drivers/samsung/emul_lcd.c new file mode 100644 index 000000000000..268032c893ed --- /dev/null +++ b/drivers/samsung/emul_lcd.c @@ -0,0 +1,60 @@ +/* + * LCD node + * + * Copyright (C) 2003,2004 Hewlett-Packard Company + * + */ + +#include +#include +#include +#include +#include +#include + +#include + +static struct class *emul_lcd_class; +static struct device *emul_lcd_dev; + +static int __init emul_lcd_class_init(void) +{ + int i, ret; + + emul_lcd_class = class_create(THIS_MODULE, "lcd"); + if (IS_ERR(emul_lcd_class)) { + printk(KERN_WARNING "Unable to create backlight class; errno = %ld\n", + PTR_ERR(emul_lcd_class)); + return PTR_ERR(emul_lcd_class); + } + + emul_lcd_dev = device_create(emul_lcd_class, NULL, NULL, NULL, "emulator"); + + /* + for (i=0; i < ARRAY_SIZE(emul_bl_device_attrib); i++) { + ret = device_create_file(emul_backlight_dev, emul_bl_device_attrib[i]); + if (ret != 0) { + printk(KERN_ERR "emul_bl: Failed to create attr %d: %d\n", i, ret); + return ret; + } + } + */ + + return 0; +} + +static void __exit emul_lcd_class_exit(void) +{ + class_destroy(emul_lcd_class); +} + +/* + * if this is compiled into the kernel, we need to ensure that the + * class is registered before users of the class try to register lcd's + */ +module_init(emul_lcd_class_init); +module_exit(emul_lcd_class_exit); + +MODULE_LICENSE("GPL"); +MODULE_AUTHOR("s-core"); +MODULE_DESCRIPTION("Emulator LCD driver for x86");