Update video driver to support the Bookeen way to use screen.

This commit is contained in:
mlt
2009-12-22 18:44:36 +00:00
committed by Godzil
parent 6a09ec6d7a
commit 2c907884d1
10 changed files with 83255 additions and 2883 deletions

View File

@@ -31,4 +31,11 @@ config MACH_SMDK2416
select MACH_SMDK
help
Say Y here if you are using an SMDK2416
config MACH_CYBOOK2416
bool "CYBOOK 2416"
select MACH_SMDK2416
help
Say Y here is you are using a Cybook 2416
endmenu

View File

@@ -20,3 +20,4 @@ obj-$(CONFIG_S3C2416_PM) += pm.o
obj-$(CONFIG_MACH_SMDK2416) += mach-smdk2416.o
obj-$(CONFIG_MACH_SMDK2416) += qisda-utils.o
obj-$(CONFIGçMACH_CYBOOK2416) += cybook.o

View File

@@ -0,0 +1,78 @@
/*
* cybook.c
*
* Copyright 2009 Bookeen <yep@confucius>
*
* 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.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301, USA.
*/
struct proc_dir_entry *platform_type_Proc_File;
#define procfs_name "device"
int procfile_read(char *buffer,
char **buffer_location,
off_t offset, int buffer_length, int *eof, void *data)
{
int ret;
if (offset > 0) {
/* we have finished to read, return 0 */
ret = 0;
} else {
/* fill the buffer, return the buffer size */
/* Currently, this kernel branch will only support the Cybook Gen4 TwistEffect */
ret = sprintf(buffer, "CYBOOK_GEN4\n");
}
return ret;
}
// ---------------------------------------------------------------------------
// ===========================================================================
static int __init cybooInit(void)
{
/* cybook proc file */
platform_type_Proc_File = create_proc_entry(procfs_name, 0644, NULL);
if (platform_type_Proc_File == NULL) {
remove_proc_entry(procfs_name, &proc_root);
printk(KERN_ALERT "Error: Could not initialize /proc/%s\n",
procfs_name);
}
platform_type_Proc_File->read_proc = procfile_read;
platform_type_Proc_File->owner = THIS_MODULE;
platform_type_Proc_File->mode = S_IFREG | S_IRUGO;
platform_type_Proc_File->uid = 0;
platform_type_Proc_File->gid = 0;
platform_type_Proc_File->size = 37;
return 0;
}
// ---------------------------------------------------------------------------
static void __exit cybookExit(void)
{
return;
}
// ---------------------------------------------------------------------------
module_init(cybookInit);
module_exit(cybookExit);
// ---------------------------------------------------------------------------
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Bookeen <developers@bookeen.com>");
MODULE_DESCRIPTION("Cybook Specialized functions");
MODULE_VERSION("2.0");
// ===================================================================