You can subscribe to this list here.
| 2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(135) |
Nov
(123) |
Dec
(83) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2002 |
Jan
(244) |
Feb
(72) |
Mar
(221) |
Apr
(91) |
May
(104) |
Jun
(93) |
Jul
(78) |
Aug
(1) |
Sep
(1) |
Oct
(29) |
Nov
(98) |
Dec
(20) |
| 2003 |
Jan
|
Feb
(21) |
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
(18) |
Sep
(18) |
Oct
(23) |
Nov
(12) |
Dec
(6) |
| 2004 |
Jan
(2) |
Feb
(32) |
Mar
|
Apr
(12) |
May
(11) |
Jun
(11) |
Jul
|
Aug
(9) |
Sep
|
Oct
(15) |
Nov
|
Dec
|
| 2005 |
Jan
|
Feb
(2) |
Mar
(11) |
Apr
(6) |
May
(1) |
Jun
(9) |
Jul
(7) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
| 2006 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2007 |
Jan
|
Feb
(2) |
Mar
|
Apr
(25) |
May
(2) |
Jun
|
Jul
(5) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2008 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2009 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2010 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(13) |
Oct
|
Nov
(2) |
Dec
(2) |
| 2011 |
Jan
|
Feb
|
Mar
(10) |
Apr
(10) |
May
(1) |
Jun
(6) |
Jul
|
Aug
(2) |
Sep
(5) |
Oct
|
Nov
|
Dec
|
|
From: James S. <jsi...@us...> - 2002-04-05 03:09:19
|
Update of /cvsroot/linuxconsole/ruby/linux/drivers/sound In directory usw-pr-cvs1:/tmp/cvs-serv8937 Removed Files: es1370.c es1371.c trident.c trident.h Log Message: Now longer present. --- es1370.c DELETED --- --- es1371.c DELETED --- --- trident.c DELETED --- --- trident.h DELETED --- |
|
From: James S. <jsi...@us...> - 2002-03-30 18:15:42
|
Update of /cvsroot/linuxconsole/ruby/utils In directory usw-pr-cvs1:/tmp/cvs-serv14567 Modified Files: remove-obsolete-files Log Message: Remove old iforce code. Index: remove-obsolete-files =================================================================== RCS file: /cvsroot/linuxconsole/ruby/utils/remove-obsolete-files,v retrieving revision 1.31 retrieving revision 1.32 diff -u -d -r1.31 -r1.32 --- remove-obsolete-files 16 Mar 2002 16:36:10 -0000 1.31 +++ remove-obsolete-files 30 Mar 2002 18:15:38 -0000 1.32 @@ -34,6 +34,7 @@ rm -fv drivers/char/ec3104_keyb.c rm -fv drivers/char/q40_keyb.c rm -fv drivers/char/qpmouse.c +rm -fv drivers/input/joytstick/iforce.c rm -fv drivers/macintosh/mac_keyb.c rm -fv drivers/tc/lk201.c rm -fv drivers/tc/lk201-remap.c |
|
From: James S. <jsi...@us...> - 2002-03-27 20:58:55
|
Update of /cvsroot/linuxconsole/ruby/linux/drivers/input/touchscreen
In directory usw-pr-cvs1:/tmp/cvs-serv30565/touchscreen
Modified Files:
Config.in Makefile ucb1200_ts.c
Log Message:
Touchscreen updates.
Index: Config.in
===================================================================
RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/input/touchscreen/Config.in,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- Config.in 14 Mar 2002 17:51:57 -0000 1.4
+++ Config.in 27 Mar 2002 20:58:50 -0000 1.5
@@ -2,9 +2,9 @@
# Mouse driver configuration
#
-bool 'Touchscreens' CONFIG_INPUT_TS
+bool 'Touchscreens' CONFIG_INPUT_TOUCHSCREEN
if [ "$CONFIG_SA1100_BITSY" = "y" ]; then
-dep_tristate ' Compaq iPAQ H3600 (Bitsy) touchscreen input driver' CONFIG_TS_BITSY $CONFIG_INPUT $CONFIG_INPUT_TS $CONFIG_SERIO
+ dep_tristate ' Compaq iPAQ H3600 (Bitsy) touchscreen input driver' CONFIG_TOUCHSCREEN_BITSY $CONFIG_INPUT $CONFIG_INPUT_TOUCHSCREEN $CONFIG_SERIO
fi
-dep_tristate ' Gunze AHL-51S touchscreen' CONFIG_TS_GUNZE $CONFIG_INPUT $CONFIG_INPUT_TS $CONFIG_SERIO
+dep_tristate ' Gunze AHL-51S touchscreen' CONFIG_TOUCHSCREEN_GUNZE $CONFIG_INPUT $CONFIG_INPUT_TOUCHSCREEN $CONFIG_SERIO
Index: Makefile
===================================================================
RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/input/touchscreen/Makefile,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- Makefile 23 Jan 2002 06:40:56 -0000 1.2
+++ Makefile 27 Mar 2002 20:58:50 -0000 1.3
@@ -8,8 +8,8 @@
# Each configuration option enables a list of files.
-obj-$(CONFIG_TS_BITSY) += h3600_ts_input.o
-obj-$(CONFIG_TS_GUNZE) += gunze.o
+obj-$(CONFIG_TOUCHSCREEN_BITSY) += h3600_ts_input.o
+obj-$(CONFIG_TOUCHSCREEN_GUNZE) += gunze.o
# The global Rules.make.
Index: ucb1200_ts.c
===================================================================
RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/input/touchscreen/ucb1200_ts.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- ucb1200_ts.c 23 Mar 2002 00:29:08 -0000 1.1
+++ ucb1200_ts.c 27 Mar 2002 20:58:50 -0000 1.2
@@ -39,14 +39,6 @@
*
*/
-/*
- * INSTRUCTIONS
- * To use this driver, simply ``mknod /dev/ts c 11 0'' and
- * use it as if it were an iPAQ. TODO: iPAQ-compatible IOCTL's.
- *
- *
- */
-
#include <linux/config.h>
#include <linux/types.h>
#include <linux/module.h>
@@ -64,8 +56,6 @@
#include <asm/irq.h>
#include <asm/ucb1200.h>
-#include "ucb1200_ts.h"
-
/*
* UCB1200 register 9: Touchscreen control register
*/
@@ -86,14 +76,6 @@
#define TSMX_LOW (1 << 13)
-/* From Compaq's Touch Screen Specification version 0.2 (draft) */
-typedef struct {
- short pressure;
- short x;
- short y;
- short millisecs;
-} TS_EVENT;
-
static int raw_max_x, raw_max_y, res_x, res_y, raw_min_x, raw_min_y, xyswap;
static int cal_ok, x_rev, y_rev;
@@ -170,54 +152,6 @@
ucb1200_start_adc(ADC_INPUT_TSPX);
}
-static int ucb1200_ts_ioctl(struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg)
-{
-/* Microwindows style (should change to TS_CAL when the specification is ready) */
- switch (cmd)
- {
- case 3:
- raw_max_x = arg;
- break;
- case 4:
- raw_max_y = arg;
- break;
- case 5:
- res_x = arg;
- break;
- case 6:
- res_y = arg;
- break;
- case 10:
- raw_min_x = arg;
- break;
- case 11:
- raw_min_y = arg;
- break;
- case 12:
-/* New attribute for portrait modes */
- xyswap = arg;
-/* Allen Add */
- case 13: /* 0 = Enable calibration ; 1 = Calibration OK */
- cal_ok = arg;
- case 14: /* Clear all buffer data */
- ts_clear();
- break;
- case 15: /* X axis reversed setting */
- x_rev = arg;
- break;
- case 16: /* Y axis reversed setting */
- y_rev = arg;
- break;
- case 17: /* Clear all buffer data */
- print_par();
- break;
-/* Allen */
- }
-
- return 0;
-}
-
-
static void ts_clear(void)
{
int i;
@@ -235,22 +169,7 @@
}
-static void print_par(void)
-{
- printk(" Kernel ==> cal_ok = %d\n",cal_ok);
- printk(" Kernel ==> raw_max_x = %d\n",raw_max_x);
- printk(" Kernel ==> raw_max_y = %d\n",raw_max_y);
- printk(" Kernel ==> res_x = %d\n",res_x);
- printk(" Kernel ==> res_y = %d\n",res_y);
- printk(" Kernel ==> raw_min_x = %d\n",raw_min_x);
- printk(" Kernel ==> raw_min_y = %d\n",raw_min_y);
- printk(" Kernel ==> xyswap = %d\n",xyswap);
- printk(" Kernel ==> x_rev = %d\n",x_rev);
- printk(" Kernel ==> y_rev = %d\n",y_rev);
-}
-
/* Allen */
-
static inline int pen_up(void)
{
ucb1200_stop_adc();
@@ -264,10 +183,8 @@
static TS_EVENT last_data = { 0, 0, 0, 0 };
int diff0, diff1, diff2, diff3;
- if (cur_data.pressure)
- {
- if (sample < 3)
- {
+ if (cur_data.pressure) {
+ if (sample < 3) {
samples[sample].x = cur_data.x;
samples[sample++].y = cur_data.y;
return;
@@ -412,94 +329,6 @@
spin_unlock_irqrestore(&owner_lock, flags);
}
-static unsigned int ucb1200_ts_poll(struct file *filp, poll_table *wait)
-{
- poll_wait(filp, &queue, wait);
- if (head != tail)
- return POLLIN | POLLRDNORM;
- return 0;
-}
-
-static ssize_t ucb1200_ts_read(struct file *filp, char *buf, size_t count, loff_t *l)
-{
- DECLARE_WAITQUEUE(wait, current);
- int i;
- TS_EVENT t;
- short out_buf[4];
-
- if (head == tail)
- {
- if (filp->f_flags & O_NONBLOCK)
- return -EAGAIN;
- add_wait_queue(&queue, &wait);
- current->state = TASK_INTERRUPTIBLE;
- while ((head == tail) && !signal_pending(current))
- {
- schedule();
- current->state = TASK_INTERRUPTIBLE;
- }
- current->state = TASK_RUNNING;
- remove_wait_queue(&queue, &wait);
- }
- for (i = count; i >= sizeof(out_buf); i -= sizeof(out_buf), buf += sizeof(out_buf))
- {
- if (head == tail)
- break;
- t = get_data();
-
- out_buf[0] = t.pressure;
-
-/* Alen Add */
-#if 0
-
-#ifdef CONFIG_SA1100_ASSABET
- if (xyswap)
- {
- out_buf[1] = (((raw_max_y - t.y)) * res_y) / (raw_max_y - raw_min_y);
- out_buf[2] = (((t.x - raw_min_x)) * res_x) / (raw_max_x - raw_min_x);
- }
- else
- {
- out_buf[1] = (((raw_max_x - t.x)) * res_x) / (raw_max_x - raw_min_x);
- out_buf[2] = (((raw_max_y - t.y)) * res_y) / (raw_max_y - raw_min_y);
- }
-#else
- if (xyswap)
- {
- out_buf[1] = (((t.y - raw_min_y)) * res_y) / (raw_max_y - raw_min_y);
- out_buf[2] = (((t.x - raw_min_x)) * res_x) / (raw_max_x - raw_min_x);
- }
- else
- {
- out_buf[1] = (((t.x - raw_min_x)) * res_x) / (raw_max_x - raw_min_x);
- out_buf[2] = (((t.y - raw_min_y)) * res_y) / (raw_max_y - raw_min_y);
- }
-#endif
-
-#else
- if (cal_ok)
- {
- out_buf[1] = (x_rev) ? ((raw_max_x - t.x) * res_x) / (raw_max_x - raw_min_x) :
- ((t.x - raw_min_x) * res_x) / (raw_max_x - raw_min_x);
- out_buf[2] = (y_rev) ? ((raw_max_y - t.y) * res_y) / (raw_max_y - raw_min_y) :
- ((t.y - raw_min_y) * res_y) / (raw_max_y - raw_min_y);
- }
- else
- {
- out_buf[1] = t.x;
- out_buf[2] = t.y;
- }
-#endif
-/* Allen */
-
- out_buf[3] = t.millisecs;
-
- copy_to_user(buf, &out_buf, sizeof(out_buf));
- }
-
- return count - i;
-}
-
/* Forward declaration */
static void ucb1200_ts_timer(unsigned long);
@@ -524,16 +353,6 @@
}
else
start_chain();
-}
-
-static int ucb1200_ts_fasync(int fd, struct file *filp, int on)
-{
- int retval;
-
- retval = fasync_helper(fd, filp, on, &fasync);
- if (retval < 0)
- return retval;
- return 0;
}
static int ucb1200_ts_open(struct inode *inode, struct file *filp)
|
|
From: James S. <jsi...@us...> - 2002-03-27 20:58:54
|
Update of /cvsroot/linuxconsole/ruby/linux/drivers/input/mouse In directory usw-pr-cvs1:/tmp/cvs-serv30565/mouse Modified Files: Config.help Log Message: Touchscreen updates. Index: Config.help =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/input/mouse/Config.help,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- Config.help 26 Jan 2002 19:20:36 -0000 1.1 +++ Config.help 27 Mar 2002 20:58:50 -0000 1.2 @@ -29,17 +29,6 @@ The module will be called sermouse.o. If you want to compile it as a module, say M here and read <file:Documentation/modules.txt>. -CONFIG_MOUSE_GUNZE - Say Y here if you have the Gunze AHL-51 touchscreen connected to - your system. - - If unsure, say N. - - This driver is also available as a module ( = code which can be - inserted in and removed from the running kernel whenever you want). - The module will be called gunze.o. If you want to compile it as a - module, say M here and read <file:Documentation/modules.txt>. - CONFIG_MOUSE_INPORT Say Y here if you have an InPort, Microsoft or ATI XL busmouse. They are rather rare these days. |
|
From: James S. <jsi...@us...> - 2002-03-27 20:58:54
|
Update of /cvsroot/linuxconsole/ruby/linux/drivers/input In directory usw-pr-cvs1:/tmp/cvs-serv30565 Modified Files: Makefile Log Message: Touchscreen updates. Index: Makefile =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/input/Makefile,v retrieving revision 1.47 retrieving revision 1.48 diff -u -d -r1.47 -r1.48 --- Makefile 23 Jan 2002 06:35:30 -0000 1.47 +++ Makefile 27 Mar 2002 20:58:50 -0000 1.48 @@ -25,7 +25,7 @@ subdir-$(CONFIG_INPUT_JOYSTICK) += joystick subdir-$(CONFIG_INPUT_KEYBOARD) += keyboard subdir-$(CONFIG_INPUT_MOUSE) += mouse -subdir-$(CONFIG_INPUT_TS) += touchscreen +subdir-$(CONFIG_INPUT_TOUCHSCREEN) += touchscreen ifeq ($(CONFIG_INPUT_KEYBOARD),y) obj-y += keyboard/keybdrv.o @@ -39,7 +39,7 @@ obj-y += joystick/joydrv.o endif -ifeq ($(CONFIG_INPUT_TS),y) +ifeq ($(CONFIG_INPUT_TOUCHSCREEN),y) obj-y += touchscreen/tsdrv.o endif |
|
From: James S. <jsi...@us...> - 2002-03-27 20:58:54
|
Update of /cvsroot/linuxconsole/ruby/linux/drivers/input/keyboard
In directory usw-pr-cvs1:/tmp/cvs-serv30565/keyboard
Modified Files:
cerf_keyb.c
Log Message:
Touchscreen updates.
Index: cerf_keyb.c
===================================================================
RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/input/keyboard/cerf_keyb.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- cerf_keyb.c 23 Mar 2002 00:22:58 -0000 1.3
+++ cerf_keyb.c 27 Mar 2002 20:58:50 -0000 1.4
@@ -343,22 +343,6 @@
add_timer(&kbd_timer);
}
-void cerf_leds(unsigned char leds)
-{
-}
-char cerf_unexpected_up(unsigned char keycode)
-{
-return 0;
-}
-int cerf_getkeycode(unsigned int scancode)
-{
-return 0;
-}
-int cerf_setkeycode(unsigned int scancode, unsigned int keycode)
-{
-return 0;
-}
-
void cerf_kbd_init_hw(void)
{
printk("Starting Cerf PDA Keyboard Driver... ");
|
|
From: James S. <jsi...@us...> - 2002-03-27 20:58:15
|
Update of /cvsroot/linuxconsole/ruby/linux/drivers/video
In directory usw-pr-cvs1:/tmp/cvs-serv30025
Modified Files:
fm2fb.c hitfb.c hpfb.c q40fb.c
Log Message:
More cleanup of the frmaebuffer code.
Index: fm2fb.c
===================================================================
RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/video/fm2fb.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- fm2fb.c 28 Feb 2002 18:28:58 -0000 1.9
+++ fm2fb.c 27 Mar 2002 20:58:09 -0000 1.10
@@ -4,7 +4,6 @@
*
* Copyright (C) 1998 Steffen A. Mork (mo...@ls...)
* Copyright (C) 1999 Geert Uytterhoeven
- * Copyright (C) 2001 James Simmons
*
* Written for 2.0.x by Steffen A. Mork
* Ported to 2.1.x by Geert Uytterhoeven
@@ -134,8 +133,12 @@
static u32 pseudo_palette[17];
static struct fb_fix_screeninfo fb_fix __initdata = {
- NULL, (unsigned long) NULL, FRAMEMASTER_REG, FB_TYPE_PACKED_PIXELS, 0,
- FB_VISUAL_TRUECOLOR, 0, 0, 0, 768<<2, (unsigned long)NULL, 8, FB_ACCEL_NONE
+ smem_len: FRAMEMASTER_REG,
+ type: FB_TYPE_PACKED_PIXELS,
+ visual: FB_VISUAL_TRUECOLOR,
+ line_length: (768 << 2),
+ mmio_len: (8),
+ accel: FB_ACCEL_NONE,
};
static int fm2fb_mode __initdata = -1;
@@ -262,6 +265,8 @@
fb_info.pseudo_palette = pseudo_palette;
fb_info.fix = fb_fix;
fb_info.flags = FBINFO_FLAG_DEFAULT;
+
+ fb_alloc_cmap(&fb_info.cmap, 16, 0);
if (register_framebuffer(&fb_info) < 0)
return -EINVAL;
Index: hitfb.c
===================================================================
RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/video/hitfb.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- hitfb.c 29 Oct 2001 22:58:43 -0000 1.6
+++ hitfb.c 27 Mar 2002 20:58:09 -0000 1.7
@@ -21,6 +21,7 @@
#include <linux/delay.h>
#include <linux/nubus.h>
#include <linux/init.h>
+#include <linux/fb.h>
#include <asm/machvec.h>
#include <asm/uaccess.h>
@@ -28,151 +29,175 @@
#include <asm/io.h>
#include <asm/hd64461.h>
-#include <linux/fb.h>
-
-static struct fb_fix_screeninfo hitfb_fix __initdata = {
- "Hitachi HD64461",(unsigned long) NULL, 1024*1024, FB_TYPE_PACKED_PIXELS, 0,
- FB_VISUAL_TRUECOLOR, 0, 0, 0, 0, (unsigned long) NULL, 0, FB_ACCEL_NONE};
-
static struct fb_var_screeninfo hitfb_var __initdata = {
- 0, 0, 0, 0, 0, 0, 0, 0,
- {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0},
- 0, FB_ACTIVATE_NOW, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, FB_VMODE_NONINTERLACED
+ activate: FB_ACTIVATE_NOW,
+ height: -1,
+ width: -1,
+ vmode: FB_VMODE_NONINTERLACED,
};
-static void hitfb_detect(void)
-{
- unsigned short lcdclor, ldr3, ldvntr;
-
- hitfb_fix.smem_start = CONFIG_HD64461_IOBASE + 0x02000000;
- hitfb_fix.smem_len = (MACH_HP680 || MACH_HP690) ? 1024*1024 : 512*1024;
-
- lcdclor = inw(HD64461_LCDCLOR);
- ldvntr = inw(HD64461_LDVNTR);
- ldr3 = inw(HD64461_LDR3);
+static struct fb_fix_screeninfo hitfb_fix __initdata = {
+ id: "Hitachi HD64461",
+ type: FB_TYPE_PACKED_PIXELS,
+ visual: FB_VISUAL_TRUECOLOR,
+ accel_flags: FB_ACCEL_NONE,
+};
- switch (ldr3 & 15) {
- default:
- case 4:
- hitfb_var.bits_per_pixel = 8;
- hitfb_var.xres = lcdclor;
- break;
- case 8:
- hitfb_var.bits_per_pixel = 16;
- hitfb_var.xres = lcdclor/2;
- break;
- }
- hitfb_var.yres = ldvntr+1;
-}
+static u16 pseudo_palette[17];
+struct fb_info fb_info;
static int hitfb_check_var(struct fb_var_screeninfo *var, struct fb_info *info)
{
- var->xres = par->x;
- var->yres = par->y;
- var->xres_virtual = var->xres;
- var->yres_virtual = var->yres;
- var->bits_per_pixel = par->bpp;
+ var->xres_virtual = var->xres;
+ var->yres_virtual = var->yres;
- switch (var->bits_per_pixel) {
- case 8:
- var->red.offset = 0;
- var->red.length = 8;
- var->green.offset = 0;
- var->green.length = 8;
- var->blue.offset = 0;
- var->blue.length = 8;
- var->transp.offset = 0;
- var->transp.length = 0;
- break;
- case 16: /* RGB 565 */
- var->red.offset = 11;
- var->red.length = 5;
- var->green.offset = 5;
- var->green.length = 6;
- var->blue.offset = 0;
- var->blue.length = 5;
- var->transp.offset = 0;
- var->transp.length = 0;
- break;
- }
- var->red.msb_right = 0;
- var->green.msb_right = 0;
- var->blue.msb_right = 0;
- var->transp.msb_right = 0;
- return 0;
+ switch (var->bits_per_pixel) {
+ case 8:
+ var->red.offset = 0;
+ var->red.length = 8;
+ var->green.offset = 0;
+ var->green.length = 8;
+ var->blue.offset = 0;
+ var->blue.length = 8;
+ var->transp.offset = 0;
+ var->transp.length = 0;
+ break;
+ case 16: /* RGB 565 */
+ var->red.offset = 11;
+ var->red.length = 5;
+ var->green.offset = 5;
+ var->green.length = 6;
+ var->blue.offset = 0;
+ var->blue.length = 5;
+ var->transp.offset = 0;
+ var->transp.length = 0;
+ break;
+ }
+ return 0;
}
-static void hitfb_set_par(struct fb_info *info)
+static int hitfb_set_par(struct fb_info *info)
{
- info->fix.smem_start = fb_info.hit_videobase;
- info->fix.smem_len = fb_info.hit_videosize;
- info->fix.visual = (info->var.bits_per_pixel == 8) ?
- FB_VISUAL_PSEUDOCOLOR : FB_VISUAL_TRUECOLOR;
+ info->fix.visual = (info->var.bits_per_pixel == 8) ?
+ FB_VISUAL_PSEUDOCOLOR : FB_VISUAL_TRUECOLOR;
- switch(info->var.bits_per_pixel) {
- default:
- case 8:
- info->fix.line_length = info->var.xres;
- break;
- case 16:
- info->fix.line_length = info->var.xres*2;
- break;
- }
+ switch(info->var.bits_per_pixel) {
+ default:
+ case 8:
+ info->fix.line_length = info->var.xres;
+ break;
+ case 16:
+ info->fix.line_length = info->var.xres*2;
+ break;
+ }
+ return 0;
}
static int hitfb_setcolreg(unsigned regno, unsigned red, unsigned green,
unsigned blue, unsigned transp,
struct fb_info *info)
{
- if (regno > 255)
- return 1;
+ if (regno > 255)
+ return 1;
- outw(regno<<8, HD64461_CPTWAR);
- outw(red>>10, HD64461_CPTWDR);
- outw(green>>10, HD64461_CPTWDR);
- outw(blue>>10, HD64461_CPTWDR);
+ outw(regno << 8, HD64461_CPTWAR);
+ outw(red >> 10, HD64461_CPTWDR);
+ outw(green >> 10, HD64461_CPTWDR);
+ outw(blue >> 10, HD64461_CPTWDR);
- if(regno<16) {
- if (info->var.bits_per_pixel == 16) {
- info->pseudo_palette[regno] = ((red & 0xf800)) | ((green & 0xfc00) >> 5) | ((blue & 0xf800) >> 11);
+ if (regno < 16) {
+ switch(info->var.bits_per_pixel) {
+#ifdef FBCON_HAS_CFB16
+ case 16:
+ ((u16 *)(info->pseudo_palette))[regno] =
+ ((red & 0xf800) ) |
+ ((green & 0xfc00) >> 5) |
+ ((blue & 0xf800) >> 11);
+ break;
+#endif
+ }
}
- }
- return 0;
+ return 0;
}
static struct fb_ops hitfb_ops = {
- owner: THIS_MODULE,
- fb_check_var: hitfb_check_var,
- fb_set_par: hitfb_set_par,
- fb_setcolreg: hitfb_setcolreg,
- fb_fillrect: cfb_fillrect,
- fb_copyarea: cfb_copyarea,
- fb_imageblit: cfb_imageblit,
+ owner: THIS_MODULE,
+ fb_check_var: hitfb_check_var,
+ fb_set_par: hitfb_set_par,
+ fb_setcolreg: hitfb_setcolreg,
+ fb_fillrect: cfb_fillrect,
+ fb_copyarea: cfb_copyarea,
+ fb_imageblit: cfb_imageblit,
};
int __init hitfb_init(void)
{
- fb_info.node = -1;
- fb_info.flags = FBINFO_FLAG_DEFAULT;
- fb_info.fbops = &hitfb_ops;
- hitfb_detect();
- fb_info.screen_base = (void *) hitfb_fix.smem_start;
+ unsigned short lcdclor, ldr3, ldvntr;
+
+ hitfb_fix.smem_start = CONFIG_HD64461_IOBASE + 0x02000000;
+ hitfb_fix.smem_len = (MACH_HP680 || MACH_HP690) ? 1024*1024 : 512*1024;
+
+ lcdclor = inw(HD64461_LCDCLOR);
+ ldvntr = inw(HD64461_LDVNTR);
+ ldr3 = inw(HD64461_LDR3);
+
+ switch (ldr3&15) {
+ default:
+ case 4:
+ hitfb_var.bits_per_pixel = 8;
+ hitfb_var.xres = lcdclor;
+ break;
+ case 8:
+ hitfb_var.bits_per_pixel = 16;
+ hitfb_var.xres = lcdclor/2;
+ break;
+ }
+ hitfb_var.yres = ldvntr+1;
+
+ fb_info.node = NODEV;
+ fb_info.fbops = &hitfb_ops;
+ fb_info.var = hitfb_var;
+ fb_info.fix = hitfb_fix;
+ fb_info.pseudo_palette = pseudo_palette;
+ fb_info.flags = FBINFO_FLAG_DEFAULT;
+ fb_info.screen_base = (void *) hitfb_fix.smem_start;
+
+ size = (fb_info.var.bits_per_pixel == 8) ? 256 : 16;
+ fb_alloc_cmap(&fb_info.cmap, size, 0);
+
+ gen_get_var(&fb_info.var, -1, &fb_info);
- if(register_framebuffer(&fb_info) < 0) return -EINVAL;
+ if (register_framebuffer(&fb_info) < 0)
+ return -EINVAL;
- printk(KERN_INFO "fb%d: %s frame buffer device\n",
- GET_FB_IDX(fb_info.node), fb_info.fix.id);
- return 0;
+ printk(KERN_INFO "fb%d: %s frame buffer device\n",
+ GET_FB_IDX(fb_info.node), fb_info.fix.id);
+ return 0;
}
-static void __exit hitfb_exit(void)
+
+void hitfb_cleanup(struct fb_info *info)
{
- unregister_framebuffer(&fb_info);
+ unregister_framebuffer(info);
}
-module_init(hitfb_init);
-module_exit(hitfb_exit);
+#ifdef MODULE
MODULE_LICENSE("GPL");
+int init_module(void)
+{
+ return hitfb_init();
+}
+
+void cleanup_module(void)
+{
+ hitfb_cleanup(void);
+}
+#endif
+
+/*
+ * Local variables:
+ * c-basic-offset: 4
+ * End:
+ */
Index: hpfb.c
===================================================================
RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/video/hpfb.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- hpfb.c 28 Feb 2002 18:28:58 -0000 1.9
+++ hpfb.c 27 Mar 2002 20:58:09 -0000 1.10
@@ -41,26 +41,27 @@
#define WMOVE 0x409c
static struct fb_fix_screeninfo hpfb_fix __initdata = {
- "HP300 Topcat", (unsigned long) NULL, 1024*768, FB_TYPE_PACKED_PIXELS, 0,
- FB_VISUAL_PSEUDOCOLOR, 0, 0, 0, 1024, (unsigned long) NULL, 0, FB_ACCEL_NONE};
+ id: "HP300 Topcat",
+ smem_len: 1024*768,
+ type: FB_TYPE_PACKED_PIXELS,
+ visual: FB_VISUAL_PSEUDOCOLOR,
+ line_length: 1024,
+ accel: FB_ACCEL_NONE,
static struct fb_var_screeninfo hpfb_defined = {
- 1024,768,1024,768, /* W,H, W, H (virtual) load xres,xres_virtual*/
- 0,0, /* virtual -> visible no offset */
- 1, /* depth -> load bits_per_pixel */
- 0, /* greyscale ? */
- {0,2,0}, /* R */
- {0,2,0}, /* G */
- {0,2,0}, /* B */
- {0,0,0}, /* transparency */
- 0, /* standard pixel format */
- FB_ACTIVATE_NOW,
- 274,195, /* 14" monitor */
- FB_ACCEL_NONE,
- 0L,0L,0L,0L,0L,
- 0L,0L,0, /* No sync info */
- FB_VMODE_NONINTERLACED,
- {0,0,0,0,0,0}
+ xres: 1024,
+ yres: 768,
+ xres_virtual: 1024,
+ yres_virtual: 786,
+ bits_per_pixel: 1,
+ red: {0,2,0}, /* R */
+ green: {0,2,0}, /* G */
+ blue: {0,2,0}, /* B */
+ activate: FB_ACTIVATE_NOW,
+ height: 274,
+ width: 195, /* 14" monitor */
+ accel_flags: FB_ACCEL_NONE,
+ vmode: FB_VMODE_NONINTERLACED,
};
/*
@@ -100,7 +101,7 @@
static struct fb_ops hpfb_ops = {
owner: THIS_MODULE,
fb_setcolreg: hpfb_setcolreg,
- fb_fillrect: cfb_fillrect,
+ fb_fillrect: cfb_fillrect,
fb_copyarea: hpfb_copyarea,
fb_imageblit: cfb_imageblit,
};
@@ -154,6 +155,8 @@
fb_info.var = hpfb_defined;
fb_info.fix = hpfb_fix;
fb_info.screen_base = hpfb_fix.smem_start;
+
+ fb_alloc_cmap(&fb_info.cmap, 256, 0);
if (register_framebuffer(&fb_info) < 0)
return 1;
Index: q40fb.c
===================================================================
RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/video/q40fb.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- q40fb.c 28 Feb 2002 18:31:50 -0000 1.7
+++ q40fb.c 27 Mar 2002 20:58:09 -0000 1.8
@@ -34,16 +34,27 @@
static struct fb_info fb_info;
static struct fb_fix_screeninfo q40fb_fix __initdata = {
- "Q40", (unsigned long) NULL, 1024*1024, FB_TYPE_PACKED_PIXELS, 0,
- FB_VISUAL_TRUECOLOR, 0, 0, 0, 1024*2, (unsigned long) NULL, 0, FB_ACCEL_NONE
+ id: "Q40",
+ smem_len: 1024*1024,
+ type: FB_TYPE_PACKED_PIXELS,
+ visual: FB_VISUAL_TRUECOLOR,
+ line_length: 1024*2,
+ accel_flags: FB_ACCEL_NONE,
};
static struct fb_var_screeninfo q40fb_var __initdata = {
- /* 1024x512, 16 bpp */
- 1024, 512, 1024, 512, 0, 0, 16, 0,
- {6, 5, 0}, {11, 5, 0}, {0, 6, 0}, {0, 0, 0},
- 0, FB_ACTIVATE_NOW, 230, 300, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, FB_VMODE_NONINTERLACED
+ xres: 1024,
+ yres: 512,
+ xres_virtual: 1024,
+ yres_virtual: 512,
+ bits_per_pixel: 16,
+ red: {6, 5, 0},
+ green: {11, 5, 0},
+ blue: {0, 6, 0},
+ activate: FB_ACTIVATE_NOW,
+ height: 230,
+ width: 300,
+ vmode: FB_VMODE_NONINTERLACED,
};
/* frame buffer operations */
@@ -54,11 +65,11 @@
struct fb_info *info);
static struct fb_ops q40fb_ops = {
- owner: THIS_MODULE,
- fb_setcolreg: q40fb_setcolreg,
- fb_fillrect: cfb_fillrect,
- fb_copyarea: cfb_copyarea,
- fb_imageblit: cfb_imageblit,
+ owner: THIS_MODULE,
+ fb_setcolreg: q40fb_setcolreg,
+ fb_fillrect: cfb_fillrect,
+ fb_copyarea: cfb_copyarea,
+ fb_imageblit: cfb_imageblit,
};
static int q40fb_setcolreg(unsigned regno, unsigned red, unsigned green,
@@ -99,6 +110,8 @@
fb_info.pseudo_palette = pseudo_palette;
fb_info.screen_base = (char *) q40fb_fix.smem_start;
+ fb_alloc_cmap(&fb_info.cmap, 16, 0);
+
master_outb(3, DISPLAY_CONTROL_REG);
if (register_framebuffer(&fb_info) < 0) {
|
|
From: James S. <jsi...@us...> - 2002-03-27 18:27:43
|
Update of /cvsroot/linuxconsole/ruby/linux/drivers/input/touchscreen In directory usw-pr-cvs1:/tmp/cvs-serv5191 Added Files: Config.help Log Message: Added first help file. --- NEW FILE: Config.help --- CONFIG_INPUT_TOUCHSCREEN Say Y here, and a list of supported touchscreens will be displayed. This option doesn't affect the kernel. If unsure, say Y. CONFIG_TOUCHSCREEN_GUNZE Say Y here if you have the Gunze AHL-51 touchscreen connected to your system. If unsure, say N. This driver is also available as a module ( = code which can be inserted in and removed from the running kernel whenever you want). The module will be called gunze.o. If you want to compile it as a module, say M here and read <file:Documentation/modules.txt>. |
|
From: James S. <jsi...@us...> - 2002-03-27 18:27:43
|
Update of /cvsroot/linuxconsole/ruby/linux/drivers/video/riva In directory usw-pr-cvs1:/tmp/cvs-serv5352 Added Files: Makefile Log Message: Don't need accel.c anymore. Its bulit into fbdev.c. --- NEW FILE: Makefile --- # # Makefile for the Riva framebuffer driver # # Note! Dependencies are done automagically by 'make dep', which also # removes any old dependencies. DON'T put your own dependencies here # unless it's something special (ie not a .c file). # # Note 2! The CFLAGS definitions are now in the main makefile... O_TARGET := rivafb.o obj-y := fbdev.o riva_hw.o ../cfbfillrect.o ../cfbcopyarea.o ../cfbimgblt.o obj-m := $(O_TARGET) include $(TOPDIR)/Rules.make |
|
From: johann d. <jd...@us...> - 2002-03-26 21:41:15
|
Update of /cvsroot/linuxconsole/ruby/linux/drivers/usb
In directory usw-pr-cvs1:/tmp/cvs-serv32336
Modified Files:
hid-ff.c
Log Message:
Added timers to handle replay delays and lengths.
Index: hid-ff.c
===================================================================
RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/usb/hid-ff.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- hid-ff.c 18 Mar 2002 21:34:28 -0000 1.8
+++ hid-ff.c 26 Mar 2002 21:41:12 -0000 1.9
@@ -30,13 +30,15 @@
#include <linux/input.h>
#include <linux/sched.h>
-#undef DEBUG
+#define DEBUG
#include <linux/usb.h>
#include <linux/circ_buf.h>
#include "hid.h"
+#define RUN_AT(t) (jiffies + (t))
+
/* Transmition state */
#define XMIT_RUNNING 0
@@ -113,14 +115,21 @@
};
struct lgff_effect {
+ int id;
+ struct hid_ff_logitech* lgff;
+
pid_t owner;
unsigned char left; /* Magnitude of vibration for left motor */
unsigned char right; /* Magnitude of vibration for right motor */
struct ff_replay replay;
+ unsigned int count; /* Number of times to play */
+ struct timer_list timer;
unsigned long flags[1];
};
struct hid_ff_logitech {
+ struct hid_device* hid;
+
struct urb* urbffout; /* Output URB used to send ff commands */
struct usb_ctrlrequest ffcr; /* ff commands use control URBs */
char buf[8];
@@ -136,7 +145,6 @@
isn't really necessary */
};
-
static void hid_lgff_ctrl_out(struct urb *urb);
static void hid_lgff_exit(struct hid_device* hid);
static int hid_lgff_event(struct hid_device *hid, struct input_dev *input,
@@ -149,10 +157,13 @@
static int hid_lgff_erase(struct input_dev *input, int id);
static void hid_lgff_ctrl_playback(struct hid_device* hid, struct lgff_effect*,
int play);
+static void hid_lgff_timer(unsigned long timer_data);
+
static int hid_lgff_init(struct hid_device* hid)
{
struct hid_ff_logitech *private;
+ int i;
/* Private data */
hid->ff_private = kmalloc(sizeof(struct hid_ff_logitech), GFP_KERNEL);
@@ -163,12 +174,24 @@
hid->ff_private = private;
+ private->hid = hid;
spin_lock_init(&private->lock);
spin_lock_init(&private->xmit_lock);
private->buf[0] = 0x03;
private->buf[1] = 0x42;
+ for (i=0; i<LGFF_EFFECTS; ++i) {
+ struct lgff_effect* effect = &private->effects[i];
+ struct timer_list* timer = &effect->timer;
+
+ init_timer(timer);
+ effect->id = i;
+ effect->lgff = private;
+ timer->data = (unsigned long)effect;
+ timer->function = hid_lgff_timer;
+ }
+
/* Event and exit callbacks */
hid->ff_exit = hid_lgff_exit;
hid->ff_event = hid_lgff_event;
@@ -213,14 +236,47 @@
struct lgff_effect *effect = lgff->effects + code;
unsigned long flags;
- if (type != EV_FF) return -EINVAL;
+ if (type != EV_FF) return -EINVAL;
+ if (!LGFF_CHECK_OWNERSHIP(code, lgff)) return -EACCES;
+ if (value < 0) return -EINVAL;
+
+ spin_lock_irqsave(&lgff->lock, flags);
- if (!LGFF_CHECK_OWNERSHIP(code, lgff)) return -EACCES;
+ if (value > 0) {
+ if (test_bit(EFFECT_STARTED, effect->flags)) {
+ spin_unlock_irqrestore(&lgff->lock, flags);
+ return -EBUSY;
+ }
+ if (test_bit(EFFECT_PLAYING, effect->flags)) {
+ spin_unlock_irqrestore(&lgff->lock, flags);
+ return -EBUSY;
+ }
- if (value < 0) return -EINVAL;
+ effect->count = value;
+
+ if (effect->replay.delay) {
+ set_bit(EFFECT_STARTED, effect->flags);
+ effect->timer.expires = RUN_AT(effect->replay.delay * HZ / 1000);
+ } else {
+ hid_lgff_ctrl_playback(hid, effect, value);
+ effect->timer.expires = RUN_AT(effect->replay.length * HZ / 1000);
+ }
+
+ add_timer(&effect->timer);
+ }
+ else { /* value == 0 */
+ if (test_and_clear_bit(EFFECT_STARTED, effect->flags)) {
+ del_timer(&effect->timer);
+
+ } else if (test_and_clear_bit(EFFECT_PLAYING, effect->flags)) {
+ del_timer(&effect->timer);
+ hid_lgff_ctrl_playback(hid, effect, value);
+ }
+
+ if (test_bit(EFFECT_PLAYING, effect->flags))
+ warn("Effect %d still playing", code);
+ }
- spin_lock_irqsave(&lgff->lock, flags);
- hid_lgff_ctrl_playback(hid, effect, value);
spin_unlock_irqrestore(&lgff->lock, flags);
return 0;
@@ -244,7 +300,7 @@
&& test_bit(EFFECT_USED, lgff->effects[i].flags)) {
if (hid_lgff_erase(dev, i))
- warn("erase effect %d failed\n", i);
+ warn("erase effect %d failed", i);
}
}
@@ -393,7 +449,7 @@
tail = lgff->xmit_tail;
if (CIRC_SPACE(head, tail, LGFF_BUFFER_SIZE) < 1) {
- warn("not enough space in xmit buffer to send new packet\n");
+ warn("not enough space in xmit buffer to send new packet");
spin_unlock_irqrestore(&lgff->xmit_lock, flags);
return;
}
@@ -433,6 +489,55 @@
clear_bit(EFFECT_PLAYING, effect->flags);
hid_lgff_make_rumble(hid);
}
+}
+
+static void hid_lgff_timer(unsigned long timer_data)
+{
+ struct lgff_effect *effect = (struct lgff_effect*) timer_data;
+ struct hid_ff_logitech* lgff = effect->lgff;
+ int id = effect->id;
+
+ unsigned long flags;
+
+ dbg("in hid_lgff_timer");
+
+ if (id < 0 || id >= LGFF_EFFECTS) {
+ warn("Bad effect id %d", id);
+ return;
+ }
+
+ effect = lgff->effects + id;
+
+ spin_lock_irqsave(&lgff->lock, flags);
+
+ if (!test_bit(EFFECT_USED, effect->flags)) {
+ warn("Unused effect id %d", id);
+
+ } else if (test_bit(EFFECT_STARTED, effect->flags)) {
+ clear_bit(EFFECT_STARTED, effect->flags);
+ set_bit(EFFECT_PLAYING, effect->flags);
+ hid_lgff_ctrl_playback(lgff->hid, effect, 1);
+ effect->timer.expires = RUN_AT(effect->replay.length * HZ / 1000);
+ add_timer(&effect->timer);
+
+ dbg("Effect %d starts playing", id);
+ } else if (test_bit(EFFECT_PLAYING, effect->flags)) {
+ clear_bit(EFFECT_PLAYING, effect->flags);
+ hid_lgff_ctrl_playback(lgff->hid, effect, 0);
+ if (--effect->count > 0) {
+ /*TODO: check that replay.delay is non-null */
+ set_bit(EFFECT_STARTED, effect->flags);
+ effect->timer.expires = RUN_AT(effect->replay.delay * HZ / 1000);
+ add_timer(&effect->timer);
+ dbg("Effect %d restarted", id);
+ } else {
+ dbg("Effect %d stopped", id);
+ }
+ } else {
+ warn("Effect %d is not started nor playing", id);
+ }
+
+ spin_unlock_irqrestore(&lgff->lock, flags);
}
#endif /* CONFIG_LOGITECH_RUMBLE */
|
|
From: James S. <jsi...@us...> - 2002-03-25 20:14:50
|
Update of /cvsroot/linuxconsole/ruby/linux/drivers/char
In directory usw-pr-cvs1:/tmp/cvs-serv15730
Modified Files:
tty_io.c
Log Message:
Oops. Stupid mistake pointed out by Wartan. Thank you.
Index: tty_io.c
===================================================================
RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/char/tty_io.c,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -d -r1.45 -r1.46
--- tty_io.c 13 Mar 2002 23:48:37 -0000 1.45
+++ tty_io.c 25 Mar 2002 20:14:45 -0000 1.46
@@ -1481,7 +1481,7 @@
if (!memcmp(&tmp_ws, &tty->winsize, sizeof(*arg)))
return 0;
#ifdef CONFIG_VT
- if (tty->driver.subtype = SYSTEM_TYPE_CONSOLE) {
+ if (tty->driver.subtype == SYSTEM_TYPE_CONSOLE) {
struct vc_data *vc = (struct vc_data *) tty->driver_data;
if (!vc || vc_resize(vc, tmp_ws.ws_col, tmp_ws.ws_row))
|
|
From: James S. <jsi...@us...> - 2002-03-25 19:39:07
|
Update of /cvsroot/linuxconsole/ruby/linux/drivers/char
In directory usw-pr-cvs1:/tmp/cvs-serv5576
Modified Files:
keyboard.c
Log Message:
Fixed bug noticed by Aivils. Thank you.
Index: keyboard.c
===================================================================
RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/char/keyboard.c,v
retrieving revision 1.74
retrieving revision 1.75
diff -u -d -r1.74 -r1.75
--- keyboard.c 18 Mar 2002 19:58:10 -0000 1.74
+++ keyboard.c 25 Mar 2002 19:39:02 -0000 1.75
@@ -1090,8 +1090,10 @@
handle->private = vt;
vt_map_input(vt);
/* enable receieving key events for each VC */
- for (i = 0; i < MAX_NR_USER_CONSOLES; i++)
- vt->vc_cons[i]->vc_kam = 1;
+ for (i = 0; i < MAX_NR_USER_CONSOLES; i++) {
+ vc = find_vc(vt->first_vc + i);
+ if (vc) vc->vc_kam = 1;
+ }
break;
} else
vt = vt->next;
@@ -1114,8 +1116,10 @@
if (vt && vt->keyboard == handle) {
/* disable receieving key events for each VC */
- for (i = 0; i < MAX_NR_USER_CONSOLES; i++)
- vt->vc_cons[i]->vc_kam = 1;
+ for (i = 0; i < MAX_NR_USER_CONSOLES; i++) {
+ vc = find_vc(vt->first_vc + i);
+ if (vc) vc->vc_kam = 1;
+ }
vt->keyboard = NULL;
handle->private = NULL;
}
|
|
From: James S. <jsi...@us...> - 2002-03-24 14:48:57
|
Update of /cvsroot/linuxconsole/ruby/linux/drivers/video
In directory usw-pr-cvs1:/tmp/cvs-serv27289
Modified Files:
neofb.c
Log Message:
cleanups.
Index: neofb.c
===================================================================
RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/video/neofb.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- neofb.c 18 Mar 2002 20:34:26 -0000 1.1
+++ neofb.c 24 Mar 2002 14:48:54 -0000 1.2
@@ -67,8 +67,6 @@
#include <asm/mtrr.h>
#endif
-#include <video/fbcon.h>
-
#include <video/neofb.h>
#define NEOFB_VERSION "0.3.3"
@@ -1182,39 +1180,10 @@
return 0;
}
-static int neofb_set_var(struct fb_var_screeninfo *var, int con,
- struct fb_info *info)
-{
- int err;
-
- if (con < 0 || (memcmp(&info->var, var, sizeof(struct fb_var_screeninfo)))) {
-
- if ((err = info->fbops->fb_check_var(var, info)))
- return err;
-
- if ((var->activate & FB_ACTIVATE_MASK) == FB_ACTIVATE_NOW) {
- info->var = *var;
-
- if (con == info->currcon) {
- info->fbops->fb_set_par(info);
-
- info->fbops->fb_pan_display(&info->var, con, info);
-
- gen_set_disp(con, info);
- fb_set_cmap(&info->cmap, 1, info);
- }
-
- if (info->changevar)
- info->changevar(con);
- }
- }
- return 0;
-}
-
/*
* Pan or Wrap the Display
*/
-static int neofb_pan_display (struct fb_var_screeninfo *var, int con,
+static int neofb_pan_display (struct fb_var_screeninfo *var,
struct fb_info *info)
{
u_int y_bottom;
@@ -1799,19 +1768,16 @@
struct neofb_par *par;
struct fb_info *info;
- info = kmalloc(sizeof(struct fb_info) +
- sizeof(struct display) + sizeof(u32) * 16, GFP_KERNEL);
+ info = kmalloc(sizeof(struct fb_info) + sizeof(u32) * 16, GFP_KERNEL);
if (!info)
return NULL;
- memset(info, 0, sizeof(struct fb_info) + sizeof(struct display));
+ memset(info, 0, sizeof(struct fb_info));
par = &default_par;
memset(par, 0, sizeof(struct neofb_par));
- info->currcon = -1;
-
par->pci_burst = !nopciburst;
par->lcd_stretch = !nostretch;
@@ -1870,14 +1836,10 @@
strcpy(info->modename, info->fix.id);
info->fbops = &neofb_ops;
- info->changevar = NULL;
- info->switch_con = gen_switch;
- info->updatevar = gen_update_var;
info->flags = FBINFO_FLAG_DEFAULT;
info->par = par;
- info->disp = (struct display *)(info + 1);
- info->pseudo_palette = (void *)(info->disp + 1);
-
+ info->pseudo_palette = (void *)(info + 1);
+
fb_alloc_cmap (&info->cmap, NR_PALETTE, 0);
return info;
|
|
From: James S. <jsi...@us...> - 2002-03-23 00:29:10
|
Update of /cvsroot/linuxconsole/ruby/linux/drivers/input/touchscreen
In directory usw-pr-cvs1:/tmp/cvs-serv1063
Added Files:
ucb1200_ts.c
Log Message:
Placed default UCB driver here. Will port to input api soon.
--- NEW FILE: ucb1200_ts.c ---
/*
* SA11x0 + UCB1x00 Touch Screen Driver Version 0.2
* Put together by Tak-Shing Chan <tch...@id...>
*
* 90% derived from the Touch screen driver for Tifon
* Copyright 1999 Peter Danielsson
*
* Codec routines derived from Itsy's Touchscreen driver
* Copyright (c) Compaq Computer Corporation, 1998, 1999
* Author: Larry Brakmo.
*
* Sample filtering derived from Diagman (ucb1x00Touch.c)
* Copyright (C) 1999 Intel Corp.
*
* IOCTL's and jitter elimination derived from ADS Touchscreen driver
* Copyright (c) 2000 Century Software, Inc.
*
* iPAQ emulation derived from Driver for the h3600 Touch Screen
* Copyright 2000 Compaq Computer Corporation.
* Author: Charles Flynn.
*
* Add Some function to let it more flexible
* All...@xl...
* ch...@li...
*
* Add Freebird UCB1300 Touch-Panel/Button driver support
* Eric Peng <erc...@co...>
* Tony Liu < to...@co...>
*
* Added support for ADCx (0-3) inputs on UCB1200
* Brad Parker <br...@he...>
*
* Added support for Flexanet machine.
* On sa1100_ts_init() error, resouces are freed.
* Jordi Colomer <jc...@ic...>
*
* Todo:
* support other button driver controlled by UCB-1300
*
*/
/*
* INSTRUCTIONS
* To use this driver, simply ``mknod /dev/ts c 11 0'' and
* use it as if it were an iPAQ. TODO: iPAQ-compatible IOCTL's.
*
*
*/
#include <linux/config.h>
#include <linux/types.h>
#include <linux/module.h>
#include <linux/sched.h>
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/fs.h>
#include <linux/delay.h>
#include <linux/fs.h>
#include <linux/poll.h>
#include <linux/string.h>
#include <asm/uaccess.h>
#include <asm/hardware.h>
#include <asm/irq.h>
#include <asm/ucb1200.h>
#include "ucb1200_ts.h"
/*
* UCB1200 register 9: Touchscreen control register
*/
#define TSMX_POW (1 << 0)
#define TSPX_POW (1 << 1)
#define TSMY_POW (1 << 2)
#define TSPY_POW (1 << 3)
#define TSMX_GND (1 << 4)
#define TSPX_GND (1 << 5)
#define TSMY_GND (1 << 6)
#define TSPY_GND (1 << 7)
#define TSC_MODE_MASK (3 << 8)
#define TSC_MODE_INT (0 << 8)
#define TSC_MODE_PRESSURE (1 << 8)
#define TSC_MODE_POSITION (1 << 9)
#define TSC_BIAS_ENA (1 << 11)
#define TSPX_LOW (1 << 12)
#define TSMX_LOW (1 << 13)
/* From Compaq's Touch Screen Specification version 0.2 (draft) */
typedef struct {
short pressure;
short x;
short y;
short millisecs;
} TS_EVENT;
static int raw_max_x, raw_max_y, res_x, res_y, raw_min_x, raw_min_y, xyswap;
static int cal_ok, x_rev, y_rev;
static char *dev_id = "ucb1200-ts";
static DECLARE_WAIT_QUEUE_HEAD(queue);
static struct timer_list timer;
/* state machine states for touch screen */
#define PRESSED 0
#define P_DONE 1
#define X_DONE 2
#define Y_DONE 3
#define RELEASED 4
/* state machine states for adc */
#define ADCX_IDLE 0
#define ADCX_SAMPLE 1
/* who owns the adc h/w (touch screen or adcx) */
#define ADC_OWNER_TS 1
#define ADC_OWNER_ADCX 2
static spinlock_t owner_lock = SPIN_LOCK_UNLOCKED;
#define BUFSIZE 128
#define XLIMIT 160
#define YLIMIT 160
static volatile int ts_state, adcx_state, adc_owner;
static int head, tail, sample;
static TS_EVENT cur_data, samples[3], buf[BUFSIZE];
static struct fasync_struct *fasync;
static unsigned long in_timehandle = 0;
static int adcx_channel, adcx_data[4];
/* Allen Add */
static void ts_clear(void);
static void print_par(void);
extern void ucb1200_stop_adc(void);
extern void ucb1200_start_adc(u16 input);
extern u16 ucb1200_read_adc(void);
static inline void set_read_x_pos(void)
{
/* See Philips' AN809 for an explanation of the pressure mode switch */
ucb1200_write_reg(UCB1200_REG_TS_CTL, TSPX_POW | TSMX_GND | TSC_MODE_PRESSURE | TSC_BIAS_ENA);
/* generate a SIB frame */
ucb1200_stop_adc();
ucb1200_write_reg(UCB1200_REG_TS_CTL, TSPX_POW | TSMX_GND | TSC_MODE_POSITION | TSC_BIAS_ENA);
ucb1200_start_adc(ADC_INPUT_TSPY);
}
static inline void set_read_y_pos(void)
{
ucb1200_write_reg(UCB1200_REG_TS_CTL, TSPY_POW | TSMY_GND | TSC_MODE_PRESSURE | TSC_BIAS_ENA);
/* generate a SIB frame */
ucb1200_stop_adc();
ucb1200_write_reg(UCB1200_REG_TS_CTL, TSPY_POW | TSMY_GND | TSC_MODE_POSITION | TSC_BIAS_ENA);
ucb1200_start_adc(ADC_INPUT_TSPX);
}
static inline void set_read_pressure(void)
{
ucb1200_write_reg(UCB1200_REG_TS_CTL, TSPX_POW | TSMX_POW | TSPY_GND | TSMY_GND | TSC_MODE_PRESSURE | TSC_BIAS_ENA);
ucb1200_start_adc(ADC_INPUT_TSPX);
}
static int ucb1200_ts_ioctl(struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg)
{
/* Microwindows style (should change to TS_CAL when the specification is ready) */
switch (cmd)
{
case 3:
raw_max_x = arg;
break;
case 4:
raw_max_y = arg;
break;
case 5:
res_x = arg;
break;
case 6:
res_y = arg;
break;
case 10:
raw_min_x = arg;
break;
case 11:
raw_min_y = arg;
break;
case 12:
/* New attribute for portrait modes */
xyswap = arg;
/* Allen Add */
case 13: /* 0 = Enable calibration ; 1 = Calibration OK */
cal_ok = arg;
case 14: /* Clear all buffer data */
ts_clear();
break;
case 15: /* X axis reversed setting */
x_rev = arg;
break;
case 16: /* Y axis reversed setting */
y_rev = arg;
break;
case 17: /* Clear all buffer data */
print_par();
break;
/* Allen */
}
return 0;
}
static void ts_clear(void)
{
int i;
for (i=0; i < BUFSIZE; i++)
{
buf[i].pressure=(short)NULL;
buf[i].x=(int)NULL;
buf[i].y=(int)NULL;
buf[i].millisecs=(int)NULL;
}
head = 0;
tail = 0;
}
static void print_par(void)
{
printk(" Kernel ==> cal_ok = %d\n",cal_ok);
printk(" Kernel ==> raw_max_x = %d\n",raw_max_x);
printk(" Kernel ==> raw_max_y = %d\n",raw_max_y);
printk(" Kernel ==> res_x = %d\n",res_x);
printk(" Kernel ==> res_y = %d\n",res_y);
printk(" Kernel ==> raw_min_x = %d\n",raw_min_x);
printk(" Kernel ==> raw_min_y = %d\n",raw_min_y);
printk(" Kernel ==> xyswap = %d\n",xyswap);
printk(" Kernel ==> x_rev = %d\n",x_rev);
printk(" Kernel ==> y_rev = %d\n",y_rev);
}
/* Allen */
static inline int pen_up(void)
{
ucb1200_stop_adc();
ucb1200_write_reg(UCB1200_REG_TS_CTL, TSPX_POW | TSMX_POW | TSPY_GND | TSMY_GND);
return ucb1200_read_reg(UCB1200_REG_TS_CTL) & TSPX_LOW;
}
static void new_data(void)
{
static TS_EVENT last_data = { 0, 0, 0, 0 };
int diff0, diff1, diff2, diff3;
if (cur_data.pressure)
{
if (sample < 3)
{
samples[sample].x = cur_data.x;
samples[sample++].y = cur_data.y;
return;
}
sample = 0;
/* Check the variance between X samples (discard if not similar), then choose the closest pair */
diff0 = abs(samples[0].x - samples[1].x);
diff1 = abs(samples[1].x - samples[2].x);
diff2 = abs(samples[2].x - cur_data.x);
diff3 = abs(cur_data.x - samples[1].x);
if (diff0 > XLIMIT || diff1 > XLIMIT || diff2 > XLIMIT || diff3 > XLIMIT)
return;
if (diff1 < diff2)
{
if (diff1 < diff3)
cur_data.x = (samples[1].x + samples[2].x) / 2;
else
cur_data.x = (cur_data.x + samples[1].x) / 2;
}
else
{
if (diff2 < diff3)
cur_data.x = (samples[2].x + cur_data.x) / 2;
else
cur_data.x = (cur_data.x + samples[1].x) / 2;
}
/* Do the same for Y */
diff0 = abs(samples[0].y - samples[1].y);
diff1 = abs(samples[1].y - samples[2].y);
diff2 = abs(samples[2].y - cur_data.y);
diff3 = abs(cur_data.y - samples[1].y);
if (diff0 > YLIMIT || diff1 > YLIMIT || diff2 > YLIMIT || diff3 > YLIMIT)
return;
if (diff1 < diff2)
{
if (diff1 < diff3)
cur_data.y = (samples[1].y + samples[2].y) / 2;
else
cur_data.y = (cur_data.y + samples[1].y) / 2;
}
else
{
if (diff2 < diff3)
cur_data.y = (samples[2].y + cur_data.y) / 2;
else
cur_data.y = (cur_data.y + samples[1].y) / 2;
}
}
else
{
/* Reset jitter detection on pen release */
last_data.x = 0;
last_data.y = 0;
}
/* Jitter elimination */
/* Allen Mask */
// if ((last_data.x || last_data.y) && abs(last_data.x - cur_data.x) <= 3 && abs(last_data.y - cur_data.y) <= 3)
// return;
/* Allen */
cur_data.millisecs = jiffies;
last_data = cur_data;
if (head != tail)
{
int last = head--;
if (last < 0)
last = BUFSIZE - 1;
}
buf[head] = cur_data;
if (++head == BUFSIZE)
head = 0;
if (head == tail && tail++ == BUFSIZE)
tail = 0;
if (fasync)
kill_fasync(&fasync, SIGIO, POLL_IN);
wake_up_interruptible(&queue);
}
static TS_EVENT get_data(void)
{
int last = tail;
if (++tail == BUFSIZE)
tail = 0;
return buf[last];
}
static void adcx_take_ownership(void);
static void wait_for_action(void)
{
adc_owner = ADC_OWNER_TS;
ts_state = PRESSED;
sample = 0;
ucb1200_disable_irq(IRQ_UCB1200_ADC);
ucb1200_set_irq_edge(TSPX_INT, GPIO_FALLING_EDGE);
ucb1200_enable_irq(IRQ_UCB1200_TSPX);
ucb1200_stop_adc();
ucb1200_write_reg(UCB1200_REG_TS_CTL, TSPX_POW | TSMX_POW | TSPY_GND | TSMY_GND | TSC_MODE_INT);
/* if adc is waiting, start it */
if (adcx_state == ADCX_SAMPLE) {
adcx_take_ownership();
}
}
static void
ts_take_ownership(void)
{
/* put back in ts int mode */
ucb1200_write_reg(UCB1200_REG_TS_CTL,
TSPX_POW | TSMX_POW | TSPY_GND | TSMY_GND |
TSC_MODE_INT);
ucb1200_enable_irq(IRQ_UCB1200_ADC);
set_read_pressure();
}
static void start_chain(void)
{
unsigned long flags;
ts_state = P_DONE;
/* if adcx is idle, grab adc, else wait for ts state check at end */
spin_lock_irqsave(&owner_lock, flags);
if (adcx_state == ADCX_IDLE || adc_owner == ADC_OWNER_TS) {
ts_take_ownership();
}
spin_unlock_irqrestore(&owner_lock, flags);
}
static unsigned int ucb1200_ts_poll(struct file *filp, poll_table *wait)
{
poll_wait(filp, &queue, wait);
if (head != tail)
return POLLIN | POLLRDNORM;
return 0;
}
static ssize_t ucb1200_ts_read(struct file *filp, char *buf, size_t count, loff_t *l)
{
DECLARE_WAITQUEUE(wait, current);
int i;
TS_EVENT t;
short out_buf[4];
if (head == tail)
{
if (filp->f_flags & O_NONBLOCK)
return -EAGAIN;
add_wait_queue(&queue, &wait);
current->state = TASK_INTERRUPTIBLE;
while ((head == tail) && !signal_pending(current))
{
schedule();
current->state = TASK_INTERRUPTIBLE;
}
current->state = TASK_RUNNING;
remove_wait_queue(&queue, &wait);
}
for (i = count; i >= sizeof(out_buf); i -= sizeof(out_buf), buf += sizeof(out_buf))
{
if (head == tail)
break;
t = get_data();
out_buf[0] = t.pressure;
/* Alen Add */
#if 0
#ifdef CONFIG_SA1100_ASSABET
if (xyswap)
{
out_buf[1] = (((raw_max_y - t.y)) * res_y) / (raw_max_y - raw_min_y);
out_buf[2] = (((t.x - raw_min_x)) * res_x) / (raw_max_x - raw_min_x);
}
else
{
out_buf[1] = (((raw_max_x - t.x)) * res_x) / (raw_max_x - raw_min_x);
out_buf[2] = (((raw_max_y - t.y)) * res_y) / (raw_max_y - raw_min_y);
}
#else
if (xyswap)
{
out_buf[1] = (((t.y - raw_min_y)) * res_y) / (raw_max_y - raw_min_y);
out_buf[2] = (((t.x - raw_min_x)) * res_x) / (raw_max_x - raw_min_x);
}
else
{
out_buf[1] = (((t.x - raw_min_x)) * res_x) / (raw_max_x - raw_min_x);
out_buf[2] = (((t.y - raw_min_y)) * res_y) / (raw_max_y - raw_min_y);
}
#endif
#else
if (cal_ok)
{
out_buf[1] = (x_rev) ? ((raw_max_x - t.x) * res_x) / (raw_max_x - raw_min_x) :
((t.x - raw_min_x) * res_x) / (raw_max_x - raw_min_x);
out_buf[2] = (y_rev) ? ((raw_max_y - t.y) * res_y) / (raw_max_y - raw_min_y) :
((t.y - raw_min_y) * res_y) / (raw_max_y - raw_min_y);
}
else
{
out_buf[1] = t.x;
out_buf[2] = t.y;
}
#endif
/* Allen */
out_buf[3] = t.millisecs;
copy_to_user(buf, &out_buf, sizeof(out_buf));
}
return count - i;
}
/* Forward declaration */
static void ucb1200_ts_timer(unsigned long);
static int ucb1200_ts_starttimer(void)
{
in_timehandle++;
init_timer(&timer);
timer.function = ucb1200_ts_timer;
timer.expires = jiffies + HZ / 100;
add_timer(&timer);
return 0;
}
static void ucb1200_ts_timer(unsigned long data)
{
in_timehandle--;
if (pen_up())
{
cur_data.pressure = 0;
new_data();
wait_for_action();
}
else
start_chain();
}
static int ucb1200_ts_fasync(int fd, struct file *filp, int on)
{
int retval;
retval = fasync_helper(fd, filp, on, &fasync);
if (retval < 0)
return retval;
return 0;
}
static int ucb1200_ts_open(struct inode *inode, struct file *filp)
{
/* Allen Add */
ts_clear();
/* Allen */
MOD_INC_USE_COUNT;
return 0;
}
static int ucb1200_ts_release(struct inode *inode, struct file *filp)
{
/* Allen Add */
ts_clear();
/* Allen */
ucb1200_ts_fasync(-1, filp, 0);
MOD_DEC_USE_COUNT;
return 0;
}
static void ucb1200_ts_interrupt(int irq, void *dev_id, struct pt_regs *regs)
{
if (in_timehandle > 0)
return;
switch (ts_state) {
case PRESSED:
start_chain();
break;
case P_DONE:
cur_data.pressure = ucb1200_read_adc();
ucb1200_enable_irq(IRQ_UCB1200_ADC);
ucb1200_disable_irq(IRQ_UCB1200_TSPX);
set_read_x_pos();
ts_state++;
break;
case X_DONE:
cur_data.x = ucb1200_read_adc();
ucb1200_enable_irq(IRQ_UCB1200_ADC);
set_read_y_pos();
ts_state++;
break;
case Y_DONE:
cur_data.y = ucb1200_read_adc();
ucb1200_set_irq_edge(TSPX_INT, GPIO_RISING_EDGE);
ucb1200_enable_irq(IRQ_UCB1200_TSPX);
ucb1200_stop_adc();
ucb1200_write_reg(UCB1200_REG_TS_CTL, TSPX_POW | TSMX_POW | TSPY_GND | TSMY_GND | TSC_MODE_INT);
ts_state++;
new_data();
ucb1200_ts_starttimer();
break;
case RELEASED:
cur_data.pressure = 0;
new_data();
wait_for_action();
}
}
static void ucb1200_adcx_interrupt(int irq, void *dev_id, struct pt_regs *regs)
{
adcx_data[adcx_channel] = ucb1200_read_adc();
adcx_state = ADCX_IDLE;
adc_owner = ADC_OWNER_TS;
ucb1200_stop_adc();
/* if ts is waiting, start it */
if (ts_state == P_DONE) {
ts_take_ownership();
}
}
static void ucb1200_adc_interrupt(int irq, void *dev_id, struct pt_regs *regs)
{
//printk("ucb1200_adc_interrupt() adc_owner %d\n", adc_owner);
switch (adc_owner) {
case ADC_OWNER_TS:
ucb1200_ts_interrupt(irq, dev_id, regs);
break;
case ADC_OWNER_ADCX:
ucb1200_adcx_interrupt(irq, dev_id, regs);
break;
}
}
static void
adcx_take_ownership(void)
{
u16 inp = 0;
adc_owner = ADC_OWNER_ADCX;
/* take out of ts int mode */
ucb1200_write_reg(UCB1200_REG_TS_CTL,
TSPX_POW | TSMX_POW | TSPY_GND | TSMY_GND);
ucb1200_enable_irq(IRQ_UCB1200_ADC);
switch (adcx_channel) {
case 0: inp = ADC_INPUT_AD0; break;
case 1: inp = ADC_INPUT_AD1; break;
case 2: inp = ADC_INPUT_AD2; break;
case 3: inp = ADC_INPUT_AD3; break;
}
ucb1200_start_adc(inp);
}
int ucb1200_adc_start(int channel)
{
unsigned long flags;
#if 0
printk("ucb1200_adc_start(channel=%d) adcx_state %d, adc_owner %d\n",
channel, adcx_state, adc_owner);
#endif
if (adcx_state != ADCX_IDLE || adc_owner != ADC_OWNER_TS)
return -EINVAL;
adcx_state = ADCX_SAMPLE;
adcx_channel = channel;
/* if ts is idle, grab adc, else wait for adc state check at end */
spin_lock_irqsave(&owner_lock, flags);
if (ts_state == PRESSED) {
adcx_take_ownership();
}
spin_unlock_irqrestore(&owner_lock, flags);
return 0;
}
int ucb1200_adc_done(void)
{
return adcx_state == ADCX_IDLE ? 1 : 0;
}
int ucb1200_adc_value(int channel)
{
return adcx_data[channel];
}
static struct file_operations ucb1200_ts_fops = {
read: ucb1200_ts_read,
poll: ucb1200_ts_poll,
ioctl: ucb1200_ts_ioctl,
fasync: ucb1200_ts_fasync,
open: ucb1200_ts_open,
release:ucb1200_ts_release,
};
int sa1100_ts_init(void)
{
#ifdef CONFIG_SA1100_ASSABET
raw_max_x = 944;
raw_max_y = 944;
raw_min_x = 70;
raw_min_y = 70;
res_x = 320;
res_y = 240;
#elif defined(CONFIG_SA1100_CERF)
raw_max_x = 944;
raw_max_y = 944;
raw_min_x = 70;
raw_min_y = 70;
#if defined(CONFIG_CERF_LCD_38_A)
res_x = 240;
res_y = 320;
#elif defined(CONFIG_CERF_LCD_57_A)
res_x = 320;
res_y = 240;
#elif defined(CONFIG_CERF_LCD_72_A)
res_x = 640;
res_y = 480;
#else
#warning "Cannot enable the UCB1200 Touchscreen Driver without selecting a Cerfboard screen orientation first"
#error
#endif
#elif defined(CONFIG_SA1100_FREEBIRD)
raw_max_x = 925;
raw_max_y = 875;
raw_min_x = 85;
raw_min_y = 60;
res_x = 240;
res_y = 320;
#elif defined(CONFIG_SA1100_YOPY)
raw_max_x = 964;
raw_max_y = 958;
raw_min_x = 45;
raw_min_y = 53;
res_x = 240;
res_y = 320;
#elif defined(CONFIG_SA1100_PFS168)
raw_max_x = 944;
raw_max_y = 944;
raw_min_x = 70;
raw_min_y = 70;
res_x = 320;
res_y = 240;
#elif defined(CONFIG_SA1100_SIMPAD)
raw_max_x = 944;
raw_max_y = 944;
raw_min_x = 70;
raw_min_y = 70;
res_x = 800;
res_y = 600;
#elif defined(CONFIG_SA1100_FLEXANET)
switch (flexanet_GUI_type)
{
/* set the touchscreen dimensions */
case FHH_GUI_TYPE_0:
raw_max_x = 944;
raw_max_y = 944;
raw_min_x = 70;
raw_min_y = 70;
res_x = 320;
res_y = 240;
break;
default:
return -ENODEV;
}
#else
raw_max_x = 885;
raw_max_y = 885;
raw_min_x = 70;
raw_min_y = 70;
res_x = 640;
res_y = 480;
#endif
xyswap = 0;
head = 0;
tail = 0;
/* Allen Add */
cal_ok = 1;
x_rev = 0;
y_rev = 0;
/* Allen */
init_waitqueue_head(&queue);
/* Initialize the touchscreen controller */
ucb1200_stop_adc();
ucb1200_set_irq_edge(ADC_INT, GPIO_RISING_EDGE);
wait_for_action();
return 0;
}
int __init ucb1200_ts_init(void)
{
int ret;
register_chrdev(TS_MAJOR, TS_NAME, &ucb1200_ts_fops);
if ((ret = ucb1200_request_irq(IRQ_UCB1200_ADC, ucb1200_adc_interrupt,
SA_INTERRUPT, TS_NAME, dev_id)))
{
printk("ucb1200_ts_init: failed to register ADC IRQ\n");
return ret;
}
if ((ret = ucb1200_request_irq(IRQ_UCB1200_TSPX, ucb1200_ts_interrupt,
SA_INTERRUPT, TS_NAME, dev_id)))
{
printk("ucb1200_ts_init: failed to register TSPX IRQ\n");
ucb1200_free_irq(IRQ_UCB1200_ADC, dev_id);
return ret;
}
if ((ret = sa1100_ts_init()) != 0)
{
ucb1200_free_irq(IRQ_UCB1200_TSPX, dev_id);
ucb1200_free_irq(IRQ_UCB1200_ADC, dev_id);
return ret;
}
printk("ucb1200 touch screen driver initialized\n");
return 0;
}
void __exit ucb1200_ts_cleanup(void)
{
ucb1200_stop_adc();
if (in_timehandle)
del_timer(&timer);
ucb1200_free_irq(IRQ_UCB1200_TSPX, dev_id);
ucb1200_free_irq(IRQ_UCB1200_ADC, dev_id);
unregister_chrdev(TS_MAJOR, TS_NAME);
printk("ucb1200 touch screen driver removed\n");
}
module_init(ucb1200_ts_init);
module_exit(ucb1200_ts_cleanup);
|
|
From: James S. <jsi...@us...> - 2002-03-23 00:23:39
|
Update of /cvsroot/linuxconsole/ruby/linux/drivers/input/keyboard
In directory usw-pr-cvs1:/tmp/cvs-serv32296
Added Files:
cerfkbd.c
Log Message:
New cerf keyboard driver. Needs alot of work.
--- NEW FILE: cerfkbd.c ---
/*
* Copyright (c) 2001 James Simmons
*/
/*
* CerPDA input keyboard Driver for Linux
*/
/*
* 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.
*
* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* Should you need to contact me, the author, you can do so either by
* e-mail - mail your message to <jsi...@us...>
*/
#include <asm/bitops.h>
#include <asm/system.h>
#include <asm/irq.h>
#include <asm/io.h>
#include <linux/module.h>
#include <linux/spinlock.h>
#include <linux/delay.h>
#include <linux/slab.h>
#include <linux/timer.h>
#include <linux/init.h>
#include <linux/input.h>
MODULE_AUTHOR("James Simmons <jsi...@us...>");
MODULE_DESCRIPTION("CerfPDA keyboard input driver");
MODULE_LICENSE("GPL");
/* Keyboard Layout
F1 F2 1/A 2/B 3/C 4/D Pwr
5/E 6/F 7/G 8/H 9/I 0/J @/K
+/L -/M ^8/N / O =/P up/Q "/R
Esc/S ,/T ./U ?/V left/W :/X right/Y
Tab/Z Shift Caps/Ctrl Backspace/Space Num/Cur down/\ Enter
The way this device works is that we need two keymaps. If the
user presses Num/Cur we switch which set of events we get.
*/
#define KBD_REPORT_UNKN
#define KBD_REPORT_ERR /* Report keyboard errors */
#define KBD_REPORT_UNKN /* Report unknown scan codes */
#define KBD_REPORT_TIMEOUTS /* Report keyboard timeouts */
#define KBD_NO_DATA (-1) /* No data */
#define KBD_REPEAT_START (0x20)
#define KBD_REPEAT_CONTINUE (0x05)
#define KBD_KEY_DOWN_MAX (0x10)
#define UINT_LEN (20)
#define SC_LIM (69)
#define KBD_ROWS (5)
#define KBD_COLUMNS (8)
#define KBD_UP_OFF (0)
#define KBD_UP_ON (1)
#define KBD_DOWN (2)
#define KBD_DOWN_HOLD (3)
unsigned keynum[KBD_ROWS*KBD_COLUMNS];
unsigned keycur[KBD_ROWS*KBD_COLUMNS];
struct cerfPDA {
struct timer_list kbd_timer;
struct input_dev kbdev;
spinlock_t kbd_controller_lock = SPIN_LOCK_UNLOCKED;
unsigned char keynum[KBD_ROWS*KBD_COLUMNS];
unsigned char keycur[KBD_ROWS*KBD_COLUMNS];
short which_keymap = 0;
};
static void column_set(unsigned int column)
{
if (column < 0) {
CERF_PDA_CPLD_UnSet(CERF_PDA_CPLD_KEYPAD_A, 0xFF, 0xFF);
CERF_PDA_CPLD_UnSet(CERF_PDA_CPLD_KEYPAD_B, 0xFF, 0xFF);
} else {
if (column < 4) {
CERF_PDA_CPLD_Set(CERF_PDA_CPLD_KEYPAD_A, 1 << (column % 4), 0xFF);
CERF_PDA_CPLD_UnSet(CERF_PDA_CPLD_KEYPAD_B, 0xFF, 0xFF);
} else {
CERF_PDA_CPLD_UnSet(CERF_PDA_CPLD_KEYPAD_A, 0xFF, 0xFF);
CERF_PDA_CPLD_Set(CERF_PDA_CPLD_KEYPAD_B, 1 << (column % 4), 0xFF);
}
}
}
static int kbd_read_input(void)
{
int value, i, j;
for(i = 0; i < KBD_COLUMNS; i++) {
column_set(i);
udelay(50);
for(j = 0; j < KBD_ROWS; j++) {
if (pda->which_keymap)
value = (GPLR & (1 << (20 + j)));
}
}
column_set(-1);
return value;
}
/* Handle the automatic interrupts handled by the timer */
static void cerfkbd_timer(unsigned long private)
{
struct cerfPDA *pda = (void *) private;
spin_lock_irq(&pda->kbd_controller_lock);
scancode = kbd_read_input();
spin_unlock_irq(&pda->kbd_controller_lock);
mod_timer(&pda->kbd_timer, jiffies + 8);
}
static int cerfkbd_open(struct input_dev *dev)
{
init_timer(&cerfPDA->timer);
cerfPDA->timer.data = (long) cerfPDA;
cerfPDA->timer.expires = jiffies + 50;
cerfPDA->timer.function = cerkbd_timer;
}
static void cerfkbd_close(struct input_dev *dev)
{
del_timer(&kbd_timer);
}
static struct input_dev logibm_dev = {
evbit: { BIT(EV_KEY) | BIT(EV_REL) },
keybit: { [LONG(BTN_LEFT)] = BIT(BTN_LEFT) | BIT(BTN_MIDDLE) | B
relbit: { BIT(REL_X) | BIT(REL_Y) },
open: cerfkbd_open,
close: cerfkbd_close,
name: "Cerf PDA keyboard",
phys: "CerfPDA/input0",
idbus: BUS_ISA,
idvendor: 0x0003,
idproduct: 0x0001,
idversion: 0x0100,
};
static int __init cerfkbd_init(void)
{
printk("Starting Cerf PDA Keyboard Driver... ");
GPDR &= ~(GPIO_GPIO(20) | GPIO_GPIO(21) | GPIO_GPIO(22) | GPIO_GPIO(23) | GPIO_GPIO(24));
input_register_device(&cerfkbd_dev);
printk(KERN_INFO "input: Cerf PDA keyboard\n");
}
static void __exit cerfkbd_int(void)
{
input_unregister_device(&cerfkbd_dev);
}
module_init(cerfkbd_init);
module_exit(cerfkbd_exit);
|
|
From: James S. <jsi...@us...> - 2002-03-23 00:23:02
|
Update of /cvsroot/linuxconsole/ruby/linux/drivers/video
In directory usw-pr-cvs1:/tmp/cvs-serv32141/drivers/video
Modified Files:
cfbcopyarea.c cfbfillrect.c cfbimgblt.c fbcon.c fbmem.c
vesafb.c
Log Message:
Bug fixes for fbcon.
Index: cfbcopyarea.c
===================================================================
RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/video/cfbcopyarea.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- cfbcopyarea.c 12 Mar 2002 20:33:19 -0000 1.5
+++ cfbcopyarea.c 23 Mar 2002 00:22:58 -0000 1.6
@@ -26,7 +26,6 @@
#include <linux/slab.h>
#include <asm/types.h>
#include <asm/io.h>
-#include <video/fbcon.h>
void cfb_copyarea(struct fb_info *p, struct fb_copyarea *area)
{
Index: cfbfillrect.c
===================================================================
RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/video/cfbfillrect.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- cfbfillrect.c 12 Mar 2002 20:33:19 -0000 1.8
+++ cfbfillrect.c 23 Mar 2002 00:22:58 -0000 1.9
@@ -20,7 +20,6 @@
#include <linux/string.h>
#include <linux/fb.h>
#include <asm/types.h>
-#include <video/fbcon.h>
void cfb_fillrect(struct fb_info *p, struct fb_fillrect *rect)
{
Index: cfbimgblt.c
===================================================================
RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/video/cfbimgblt.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- cfbimgblt.c 11 Mar 2002 21:37:23 -0000 1.9
+++ cfbimgblt.c 23 Mar 2002 00:22:58 -0000 1.10
@@ -31,8 +31,6 @@
#include <linux/fb.h>
#include <asm/types.h>
-#include <video/fbcon.h>
-
#define DEBUG
#ifdef DEBUG
Index: fbcon.c
===================================================================
RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/video/fbcon.c,v
retrieving revision 1.61
retrieving revision 1.62
diff -u -d -r1.61 -r1.62
--- fbcon.c 26 Dec 2001 17:28:11 -0000 1.61
+++ fbcon.c 23 Mar 2002 00:22:58 -0000 1.62
@@ -316,25 +316,18 @@
static void fbcon_clear(struct vc_data *vc,int sx,int sy, int width,int height)
{
struct fb_info *info = (struct fb_info *) vc->display_fg->data_hook;
- unsigned long color;
+ struct fb_fillrect rect;
- if (info->fix.visual == FB_VISUAL_PSEUDOCOLOR)
- color = attr_bgcol_ec(vc);
- else {
- if (info->var.bits_per_pixel > 16)
- color = ((u32*)info->pseudo_palette)[attr_bgcol_ec(vc)];
- else
- color = ((u16*)info->pseudo_palette)[attr_bgcol_ec(vc)];
- }
- sx *= vc->vc_font.width;
- sy *= vc->vc_font.height;
- width *= vc->vc_font.width;
- height *= vc->vc_font.height;
+ rect.color = attr_bgcol_ec(vc);
+ rect.rop = ROP_COPY;
+ rect.dx *= vc->vc_font.width;
+ rect.dy *= vc->vc_font.height;
+ rect.width *= vc->vc_font.width;
+ rect.height *= vc->vc_font.height;
DPRINTK("Calling clear screen with width %d, height %d at %d,%d\n",
- width, height, sx, sy);
-
- info->fbops->fb_fillrect(info, sx, sy, width, height, color, ROP_COPY);
+ rect.width, rect.height, rect.sx, rect.sy);
+ info->fbops->fb_fillrect(info, &rect);
}
static void fbcon_putc(struct vc_data *vc, int c, int ypos, int xpos)
@@ -357,8 +350,8 @@
}
}
- image.x = xpos * vc->vc_font.width;
- image.y = ypos * vc->vc_font.height;
+ image.dx = xpos * vc->vc_font.width;
+ image.dy = ypos * vc->vc_font.height;
image.width = vc->vc_font.width;
image.height = vc->vc_font.height;
image.depth = 1;
@@ -391,8 +384,8 @@
image.bg_color = ((u16*)info->pseudo_palette)[attr_bgcol(vc,c)];
}
}
- image.x = xpos * vc->vc_font.width;
- image.y = ypos * vc->vc_font.height;
+ image.dx = xpos * vc->vc_font.width;
+ image.dy = ypos * vc->vc_font.height;
image.width = vc->vc_font.width;
image.height = vc->vc_font.height;
image.depth = 1;
@@ -402,13 +395,14 @@
(scr_readw(s) & charmask)*vc->vc_font.height*width;
s++;
info->fbops->fb_imageblit(info, &image);
- image.x += vc->vc_font.width;
+ image.dx += vc->vc_font.width;
}
}
static void fbcon_cursor(struct vc_data *vc, int mode)
{
struct fb_info *info = (struct fb_info *) vc->display_fg->data_hook;
+ struct fb_fillrect rect;
struct fbcursor cursor;
int i;
@@ -427,12 +421,13 @@
info->cursor.set = FB_CUR_SETCUR;
info->fbops->fb_cursor(info, &info->cursor);
} else {
- unsigned int sx = vc->vc_x * vc->vc_font.width;
- unsigned int sy = vc->vc_y * vc->vc_font.height;
- unsigned long color = -1;
-
- info->fbops->fb_fillrect(info, sx, sy,vc->vc_font.width,
- vc->vc_font.height, color, ROP_XOR);
+ rect.dx = vc->vc_x * vc->vc_font.width;
+ rect.dy = vc->vc_y * vc->vc_font.height;
+ rect.width = vc->vc_font.width;
+ rect.height = vc->vc_font.height;
+ rect.color = -1;
+ rect.rop = ROP_XOR;
+ info->fbops->fb_fillrect(info, &rect);
}
break;
case CM_MOVE:
@@ -446,12 +441,13 @@
info->cursor.hot.y = info->cursor.pos.y;
info->fbops->fb_cursor(info, &info->cursor);
} else {
- unsigned int sx = vc->vc_x * vc->vc_font.width;
- unsigned int sy = vc->vc_y * vc->vc_font.height;
- unsigned long color = -1;
-
- info->fbops->fb_fillrect(info, sx, sy,vc->vc_font.width,
- vc->vc_font.height, color, ROP_XOR);
+ rect.dx = vc->vc_x * vc->vc_font.width;
+ rect.dy = vc->vc_y * vc->vc_font.height;
+ rect.width = vc->vc_font.width;
+ rect.height = vc->vc_font.height;
+ rect.color = -1;
+ rect.rop = ROP_XOR;
+ info->fbops->fb_fillrect(info, &rect);
}
break;
case CM_CHANGE: {
@@ -504,12 +500,13 @@
cursor.mask = mask;
info->fbops->fb_cursor(info, &cursor);
} else {
- unsigned int sx = vc->vc_x * vc->vc_font.width;
- unsigned int sy = vc->vc_y * vc->vc_font.height;
- unsigned long color = -1;
-
- info->fbops->fb_fillrect(info, sx, sy,vc->vc_font.width,
- vc->vc_font.height, color, ROP_XOR);
+ rect.dx = vc->vc_x * vc->vc_font.width;
+ rect.dy = vc->vc_y * vc->vc_font.height;
+ rect.width = vc->vc_font.width;
+ rect.height = vc->vc_font.height;
+ rect.color = -1;
+ rect.rop = ROP_XOR;
+ info->fbops->fb_fillrect(info, &rect);
}
break;
}
@@ -520,21 +517,23 @@
int count)
{
struct fb_info *info = (struct fb_info *) vc->display_fg->data_hook;
- unsigned int height = (b-t-count) * vc->vc_font.height;
- unsigned int sy = 0, dy = 0;
+ struct fb_copyarea area;
+
+ area.sy = area.dy = area.sx = area.dx = 0;
+ area.height = (b-t-count) * vc->vc_font.height;
+ area.width = info->var.xres;
switch (dir) {
case SM_UP:
- sy = (t + count) * vc->vc_font.height;
- dy = t * vc->vc_font.height;
+ area.sy = (t + count) * vc->vc_font.height;
+ area.dy = t * vc->vc_font.height;
break;
case SM_DOWN:
- sy = t * vc->vc_font.height;
- dy = (t + count) * vc->vc_font.height;
+ area.sy = t * vc->vc_font.height;
+ area.dy = (t + count) * vc->vc_font.height;
break;
}
-
- info->fbops->fb_copyarea(info, 0, sy, info->var.xres, height, 0, dy);
+ info->fbops->fb_copyarea(info, &area);
return 0;
}
@@ -542,16 +541,17 @@
int height, int width)
{
struct fb_info *info = (struct fb_info *) vc->display_fg->data_hook;
-
- sx *= vc->vc_font.width;
- sy *= vc->vc_font.height;
- dx *= vc->vc_font.width;
- dy *= vc->vc_font.height;
- height *= vc->vc_font.height;
- width *= vc->vc_font.width;
+ struct fb_copyarea area;
+
+ area.sx *= vc->vc_font.width;
+ area.sy *= vc->vc_font.height;
+ area.dx *= vc->vc_font.width;
+ area.dy *= vc->vc_font.height;
+ area.height *= vc->vc_font.height;
+ area.width *= vc->vc_font.width;
- DPRINTK("Calling bmove to move a region of width %d and height %d to go from %d,%d to %d,%d\n", width, height, sx, sy, dx, dy);
- info->fbops->fb_copyarea(info, sx, sy, width, height, dx, dy);
+ DPRINTK("Calling bmove to move a region of width %d and height %d to go from %d,%d to %d,%d\n", area.width, area.height, area.sx, area.sy,area.dx,area.dy);
+ info->fbops->fb_copyarea(info, &area);
}
static int fbcon_blank(struct vc_data *vc, int blank)
@@ -562,10 +562,16 @@
info->fbops->fb_blank(blank, info);
} else {
if (info->var.accel_flags != FB_ACCEL_NONE) {
+ struct fb_fillrect rect;
unsigned long color = 0;
- info->fbops->fb_fillrect(info, 0, 0, info->var.xres,
- info->var.yres, color, ROP_COPY);
+ rect.dx = 0;
+ rect.dy = 0;
+ rect.width = info->var.xres;
+ rect.height = info->var.yres;
+ rect.color = color;
+ rect.rop = ROP_COPY;
+ info->fbops->fb_fillrect(info, &rect);
} else {
if ((info->fix.visual == FB_VISUAL_PSEUDOCOLOR ||
info->fix.visual == FB_VISUAL_DIRECTCOLOR) && blank) {
@@ -673,12 +679,19 @@
/* Hardware panning support */
if (fb_pan_display(&info->var, info)) {
+ struct fb_copyarea area;
/*
* Oops it failed to work. Time to do cleanup then use
* a copyarea.
*/
info->var.yoffset = orig_y;
- info->fbops->fb_copyarea(info, 0, orig_y, info->var.xres, delta, 0, info->var.yoffset);
+ area.sx = 0;
+ area.sy = orig_y;
+ area.width = info->var.xres;
+ area.height = delta;
+ area.dx = 0;
+ area.dy = info->var.yoffset;
+ info->fbops->fb_copyarea(info, &area);
}
return 0;
}
Index: fbmem.c
===================================================================
RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/video/fbmem.c,v
retrieving revision 1.60
retrieving revision 1.61
diff -u -d -r1.60 -r1.61
--- fbmem.c 14 Mar 2002 22:32:23 -0000 1.60
+++ fbmem.c 23 Mar 2002 00:22:58 -0000 1.61
@@ -549,12 +549,11 @@
((fbca.dx + fbca.width) > info->var.xres) ||
((fbca.dy + fbca.height) > info->var.yres))
return(-EINVAL);
- fb->fb_copyarea(info,
- fbca.sx + info->var.xoffset,
- fbca.sy + info->var.yoffset,
- fbca.width, fbca.height,
- fbca.dx + info->var.xoffset,
- fbca.dy + info->var.yoffset);
+ fbca.sx += info->var.xoffset;
+ fbca.sy += info->var.yoffset;
+ fbca.dx += info->var.xoffset;
+ fbca.dy += info->var.yoffset;
+ fb->fb_copyarea(info, &fbca);
return(0);
}
case FBIOPUT_FILLRECT:
@@ -562,19 +561,16 @@
struct fb_fillrect fbfr;
if (copy_from_user(&fbfr, (void *) arg, sizeof(var)))
return -EFAULT;
- if ((fbfr.x1 > info->var.xres) ||
- (fbfr.y1 > info->var.yres) ||
- ((fbfr.x1 + fbfr.width) > info->var.xres) ||
- ((fbfr.y1 + fbfr.height) > info->var.yres))
+ if ((fbfr.dx > info->var.xres) ||
+ (fbfr.dy > info->var.yres) ||
+ ((fbfr.dx + fbfr.width) > info->var.xres) ||
+ ((fbfr.dy + fbfr.height) > info->var.yres))
return(-EINVAL);
if ((fbfr.rop != ROP_COPY) && (fbfr.rop != ROP_XOR))
return(-EINVAL);
- fb->fb_fillrect(info,
- fbfr.x1 + info->var.xoffset,
- fbfr.y1 + info->var.yoffset,
- fbfr.width, fbfr.height,
- fbfr.color,
- fbfr.rop);
+ fbfr.dx += info->var.xoffset;
+ fbfr.dy += info->var.yoffset;
+ fb->fb_fillrect(info, &fbfr);
return(0);
}
@@ -838,8 +834,8 @@
for (x = 0; x < smp_num_cpus * (LOGO_W + 8) &&
x < info->var.xres - (LOGO_W + 8); x += (LOGO_W + 8)) {
- image.x = x;
- image.y = 0; /* For now. We should add in wrap around */
+ image.dx = x;
+ image.dy = 0; /* For now. We should add in wrap around */
if (info->fbops->fb_imageblit)
info->fbops->fb_imageblit(info, &image);
Index: vesafb.c
===================================================================
RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/video/vesafb.c,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -r1.20 -r1.21
--- vesafb.c 18 Mar 2002 19:29:11 -0000 1.20
+++ vesafb.c 23 Mar 2002 00:22:58 -0000 1.21
@@ -21,6 +21,7 @@
#include <linux/init.h>
#include <asm/io.h>
+#include <asm/mtrr.h>
#define dac_reg (0x3c8)
#define dac_val (0x3c9)
@@ -28,33 +29,24 @@
/* --------------------------------------------------------------------- */
static struct fb_var_screeninfo vesafb_defined = {
- 0,0,0,0, /* W,H, W, H (virtual) load xres,xres_virtual*/
- 0,0, /* virtual -> visible no offset */
- 8, /* depth -> load bits_per_pixel */
- 0, /* greyscale ? */
- {0,0,0}, /* R */
- {0,0,0}, /* G */
- {0,0,0}, /* B */
- {0,0,0}, /* transparency */
- 0, /* standard pixel format */
- FB_ACTIVATE_NOW,
- -1,-1,
- 0,
- 0L,0L,0L,0L,0L,
- 0L,0L,0, /* No sync info */
- FB_VMODE_NONINTERLACED,
- {0,0,0,0,0,0}
+ activate: FB_ACTIVATE_NOW,
+ height: -1,
+ width: -1,
+ vmode: FB_VMODE_NONINTERLACED,
};
-static struct fb_fix_screeninfo vesafb_fix __initdata = {
- "VESA VGA", (unsigned long) NULL, 0, FB_TYPE_PACKED_PIXELS, 0,
- FB_VISUAL_PSEUDOCOLOR, 0, 0, 0, 0, (unsigned long) NULL, 0, FB_ACCEL_NONE
+static struct fb_fix_screeninfo vesafb_fix = {
+ id: "VESA VGA",
+ type: FB_TYPE_PACKED_PIXELS,
+ accel: FB_ACCEL_NONE,
};
static struct fb_info fb_info;
static u32 pseudo_palette[17];
static int inverse = 0;
+static int mtrr = 0;
+
static int pmi_setpal = 0; /* pmi for palette changes ??? */
static int ypan = 0; /* 0..nothing, 1..ypan, 2..ywrap */
static unsigned short *pmi_base = 0;
@@ -63,7 +55,7 @@
/* --------------------------------------------------------------------- */
-static int vesafb_pan_display(struct fb_var_screeninfo *var,
+static int vesafb_pan_display(struct fb_var_screeninfo *var,
struct fb_info *info)
{
int offset;
@@ -127,49 +119,49 @@
* (according to the entries in the `var' structure). Return
* != 0 for invalid regno.
*/
+
if (regno >= info->cmap.len)
return 1;
switch (info->var.bits_per_pixel) {
- case 8:
- vesa_setpalette(regno, red, green, blue);
- break;
- case 15:
- case 16:
- if (info->var.red.offset == 10) {
- /* 1:5:5:5 */
- ((u16*) (info->pseudo_palette))[regno] =
+ case 8:
+ vesa_setpalette(regno,red,green,blue);
+ break;
+ case 16:
+ if (info->var.red.offset == 10) {
+ /* 1:5:5:5 */
+ ((u32*) (info->pseudo_palette))[regno] =
((red & 0xf800) >> 1) |
((green & 0xf800) >> 6) |
((blue & 0xf800) >> 11);
- } else {
- /* 0:5:6:5 */
- ((u16*) (info->pseudo_palette))[regno] =
+ } else {
+ /* 0:5:6:5 */
+ ((u32*) (info->pseudo_palette))[regno] =
((red & 0xf800) ) |
((green & 0xfc00) >> 5) |
((blue & 0xf800) >> 11);
- }
- break;
- case 24:
- red >>= 8;
- green >>= 8;
- blue >>= 8;
- ((u32 *)(info->pseudo_palette))[regno] =
- (red << info->var.red.offset) |
- (green << info->var.green.offset) |
- (blue << info->var.blue.offset);
- break;
- case 32:
- red >>= 8;
- green >>= 8;
- blue >>= 8;
- ((u32 *)(info->pseudo_palette))[regno] =
- (red << info->var.red.offset) |
- (green << info->var.green.offset) |
- (blue << info->var.blue.offset);
- break;
- }
- return 0;
+ }
+ break;
+ case 24:
+ red >>= 8;
+ green >>= 8;
+ blue >>= 8;
+ ((u32 *)(info->pseudo_palette))[regno] =
+ (red << info->var.red.offset) |
+ (green << info->var.green.offset) |
+ (blue << info->var.blue.offset);
+ break;
+ case 32:
+ red >>= 8;
+ green >>= 8;
+ blue >>= 8;
+ ((u32 *)(info->pseudo_palette))[regno] =
+ (red << info->var.red.offset) |
+ (green << info->var.green.offset) |
+ (blue << info->var.blue.offset);
+ break;
+ }
+ return 0;
}
static struct fb_ops vesafb_ops = {
@@ -187,8 +179,8 @@
if (!options || !*options)
return 0;
-
- while ((this_opt = strsep(&options, ",")) != NULL) {
+
+ while ((this_opt = strsep(&options, ",")) != NULL) {
if (!*this_opt) continue;
if (! strcmp(this_opt, "inverse"))
@@ -209,51 +201,44 @@
int __init vesafb_init(void)
{
- /* Mode */
- int video_width, video_height, video_height_virtual, video_bpp, i;
- int video_visual, video_linelength, video_cmap_len, video_size;
- unsigned long video_base; /* physical addr */
- char *video_vbase; /* mapped */
+ int video_cmap_len;
+ int i;
if (screen_info.orig_video_isVGA != VIDEO_TYPE_VLFB)
return -ENXIO;
- printk("It is a linear framebuffer\n");
-
- video_base = screen_info.lfb_base;
- video_bpp = screen_info.lfb_depth;
- if (15 == video_bpp)
- video_bpp = 16;
- video_width = screen_info.lfb_width;
- video_height = screen_info.lfb_height;
- video_linelength = screen_info.lfb_linelength;
- video_size = screen_info.lfb_size * 65536;
- video_visual = (video_bpp == 8) ?
+ vesafb_fix.smem_start = screen_info.lfb_base;
+ vesafb_defined.bits_per_pixel = screen_info.lfb_depth;
+ if (15 == vesafb_defined.bits_per_pixel)
+ vesafb_defined.bits_per_pixel = 16;
+ vesafb_defined.xres = screen_info.lfb_width;
+ vesafb_defined.yres = screen_info.lfb_height;
+ vesafb_fix.line_length = screen_info.lfb_linelength;
+ vesafb_fix.smem_len = screen_info.lfb_size * 65536;
+ vesafb_fix.visual = (vesafb_defined.bits_per_pixel == 8) ?
FB_VISUAL_PSEUDOCOLOR : FB_VISUAL_TRUECOLOR;
- if (!request_mem_region(video_base, video_size, "vesafb")) {
+ if (!request_mem_region(vesafb_fix.smem_start, vesafb_fix.smem_len, "vesafb")) {
printk(KERN_WARNING
"vesafb: abort, cannot reserve video memory at 0x%lx\n",
- video_base);
+ vesafb_fix.smem_start);
/* We cannot make this fatal. Sometimes this comes from magic
- spaces our resource handlers simply don't know about */
+ spaces our resource handlers simply don't know about */
}
- printk("Got requested region (framebuffer)\n");
-
- fb_info.screen_base = video_vbase = ioremap(video_base, video_size);
- if (!video_vbase) {
- release_mem_region(video_base, video_size);
+ fb_info.screen_base = ioremap(vesafb_fix.smem_start, vesafb_fix.smem_len);
+ if (!fb_info.screen_base) {
+ release_mem_region(vesafb_fix.smem_start, vesafb_fix.smem_len);
printk(KERN_ERR
"vesafb: abort, cannot ioremap video memory 0x%x @ 0x%lx\n",
- video_size, video_base);
+ vesafb_fix.smem_len, vesafb_fix.smem_start);
return -EIO;
}
printk(KERN_INFO "vesafb: framebuffer at 0x%lx, mapped to 0x%p, size %dk\n",
- video_base, video_vbase, video_size/1024);
+ vesafb_fix.smem_start, fb_info.screen_base, vesafb_fix.smem_len/1024);
printk(KERN_INFO "vesafb: mode is %dx%dx%d, linelength=%d, pages=%d\n",
- video_width, video_height, video_bpp, video_linelength, screen_info.pages);
+ vesafb_defined.xres, vesafb_defined.yres, vesafb_defined.bits_per_pixel, vesafb_fix.line_length, screen_info.pages);
if (screen_info.vesapm_seg) {
printk(KERN_INFO "vesafb: protected mode interface info at %04x:%04x\n",
@@ -286,31 +271,27 @@
}
}
- vesafb_defined.xres=video_width;
- vesafb_defined.yres=video_height;
- vesafb_defined.xres_virtual=video_width;
- vesafb_defined.yres_virtual=video_size / video_linelength;
- vesafb_defined.bits_per_pixel=video_bpp;
-
- if (ypan && vesafb_defined.yres_virtual > video_height) {
- printk(KERN_INFO "vesafb: scrolling: %s using protected mode interface, yres_virtual=%d\n", (ypan > 1) ? "ywrap" : "ypan", vesafb_defined.yres_virtual);
+ vesafb_defined.xres_virtual = vesafb_defined.xres;
+ vesafb_defined.yres_virtual = vesafb_fix.smem_len / vesafb_fix.line_length;
+ if (ypan && vesafb_defined.yres_virtual > vesafb_defined.yres) {
+ printk(KERN_INFO "vesafb: scrolling: %s using protected mode interface, yres_virtual=%d\n",
+ (ypan > 1) ? "ywrap" : "ypan",vesafb_defined.yres_virtual);
} else {
printk(KERN_INFO "vesafb: scrolling: redraw\n");
- vesafb_defined.yres_virtual = video_height;
+ vesafb_defined.yres_virtual = vesafb_defined.yres;
ypan = 0;
}
- video_height_virtual = vesafb_defined.yres_virtual;
-
+
/* some dummy values for timing to make fbset happy */
- vesafb_defined.pixclock = 10000000 / video_width * 1000 / video_height;
- vesafb_defined.left_margin = (video_width / 8) & 0xf8;
+ vesafb_defined.pixclock = 10000000 / vesafb_defined.xres * 1000 / vesafb_defined.yres;
+ vesafb_defined.left_margin = (vesafb_defined.xres / 8) & 0xf8;
vesafb_defined.right_margin = 32;
vesafb_defined.upper_margin = 16;
vesafb_defined.lower_margin = 4;
- vesafb_defined.hsync_len = (video_width / 8) & 0xf8;
+ vesafb_defined.hsync_len = (vesafb_defined.xres / 8) & 0xf8;
vesafb_defined.vsync_len = 4;
- if (video_bpp > 8) {
+ if (vesafb_defined.bits_per_pixel > 8) {
vesafb_defined.red.offset = screen_info.red_pos;
vesafb_defined.red.length = screen_info.red_size;
vesafb_defined.green.offset = screen_info.green_pos;
@@ -337,29 +318,39 @@
video_cmap_len = 256;
}
- vesafb_fix.smem_start = video_base;
- vesafb_fix.smem_len = video_size;
- vesafb_fix.visual = video_visual;
- vesafb_fix.ypanstep = ypan ? 1 : 0;
- vesafb_fix.ywrapstep = (ypan>1) ? 1 : 0;
- vesafb_fix.line_length = video_linelength;
+ vesafb_fix.ypanstep = ypan ? 1 : 0;
+ vesafb_fix.ywrapstep = (ypan>1) ? 1 : 0;
/* request failure does not faze us, as vgacon probably has this
* region already (FIXME) */
request_region(0x3c0, 32, "vesafb");
- fb_info.node = -1;
+ if (mtrr) {
+ int temp_size = vesafb_fix.smem_len;
+ /* Find the largest power-of-two */
+ while (temp_size & (temp_size - 1))
+ temp_size &= (temp_size - 1);
+
+ /* Try and find a power of two to add */
+ while (temp_size && mtrr_add(vesafb_fix.smem_start, temp_size, MTRR_TYPE_WRCOMB, 1)==-EINVAL) {
+ temp_size >>= 1;
+ }
+ }
+
+ fb_info.node = NODEV;
fb_info.fbops = &vesafb_ops;
fb_info.var = vesafb_defined;
fb_info.fix = vesafb_fix;
- fb_info.flags=FBINFO_FLAG_DEFAULT;
fb_info.pseudo_palette = pseudo_palette;
+ fb_info.flags = FBINFO_FLAG_DEFAULT;
+
+ fb_alloc_cmap(&fb_info.cmap, video_cmap_len, 0);
if (register_framebuffer(&fb_info)<0)
return -EINVAL;
printk(KERN_INFO "fb%d: %s frame buffer device\n",
- GET_FB_IDX(fb_info.node), fb_info.fix.id);
+ minor(fb_info.node), fb_info.fix.id);
return 0;
}
|
|
From: James S. <jsi...@us...> - 2002-03-23 00:23:02
|
Update of /cvsroot/linuxconsole/ruby/linux/drivers/input/keyboard
In directory usw-pr-cvs1:/tmp/cvs-serv32141/drivers/input/keyboard
Modified Files:
cerf_keyb.c
Log Message:
Bug fixes for fbcon.
Index: cerf_keyb.c
===================================================================
RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/input/keyboard/cerf_keyb.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- cerf_keyb.c 15 Mar 2002 18:28:12 -0000 1.2
+++ cerf_keyb.c 23 Mar 2002 00:22:58 -0000 1.3
@@ -10,13 +10,17 @@
#include <linux/mm.h>
#include <linux/signal.h>
#include <linux/init.h>
+#include <linux/kbd_ll.h>
#include <linux/delay.h>
#include <linux/random.h>
#include <linux/poll.h>
+#include <linux/miscdevice.h>
#include <linux/slab.h>
+#include <linux/kbd_kern.h>
#include <linux/smp_lock.h>
#include <linux/timer.h>
+#include <asm/keyboard.h>
#include <asm/bitops.h>
#include <asm/uaccess.h>
#include <asm/irq.h>
@@ -308,7 +312,9 @@
{
if(scancode != (unsigned char)(KBD_NO_DATA))
{
+#ifdef CONFIG_VT
handle_scancode(scancode, !(scancode & KBD_KEYUP));
+#endif
tasklet_schedule(&keyboard_tasklet);
}
}
|
|
From: James S. <jsi...@us...> - 2002-03-23 00:23:01
|
Update of /cvsroot/linuxconsole/ruby/linux/include/linux
In directory usw-pr-cvs1:/tmp/cvs-serv32141/include/linux
Modified Files:
fb.h
Log Message:
Bug fixes for fbcon.
Index: fb.h
===================================================================
RCS file: /cvsroot/linuxconsole/ruby/linux/include/linux/fb.h,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -d -r1.48 -r1.49
--- fb.h 13 Mar 2002 23:48:38 -0000 1.48
+++ fb.h 23 Mar 2002 00:22:58 -0000 1.49
@@ -294,8 +294,8 @@
};
struct fb_fillrect {
- __u32 x1; /* screen-relative */
- __u32 y1;
+ __u32 dx; /* screen-relative */
+ __u32 dy;
__u32 width;
__u32 height;
__u32 color;
@@ -305,8 +305,8 @@
struct fb_image {
__u32 width; /* Size of image */
__u32 height;
- __u16 x; /* Where to place image */
- __u16 y;
+ __u16 dx; /* Where to place image */
+ __u16 dy;
__u32 fg_color; /* Only used when a mono bitmap */
__u32 bg_color;
__u8 depth; /* Dpeth of the image */
@@ -440,11 +440,9 @@
extern int fb_set_var(struct fb_var_screeninfo *var, struct fb_info *info);
extern int fb_pan_display(struct fb_var_screeninfo *var, struct fb_info *info);
extern int fb_setup(char *options);
-extern void cfb_fillrect(struct fb_info *p, int x1, int y1, unsigned int width,
- unsigned int rows, unsigned long color, int rop);
-extern void cfb_copyarea(struct fb_info *p, int sx, int sy, unsigned int width,
- unsigned int rows, int dx, int dy);
-extern void cfb_imageblit(struct fb_info *p, struct fb_image *image);
+extern void cfb_fillrect(struct fb_info *info, struct fb_fillrect *rect);
+extern void cfb_copyarea(struct fb_info *info, struct fb_copyarea *area);
+extern void cfb_imageblit(struct fb_info *info, struct fb_image *image);
/*
* Helper functions
|
|
From: James S. <jsi...@us...> - 2002-03-22 20:19:14
|
Update of /cvsroot/linuxconsole/ruby/linux/drivers/video/riva
In directory usw-pr-cvs1:/tmp/cvs-serv3485
Modified Files:
fbdev.c
Added Files:
rivafb.h
Log Message:
I somewhat ported the rivafb driver to ruby. Now for testing.
--- NEW FILE: rivafb.h ---
#ifndef __RIVAFB_H
#define __RIVAFB_H
#include <linux/config.h>
#include <linux/fb.h>
#include <video/fbcon.h>
#include "../fbcon-accel.h"
#include "riva_hw.h"
/* GGI compatibility macros */
#define NUM_SEQ_REGS 0x05
#define NUM_CRT_REGS 0x41
#define NUM_GRC_REGS 0x09
#define NUM_ATC_REGS 0x15
/* holds the state of the VGA core and extended Riva hw state from riva_hw.c.
* From KGI originally. */
struct riva_regs {
u8 attr[NUM_ATC_REGS];
u8 crtc[NUM_CRT_REGS];
u8 gra[NUM_GRC_REGS];
u8 seq[NUM_SEQ_REGS];
u8 misc_output;
RIVA_HW_STATE ext;
};
struct riva_par {
RIVA_HW_INST riva; /* interface to riva_hw.c */
caddr_t ctrl_base; /* virtual control register base addr */
unsigned dclk_max; /* max DCLK */
struct riva_regs initial_state; /* initial startup video mode */
struct riva_regs current_state;
struct riva_cursor *cursor;
#ifdef CONFIG_MTRR
struct { int vram; int vram_valid; } mtrr;
#endif
};
#endif /* __RIVAFB_H */
Index: fbdev.c
===================================================================
RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/video/riva/fbdev.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- fbdev.c 18 Mar 2002 19:29:11 -0000 1.12
+++ fbdev.c 22 Mar 2002 20:19:09 -0000 1.13
@@ -25,7 +25,6 @@
* Known bugs and issues:
* restoring text mode fails
* doublescan modes are broken
- * option 'noaccel' has no effect
*/
#include <linux/config.h>
@@ -34,11 +33,9 @@
#include <linux/errno.h>
#include <linux/string.h>
#include <linux/mm.h>
[...2119 lines suppressed...]
+ release_mem_region(info->fix.smem_start,
+ info->fix.smem_len);
+ kfree(info);
pci_set_drvdata(pd, NULL);
}
-
-
/* ------------------------------------------------------------------------- *
*
* initialization
@@ -2061,8 +1558,6 @@
} else if (!strncmp(this_opt, "noblink", 7)) {
noblink = 1;
- } else if (!strncmp(this_opt, "noaccel", 7)) {
- noaccel = 1;
} else if (!strncmp(this_opt, "nomove", 6)) {
nomove = 1;
#ifdef CONFIG_MTRR
|
|
From: James S. <jsi...@us...> - 2002-03-22 20:14:07
|
Update of /cvsroot/linuxconsole/ruby/linux/arch/sparc64
In directory usw-pr-cvs1:/tmp/cvs-serv1749/linux/arch/sparc64
Modified Files:
config.in
Log Message:
Synced to 2.5.7
Index: config.in
===================================================================
RCS file: /cvsroot/linuxconsole/ruby/linux/arch/sparc64/config.in,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -d -r1.24 -r1.25
--- config.in 14 Mar 2002 22:32:22 -0000 1.24
+++ config.in 22 Mar 2002 20:13:58 -0000 1.25
@@ -104,7 +104,6 @@
if [ "$CONFIG_IDE" != "n" ]; then
source drivers/ide/Config.in
else
- define_bool CONFIG_BLK_DEV_IDE_MODES n
define_bool CONFIG_BLK_DEV_HD n
fi
endmenu
@@ -282,6 +281,10 @@
bool ' Spinlock debugging' CONFIG_DEBUG_SPINLOCK
bool ' Verbose BUG() reporting (adds 70K)' CONFIG_DEBUG_BUGVERBOSE
bool ' D-cache flush debugging' CONFIG_DEBUG_DCFLUSH
+fi
+bool 'Stack Overflow Detection Support' CONFIG_STACK_DEBUG
+if [ "$CONFIG_STACK_DEBUG" = "y" ] ; then
+ define_bool CONFIG_MCOUNT y
fi
endmenu
|
|
From: James S. <jsi...@us...> - 2002-03-22 20:14:07
|
Update of /cvsroot/linuxconsole/ruby/linux/drivers/usb
In directory usw-pr-cvs1:/tmp/cvs-serv1749/linux/drivers/usb
Modified Files:
Config.help Config.in Makefile hid.h hiddev.c
Log Message:
Synced to 2.5.7
Index: Config.help
===================================================================
RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/usb/Config.help,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- Config.help 6 Mar 2002 23:02:58 -0000 1.2
+++ Config.help 22 Mar 2002 20:13:58 -0000 1.3
@@ -196,6 +196,18 @@
The module will be called audio.o. If you want to compile it as a
module, say M here and read <file:Documentation/modules.txt>.
+CONFIG_USB_EMI26
+ This driver loads firmware to Emagic EMI 2|6 low latency USB
+ Audio interface.
+
+ After firmware load the device is handled with standard linux
+ USB Audio driver.
+
+ This code is also available as a module ( = code which can be
+ inserted in and removed from the running kernel whenever you want).
+ The module will be called audio.o. If you want to compile it as a
+ module, say M here and read <file:Documentation/modules.txt>.
+
CONFIG_USB_ACM
This driver supports USB modems and ISDN adapters which support the
Communication Device Class Abstract Control Model interface.
@@ -342,12 +354,12 @@
module, say M here and read <file:Documentation/modules.txt>.
CONFIG_USB_PEGASUS
- Say Y here if you know you have Pegasus or Pegasus II based adapter.
+ Say Y here if you know you have Pegasus or Pegasus-II based adapter.
If in doubt then look at linux/drivers/usb/pegasus.h for the complete
list of supported devices.
If your particular adapter is not in the list and you are _sure_ it
- is Pegasus or Pegasus II based then send me (pma...@ln...) vendor
- and device IDs.
+ is Pegasus or Pegasus II based then send me (pma...@us...)
+ vendor and device IDs.
This code is also available as a module ( = code which can be
inserted in and removed from the running kernel whenever you want).
@@ -396,6 +408,7 @@
CONFIG_USB_CATC
Say Y if you want to use one of the following 10Mbps USB Ethernet
device based on the EL1210A chip. Supported devices are:
+ Belkin F5U011
Belkin F5U111
CATC NetMate
CATC NetMate II
Index: Config.in
===================================================================
RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/usb/Config.in,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- Config.in 18 Mar 2002 19:29:10 -0000 1.21
+++ Config.in 22 Mar 2002 20:13:58 -0000 1.22
@@ -31,6 +31,7 @@
comment 'USB Device Class drivers'
dep_tristate ' USB Audio support' CONFIG_USB_AUDIO $CONFIG_USB $CONFIG_SOUND
+ dep_tristate ' EMI 2|6 USB Audio interface support' CONFIG_USB_EMI26 $CONFIG_USB_AUDIO
dep_tristate ' USB Bluetooth support (EXPERIMENTAL)' CONFIG_USB_BLUETOOTH $CONFIG_USB $CONFIG_EXPERIMENTAL
if [ "$CONFIG_SCSI" = "n" ]; then
comment ' SCSI support is needed for USB Storage'
@@ -89,7 +90,7 @@
if [ "$CONFIG_NET" = "n" ]; then
comment ' Networking support is needed for USB Networking device support'
else
- dep_tristate ' USB ADMtek Pegasus-based ethernet device support (EXPERIMENTAL)' CONFIG_USB_PEGASUS $CONFIG_USB $CONFIG_NET $CONFIG_EXPERIMENTAL
+ dep_tristate ' USB Pegasus/Pegasus-II based ethernet device support (EXPERIMENTAL)' CONFIG_USB_PEGASUS $CONFIG_USB $CONFIG_NET $CONFIG_EXPERIMENTAL
dep_tristate ' USB KLSI KL5USB101-based ethernet device support (EXPERIMENTAL)' CONFIG_USB_KAWETH $CONFIG_USB $CONFIG_NET $CONFIG_EXPERIMENTAL
dep_tristate ' USB CATC NetMate-based Ethernet device support (EXPERIMENTAL)' CONFIG_USB_CATC $CONFIG_USB $CONFIG_NET $CONFIG_EXPERIMENTAL
dep_tristate ' USB Communication Class Ethernet device support (EXPERIMENTAL)' CONFIG_USB_CDCETHER $CONFIG_USB $CONFIG_NET $CONFIG_EXPERIMENTAL
Index: Makefile
===================================================================
RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/usb/Makefile,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- Makefile 3 Mar 2002 16:28:06 -0000 1.16
+++ Makefile 22 Mar 2002 20:13:58 -0000 1.17
@@ -68,6 +68,7 @@
obj-$(CONFIG_USB_ACM) += acm.o
obj-$(CONFIG_USB_PRINTER) += printer.o
obj-$(CONFIG_USB_AUDIO) += audio.o
+obj-$(CONFIG_USB_EMI26) += emi26.o
obj-$(CONFIG_USB_IBMCAM) += ibmcam.o usbvideo.o ultracam.o
obj-$(CONFIG_USB_KONICAWC) += konicawc.o usbvideo.o
obj-$(CONFIG_USB_PWC) += pwc.o
Index: hid.h
===================================================================
RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/usb/hid.h,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -d -r1.29 -r1.30
--- hid.h 10 Mar 2002 12:26:40 -0000 1.29
+++ hid.h 22 Mar 2002 20:13:58 -0000 1.30
@@ -203,6 +203,8 @@
#define HID_QUIRK_INVERT 0x01
#define HID_QUIRK_NOTOUCH 0x02
+#define HID_QUIRK_IGNORE 0x04
+#define HID_QUIRK_NOGET 0x08
/*
* This is the global enviroment of the parser. This information is
@@ -276,6 +278,7 @@
__s32 unit_exponent;
unsigned unit;
struct hid_report *report; /* associated report */
+ unsigned index; /* index into report->field[] */
};
#define HID_MAX_FIELDS 64
Index: hiddev.c
===================================================================
RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/usb/hiddev.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- hiddev.c 22 Jan 2002 20:58:58 -0000 1.1
+++ hiddev.c 22 Mar 2002 20:13:58 -0000 1.2
@@ -50,9 +50,10 @@
};
struct hiddev_list {
- struct hiddev_event buffer[HIDDEV_BUFFER_SIZE];
+ struct hiddev_usage_ref buffer[HIDDEV_BUFFER_SIZE];
int head;
int tail;
+ unsigned flags;
struct fasync_struct *fasync;
struct hiddev *hiddev;
struct hiddev_list *next;
@@ -146,17 +147,19 @@
* This is where hid.c calls into hiddev to pass an event that occurred over
* the interrupt pipe
*/
-void hiddev_hid_event(struct hid_device *hid, unsigned int usage, int value)
+void hiddev_hid_event(struct hid_device *hid, struct hiddev_usage_ref *uref)
{
struct hiddev *hiddev = hid->hiddev;
struct hiddev_list *list = hiddev->list;
while (list) {
- list->buffer[list->head].hid = usage;
- list->buffer[list->head].value = value;
- list->head = (list->head + 1) & (HIDDEV_BUFFER_SIZE - 1);
-
- kill_fasync(&list->fasync, SIGIO, POLL_IN);
+ if (uref->field_index != HID_FIELD_INDEX_NONE ||
+ (list->flags & HIDDEV_FLAG_REPORT) != 0) {
+ list->buffer[list->head] = *uref;
+ list->head = (list->head + 1) &
+ (HIDDEV_BUFFER_SIZE - 1);
+ kill_fasync(&list->fasync, SIGIO, POLL_IN);
+ }
list = list->next;
}
@@ -257,43 +260,67 @@
{
DECLARE_WAITQUEUE(wait, current);
struct hiddev_list *list = file->private_data;
+ int event_size;
int retval = 0;
- if (list->head == list->tail) {
-
- add_wait_queue(&list->hiddev->wait, &wait);
- set_current_state(TASK_INTERRUPTIBLE);
+ event_size = ((list->flags & HIDDEV_FLAG_UREF) != 0) ?
+ sizeof(struct hiddev_usage_ref) : sizeof(struct hiddev_event);
- while (list->head == list->tail) {
+ if (count < event_size) return 0;
- if (file->f_flags & O_NONBLOCK) {
- retval = -EAGAIN;
- break;
- }
- if (signal_pending(current)) {
- retval = -ERESTARTSYS;
- break;
- }
- if (!list->hiddev->exist) {
- retval = -EIO;
- break;
+ while (retval == 0) {
+ if (list->head == list->tail) {
+ add_wait_queue(&list->hiddev->wait, &wait);
+ set_current_state(TASK_INTERRUPTIBLE);
+
+ while (list->head == list->tail) {
+ if (file->f_flags & O_NONBLOCK) {
+ retval = -EAGAIN;
+ break;
+ }
+ if (signal_pending(current)) {
+ retval = -ERESTARTSYS;
+ break;
+ }
+ if (!list->hiddev->exist) {
+ retval = -EIO;
+ break;
+ }
+
+ schedule();
}
- schedule();
+ set_current_state(TASK_RUNNING);
+ remove_wait_queue(&list->hiddev->wait, &wait);
}
- set_current_state(TASK_RUNNING);
- remove_wait_queue(&list->hiddev->wait, &wait);
- }
+ if (retval)
+ return retval;
- if (retval)
- return retval;
- while (list->head != list->tail && retval + sizeof(struct hiddev_event) <= count) {
- if (copy_to_user(buffer + retval, list->buffer + list->tail,
- sizeof(struct hiddev_event))) return -EFAULT;
- list->tail = (list->tail + 1) & (HIDDEV_BUFFER_SIZE - 1);
- retval += sizeof(struct hiddev_event);
+ while (list->head != list->tail &&
+ retval + event_size <= count) {
+ if ((list->flags & HIDDEV_FLAG_UREF) == 0) {
+ if (list->buffer[list->tail].field_index !=
+ HID_FIELD_INDEX_NONE) {
+ struct hiddev_event event;
+ event.hid = list->buffer[list->tail].usage_code;
+ event.value = list->buffer[list->tail].value;
+ if (copy_to_user(buffer + retval, &event, sizeof(struct hiddev_event)))
+ return -EFAULT;
+ retval += sizeof(struct hiddev_event);
+ }
+ } else {
+ if (list->buffer[list->tail].field_index != HID_FIELD_INDEX_NONE ||
+ (list->flags & HIDDEV_FLAG_REPORT) != 0) {
+ if (copy_to_user(buffer + retval, list->buffer + list->tail, sizeof(struct hiddev_usage_ref)))
+ return -EFAULT;
+ retval += sizeof(struct hiddev_usage_ref);
+ }
+ }
+ list->tail = (list->tail + 1) & (HIDDEV_BUFFER_SIZE - 1);
+ }
+
}
return retval;
@@ -357,6 +384,25 @@
dinfo.num_applications = hid->maxapplication;
return copy_to_user((void *) arg, &dinfo, sizeof(dinfo));
}
+
+ case HIDIOCGFLAG:
+ return put_user(list->flags, (int *) arg);
+
+ case HIDIOCSFLAG:
+ {
+ int newflags;
+ if (get_user(newflags, (int *) arg))
+ return -EFAULT;
+
+ if ((newflags & ~HIDDEV_FLAGS) != 0 ||
+ ((newflags & HIDDEV_FLAG_REPORT) != 0 &&
+ (newflags & HIDDEV_FLAG_UREF) == 0))
+ return -EINVAL;
+
+ list->flags = newflags;
+
+ return 0;
+ }
case HIDIOCGSTRING:
{
|
|
From: James S. <jsi...@us...> - 2002-03-22 20:14:07
|
Update of /cvsroot/linuxconsole/ruby/linux/arch/x86_64/ia32 In directory usw-pr-cvs1:/tmp/cvs-serv1749/linux/arch/x86_64/ia32 Modified Files: ia32_ioctl.c Log Message: Synced to 2.5.7 Index: ia32_ioctl.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/arch/x86_64/ia32/ia32_ioctl.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- ia32_ioctl.c 18 Mar 2002 19:29:09 -0000 1.2 +++ ia32_ioctl.c 22 Mar 2002 20:13:58 -0000 1.3 @@ -3065,7 +3065,6 @@ COMPATIBLE_IOCTL(HDIO_SET_MULTCOUNT) COMPATIBLE_IOCTL(HDIO_DRIVE_CMD) COMPATIBLE_IOCTL(HDIO_SET_PIO_MODE) -COMPATIBLE_IOCTL(HDIO_SCAN_HWIF) COMPATIBLE_IOCTL(HDIO_SET_NICE) /* 0x02 -- Floppy ioctls */ COMPATIBLE_IOCTL(FDMSGON) |
|
From: James S. <jsi...@us...> - 2002-03-22 20:14:07
|
Update of /cvsroot/linuxconsole/ruby/linux/arch/ppc64 In directory usw-pr-cvs1:/tmp/cvs-serv1749/linux/arch/ppc64 Modified Files: config.in Log Message: Synced to 2.5.7 Index: config.in =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/arch/ppc64/config.in,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- config.in 15 Mar 2002 18:28:12 -0000 1.1 +++ config.in 22 Mar 2002 20:13:57 -0000 1.2 @@ -92,7 +92,6 @@ if [ "$CONFIG_IDE" != "n" ]; then source drivers/ide/Config.in else - define_bool CONFIG_BLK_DEV_IDE_MODES n define_bool CONFIG_BLK_DEV_HD n fi endmenu |
|
From: James S. <jsi...@us...> - 2002-03-22 20:14:07
|
Update of /cvsroot/linuxconsole/ruby/linux/arch/sh In directory usw-pr-cvs1:/tmp/cvs-serv1749/linux/arch/sh Modified Files: config.in Log Message: Synced to 2.5.7 Index: config.in =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/arch/sh/config.in,v retrieving revision 1.19 retrieving revision 1.20 diff -u -d -r1.19 -r1.20 --- config.in 14 Mar 2002 22:32:22 -0000 1.19 +++ config.in 22 Mar 2002 20:13:58 -0000 1.20 @@ -219,7 +219,6 @@ if [ "$CONFIG_IDE" != "n" ]; then source drivers/ide/Config.in else - define_bool CONFIG_BLK_DEV_IDE_MODES n define_bool CONFIG_BLK_DEV_HD n fi endmenu |
|
From: James S. <jsi...@us...> - 2002-03-22 20:14:07
|
Update of /cvsroot/linuxconsole/ruby/linux/arch/sparc64/kernel
In directory usw-pr-cvs1:/tmp/cvs-serv1749/linux/arch/sparc64/kernel
Modified Files:
ioctl32.c
Log Message:
Synced to 2.5.7
Index: ioctl32.c
===================================================================
RCS file: /cvsroot/linuxconsole/ruby/linux/arch/sparc64/kernel/ioctl32.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- ioctl32.c 15 Mar 2002 18:28:12 -0000 1.1
+++ ioctl32.c 22 Mar 2002 20:13:58 -0000 1.2
@@ -32,6 +32,7 @@
#include <linux/ppp_defs.h>
#include <linux/if_ppp.h>
#include <linux/if_pppox.h>
+#include <linux/if_tun.h>
#include <linux/mtio.h>
#include <linux/cdrom.h>
#include <linux/loop.h>
@@ -96,6 +97,7 @@
#include <linux/usb.h>
#include <linux/usbdevice_fs.h>
#include <linux/nbd.h>
+#include <linux/random.h>
/* Use this to get at 32-bit user passed pointers.
See sys_sparc32.c for description about these. */
@@ -3982,7 +3984,6 @@
COMPATIBLE_IOCTL(HDIO_SET_MULTCOUNT)
COMPATIBLE_IOCTL(HDIO_DRIVE_CMD)
COMPATIBLE_IOCTL(HDIO_SET_PIO_MODE)
-COMPATIBLE_IOCTL(HDIO_SCAN_HWIF)
COMPATIBLE_IOCTL(HDIO_SET_NICE)
/* 0x02 -- Floppy ioctls */
COMPATIBLE_IOCTL(FDMSGON)
@@ -4085,6 +4086,12 @@
COMPATIBLE_IOCTL(SCSI_IOCTL_TAGGED_DISABLE)
COMPATIBLE_IOCTL(SCSI_IOCTL_GET_BUS_NUMBER)
COMPATIBLE_IOCTL(SCSI_IOCTL_SEND_COMMAND)
+/* Big T */
+COMPATIBLE_IOCTL(TUNSETNOCSUM);
+COMPATIBLE_IOCTL(TUNSETDEBUG);
+COMPATIBLE_IOCTL(TUNSETIFF);
+COMPATIBLE_IOCTL(TUNSETPERSIST);
+COMPATIBLE_IOCTL(TUNSETOWNER);
/* Big V */
COMPATIBLE_IOCTL(VT_SETMODE)
COMPATIBLE_IOCTL(VT_GETMODE)
@@ -4198,6 +4205,8 @@
COMPATIBLE_IOCTL(SIOCGMIIPHY)
COMPATIBLE_IOCTL(SIOCGMIIREG)
COMPATIBLE_IOCTL(SIOCSMIIREG)
+COMPATIBLE_IOCTL(SIOCGIFVLAN)
+COMPATIBLE_IOCTL(SIOCSIFVLAN)
/* SG stuff */
COMPATIBLE_IOCTL(SG_SET_TIMEOUT)
COMPATIBLE_IOCTL(SG_GET_TIMEOUT)
@@ -4536,6 +4545,13 @@
COMPATIBLE_IOCTL(WIOCSTART)
COMPATIBLE_IOCTL(WIOCSTOP)
COMPATIBLE_IOCTL(WIOCGSTAT)
+/* Big R */
+COMPATIBLE_IOCTL(RNDGETENTCNT)
+COMPATIBLE_IOCTL(RNDADDTOENTCNT)
+COMPATIBLE_IOCTL(RNDGETPOOL)
+COMPATIBLE_IOCTL(RNDADDENTROPY)
+COMPATIBLE_IOCTL(RNDZAPENTCNT)
+COMPATIBLE_IOCTL(RNDCLEARPOOL)
/* Bluetooth ioctls */
COMPATIBLE_IOCTL(HCIDEVUP)
COMPATIBLE_IOCTL(HCIDEVDOWN)
|