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: johann d. <jd...@us...> - 2002-07-21 11:14:33
|
Update of /cvsroot/linuxconsole/ruby/linux/drivers/usb/input
In directory usw-pr-cvs1:/tmp/cvs-serv13450
Modified Files:
Config.help Config.in Makefile hid-ff.c hid-lgff.c
Removed Files:
hid-lg3dff.c
Log Message:
Put support for Logitech devices into lgff.c. Removed lg3dff.c.
Index: Config.help
===================================================================
RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/usb/input/Config.help,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- Config.help 18 Jun 2002 18:51:55 -0000 1.2
+++ Config.help 21 Jul 2002 11:14:30 -0000 1.3
@@ -30,15 +30,19 @@
If unsure, say N.
-CONFIG_LOGITECH_RUMBLE
- Say Y here if you have a Logitech WingMan Cordless rumble pad and if you
+CONFIG_LOGITECH_FF
+ Say Y here if you have a Logitech device with force-feedback and if you
want to enable force feedback. Note: if you say N here, this device will
still be supported, but without force feedback.
+ If unsure, say N.
+
CONFIG_HID_PID
Say Y yes if you have a PID-compliant joystick and wish to enable force
feedback for it. The Microsoft Sidewinder Force Feedback 2 is one such
device.
+
+ If unsure, say N.
CONFIG_USB_HIDDEV
Say Y here if you want to support HID devices (from the USB
Index: Config.in
===================================================================
RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/usb/input/Config.in,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- Config.in 18 Jun 2002 18:51:55 -0000 1.5
+++ Config.in 21 Jul 2002 11:14:30 -0000 1.6
@@ -14,10 +14,9 @@
dep_tristate ' USB HIDBP Mouse (basic) support' CONFIG_USB_MOUSE $CONFIG_USB $CONFIG_INPUT
dep_tristate ' Griffin Technology PowerMate support' CONFIG_USB_POWERMATE $CONFIG_USB $CONFIG_INPUT
fi
-dep_mbool ' Force feedback support' CONFIG_HID_FF $CONFIG_USB_HID
-dep_mbool ' Logitech RumblePad support' CONFIG_LOGITECH_RUMBLE $CONFIG_USB_HID $CONFIG_HID_FF
-dep_mbool ' Logitech WingMan Force 3D support' CONFIG_LOGITECH_3D $CONFIG_USB_HID $CONFIG_HID_FF
-dep_mbool ' PID Devices' CONFIG_HID_PID $CONFIG_USB_HID $CONFIG_HID_FF
+dep_mbool ' Force feedback support' CONFIG_HID_FF $CONFIG_USB_HID $CONFIG_USB_HIDINPUT
+dep_mbool ' Logitech devices support' CONFIG_LOGITECH_FF $CONFIG_USB_HID $CONFIG_HID_FF
+dep_mbool ' PID Devices' CONFIG_HID_PID $CONFIG_USB_HID $CONFIG_HID_FF
dep_tristate ' Aiptek 6000U/8000U tablet support' CONFIG_USB_AIPTEK $CONFIG_USB $CONFIG_INPUT
dep_tristate ' Wacom Intuos/Graphire tablet support' CONFIG_USB_WACOM $CONFIG_USB $CONFIG_INPUT
Index: Makefile
===================================================================
RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/usb/input/Makefile,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- Makefile 18 Jun 2002 18:51:55 -0000 1.5
+++ Makefile 21 Jul 2002 11:14:30 -0000 1.6
@@ -16,12 +16,8 @@
hid-objs += pid.o
endif
-ifeq ($(CONFIG_LOGITECH_RUMBLE),y)
+ifeq ($(CONFIG_LOGITECH_FF),y)
hid-objs += hid-lgff.o
-endif
-
-ifeq ($(CONFIG_LOGITECH_3D),y)
- hid-objs += hid-lg3dff.o
endif
ifeq ($(CONFIG_HID_FF),y)
Index: hid-ff.c
===================================================================
RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/usb/input/hid-ff.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- hid-ff.c 9 Jun 2002 11:06:38 -0000 1.3
+++ hid-ff.c 21 Jul 2002 11:14:30 -0000 1.4
@@ -44,17 +44,15 @@
* devices, you need to add the USB vendor and product ids here.
*/
struct hid_ff_initializer {
- __u16 idVendor;
- __u16 idProduct;
+ u16 idVendor;
+ u16 idProduct;
int (*init)(struct hid_device*);
};
static struct hid_ff_initializer inits[] = {
-#ifdef CONFIG_LOGITECH_RUMBLE
+#ifdef CONFIG_LOGITECH_FF
{0x46d, 0xc211, hid_lgff_init},
-#endif
-#ifdef CONFIG_LOGITECH_3D
- {0x46d, 0xc283, hid_lg3d_init},
+ {0x46d, 0xc283, hid_lgff_init},
#endif
#ifdef CONFIG_HID_PID
{0x45e, 0x001b, hid_pid_init},
@@ -68,8 +66,8 @@
struct hid_ff_initializer *init;
for (init = inits;
init->idVendor
- && !(init->idVendor == idVendor
- && init->idProduct == idProduct);
+ && !(init->idVendor == idVendor
+ && init->idProduct == idProduct);
init++);
return init->idVendor? init : NULL;
@@ -83,7 +81,7 @@
hid->dev->descriptor.idProduct);
if (!init) {
- warn("hid_ff_init could not find initializer");
+ dbg("hid_ff_init could not find initializer");
return -ENOSYS;
}
return init->init(hid);
Index: hid-lgff.c
===================================================================
RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/usb/input/hid-lgff.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- hid-lgff.c 14 Jul 2002 10:31:42 -0000 1.4
+++ hid-lgff.c 21 Jul 2002 11:14:30 -0000 1.5
@@ -4,6 +4,7 @@
* Force feedback support for hid-compliant for some of the devices from
* Logitech, namely:
* - WingMan Cordless RumblePad
+ * - WingMan Force 3D
*
* Copyright (c) 2002 Johann Deneux
*/
@@ -36,6 +37,11 @@
#include <linux/circ_buf.h>
#include "hid.h"
+#include "fixp-arith.h"
+
+
+/* Periodicity of the update */
+#define PERIOD (HZ/10)
#define RUN_AT(t) (jiffies + (t))
@@ -48,79 +54,97 @@
#define EFFECT_PLAYING 1 /* Effect is being played */
#define EFFECT_USED 2
+// For lgff_device::flags
+#define DEVICE_CLOSING 0 /* The driver is being unitialised */
+
/* Check that the current process can access an effect */
#define CHECK_OWNERSHIP(effect) (current->pid == 0 \
|| effect.owner == current->pid)
-/* **************************************************************************/
-/* Implements the protocol used by the Logitech WingMan Cordless RumblePad */
-/* **************************************************************************/
-
#define LGFF_CHECK_OWNERSHIP(i, l) \
(i>=0 && i<LGFF_EFFECTS \
&& test_bit(EFFECT_USED, l->effects[i].flags) \
&& CHECK_OWNERSHIP(l->effects[i]))
-#define LGFF_BUFFER_SIZE 64
#define LGFF_EFFECTS 8
-struct lgff_magnitudes {
- unsigned char left;
- unsigned char right;
+struct device_type {
+ u16 idVendor;
+ u16 idProduct;
+ signed short *ff;
};
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;
+
+ struct ff_effect effect;
+
unsigned long flags[1];
+ unsigned int count; /* Number of times left to play */
+ unsigned long started_at; /* When the effect started to play */
};
-struct hid_ff_logitech {
+struct lgff_device {
struct hid_device* hid;
- struct hid_report report;
- __s32 value[8];
+ struct hid_report* constant;
+ struct hid_report* rumble;
+ struct hid_report* condition;
struct lgff_effect effects[LGFF_EFFECTS];
spinlock_t lock; /* device-level lock. Having locks on
a per-effect basis could be nice, but
isn't really necessary */
+
+ unsigned long flags[1]; /* Contains various information about the
+ state of the driver for this device */
+
+ struct timer_list timer;
};
+/* Callbacks */
static void hid_lgff_exit(struct hid_device* hid);
static int hid_lgff_event(struct hid_device *hid, struct input_dev *input,
unsigned int type, unsigned int code, int value);
-static void hid_lgff_make_rumble(struct hid_device* hid);
-
static int hid_lgff_flush(struct input_dev *input, struct file *file);
static int hid_lgff_upload_effect(struct input_dev *input,
struct ff_effect *effect);
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);
+
+/* Local functions */
+static void hid_lgff_input_init(struct hid_device* hid);
static void hid_lgff_timer(unsigned long timer_data);
+static struct hid_report* hid_lgff_duplicate_report(struct hid_report*);
+static void hid_lgff_delete_report(struct hid_report*);
+static signed short ff_rumble[] = {
+ FF_RUMBLE,
+ -1
+};
+
+static signed short ff_joystick[] = {
+ FF_CONSTANT,
+ -1
+};
+
+static struct device_type devices[] = {
+ {0x046d, 0xc211, ff_rumble},
+ {0x046d, 0xc283, ff_joystick},
+ {0x0000, 0x0000, ff_joystick}
+};
int hid_lgff_init(struct hid_device* hid)
{
- struct hid_ff_logitech *private;
+ struct lgff_device *private;
struct hid_report* report;
struct hid_field* field;
- int i;
/* Find the report to use */
if (list_empty(&hid->report_enum[HID_OUTPUT_REPORT].report_list)) {
err("No output report found");
return -1;
}
- /* Check the report looks ok */
+ /* Check that the report looks ok */
report = (struct hid_report*)hid->report_enum[HID_OUTPUT_REPORT].report_list.next;
if (!report) {
err("NULL output report");
@@ -131,60 +155,138 @@
err("NULL field");
return -1;
}
- if (!field->value) {
- err("No space allocated for values");
- return -1;
- }
- private = kmalloc(sizeof(struct hid_ff_logitech), GFP_KERNEL);
+ private = kmalloc(sizeof(struct lgff_device), GFP_KERNEL);
if (!private) return -1;
- memset(private, 0, sizeof(struct hid_ff_logitech));
+ memset(private, 0, sizeof(struct lgff_device));
hid->ff_private = private;
- private->report = *(struct hid_report*)(hid->report_enum[HID_OUTPUT_REPORT].report_list.next);
- private->hid = hid;
+ /* Input init */
+ hid_lgff_input_init(hid);
- spin_lock_init(&private->lock);
- for (i=0; i<LGFF_EFFECTS; ++i) {
- struct lgff_effect* effect = &private->effects[i];
- struct timer_list* timer = &effect->timer;
+ private->constant = hid_lgff_duplicate_report(report);
+ if (!private->constant) {
+ kfree(private);
+ return -1;
+ }
+ private->constant->field[0]->value[0] = 0x51;
+ private->constant->field[0]->value[1] = 0x08;
+ private->constant->field[0]->value[2] = 0x7f;
+ private->constant->field[0]->value[3] = 0x7f;
- init_timer(timer);
- effect->id = i;
- effect->lgff = private;
- timer->data = (unsigned long)effect;
- timer->function = hid_lgff_timer;
+ private->rumble = hid_lgff_duplicate_report(report);
+ if (!private->rumble) {
+ hid_lgff_delete_report(private->constant);
+ kfree(private);
+ return -1;
}
+ private->rumble->field[0]->value[0] = 0x03;
+ private->rumble->field[0]->value[1] = 0x42;
+
+
+ private->condition = hid_lgff_duplicate_report(report);
+ if (!private->condition) {
+ hid_lgff_delete_report(private->rumble);
+ hid_lgff_delete_report(private->constant);
+ kfree(private);
+ return -1;
+ }
+
+ private->hid = hid;
+
+ spin_lock_init(&private->lock);
+ init_timer(&private->timer);
+ private->timer.data = (unsigned long)private;
+ private->timer.function = hid_lgff_timer;
/* Event and exit callbacks */
hid->ff_exit = hid_lgff_exit;
hid->ff_event = hid_lgff_event;
- /* Input init */
+ /* Start the update task */
+ private->timer.expires = RUN_AT(PERIOD);
+ add_timer(&private->timer); /*TODO: only run the timer when at least
+ one effect is playing */
+
+ printk(KERN_INFO "Force feedback for Logitech force feedback devices by Johann Deneux <de...@if...>\n");
+
+ return 0;
+}
+
+static struct hid_report* hid_lgff_duplicate_report(struct hid_report* report)
+{
+ struct hid_report* ret;
+
+ ret = kmalloc(sizeof(struct lgff_device), GFP_KERNEL);
+ if (!ret) return NULL;
+ *ret = *report;
+
+ ret->field[0] = kmalloc(sizeof(struct hid_field), GFP_KERNEL);
+ if (!ret->field[0]) {
+ kfree(ret);
+ return NULL;
+ }
+ *ret->field[0] = *report->field[0];
+
+ ret->field[0]->value = kmalloc(sizeof(s32[8]), GFP_KERNEL);
+ if (!ret->field[0]->value) {
+ kfree(ret->field[0]);
+ kfree(ret);
+ return NULL;
+ }
+ memset(ret->field[0]->value, 0, sizeof(s32[8]));
+
+ return ret;
+}
+
+static void hid_lgff_delete_report(struct hid_report* report)
+{
+ if (report) {
+ kfree(report->field[0]->value);
+ kfree(report->field[0]);
+ kfree(report);
+ }
+}
+
+static void hid_lgff_input_init(struct hid_device* hid)
+{
+ struct device_type* dev = devices;
+ signed short* ff;
+ u16 idVendor = hid->dev->descriptor.idVendor;
+ u16 idProduct = hid->dev->descriptor.idProduct;
+
+ while (dev->idVendor && (idVendor != dev->idVendor || idProduct != dev->idProduct))
+ dev++;
+
+ ff = dev->ff;
+
+ while (ff && *ff >= 0) {
+ set_bit(*ff, hid->input.ffbit);
+ ++ff;
+ }
+
hid->input.upload_effect = hid_lgff_upload_effect;
hid->input.flush = hid_lgff_flush;
- set_bit(FF_RUMBLE, hid->input.ffbit);
+
set_bit(EV_FF, hid->input.evbit);
hid->input.ff_effects_max = LGFF_EFFECTS;
-
- printk(KERN_INFO "Force feedback for Logitech rumble devices by Johann Deneux <de...@if...>\n");
-
- return 0;
}
static void hid_lgff_exit(struct hid_device* hid)
{
- struct hid_ff_logitech *lgff = hid->ff_private;
+ struct lgff_device *lgff = hid->ff_private;
- /* At this point, all effects were erased by hid_lgff_flush.
- No need to do anything */
+ set_bit(DEVICE_CLOSING, lgff->flags);
+ del_timer_sync(&lgff->timer);
+
+ kfree(lgff);
}
static int hid_lgff_event(struct hid_device *hid, struct input_dev* input,
unsigned int type, unsigned int code, int value)
{
- struct hid_ff_logitech *lgff = hid->ff_private;
+ struct lgff_device *lgff = hid->ff_private;
struct lgff_effect *effect = lgff->effects + code;
unsigned long flags;
@@ -206,27 +308,16 @@
effect->count = value;
- if (effect->replay.delay) {
+ if (effect->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);
+ set_bit(EFFECT_PLAYING, effect->flags);
}
-
- add_timer(&effect->timer);
+ effect->started_at = jiffies;
}
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);
+ clear_bit(EFFECT_STARTED, effect->flags);
+ clear_bit(EFFECT_PLAYING, effect->flags);
}
spin_unlock_irqrestore(&lgff->lock, flags);
@@ -239,7 +330,7 @@
static int hid_lgff_flush(struct input_dev *dev, struct file *file)
{
struct hid_device *hid = dev->private;
- struct hid_ff_logitech *lgff = hid->ff_private;
+ struct lgff_device *lgff = hid->ff_private;
int i;
for (i=0; i<dev->ff_effects_max; ++i) {
@@ -263,13 +354,12 @@
static int hid_lgff_erase(struct input_dev *dev, int id)
{
struct hid_device *hid = dev->private;
- struct hid_ff_logitech *lgff = hid->ff_private;
+ struct lgff_device *lgff = hid->ff_private;
unsigned long flags;
if (!LGFF_CHECK_OWNERSHIP(id, lgff)) return -EACCES;
spin_lock_irqsave(&lgff->lock, flags);
- hid_lgff_ctrl_playback(hid, lgff->effects + id, 0);
lgff->effects[id].flags[0] = 0;
spin_unlock_irqrestore(&lgff->lock, flags);
@@ -280,7 +370,7 @@
struct ff_effect* effect)
{
struct hid_device *hid = input->private;
- struct hid_ff_logitech *lgff = hid->ff_private;
+ struct lgff_device *lgff = hid->ff_private;
struct lgff_effect new;
int id;
unsigned long flags;
@@ -289,8 +379,6 @@
if (!test_bit(effect->type, input->ffbit)) return -EINVAL;
- if (effect->type != FF_RUMBLE) return -EINVAL;
-
spin_lock_irqsave(&lgff->lock, flags);
if (effect->id == -1) {
@@ -315,25 +403,20 @@
id = effect->id;
new = lgff->effects[id];
- new.right = effect->u.rumble.strong_magnitude >> 9;
- new.left = effect->u.rumble.weak_magnitude >> 9;
- new.replay = effect->replay;
+ new.effect = *effect;
- /* If we updated an effect that was being played, we need to remake
- the rumble effect */
if (test_bit(EFFECT_STARTED, lgff->effects[id].flags)
|| test_bit(EFFECT_STARTED, lgff->effects[id].flags)) {
/* Changing replay parameters is not allowed (for the time
being) */
- if (new.replay.delay != lgff->effects[id].replay.delay
- || new.replay.length != lgff->effects[id].replay.length) {
+ if (new.effect.replay.delay != lgff->effects[id].effect.replay.delay
+ || new.effect.replay.length != lgff->effects[id].effect.replay.length) {
spin_unlock_irqrestore(&lgff->lock, flags);
return -ENOSYS;
}
lgff->effects[id] = new;
- hid_lgff_make_rumble(hid);
} else {
lgff->effects[id] = new;
@@ -343,90 +426,99 @@
return 0;
}
-static void hid_lgff_make_rumble(struct hid_device* hid)
+static void hid_lgff_timer(unsigned long timer_data)
{
- struct hid_ff_logitech *lgff = hid->ff_private;
- int left = 0, right = 0;
- int i;
+ struct lgff_device *lgff = (struct lgff_device*)timer_data;
+ struct hid_device *hid = lgff->hid;
unsigned long flags;
+ int x = 0x7f, y = 0x7f; // Coordinates of constant effects
+ unsigned int left = 0, right = 0; // Rumbling
+ int i;
- for (i=0; i<LGFF_EFFECTS; ++i) {
- if (test_bit(EFFECT_USED, lgff->effects[i].flags)
- && test_bit(EFFECT_PLAYING, lgff->effects[i].flags)) {
- left += lgff->effects[i].left;
- right += lgff->effects[i].right;
- }
- }
-
- lgff->report.field[0]->value[0] = 0x03;
- lgff->report.field[0]->value[1] = 0x42;
- lgff->report.field[0]->value[3] = left;
- lgff->report.field[0]->value[4] = right;
- hid_submit_report(hid, &lgff->report, USB_DIR_OUT);
-}
+ spin_lock_irqsave(&lgff->lock, flags);
-/* Lock must be held by caller */
-static void hid_lgff_ctrl_playback(struct hid_device *hid,
- struct lgff_effect *effect, int play)
-{
- if (play) {
- set_bit(EFFECT_PLAYING, effect->flags);
- hid_lgff_make_rumble(hid);
+ for (i=0; i<LGFF_EFFECTS; ++i) {
+ struct lgff_effect* effect = lgff->effects +i;
- } else {
- clear_bit(EFFECT_PLAYING, effect->flags);
- hid_lgff_make_rumble(hid);
- }
-}
+ if (test_bit(EFFECT_PLAYING, effect->flags)) {
-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;
+ switch (effect->effect.type) {
+ case FF_CONSTANT: {
+ //TODO: handle envelopes
+ int degrees = effect->effect.direction * 360 >> 16;
+ x += fixp_mult(fixp_sin(degrees),
+ fixp_new16(effect->effect.u.constant.level));
+ y += fixp_mult(-fixp_cos(degrees),
+ fixp_new16(effect->effect.u.constant.level));
+ } break;
+ case FF_RUMBLE:
+ right += effect->effect.u.rumble.strong_magnitude;
+ left += effect->effect.u.rumble.weak_magnitude;
+ break;
+ };
- unsigned long flags;
+ /* One run of the effect is finished playing */
+ if (time_after(jiffies,
+ effect->started_at
+ + effect->effect.replay.delay*HZ/1000
+ + effect->effect.replay.length*HZ/1000)) {
+ dbg("Finished playing once %d", i);
+ if (--effect->count <= 0) {
+ dbg("Stopped %d", i);
+ clear_bit(EFFECT_PLAYING, effect->flags);
+ }
+ else {
+ dbg("Start again %d", i);
+ if (effect->effect.replay.length != 0) {
+ clear_bit(EFFECT_PLAYING, effect->flags);
+ set_bit(EFFECT_STARTED, effect->flags);
+ }
+ effect->started_at = jiffies;
+ }
+ }
- dbg("in hid_lgff_timer");
+ } else if (test_bit(EFFECT_STARTED, lgff->effects[i].flags)) {
+ /* Check if we should start playing the effect */
+ if (time_after(jiffies,
+ lgff->effects[i].started_at
+ + lgff->effects[i].effect.replay.delay*HZ/1000)) {
+ dbg("Now playing %d", i);
+ clear_bit(EFFECT_STARTED, lgff->effects[i].flags);
+ set_bit(EFFECT_PLAYING, lgff->effects[i].flags);
+ }
+ }
+ }
- if (id < 0 || id >= LGFF_EFFECTS) {
- warn("Bad effect id %d", id);
- return;
- }
+#define CLAMP(x) if (x < 0) x = 0; if (x > 0xff) x = 0xff
- effect = lgff->effects + id;
+ // Clamp values
+ CLAMP(x);
+ CLAMP(y);
+ CLAMP(left);
+ CLAMP(right);
- spin_lock_irqsave(&lgff->lock, flags);
+#undef CLAMP
- if (!test_bit(EFFECT_USED, effect->flags)) {
- warn("Unused effect id %d", id);
+ if (x != lgff->constant->field[0]->value[2]
+ || y != lgff->constant->field[0]->value[3]) {
+ lgff->constant->field[0]->value[2] = x;
+ lgff->constant->field[0]->value[3] = y;
+ dbg("(x,y)=(%04x, %04x)", x, y);
+ hid_submit_report(hid, lgff->constant, USB_DIR_OUT);
+ }
- } 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);
- if (effect->replay.length) {
- effect->timer.expires = RUN_AT(effect->replay.length * HZ / 1000);
- add_timer(&effect->timer);
- }
- /* else { play for ever } */
+ if (left != lgff->rumble->field[0]->value[3]
+ || right != lgff->rumble->field[0]->value[4]) {
+ lgff->rumble->field[0]->value[3] = left;
+ lgff->rumble->field[0]->value[4] = right;
+ dbg("(left,right)=(%04x, %04x)", left, right);
+ hid_submit_report(hid, lgff->rumble, USB_DIR_OUT);
+ }
- 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);
+ if (!test_bit(DEVICE_CLOSING, lgff->flags)) {
+ lgff->timer.expires = RUN_AT(PERIOD);
+ add_timer(&lgff->timer);
}
- spin_unlock_irqrestore(&lgff->lock, flags);
+ spin_unlock_irqrestore(&lgff->lock, flags);
}
--- hid-lg3dff.c DELETED ---
|
|
From: Vojtech P. <vo...@us...> - 2002-07-17 08:50:59
|
Update of /cvsroot/linuxconsole/ruby/utils
In directory usw-pr-cvs1:/tmp/cvs-serv26195
Modified Files:
evtest.c
Log Message:
Remove duplicated key definitions.
Index: evtest.c
===================================================================
RCS file: /cvsroot/linuxconsole/ruby/utils/evtest.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- evtest.c 13 Jul 2002 13:56:37 -0000 1.17
+++ evtest.c 17 Jul 2002 08:50:55 -0000 1.18
@@ -73,8 +73,8 @@
"TV2", "VCR", "VCR2", "Sat", "Sat2", "CD", "Tape", "Radio", "Tuner", "Player",
"Text", "DVD", "Aux", "MP3", "Audio", "Video", "Directory", "List", "Memo",
"Calendar", "Red", "Green", "Yellow", "Blue", "ChannelUp", "ChannelDown",
-"First", "Last", "AB", "Play", "Restart", "Slow", "Shuffle", "FastForward",
-"Previous", "Next", "Digits", "Teen", "Twen", "Break" };
+"First", "Last", "AB", "Next", "Restart", "Slow", "Shuffle", "Break",
+"Previous", "Digits", "Teen", "Twen" };
char *absval[5] = { "Value", "Min ", "Max ", "Fuzz ", "Flat " };
char *relatives[REL_MAX + 1] = { "X", "Y", "Z", NULL, NULL, NULL, "HWheel", "Dial", "Wheel" };
|
|
From: johann d. <jd...@us...> - 2002-07-14 10:31:45
|
Update of /cvsroot/linuxconsole/ruby/linux/drivers/usb/input
In directory usw-pr-cvs1:/tmp/cvs-serv24762
Modified Files:
hid-lgff.c
Log Message:
Use hid_submit_report instead of usb_submit_urb. Much smaller, simpler code. Should work with both 2.4 and 2.5 kernels.
Index: hid-lgff.c
===================================================================
RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/usb/input/hid-lgff.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- hid-lgff.c 26 Apr 2002 16:26:00 -0000 1.3
+++ hid-lgff.c 14 Jul 2002 10:31:42 -0000 1.4
@@ -85,14 +85,8 @@
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];
-
- spinlock_t xmit_lock;
- unsigned int xmit_head, xmit_tail;
- struct lgff_magnitudes xmit_data[LGFF_BUFFER_SIZE];
- long xmit_flags[1];
+ struct hid_report report;
+ __s32 value[8];
struct lgff_effect effects[LGFF_EFFECTS];
spinlock_t lock; /* device-level lock. Having locks on
@@ -100,7 +94,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,
unsigned int type, unsigned int code, int value);
@@ -118,22 +111,40 @@
int hid_lgff_init(struct hid_device* hid)
{
struct hid_ff_logitech *private;
+ struct hid_report* report;
+ struct hid_field* field;
int i;
- /* Private data */
+ /* Find the report to use */
+ if (list_empty(&hid->report_enum[HID_OUTPUT_REPORT].report_list)) {
+ err("No output report found");
+ return -1;
+ }
+ /* Check the report looks ok */
+ report = (struct hid_report*)hid->report_enum[HID_OUTPUT_REPORT].report_list.next;
+ if (!report) {
+ err("NULL output report");
+ return -1;
+ }
+ field = report->field[0];
+ if (!field) {
+ err("NULL field");
+ return -1;
+ }
+ if (!field->value) {
+ err("No space allocated for values");
+ return -1;
+ }
+
private = kmalloc(sizeof(struct hid_ff_logitech), GFP_KERNEL);
if (!private) return -1;
-
memset(private, 0, sizeof(struct hid_ff_logitech));
-
hid->ff_private = private;
+ private->report = *(struct hid_report*)(hid->report_enum[HID_OUTPUT_REPORT].report_list.next);
private->hid = hid;
- spin_lock_init(&private->lock);
- spin_lock_init(&private->xmit_lock);
- private->buf[0] = 0x03;
- private->buf[1] = 0x42;
+ spin_lock_init(&private->lock);
for (i=0; i<LGFF_EFFECTS; ++i) {
struct lgff_effect* effect = &private->effects[i];
@@ -150,17 +161,6 @@
hid->ff_exit = hid_lgff_exit;
hid->ff_event = hid_lgff_event;
- /* USB init */
- if (!(private->urbffout = usb_alloc_urb(0, GFP_KERNEL))) {
- kfree(hid->ff_private);
- return -1;
- }
-
- usb_fill_control_urb(private->urbffout, hid->dev, 0,
- (void*) &private->ffcr, private->buf, 8,
- hid_lgff_ctrl_out, hid);
- dbg("Created ff output control urb");
-
/* Input init */
hid->input.upload_effect = hid_lgff_upload_effect;
hid->input.flush = hid_lgff_flush;
@@ -177,10 +177,8 @@
{
struct hid_ff_logitech *lgff = hid->ff_private;
- if (lgff->urbffout) {
- usb_unlink_urb(lgff->urbffout);
- usb_free_urb(lgff->urbffout);
- }
+ /* At this point, all effects were erased by hid_lgff_flush.
+ No need to do anything */
}
static int hid_lgff_event(struct hid_device *hid, struct input_dev* input,
@@ -345,48 +343,11 @@
return 0;
}
-static void hid_lgff_xmit(struct hid_device* hid)
-{
- struct hid_ff_logitech *lgff = hid->ff_private;
- int err;
- int tail;
- unsigned long flags;
-
- spin_lock_irqsave(&lgff->xmit_lock, flags);
-
- tail = lgff->xmit_tail;
- if (lgff->xmit_head == tail) {
- clear_bit(XMIT_RUNNING, lgff->xmit_flags);
- spin_unlock_irqrestore(&lgff->xmit_lock, flags);
- return;
- }
- lgff->buf[3] = lgff->xmit_data[tail].left;
- lgff->buf[4] = lgff->xmit_data[tail].right;
- tail++; tail &= LGFF_BUFFER_SIZE -1;
- lgff->xmit_tail = tail;
-
- spin_unlock_irqrestore(&lgff->xmit_lock, flags);
-
- lgff->urbffout->pipe = usb_sndctrlpipe(hid->dev, 0);
- lgff->ffcr.bRequestType = USB_TYPE_CLASS | USB_DIR_OUT | USB_RECIP_INTERFACE;
- lgff->urbffout->transfer_buffer_length = lgff->ffcr.wLength = 8;
- lgff->ffcr.bRequest = 9;
- lgff->ffcr.wValue = 0x0203; /*NOTE: Potential problem with
- little/big endian */
- lgff->ffcr.wIndex = 0;
-
- lgff->urbffout->dev = hid->dev;
-
- if ((err=usb_submit_urb(lgff->urbffout, GFP_ATOMIC)))
- warn("usb_submit_urb returned %d", err);
-}
-
static void hid_lgff_make_rumble(struct hid_device* hid)
{
struct hid_ff_logitech *lgff = hid->ff_private;
int left = 0, right = 0;
int i;
- int head, tail;
unsigned long flags;
for (i=0; i<LGFF_EFFECTS; ++i) {
@@ -397,38 +358,11 @@
}
}
- spin_lock_irqsave(&lgff->xmit_lock, flags);
-
- head = lgff->xmit_head;
- tail = lgff->xmit_tail;
-
- if (CIRC_SPACE(head, tail, LGFF_BUFFER_SIZE) < 1) {
- warn("not enough space in xmit buffer to send new packet");
- spin_unlock_irqrestore(&lgff->xmit_lock, flags);
- return;
- }
-
- lgff->xmit_data[head].left = left > 0x7f ? 0x7f : left;
- lgff->xmit_data[head].right = right > 0x7f ? 0x7f : right;
- head++; head &= LGFF_BUFFER_SIZE -1;
- lgff->xmit_head = head;
-
- if (test_and_set_bit(XMIT_RUNNING, lgff->xmit_flags))
- spin_unlock_irqrestore(&lgff->xmit_lock, flags);
- else {
- spin_unlock_irqrestore(&lgff->xmit_lock, flags);
- hid_lgff_xmit(hid);
- }
-}
-
-static void hid_lgff_ctrl_out(struct urb *urb)
-{
- struct hid_device *hid = urb->context;
-
- if (urb->status)
- warn("hid_irq_ffout status %d received", urb->status);
-
- hid_lgff_xmit(hid);
+ lgff->report.field[0]->value[0] = 0x03;
+ lgff->report.field[0]->value[1] = 0x42;
+ lgff->report.field[0]->value[3] = left;
+ lgff->report.field[0]->value[4] = right;
+ hid_submit_report(hid, &lgff->report, USB_DIR_OUT);
}
/* Lock must be held by caller */
@@ -471,8 +405,11 @@
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);
+ if (effect->replay.length) {
+ effect->timer.expires = RUN_AT(effect->replay.length * HZ / 1000);
+ add_timer(&effect->timer);
+ }
+ /* else { play for ever } */
dbg("Effect %d starts playing", id);
} else if (test_bit(EFFECT_PLAYING, effect->flags)) {
|
|
From: johann d. <jd...@us...> - 2002-07-14 10:14:04
|
Update of /cvsroot/linuxconsole/ruby/linux/drivers/input/joystick/iforce In directory usw-pr-cvs1:/tmp/cvs-serv22288 Modified Files: iforce-ff.c Log Message: 0 means "play for ever" for playback durations. Index: iforce-ff.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/input/joystick/iforce/iforce-ff.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- iforce-ff.c 2 Feb 2002 19:28:35 -0000 1.9 +++ iforce-ff.c 14 Jul 2002 10:14:00 -0000 1.10 @@ -326,6 +326,7 @@ data[1] = effect_type; data[2] = LO(axes) | find_button(iforce, button); + if (!duration) duration = 0xFFFF; data[3] = LO(duration); data[4] = HI(duration); |
|
From: johann d. <jd...@us...> - 2002-07-14 10:08:51
|
Update of /cvsroot/linuxconsole/ruby/linux/include/linux
In directory usw-pr-cvs1:/tmp/cvs-serv21359
Modified Files:
input.h
Log Message:
A value of 0 denotes infite playback durations for force effects.
Whitespace changes.
Index: input.h
===================================================================
RCS file: /cvsroot/linuxconsole/ruby/linux/include/linux/input.h,v
retrieving revision 1.69
retrieving revision 1.70
diff -u -d -r1.69 -r1.70
--- input.h 10 Jul 2002 22:34:01 -0000 1.69
+++ input.h 14 Jul 2002 10:08:48 -0000 1.70
@@ -523,8 +523,10 @@
*/
struct ff_replay {
- __u16 length; /* Duration of an effect in ms. All other times are also expressed in ms */
- __u16 delay; /* Time to wait before to start playing an effect */
+ __u16 length; /* Duration of an effect in ms.
+ All other times are also expressed in ms.
+ 0 means "play for ever" */
+ __u16 delay; /* Time to wait before to start playing an effect */
};
struct ff_trigger {
@@ -561,17 +563,17 @@
joystick moves to the right */
__s16 left_coeff; /* Same for left side */
- __u16 deadband; /* Size of area where no force is produced */
- __s16 center; /* Position of dead zone */
+ __u16 deadband; /* Size of area where no force is produced */
+ __s16 center; /* Position of dead zone */
};
/* FF_PERIODIC */
struct ff_periodic_effect {
- __u16 waveform; /* Kind of wave (sine, square...) */
- __u16 period; /* in ms */
+ __u16 waveform; /* Kind of wave (sine, square...) */
+ __u16 period; /* in ms */
__s16 magnitude; /* Peak value */
- __s16 offset; /* Mean value of wave (roughly) */
+ __s16 offset; /* Mean value of wave (roughly) */
__u16 phase; /* 'Horizontal' shift */
struct ff_envelope envelope;
|
|
From: Vojtech P. <vo...@us...> - 2002-07-13 13:56:41
|
Update of /cvsroot/linuxconsole/ruby/utils
In directory usw-pr-cvs1:/tmp/cvs-serv25940
Modified Files:
evtest.c
Log Message:
Add key definitions for set-top boxes.
Index: evtest.c
===================================================================
RCS file: /cvsroot/linuxconsole/ruby/utils/evtest.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- evtest.c 24 Oct 2001 11:19:28 -0000 1.16
+++ evtest.c 13 Jul 2002 13:56:37 -0000 1.17
@@ -66,7 +66,15 @@
"BtnA", "BtnB", "BtnC", "BtnX", "BtnY", "BtnZ", "BtnTL", "BtnTR", "BtnTL2", "BtnTR2", "BtnSelect", "BtnStart", "BtnMode",
"BtnThumbL", "BtnThumbR", NULL,
"ToolPen", "ToolRubber", "ToolBrush", "ToolPencil", "ToolAirbrush", "ToolFinger", "ToolMouse", "ToolLens", NULL, NULL,
-"Touch", "Stylus", "Stylus2" };
+"Touch", "Stylus", "Stylus2", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+"Ok", "Select", "Goto", "Clear", "Power2", "Option", "Info", "Time", "Vendor",
+"Archive", "Program", "Channel", "Favorites", "EPG", "PVR", "MHP", "Language",
+"Title", "Subtitle", "Angle", "Zoom", "Mode", "Keyboard", "Screen", "PC", "TV",
+"TV2", "VCR", "VCR2", "Sat", "Sat2", "CD", "Tape", "Radio", "Tuner", "Player",
+"Text", "DVD", "Aux", "MP3", "Audio", "Video", "Directory", "List", "Memo",
+"Calendar", "Red", "Green", "Yellow", "Blue", "ChannelUp", "ChannelDown",
+"First", "Last", "AB", "Play", "Restart", "Slow", "Shuffle", "FastForward",
+"Previous", "Next", "Digits", "Teen", "Twen", "Break" };
char *absval[5] = { "Value", "Min ", "Max ", "Fuzz ", "Flat " };
char *relatives[REL_MAX + 1] = { "X", "Y", "Z", NULL, NULL, NULL, "HWheel", "Dial", "Wheel" };
|
|
From: James S. <jsi...@us...> - 2002-07-12 17:17:55
|
Update of /cvsroot/linuxconsole/ruby/linux/arch/ppc/kernel In directory usw-pr-cvs1:/tmp/cvs-serv11287/kernel Modified Files: m8260_setup.c m8xx_setup.c ppc4xx_setup.c Log Message: Fixes to removal old keyboard code. Index: m8260_setup.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/arch/ppc/kernel/m8260_setup.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- m8260_setup.c 14 Mar 2002 22:32:22 -0000 1.1 +++ m8260_setup.c 12 Jul 2002 17:17:52 -0000 1.2 @@ -266,14 +266,6 @@ ppc_md.find_end_of_memory = m8260_find_end_of_memory; ppc_md.setup_io_mappings = m8260_map_io; - - ppc_md.kbd_setkeycode = NULL; - ppc_md.kbd_getkeycode = NULL; - ppc_md.kbd_translate = NULL; - ppc_md.kbd_unexpected_up = NULL; - ppc_md.kbd_leds = NULL; - ppc_md.kbd_init_hw = NULL; - ppc_md.ppc_kbd_sysrq_xlate = NULL; } /* Mainly for ksyms. Index: m8xx_setup.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/arch/ppc/kernel/m8xx_setup.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- m8xx_setup.c 18 Jun 2002 18:51:54 -0000 1.2 +++ m8xx_setup.c 12 Jul 2002 17:17:52 -0000 1.3 @@ -396,14 +396,6 @@ ppc_md.find_end_of_memory = m8xx_find_end_of_memory; ppc_md.setup_io_mappings = m8xx_map_io; - ppc_md.kbd_setkeycode = NULL; - ppc_md.kbd_getkeycode = NULL; - ppc_md.kbd_translate = NULL; - ppc_md.kbd_unexpected_up = NULL; - ppc_md.kbd_leds = NULL; - ppc_md.kbd_init_hw = NULL; - ppc_md.ppc_kbd_sysrq_xlate = NULL; - #if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE) m8xx_ide_init(); #endif Index: ppc4xx_setup.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/arch/ppc/kernel/ppc4xx_setup.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- ppc4xx_setup.c 25 May 2002 20:32:00 -0000 1.4 +++ ppc4xx_setup.c 12 Jul 2002 17:17:52 -0000 1.5 @@ -58,16 +58,6 @@ /* Function Prototypes */ extern void abort(void); extern void ppc4xx_find_bridges(void); - -extern int pckbd_setkeycode(unsigned int scancode, unsigned int keycode); -extern int pckbd_getkeycode(unsigned int scancode); -extern int pckbd_pretranslate(unsigned char scancode, char raw_mode); -extern int pckbd_translate(unsigned char scancode, unsigned char *keycode, - char raw_mode); -extern char pckbd_unexpected_up(unsigned char keycode); -extern void pckbd_leds(unsigned char leds); -extern void pckbd_init_hw(void); - extern void ppc4xx_wdt_heartbeat(void); extern int wdt_enable; extern unsigned long wdt_period; @@ -352,19 +342,6 @@ #ifdef CONFIG_DEBUG_TEXT ppc_md.progress = ppc4xx_progress; -#endif - -#if defined(CONFIG_VT) && defined(CONFIG_PC_KEYBOARD) -#if defined(CONFIG_REDWOOD_4) && defined(CONFIG_STB_KB) - redwood_irkb_init(); -#else - ppc_md.kbd_setkeycode = pckbd_setkeycode; - ppc_md.kbd_getkeycode = pckbd_getkeycode; - ppc_md.kbd_translate = pckbd_translate; - ppc_md.kbd_unexpected_up = pckbd_unexpected_up; - ppc_md.kbd_leds = pckbd_leds; - ppc_md.kbd_init_hw = pckbd_init_hw; -#endif #endif /* |
|
From: Vojtech P. <vo...@us...> - 2002-07-11 12:36:43
|
Update of /cvsroot/linuxconsole/ruby/linux/drivers/usb/input
In directory usw-pr-cvs1:/tmp/cvs-serv6612
Modified Files:
aiptek.c usbkbd.c usbmouse.c wacom.c
Removed Files:
usbpath.h
Log Message:
Sync to 2.5 changes.
Index: aiptek.c
===================================================================
RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/usb/input/aiptek.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- aiptek.c 18 Jun 2002 18:51:55 -0000 1.1
+++ aiptek.c 11 Jul 2002 12:36:39 -0000 1.2
@@ -296,9 +296,8 @@
input_register_device(&aiptek->dev);
- printk(KERN_INFO "input%d: %s on usb%d:%d.%d\n",
- aiptek->dev.number, aiptek->features->name, dev->bus->busnum,
- dev->devnum, ifnum);
+ printk(KERN_INFO "input: %s on usb%d:%d.%d\n",
+ aiptek->features->name, dev->bus->busnum, dev->devnum, ifnum);
return aiptek;
}
Index: usbkbd.c
===================================================================
RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/usb/input/usbkbd.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- usbkbd.c 16 Apr 2002 17:41:51 -0000 1.1
+++ usbkbd.c 11 Jul 2002 12:36:39 -0000 1.2
@@ -69,7 +69,7 @@
struct usb_device *usbdev;
unsigned char new[8];
unsigned char old[8];
- struct urb irq, led;
+ struct urb *irq, *led;
struct usb_ctrlrequest cr;
unsigned char leds, newleds;
char name[128];
@@ -118,15 +118,15 @@
(!!test_bit(LED_SCROLLL, dev->led) << 2) | (!!test_bit(LED_CAPSL, dev->led) << 1) |
(!!test_bit(LED_NUML, dev->led));
- if (kbd->led.status == -EINPROGRESS)
+ if (kbd->led->status == -EINPROGRESS)
return 0;
if (kbd->leds == kbd->newleds)
return 0;
kbd->leds = kbd->newleds;
- kbd->led.dev = kbd->usbdev;
- if (usb_submit_urb(&kbd->led))
+ kbd->led->dev = kbd->usbdev;
+ if (usb_submit_urb(kbd->led, GFP_ATOMIC))
err("usb_submit_urb(leds) failed");
return 0;
@@ -143,8 +143,8 @@
return;
kbd->leds = kbd->newleds;
- kbd->led.dev = kbd->usbdev;
- if (usb_submit_urb(&kbd->led))
+ kbd->led->dev = kbd->usbdev;
+ if (usb_submit_urb(kbd->led, GFP_ATOMIC))
err("usb_submit_urb(leds) failed");
}
@@ -155,8 +155,8 @@
if (kbd->open++)
return 0;
- kbd->irq.dev = kbd->usbdev;
- if (usb_submit_urb(&kbd->irq))
+ kbd->irq->dev = kbd->usbdev;
+ if (usb_submit_urb(kbd->irq, GFP_KERNEL))
return -EIO;
return 0;
@@ -167,7 +167,7 @@
struct usb_kbd *kbd = dev->private;
if (!--kbd->open)
- usb_unlink_urb(&kbd->irq);
+ usb_unlink_urb(kbd->irq);
}
static void *usb_kbd_probe(struct usb_device *dev, unsigned int ifnum,
@@ -196,6 +196,18 @@
if (!(kbd = kmalloc(sizeof(struct usb_kbd), GFP_KERNEL))) return NULL;
memset(kbd, 0, sizeof(struct usb_kbd));
+ kbd->irq = usb_alloc_urb(0, GFP_KERNEL);
+ if (!kbd->irq) {
+ kfree(kbd);
+ return NULL;
+ }
+ kbd->led = usb_alloc_urb(0, GFP_KERNEL);
+ if (!kbd->led) {
+ usb_free_urb(kbd->irq);
+ kfree(kbd);
+ return NULL;
+ }
+
kbd->usbdev = dev;
kbd->dev.evbit[0] = BIT(EV_KEY) | BIT(EV_LED) | BIT(EV_REP);
@@ -210,7 +222,7 @@
kbd->dev.open = usb_kbd_open;
kbd->dev.close = usb_kbd_close;
- FILL_INT_URB(&kbd->irq, dev, pipe, kbd->new, maxp > 8 ? 8 : maxp,
+ FILL_INT_URB(kbd->irq, dev, pipe, kbd->new, maxp > 8 ? 8 : maxp,
usb_kbd_irq, kbd, endpoint->bInterval);
kbd->cr.bRequestType = USB_TYPE_CLASS | USB_RECIP_INTERFACE;
@@ -247,7 +259,7 @@
kfree(buf);
- FILL_CONTROL_URB(&kbd->led, dev, usb_sndctrlpipe(dev, 0),
+ FILL_CONTROL_URB(kbd->led, dev, usb_sndctrlpipe(dev, 0),
(void*) &kbd->cr, &kbd->leds, 1, usb_kbd_led, kbd);
input_register_device(&kbd->dev);
@@ -260,8 +272,10 @@
static void usb_kbd_disconnect(struct usb_device *dev, void *ptr)
{
struct usb_kbd *kbd = ptr;
- usb_unlink_urb(&kbd->irq);
+ usb_unlink_urb(kbd->irq);
input_unregister_device(&kbd->dev);
+ usb_free_urb(kbd->irq);
+ usb_free_urb(kbd->led);
kfree(kbd);
}
Index: usbmouse.c
===================================================================
RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/usb/input/usbmouse.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- usbmouse.c 16 Apr 2002 17:41:51 -0000 1.1
+++ usbmouse.c 11 Jul 2002 12:36:39 -0000 1.2
@@ -51,7 +51,7 @@
char phys[64];
struct usb_device *usbdev;
struct input_dev dev;
- struct urb irq;
+ struct urb *irq;
int open;
};
@@ -81,8 +81,8 @@
if (mouse->open++)
return 0;
- mouse->irq.dev = mouse->usbdev;
- if (usb_submit_urb(&mouse->irq))
+ mouse->irq->dev = mouse->usbdev;
+ if (usb_submit_urb(mouse->irq, GFP_KERNEL))
return -EIO;
return 0;
@@ -93,7 +93,7 @@
struct usb_mouse *mouse = dev->private;
if (!--mouse->open)
- usb_unlink_urb(&mouse->irq);
+ usb_unlink_urb(mouse->irq);
}
static void *usb_mouse_probe(struct usb_device *dev, unsigned int ifnum,
@@ -122,6 +122,12 @@
if (!(mouse = kmalloc(sizeof(struct usb_mouse), GFP_KERNEL))) return NULL;
memset(mouse, 0, sizeof(struct usb_mouse));
+ mouse->irq = usb_alloc_urb(0, GFP_KERNEL);
+ if (!mouse->irq) {
+ kfree(mouse);
+ return NULL;
+ }
+
mouse->usbdev = dev;
mouse->dev.evbit[0] = BIT(EV_KEY) | BIT(EV_REL);
@@ -162,7 +168,7 @@
kfree(buf);
- FILL_INT_URB(&mouse->irq, dev, pipe, mouse->data, maxp > 8 ? 8 : maxp,
+ FILL_INT_URB(mouse->irq, dev, pipe, mouse->data, maxp > 8 ? 8 : maxp,
usb_mouse_irq, mouse, endpoint->bInterval);
input_register_device(&mouse->dev);
@@ -175,8 +181,9 @@
static void usb_mouse_disconnect(struct usb_device *dev, void *ptr)
{
struct usb_mouse *mouse = ptr;
- usb_unlink_urb(&mouse->irq);
+ usb_unlink_urb(mouse->irq);
input_unregister_device(&mouse->dev);
+ usb_free_urb(mouse->irq);
kfree(mouse);
}
Index: wacom.c
===================================================================
RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/usb/input/wacom.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- wacom.c 16 Apr 2002 17:41:51 -0000 1.1
+++ wacom.c 11 Jul 2002 12:36:39 -0000 1.2
@@ -99,7 +99,7 @@
signed char data[10];
struct input_dev dev;
struct usb_device *usbdev;
- struct urb irq;
+ struct urb *irq;
struct wacom_features *features;
int tool[2];
int open;
@@ -335,8 +335,8 @@
if (wacom->open++)
return 0;
- wacom->irq.dev = wacom->usbdev;
- if (usb_submit_urb(&wacom->irq))
+ wacom->irq->dev = wacom->usbdev;
+ if (usb_submit_urb(wacom->irq, GFP_KERNEL))
return -EIO;
return 0;
@@ -347,7 +347,7 @@
struct wacom *wacom = dev->private;
if (!--wacom->open)
- usb_unlink_urb(&wacom->irq);
+ usb_unlink_urb(wacom->irq);
}
static void *wacom_probe(struct usb_device *dev, unsigned int ifnum, const struct usb_device_id *id)
@@ -359,6 +359,12 @@
if (!(wacom = kmalloc(sizeof(struct wacom), GFP_KERNEL))) return NULL;
memset(wacom, 0, sizeof(struct wacom));
+ wacom->irq = usb_alloc_urb(0, GFP_KERNEL);
+ if (!wacom->irq) {
+ kfree(wacom);
+ return NULL;
+ }
+
wacom->features = wacom_features + id->driver_info;
wacom->dev.evbit[0] |= BIT(EV_KEY) | BIT(EV_ABS) | BIT(EV_MSC) | wacom->features->evbit;
@@ -402,7 +408,7 @@
endpoint = dev->config[0].interface[ifnum].altsetting[0].endpoint + 0;
- FILL_INT_URB(&wacom->irq, dev, usb_rcvintpipe(dev, endpoint->bEndpointAddress),
+ FILL_INT_URB(wacom->irq, dev, usb_rcvintpipe(dev, endpoint->bEndpointAddress),
wacom->data, wacom->features->pktlen, wacom->features->irq, wacom, endpoint->bInterval);
input_register_device(&wacom->dev);
@@ -415,8 +421,9 @@
static void wacom_disconnect(struct usb_device *dev, void *ptr)
{
struct wacom *wacom = ptr;
- usb_unlink_urb(&wacom->irq);
+ usb_unlink_urb(wacom->irq);
input_unregister_device(&wacom->dev);
+ usb_free_urb(wacom->irq);
kfree(wacom);
}
--- usbpath.h DELETED ---
|
|
From: Vojtech P. <vo...@us...> - 2002-07-10 22:34:04
|
Update of /cvsroot/linuxconsole/ruby/linux/include/linux
In directory usw-pr-cvs1:/tmp/cvs-serv27583/linux/include/linux
Modified Files:
gameport.h input.h serio.h
Log Message:
Sync input drivers to the BK tree.
Index: gameport.h
===================================================================
RCS file: /cvsroot/linuxconsole/ruby/linux/include/linux/gameport.h,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- gameport.h 25 May 2002 20:32:04 -0000 1.21
+++ gameport.h 10 Jul 2002 22:34:00 -0000 1.22
@@ -74,7 +74,7 @@
void gameport_close(struct gameport *gameport);
void gameport_rescan(struct gameport *gameport);
-#ifdef CONFIG_INPUT_GAMEPORT
+#if defined(CONFIG_GAMEPORT) || defined(CONFIG_GAMEPORT_MODULE)
void gameport_register_port(struct gameport *gameport);
void gameport_unregister_port(struct gameport *gameport);
#else
Index: input.h
===================================================================
RCS file: /cvsroot/linuxconsole/ruby/linux/include/linux/input.h,v
retrieving revision 1.68
retrieving revision 1.69
diff -u -d -r1.68 -r1.69
--- input.h 31 May 2002 10:35:49 -0000 1.68
+++ input.h 10 Jul 2002 22:34:01 -0000 1.69
@@ -507,6 +507,7 @@
#define BUS_AMIGA 0x16
#define BUS_ADB 0x17
#define BUS_I2C 0x18
+#define BUS_HOST 0x19
/*
* Values describing the status of an effect
Index: serio.h
===================================================================
RCS file: /cvsroot/linuxconsole/ruby/linux/include/linux/serio.h,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -d -r1.22 -r1.23
--- serio.h 10 Jul 2002 20:45:55 -0000 1.22
+++ serio.h 10 Jul 2002 22:34:01 -0000 1.23
@@ -76,6 +76,7 @@
int serio_open(struct serio *serio, struct serio_dev *dev);
void serio_close(struct serio *serio);
void serio_rescan(struct serio *serio);
+void serio_interrupt(struct serio *serio, unsigned char data, unsigned int flags);
void serio_register_port(struct serio *serio);
void serio_unregister_port(struct serio *serio);
@@ -91,12 +92,6 @@
{
if (serio->dev && serio->dev->write_wakeup)
serio->dev->write_wakeup(serio);
-}
-
-static __inline__ void serio_interrupt(struct serio *serio, unsigned char data, unsigned int flags)
-{
- if (serio->dev && serio->dev->interrupt)
- serio->dev->interrupt(serio, data, flags);
}
#define SERIO_TIMEOUT 1
|
|
From: Vojtech P. <vo...@us...> - 2002-07-10 22:34:04
|
Update of /cvsroot/linuxconsole/ruby/utils
In directory usw-pr-cvs1:/tmp/cvs-serv27583/utils
Modified Files:
inputattach.c
Log Message:
Sync input drivers to the BK tree.
Index: inputattach.c
===================================================================
RCS file: /cvsroot/linuxconsole/ruby/utils/inputattach.c,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -r1.20 -r1.21
--- inputattach.c 25 Sep 2001 09:37:57 -0000 1.20
+++ inputattach.c 10 Jul 2002 22:34:01 -0000 1.21
@@ -319,6 +319,11 @@
{
unsigned char c, o = 0;
+ c = 0x80;
+
+ if (write(fd, &c, 1) != 1) /* Enable command */
+ return -1;
+
while (1)
if (!readchar(fd, &c, 1)) {
printf("%02x (%c) ", c, ((c > 32) && (c < 127)) ? c : 'x');
@@ -364,7 +369,7 @@
{ "--ps2serkbd", "-ps2ser", B1200, CS8, SERIO_PS2SER, 0x00, 1, NULL },
{ "--twiddler", "-twid", B2400, CS8, SERIO_TWIDKBD, 0x00, 0, twiddler_init },
{ "--twiddler-joy", "-twidjoy", B2400, CS8, SERIO_TWIDJOY, 0x00, 0, twiddler_init },
-{ "--dump", "-dump", B1200, CS7, 0, 0x00, 0, dump_init },
+{ "--dump", "-dump", B2400, CS8, 0, 0x00, 0, dump_init },
{ "", "", 0, 0 }
};
|
|
From: Vojtech P. <vo...@us...> - 2002-07-10 22:34:03
|
Update of /cvsroot/linuxconsole/ruby/linux/drivers/input/serio
In directory usw-pr-cvs1:/tmp/cvs-serv27583/linux/drivers/input/serio
Modified Files:
i8042.c i8042.h serio.c
Log Message:
Sync input drivers to the BK tree.
Index: i8042.c
===================================================================
RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/input/serio/i8042.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -d -r1.23 -r1.24
--- i8042.c 10 Jul 2002 20:45:54 -0000 1.23
+++ i8042.c 10 Jul 2002 22:34:00 -0000 1.24
@@ -70,6 +70,7 @@
static struct serio i8042_aux_port;
static unsigned char i8042_initial_ctr;
static unsigned char i8042_ctr;
+struct timer_list i8042_timer;
#ifdef I8042_DEBUG_IO
static unsigned long i8042_start;
@@ -243,7 +244,7 @@
* mode tend to trash their CTR when doing the AUX_SEND command.
*/
- retval += i8042_command(&i8042_ctr, I8042_CMD_CTL_WCTR);
+ retval |= i8042_command(&i8042_ctr, I8042_CMD_CTL_WCTR);
/*
* Make sure the interrupt happens and the character is received even
@@ -251,7 +252,7 @@
* characters later.
*/
- i8042_interrupt(0, port, NULL);
+ i8042_interrupt(0, NULL, NULL);
return retval;
}
@@ -269,28 +270,23 @@
*/
if (request_irq(values->irq, i8042_interrupt, 0, "i8042", NULL)) {
- printk(KERN_ERR "i8042.c: Can't get irq %d for %s\n", values->irq, values->name);
+ printk(KERN_ERR "i8042.c: Can't get irq %d for %s, unregistering the port.\n", values->irq, values->name);
+ values->exists = 0;
+ serio_unregister_port(port);
return -1;
}
/*
- * Enable the device and its interrupt.
+ * Enable the interrupt.
*/
i8042_ctr |= values->irqen;
- i8042_ctr &= ~values->disable;
if (i8042_command(&i8042_ctr, I8042_CMD_CTL_WCTR)) {
printk(KERN_ERR "i8042.c: Can't write CTR while opening %s.\n", values->name);
return -1;
}
-/*
- * Flush buffers
- */
-
- i8042_flush();
-
return 0;
}
@@ -304,11 +300,10 @@
struct i8042_values *values = port->driver;
/*
- * Disable the device and its interrupt.
+ * Disable the interrupt.
*/
i8042_ctr &= ~values->irqen;
- i8042_ctr |= values->disable;
if (i8042_command(&i8042_ctr, I8042_CMD_CTL_WCTR)) {
printk(KERN_ERR "i8042.c: Can't write CTR while closing %s.\n", values->name);
@@ -374,26 +369,29 @@
{
unsigned long flags;
unsigned char str, data;
+ unsigned int dfl;
spin_lock_irqsave(&i8042_lock, flags);
while ((str = inb(I8042_STATUS_REG)) & I8042_STR_OBF) {
data = inb(I8042_DATA_REG);
+ dfl = ((str & I8042_STR_PARITY) ? SERIO_PARITY : 0) |
+ ((str & I8042_STR_TIMEOUT) ? SERIO_TIMEOUT : 0);
#ifdef I8042_DEBUG_IO
- printk(KERN_DEBUG "i8042.c: %02x <- i8042 (interrupt-%s) [%d]\n",
- data, (str & I8042_STR_AUXDATA) ? "aux" : "kbd", (int) (jiffies - i8042_start));
+ printk(KERN_DEBUG "i8042.c: %02x <- i8042 (interrupt-%s, %d) [%d]\n",
+ data, (str & I8042_STR_AUXDATA) ? "aux" : "kbd", irq, (int) (jiffies - i8042_start));
#endif
if (i8042_aux_values.exists && (str & I8042_STR_AUXDATA)) {
- serio_interrupt(&i8042_aux_port, data, 0);
+ serio_interrupt(&i8042_aux_port, data, dfl);
} else {
if (i8042_kbd_values.exists) {
if (!i8042_direct) {
if (data > 0x7f) {
if (test_and_clear_bit(data & 0x7f, i8042_unxlate_seen)) {
- serio_interrupt(&i8042_kbd_port, 0xf0, 0);
+ serio_interrupt(&i8042_kbd_port, 0xf0, dfl);
data = i8042_unxlate_table[data & 0x7f];
}
} else {
@@ -401,7 +399,7 @@
data = i8042_unxlate_table[data];
}
}
- serio_interrupt(&i8042_kbd_port, data, 0);
+ serio_interrupt(&i8042_kbd_port, data, dfl);
}
}
}
@@ -524,6 +522,8 @@
void i8042_controller_cleanup(void)
{
+ i8042_flush();
+
/*
* Reset the controller.
*/
@@ -565,6 +565,19 @@
{
unsigned char param;
+/*
+ * Check if AUX irq is available. If it isn't, then there is no point
+ * in trying to detect AUX presence.
+ */
+
+ if (request_irq(values->irq, i8042_interrupt, 0, "i8042", NULL))
+ return -1;
+ free_irq(values->irq, NULL);
+
+/*
+ * Get rid of bytes in the queue.
+ */
+
i8042_flush();
/*
@@ -637,6 +650,32 @@
return 0;
}
+static void i8042_timer_func(unsigned long data)
+{
+ i8042_interrupt(0, NULL, NULL);
+ mod_timer(&i8042_timer, jiffies + I8042_POLL_PERIOD);
+}
+
+static void __init i8042_start_polling(void)
+{
+ i8042_ctr &= ~I8042_CTR_KBDDIS;
+ if (i8042_aux_values.exists)
+ i8042_ctr &= ~I8042_CTR_AUXDIS;
+
+ if (i8042_command(&i8042_ctr, I8042_CMD_CTL_WCTR)) {
+ printk(KERN_WARNING "i8042.c: Can't write CTR while starting polling.\n");
+ return;
+ }
+
+ i8042_timer.function = i8042_timer_func;
+ mod_timer(&i8042_timer, jiffies + I8042_POLL_PERIOD);
+}
+
+static void __exit i8042_stop_polling(void)
+{
+ del_timer(&i8042_timer);
+}
+
/*
* Module init and cleanup functions.
*/
@@ -677,6 +716,15 @@
i8042_start = jiffies;
#endif
+/*
+ * On ix86 platforms touching the i8042 data register region can do really
+ * bad things. Because of this the region is always reserved on ix86 boxes.
+ */
+#if !defined(__i386__) && !defined(__sh__) && !defined(__alpha__)
+ if (!request_region(I8042_DATA_REG, 16, "i8042"))
+ return -EBUSY;
+#endif
+
if (i8042_controller_init())
return -ENODEV;
@@ -685,20 +733,18 @@
if (!i8042_noaux && !i8042_check_aux(&i8042_aux_values, &i8042_aux_port))
i8042_port_register(&i8042_aux_values, &i8042_aux_port);
-/*
- * On ix86 platforms touching the i8042 data register region can do really
- * bad things. Because of this the region is always reserved on ix86 boxes.
- */
-#if !defined(__i386__) && !defined(__sh__) && !defined(__alpha__)
- request_region(I8042_DATA_REG, 16, "i8042");
-#endif
+ i8042_start_polling();
+
register_reboot_notifier(&i8042_notifier);
+
return 0;
}
void __exit i8042_exit(void)
{
unregister_reboot_notifier(&i8042_notifier);
+
+ i8042_stop_polling();
if (i8042_kbd_values.exists)
serio_unregister_port(&i8042_kbd_port);
@@ -707,6 +753,7 @@
serio_unregister_port(&i8042_aux_port);
i8042_controller_cleanup();
+
#if !defined(__i386__) && !defined(__sh__) && !defined(__alpha__)
release_region(I8042_DATA_REG, 16);
#endif
Index: i8042.h
===================================================================
RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/input/serio/i8042.h,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- i8042.h 10 Jul 2002 18:08:04 -0000 1.11
+++ i8042.h 10 Jul 2002 22:34:00 -0000 1.12
@@ -28,12 +28,6 @@
*/
/*
- * If you want to reset your i8042 upon boot, define this.
- */
-
-#undef I8042_RESET
-
-/*
* If you want to trace all the i/o the i8042 module does for
* debugging purposes, define this.
*/
@@ -61,6 +55,15 @@
*/
#define I8042_CTL_TIMEOUT 10000
+
+/*
+ * When the device isn't opened and it's interrupts aren't used, we poll it at
+ * regular intervals to see if any characters arrived. If yes, we can start
+ * probing for any mouse / keyboard connected. This is the period of the
+ * polling.
+ */
+
+#define I8042_POLL_PERIOD HZ/20
/*
* Register numbers.
Index: serio.c
===================================================================
RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/input/serio/serio.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- serio.c 10 Jul 2002 18:08:04 -0000 1.16
+++ serio.c 10 Jul 2002 22:34:00 -0000 1.17
@@ -111,6 +111,14 @@
wake_up(&serio_wait);
}
+void serio_interrupt(struct serio *serio, unsigned char data, unsigned int flags)
+{
+ if (serio->dev && serio->dev->interrupt)
+ serio->dev->interrupt(serio, data, flags);
+ else
+ serio_rescan(serio);
+}
+
void serio_register_port(struct serio *serio)
{
serio->next = serio_list;
|
|
From: Vojtech P. <vo...@us...> - 2002-07-10 22:34:02
|
Update of /cvsroot/linuxconsole/ruby/linux/drivers/input/joystick/iforce In directory usw-pr-cvs1:/tmp/cvs-serv27583/linux/drivers/input/joystick/iforce Modified Files: Config.in Log Message: Sync input drivers to the BK tree. Index: Config.in =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/input/joystick/iforce/Config.in,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- Config.in 10 Jul 2002 18:08:04 -0000 1.4 +++ Config.in 10 Jul 2002 22:33:57 -0000 1.5 @@ -5,10 +5,10 @@ dep_tristate ' I-Force devices' CONFIG_JOYSTICK_IFORCE $CONFIG_INPUT $CONFIG_INPUT_JOYSTICK if [ "$CONFIG_JOYSTICK_IFORCE" = "m" -o "$CONFIG_JOYSTICK_IFORCE" = "y" ]; then - if [ "$CONFIG_USB" != "n" ]; then - bool ' I-Force USB joysticks and wheels' CONFIG_JOYSTICK_IFORCE_USB + if [ "$CONFIG_JOYSTICK_IFORCE" = "m" -o "$CONFIG_USB" = "y" ]; then + dep_mbool ' I-Force USB joysticks and wheels' CONFIG_JOYSTICK_IFORCE_USB $CONFIG_USB fi - if [ "$CONFIG_SERIO" != "n" ]; then - bool ' I-Force Serial joysticks and wheels' CONFIG_JOYSTICK_IFORCE_232 + if [ "$CONFIG_JOYSTICK_IFORCE" = "m" -o "$CONFIG_SERIO" = "y" ]; then + dep_mbool ' I-Force Serial joysticks and wheels' CONFIG_JOYSTICK_IFORCE_232 $CONFIG_SERIO fi fi |
|
From: James S. <jsi...@us...> - 2002-07-10 20:46:31
|
Update of /cvsroot/linuxconsole/ruby/linux/drivers/video In directory usw-pr-cvs1:/tmp/cvs-serv29203 Added Files: sa1100fb.c sa1100fb.h Log Message: SA1100 changes to new api. |
|
From: James S. <jsi...@us...> - 2002-07-10 20:45:57
|
Update of /cvsroot/linuxconsole/ruby/linux/include/linux
In directory usw-pr-cvs1:/tmp/cvs-serv29027/include/linux
Modified Files:
serio.h
Log Message:
Vojtech's fixes.
Index: serio.h
===================================================================
RCS file: /cvsroot/linuxconsole/ruby/linux/include/linux/serio.h,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- serio.h 19 Dec 2001 05:15:21 -0000 1.21
+++ serio.h 10 Jul 2002 20:45:55 -0000 1.22
@@ -42,6 +42,7 @@
void *driver;
char *name;
char *phys;
+ int number;
unsigned short idbus;
unsigned short idvendor;
@@ -49,6 +50,7 @@
unsigned short idversion;
unsigned long type;
+ unsigned long event;
int (*write)(struct serio *, unsigned char);
int (*open)(struct serio *);
@@ -87,9 +89,14 @@
static __inline__ void serio_dev_write_wakeup(struct serio *serio)
{
- if (serio->dev && serio->dev->write_wakeup) {
+ if (serio->dev && serio->dev->write_wakeup)
serio->dev->write_wakeup(serio);
- }
+}
+
+static __inline__ void serio_interrupt(struct serio *serio, unsigned char data, unsigned int flags)
+{
+ if (serio->dev && serio->dev->interrupt)
+ serio->dev->interrupt(serio, data, flags);
}
#define SERIO_TIMEOUT 1
@@ -122,7 +129,7 @@
#define SERIO_H3600 0x21
#define SERIO_PS2SER 0x22
#define SERIO_TWIDKBD 0x23
-#define SERIO_TWIDJOY 0x24
+#define SERIO_TWIDJOY 0x24
#define SERIO_HIL 0x25
#define SERIO_ID 0xff00UL
|
|
From: James S. <jsi...@us...> - 2002-07-10 20:45:57
|
Update of /cvsroot/linuxconsole/ruby/linux/drivers/input/serio
In directory usw-pr-cvs1:/tmp/cvs-serv29027/drivers/input/serio
Modified Files:
i8042.c
Added Files:
ct82c710.c parkbd.c rpckbd.c serport.c
Log Message:
Vojtech's fixes.
Index: i8042.c
===================================================================
RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/input/serio/i8042.c,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -d -r1.22 -r1.23
--- i8042.c 10 Jul 2002 18:08:04 -0000 1.22
+++ i8042.c 10 Jul 2002 20:45:54 -0000 1.23
@@ -387,14 +387,13 @@
#endif
if (i8042_aux_values.exists && (str & I8042_STR_AUXDATA)) {
- if (i8042_aux_port.dev)
- i8042_aux_port.dev->interrupt(&i8042_aux_port, data, 0);
+ serio_interrupt(&i8042_aux_port, data, 0);
} else {
- if (i8042_kbd_values.exists && i8042_kbd_port.dev) {
+ if (i8042_kbd_values.exists) {
if (!i8042_direct) {
if (data > 0x7f) {
if (test_and_clear_bit(data & 0x7f, i8042_unxlate_seen)) {
- i8042_kbd_port.dev->interrupt(&i8042_kbd_port, 0xf0, 0);
+ serio_interrupt(&i8042_kbd_port, 0xf0, 0);
data = i8042_unxlate_table[data & 0x7f];
}
} else {
@@ -402,7 +401,7 @@
data = i8042_unxlate_table[data];
}
}
- i8042_kbd_port.dev->interrupt(&i8042_kbd_port, data, 0);
+ serio_interrupt(&i8042_kbd_port, data, 0);
}
}
}
|
|
From: James S. <jsi...@us...> - 2002-07-10 18:08:35
|
Update of /cvsroot/linuxconsole/ruby/linux/arch/ppc
In directory usw-pr-cvs1:/tmp/cvs-serv10580/linux/arch/ppc
Modified Files:
Config.help config.in
Log Message:
Syned to 2.5.25
Index: Config.help
===================================================================
RCS file: /cvsroot/linuxconsole/ruby/linux/arch/ppc/Config.help,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- Config.help 3 Jun 2002 22:44:56 -0000 1.6
+++ Config.help 10 Jul 2002 18:08:02 -0000 1.7
@@ -938,3 +938,7 @@
which has a small amount of memory.
Say N here unless you know what you are doing.
+
+CONFIG_DEBUG_SPINLOCK
+ Say Y here and to CONFIG_SMP to include code to check for missing
+ spinlock initialization and some other common spinlock errors.
Index: config.in
===================================================================
RCS file: /cvsroot/linuxconsole/ruby/linux/arch/ppc/config.in,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -d -r1.34 -r1.35
--- config.in 22 Jun 2002 17:50:58 -0000 1.34
+++ config.in 10 Jul 2002 18:08:02 -0000 1.35
@@ -288,9 +288,6 @@
if [ "$CONFIG_8xx" = "y" ]; then
bool "Pinned Kernel TLBs (860 ONLY)" CONFIG_PIN_TLB
fi
- if [ "$CONFIG_40x" = "y" ]; then
- bool "Pinned Kernel TLBs" CONFIG_PIN_TLB
- fi
if [ "$CONFIG_ALL_PPC" != "y" ]; then
bool "Set the boot link/load address" CONFIG_BOOT_LOAD_BOOL
if [ "$CONFIG_BOOT_LOAD_BOOL" = "y" ]; then
@@ -595,6 +592,7 @@
comment 'Kernel hacking'
bool 'Magic SysRq key' CONFIG_MAGIC_SYSRQ
+bool 'Spinlock debugging' CONFIG_DEBUG_SPINLOCK
bool 'Include kgdb kernel debugger' CONFIG_KGDB
if [ "$CONFIG_KGDB" = "y" ]; then
choice 'Serial Port' \
|
|
From: James S. <jsi...@us...> - 2002-07-10 18:08:35
|
Update of /cvsroot/linuxconsole/ruby/linux/arch/ppc/kernel In directory usw-pr-cvs1:/tmp/cvs-serv10580/linux/arch/ppc/kernel Modified Files: ppc_ksyms.c Log Message: Syned to 2.5.25 Index: ppc_ksyms.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/arch/ppc/kernel/ppc_ksyms.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- ppc_ksyms.c 22 Jun 2002 17:50:58 -0000 1.10 +++ ppc_ksyms.c 10 Jul 2002 18:08:02 -0000 1.11 @@ -76,10 +76,6 @@ extern unsigned long mm_ptov (unsigned long paddr); -extern void *consistent_alloc(int gfp, size_t size, dma_addr_t *dma_handle); -extern void consistent_free(void *vaddr); -extern void consistent_sync(void *vaddr, size_t size, int direction); - EXPORT_SYMBOL(clear_page); EXPORT_SYMBOL(do_signal); EXPORT_SYMBOL(do_syscall_trace); |
|
From: James S. <jsi...@us...> - 2002-07-10 18:08:35
|
Update of /cvsroot/linuxconsole/ruby/linux/arch/i386/mm
In directory usw-pr-cvs1:/tmp/cvs-serv10580/linux/arch/i386/mm
Modified Files:
fault.c
Log Message:
Syned to 2.5.25
Index: fault.c
===================================================================
RCS file: /cvsroot/linuxconsole/ruby/linux/arch/i386/mm/fault.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- fault.c 22 Mar 2002 20:13:57 -0000 1.10
+++ fault.c 10 Jul 2002 18:08:02 -0000 1.11
@@ -56,12 +56,16 @@
for (;;) {
survive:
- {
- int fault = handle_mm_fault(current->mm, vma, start, 1);
- if (!fault)
+ switch (handle_mm_fault(current->mm, vma, start, 1)) {
+ case VM_FAULT_SIGBUS:
goto bad_area;
- if (fault < 0)
+ case VM_FAULT_OOM:
goto out_of_memory;
+ case VM_FAULT_MINOR:
+ case VM_FAULT_MAJOR:
+ break;
+ default:
+ BUG();
}
if (!size)
break;
@@ -237,16 +241,18 @@
* the fault.
*/
switch (handle_mm_fault(mm, vma, address, write)) {
- case 1:
- tsk->min_flt++;
- break;
- case 2:
- tsk->maj_flt++;
- break;
- case 0:
- goto do_sigbus;
- default:
- goto out_of_memory;
+ case VM_FAULT_MINOR:
+ tsk->min_flt++;
+ break;
+ case VM_FAULT_MAJOR:
+ tsk->maj_flt++;
+ break;
+ case VM_FAULT_SIGBUS:
+ goto do_sigbus;
+ case VM_FAULT_OOM:
+ goto out_of_memory;
+ default:
+ BUG();
}
/*
|
|
From: James S. <jsi...@us...> - 2002-07-10 18:08:34
|
Update of /cvsroot/linuxconsole/ruby/linux/arch/i386/kernel
In directory usw-pr-cvs1:/tmp/cvs-serv10580/linux/arch/i386/kernel
Modified Files:
apm.c
Log Message:
Syned to 2.5.25
Index: apm.c
===================================================================
RCS file: /cvsroot/linuxconsole/ruby/linux/arch/i386/kernel/apm.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- apm.c 22 Jun 2002 17:50:58 -0000 1.8
+++ apm.c 10 Jul 2002 18:08:02 -0000 1.9
@@ -814,16 +814,16 @@
if (jiffies_since_last_check > IDLE_CALC_LIMIT) {
use_apm_idle = 0;
last_jiffies = jiffies;
- last_stime = current->times.tms_stime;
+ last_stime = current->stime;
} else if (jiffies_since_last_check > idle_period) {
unsigned int idle_percentage;
- idle_percentage = current->times.tms_stime - last_stime;
+ idle_percentage = current->stime - last_stime;
idle_percentage *= 100;
idle_percentage /= jiffies_since_last_check;
use_apm_idle = (idle_percentage > idle_threshold);
last_jiffies = jiffies;
- last_stime = current->times.tms_stime;
+ last_stime = current->stime;
}
bucket = IDLE_LEAKY_MAX;
|
|
From: James S. <jsi...@us...> - 2002-07-10 18:08:34
|
Update of /cvsroot/linuxconsole/ruby/linux/Documentation/DocBook
In directory usw-pr-cvs1:/tmp/cvs-serv10580/linux/Documentation/DocBook
Modified Files:
Makefile kernel-api.tmpl
Log Message:
Syned to 2.5.25
Index: Makefile
===================================================================
RCS file: /cvsroot/linuxconsole/ruby/linux/Documentation/DocBook/Makefile,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- Makefile 15 Jun 2002 19:17:07 -0000 1.15
+++ Makefile 10 Jul 2002 18:08:01 -0000 1.16
@@ -15,6 +15,10 @@
$(TOPDIR)/scripts/docgen $(TOPDIR)/scripts/gen-all-syms \
$(TOPDIR)/scripts/kernel-doc $(TOPDIR)/scripts/docproc: doc-progs ;
+dochelp:
+ @echo ' Linux kernel internal documentation in different formats:'
+ @echo ' sgmldocs (SGML), psdocs (Postscript), pdfdocs (PDF), htmldocs (HTML)'
+
.PHONY: doc-progs
doc-progs:
@$(MAKE) -C $(TOPDIR)/scripts doc-progs
@@ -116,6 +120,7 @@
$(TOPDIR)/drivers/usb/core/urb.c \
$(TOPDIR)/drivers/usb/core/message.c \
$(TOPDIR)/drivers/usb/core/config.c \
+ $(TOPDIR)/drivers/usb/core/file.c \
$(TOPDIR)/drivers/usb/core/usb.c \
$(TOPDIR)/drivers/video/fbmem.c \
$(TOPDIR)/drivers/video/fbcmap.c \
Index: kernel-api.tmpl
===================================================================
RCS file: /cvsroot/linuxconsole/ruby/linux/Documentation/DocBook/kernel-api.tmpl,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- kernel-api.tmpl 4 Jun 2002 19:45:04 -0000 1.8
+++ kernel-api.tmpl 10 Jul 2002 18:08:02 -0000 1.9
@@ -285,6 +285,7 @@
!Edrivers/usb/core/urb.c
!Edrivers/usb/core/config.c
!Edrivers/usb/core/message.c
+!Edrivers/usb/core/file.c
!Edrivers/usb/core/usb.c
</sect1>
|
|
From: James S. <jsi...@us...> - 2002-07-10 18:08:33
|
Update of /cvsroot/linuxconsole/ruby/linux In directory usw-pr-cvs1:/tmp/cvs-serv10580/linux Modified Files: Makefile Log Message: Syned to 2.5.25 Index: Makefile =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/Makefile,v retrieving revision 1.65 retrieving revision 1.66 diff -u -d -r1.65 -r1.66 --- Makefile 22 Jun 2002 17:50:57 -0000 1.65 +++ Makefile 10 Jul 2002 18:08:01 -0000 1.66 @@ -1,8 +1,14 @@ VERSION = 2 PATCHLEVEL = 5 -SUBLEVEL = 24 +SUBLEVEL = 25 EXTRAVERSION = -ruby +# *DOCUMENTATION* +# Too see a list of typical targets execute "make help" +# More info can be located in ./Documentation/kbuild +# Comments in this file is targeted only to the developer, do not +# expect to learn how to build the kernel reading this file. + # We are using a recursive build, so we need to do a little thinking # to get the ordering right. # @@ -140,16 +146,23 @@ CONFIG_SHELL TOPDIR HPATH HOSTCC HOSTCFLAGS CROSS_COMPILE AS LD CC \ CPP AR NM STRIP OBJCOPY OBJDUMP MAKE MAKEFILES GENKSYMS PERL -export CPPFLAGS EXPORT_FLAGS NOSTDINC_FLAGS +export CPPFLAGS EXPORT_FLAGS NOSTDINC_FLAGS OBJCOPYFLAGS export CFLAGS CFLAGS_KERNEL CFLAGS_MODULE export AFLAGS AFLAGS_KERNEL AFLAGS_MODULE +src := . +obj := . +srctree := $(TOPDIR) +objtree := $(TOPDIR) + +export srctree objtree + SUBDIRS := init kernel mm fs ipc lib drivers sound net noconfig_targets := xconfig menuconfig config oldconfig randconfig \ defconfig allyesconfig allnoconfig allmodconfig \ clean mrproper distclean \ - tags TAGS sgmldocs psdocs pdfdocs htmldocs \ + help tags TAGS sgmldocs psdocs pdfdocs htmldocs \ checkconfig checkhelp checkincludes ifeq ($(filter $(noconfig_targets),$(MAKECMDGOALS)),) @@ -217,7 +230,7 @@ include arch/$(ARCH)/Makefile -export NETWORKS DRIVERS LIBS HEAD LDFLAGS LINKFLAGS MAKEBOOT ASFLAGS +export NETWORKS DRIVERS LIBS HEAD LDFLAGS MAKEBOOT ASFLAGS # boot target # --------------------------------------------------------------------------- @@ -238,7 +251,7 @@ vmlinux-objs := $(HEAD) $(INIT) $(CORE_FILES) $(LIBS) $(DRIVERS) $(NETWORKS) quiet_cmd_link_vmlinux = LD $@ -cmd_link_vmlinux = $(LD) $(LINKFLAGS) $(HEAD) $(INIT) \ +cmd_link_vmlinux = $(LD) $(LDFLAGS) $(LDFLAGS_$(@F)) $(HEAD) $(INIT) \ --start-group \ $(CORE_FILES) \ $(LIBS) \ @@ -255,7 +268,7 @@ . scripts/mkversion > .tmpversion mv -f .tmpversion .version +$(MAKE) -C init - $(call cmd,cmd_link_vmlinux) + $(call cmd,link_vmlinux) $(cmd_link_vmlinux) echo 'cmd_$@ := $(cmd_link_vmlinux)' > $(@D)/.$(@F).cmd $(NM) vmlinux | grep -v '\(compiled\)\|\(\.o$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | sort > System.map @@ -679,6 +692,43 @@ find $(SUBDIRS) init -name SCCS -prune -o -name BitKeeper -prune -o \ -name '*.[ch]' -print | xargs ctags $$CTAGSF -a +# Brief documentation of the typical targets used +# --------------------------------------------------------------------------- + +help: + @echo 'Cleaning targets:' + @echo ' clean - remove most generated files but keep the config' + @echo ' mrproper - remove all generated files including the config' + @echo ' distclean - mrproper + remove files generated by editors and patch' + @echo '' + @echo 'Configuration targets:' + @echo ' oldconfig - Update current config utilising a line-oriented program' + @echo ' menuconfig - Update current config utilising a menu based program' + @echo ' xconfig - Update current config utilising a X-based program' + @echo ' defconfig - New config with default answer to all options' + @echo ' allmodconfig - New config selecting modules when possible' + @echo ' allyesconfig - New config where all options are accepted with yes' + @echo ' allnoconfig - New minimal config' + @echo '' + @echo 'Other generic targets:' + @echo ' all - Build all targets marked with [*]' + @echo ' dep - Create module version information' + @echo '* vmlinux - Build the bare kernel' + @echo '* modules - Build all modules' + @echo ' dir/file.[ois]- Build specified target only' + @echo ' rpm - Build a kernel as an RPM package' + @echo ' tags/TAGS - Generate tags file for editors' + @echo '' + @echo 'Documentation targets:' + @$(MAKE) --no-print-directory -f Documentation/DocBook/Makefile dochelp + @echo '' + @echo 'Architecture specific targets ($(ARCH)):' + @$(MAKE) --no-print-directory -f arch/$(ARCH)/boot/Makefile archhelp + @echo '' + @echo 'Execute "make" or "make all" to build all targets marked with [*] ' + @echo 'For further info browse Documentation/kbuild/*' + + # Documentation targets # --------------------------------------------------------------------------- @@ -735,9 +785,9 @@ $(filter-out $(cmd_$(@F)),$(cmd_$(1)))),\ @$(rule_$(1))) -# If quiet is set, only print short version of rule +# If quiet is set, only print short version of command -cmd = @$(if $($(quiet)$(1)),echo ' $($(quiet)$(1))' &&) $($(1)) +cmd = @$(if $($(quiet)cmd_$(1)),echo ' $($(quiet)cmd_$(1))' &&) $(cmd_$(1)) define update-if-changed if [ -r $@ ] && cmp -s $@ $@.tmp; then \ |
|
From: James S. <jsi...@us...> - 2002-07-10 18:08:08
|
Update of /cvsroot/linuxconsole/ruby/linux/drivers/input/mouse
In directory usw-pr-cvs1:/tmp/cvs-serv10580/linux/drivers/input/mouse
Modified Files:
amimouse.c psmouse.c rpcmouse.c
Removed Files:
Config.help Config.in inport.c logibm.c maplemouse.c
pc110pad.c sermouse.c
Log Message:
Syned to 2.5.25
Index: amimouse.c
===================================================================
RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/input/mouse/amimouse.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- amimouse.c 22 Jan 2002 20:46:45 -0000 1.10
+++ amimouse.c 10 Jul 2002 18:08:04 -0000 1.11
@@ -1,38 +1,20 @@
/*
- * $Id$
+ * Amiga mouse driver for Linux/m68k
*
- * Copyright (c) 2000-2001 Vojtech Pavlik
+ * Copyright (c) 2000-2002 Vojtech Pavlik
*
* Based on the work of:
* Michael Rausch James Banks
* Matther Dillon David Giller
* Nathan Laredo Linus Torvalds
* Johan Myreen Jes Sorensen
- * Russel King
- */
-
-/*
- * Amiga mouse driver for Linux/m68k
+ * Russell King
*/
/*
- * 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 <vo...@uc...>, or by paper mail:
- * Vojtech Pavlik, Simunkova 1594, Prague 8, 182 00 Czech Republic
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 as published by
+ * the Free Software Foundation
*/
#include <linux/module.h>
@@ -70,10 +52,10 @@
dx = nx - amimouse_lastx;
dy = ny - amimouse_lasty;
- if (dx < -127) dx = (256 + nx) - lastx;
- if (dx > 127) dx = (nx - 256) - lastx;
- if (dy < -127) dy = (256 + ny) - lasty;
- if (dy > 127) dy = (ny - 256) - lasty;
+ if (dx < -127) dx = (256 + nx) - amimouse_lastx;
+ if (dx > 127) dx = (nx - 256) - amimouse_lastx;
+ if (dy < -127) dy = (256 + ny) - amimouse_lasty;
+ if (dy > 127) dy = (ny - 256) - amimouse_lasty;
amimouse_lastx = nx;
amimouse_lasty = ny;
Index: psmouse.c
===================================================================
RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/input/mouse/psmouse.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- psmouse.c 13 Mar 2002 10:03:43 -0000 1.18
+++ psmouse.c 10 Jul 2002 18:08:04 -0000 1.19
@@ -31,6 +31,7 @@
#include <linux/input.h>
#include <linux/serio.h>
#include <linux/init.h>
+#include <linux/tqueue.h>
MODULE_AUTHOR("Vojtech Pavlik <vo...@uc...>");
MODULE_DESCRIPTION("PS/2 mouse driver");
@@ -215,8 +216,7 @@
}
if (psmouse->pktcnt == 1 && psmouse->packet[0] == PSMOUSE_RET_BAT) {
- queue_task(&psmouse->tq, &tq_immediate);
- mark_bh(IMMEDIATE_BH);
+ serio_rescan(serio);
return;
}
}
@@ -557,22 +557,6 @@
}
/*
- * psmouse_powerup() is called when we get the powerup
- * sequence - 0xaa [0x00], so that the mouse/kbd is re-probed.
- */
-
-static void psmouse_powerup(void *data)
-{
- struct psmouse *psmouse = data;
-
- if (psmouse->packet[0] == PSMOUSE_RET_BAT && (psmouse->pktcnt == 1 ||
- (psmouse->pktcnt == 2 && psmouse->packet[1] == 0x00))) {
- mdelay(40); /* FIXME!!! Wait some nicer way */
- serio_rescan(psmouse->serio);
- }
-}
-
-/*
* psmouse_connect() is a callback form the serio module when
* an unhandled serio port is found.
*/
@@ -595,8 +579,6 @@
psmouse->serio = serio;
psmouse->dev.private = psmouse;
- psmouse->tq.routine = psmouse_powerup;
- psmouse->tq.data = psmouse;
serio->private = psmouse;
Index: rpcmouse.c
===================================================================
RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/input/mouse/rpcmouse.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- rpcmouse.c 22 Jan 2002 20:48:59 -0000 1.12
+++ rpcmouse.c 10 Jul 2002 18:08:04 -0000 1.13
@@ -1,37 +1,22 @@
/*
- * $Id$
+ * Acorn RiscPC mouse driver for Linux/ARM
*
- * Copyright (c) 2000-2001 Vojtech Pavlik
+ * Copyright (c) 2000-2002 Vojtech Pavlik
+ * Copyright (C) 1996-1998 Russell King
*
- * Based on the work of:
- * Russel King
- */
-
-/*
- * Acorn RiscPC mouse driver for Linux/ARM
*/
/*
- * 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
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 as published by
+ * the Free Software Foundation.
*
- * Should you need to contact me, the author, you can do so either by
- * e-mail - mail your message to <vo...@uc...>, or by paper mail:
- * Vojtech Pavlik, Simunkova 1594, Prague 8, 182 00 Czech Republic
+ * This handles the Acorn RiscPCs mouse. We basically have a couple of
+ * hardware registers that track the sensor count for the X-Y movement and
+ * another register holding the button state. On every VSYNC interrupt we read
+ * the complete state and then work out if something has changed.
*/
-
#include <linux/module.h>
#include <linux/sched.h>
#include <linux/ptrace.h>
@@ -41,14 +26,12 @@
#include <asm/hardware.h>
#include <asm/irq.h>
#include <asm/io.h>
-#include <asm/iomd.h>
+#include <asm/hardware/iomd.h>
-MODULE_AUTHOR("Vojtech Pavlik <vo...@uc...>");
+MODULE_AUTHOR("Vojtech Pavlik, Russell King");
MODULE_DESCRIPTION("Acorn RiscPC mouse driver");
MODULE_LICENSE("GPL");
-#define IOMD_MOUSEBTN 0x800C4000
-
static short rpcmouse_lastx, rpcmouse_lasty;
static struct input_dev rpcmouse_dev = {
@@ -57,7 +40,7 @@
relbit: { BIT(REL_X) | BIT(REL_Y) },
name: "Acorn RiscPC Mouse",
phys: "rpcmouse/input0",
- idbus: BUS_ISA,
+ idbus: BUS_HOST,
idvendor: 0x0005,
idproduct: 0x0001,
idversion: 0x0100,
@@ -67,9 +50,9 @@
{
short x, y, dx, dy, b;
- x = (short) inl(IOMD_MOUSEX);
- y = (short) inl(IOMD_MOUSEY);
- b = (short) inl(IOMD_MOUSEBTN);
+ x = (short) iomd_readl(IOMD_MOUSEX);
+ y = (short) iomd_readl(IOMD_MOUSEY);
+ b = (short) (__raw_readl(0xe0310000) >> 4) & 7;
dx = x - rpcmouse_lastx;
dy = y - rpcmouse_lasty;
@@ -80,15 +63,15 @@
input_report_rel(&rpcmouse_dev, REL_X, dx);
input_report_rel(&rpcmouse_dev, REL_Y, dy);
- input_report_key(&amimouse_dev, BTN_LEFT, buttons & 0x10);
- input_report_key(&amimouse_dev, BTN_MIDDLE, buttons & 0x20);
- input_report_key(&amimouse_dev, BTN_RIGHT, buttons & 0x40);
+ input_report_key(&rpcmouse_dev, BTN_LEFT, buttons & 0x10);
+ input_report_key(&rpcmouse_dev, BTN_MIDDLE, buttons & 0x20);
+ input_report_key(&rpcmouse_dev, BTN_RIGHT, buttons & 0x40);
}
static int __init rpcmouse_init(void)
{
- rpcmouse_lastx = (short) inl(IOMD_MOUSEX);
- rpcmouse_lasty = (short) inl(IOMD_MOUSEY);
+ rpcmouse_lastx = (short) iomd_readl(IOMD_MOUSEX);
+ rpcmouse_lasty = (short) iomd_readl(IOMD_MOUSEY);
if (request_irq(IRQ_VSYNCPULSE, rpcmouse_irq, SA_SHIRQ, "rpcmouse", NULL)) {
printk(KERN_ERR "rpcmouse: unable to allocate VSYNC interrupt\n");
@@ -96,7 +79,7 @@
}
input_register_device(&rpcmouse_dev);
- printk(KERN_INFO "input%d: Acorn RiscPC mouse irq %d", IRQ_VSYNCPULSE);
+ printk(KERN_INFO "input: Acorn RiscPC mouse irq %d", IRQ_VSYNCPULSE);
return 0;
}
--- Config.help DELETED ---
--- Config.in DELETED ---
--- inport.c DELETED ---
--- logibm.c DELETED ---
--- maplemouse.c DELETED ---
--- pc110pad.c DELETED ---
--- sermouse.c DELETED ---
|
Update of /cvsroot/linuxconsole/ruby/linux/drivers/input/serio
In directory usw-pr-cvs1:/tmp/cvs-serv10580/linux/drivers/input/serio
Modified Files:
Config.in i8042.c i8042.h serio.c
Removed Files:
Config.help ct82c710.c parkbd.c rpckbd.c serport.c
Log Message:
Syned to 2.5.25
Index: Config.in
===================================================================
RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/input/serio/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:56 -0000 1.4
+++ Config.in 10 Jul 2002 18:08:04 -0000 1.5
@@ -4,14 +4,14 @@
tristate 'Serial i/o support' CONFIG_SERIO
-dep_tristate ' i8042 PC Keyboard controller' CONFIG_SERIO_I8042 $CONFIG_SERIO $CONFIG_ISA
+dep_tristate ' i8042 PC Keyboard controller' CONFIG_SERIO_I8042 $CONFIG_SERIO
if [ "$CONFIG_SERIO_I8042" != "n" ]; then
hex ' Register Base Address' CONFIG_I8042_REG_BASE 60
int ' PS/2 Keyboard IRQ' CONFIG_I8042_KBD_IRQ 1
int ' PS/2 AUX IRQ' CONFIG_I8042_AUX_IRQ 12
fi
dep_tristate ' Serial port line discipline' CONFIG_SERIO_SERPORT $CONFIG_SERIO
-dep_tristate ' ct82c710 Aux port controller' CONFIG_SERIO_CT82C710 $CONFIG_SERIO $CONFIG_ISA
+dep_tristate ' ct82c710 Aux port controller' CONFIG_SERIO_CT82C710 $CONFIG_SERIO
dep_tristate ' Q40 keyboard controller' CONFIG_SERIO_Q40KBD $CONFIG_SERIO
dep_tristate ' Parallel port keyboard adapter' CONFIG_SERIO_PARKBD $CONFIG_SERIO $CONFIG_PARPORT
Index: i8042.c
===================================================================
RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/input/serio/i8042.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- i8042.c 1 Mar 2002 22:09:27 -0000 1.21
+++ i8042.c 10 Jul 2002 18:08:04 -0000 1.22
@@ -37,6 +37,7 @@
#include <linux/reboot.h>
#include <linux/init.h>
#include <linux/serio.h>
+#include <linux/sched.h> /* request/free_irq */
#include "i8042.h"
@@ -198,6 +199,9 @@
/*
* i8042_kbd_write() sends a byte out through the keyboard interface.
+ * It also automatically refreshes the CTR value, since some i8042's
+ * trash their CTR after attempting to send data to an nonexistent
+ * device.
*/
static int i8042_kbd_write(struct serio *port, unsigned char c)
Index: i8042.h
===================================================================
RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/input/serio/i8042.h,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- i8042.h 1 Mar 2002 21:52:48 -0000 1.10
+++ i8042.h 10 Jul 2002 18:08:04 -0000 1.11
@@ -66,9 +66,9 @@
* Register numbers.
*/
+#define I8042_COMMAND_REG CONFIG_I8042_REG_BASE + 4
+#define I8042_STATUS_REG CONFIG_I8042_REG_BASE + 4
#define I8042_DATA_REG CONFIG_I8042_REG_BASE
-#define I8042_COMMAND_REG I8042_DATA_REG + 4
-#define I8042_STATUS_REG I8042_DATA_REG + 4
/*
* Status register bits.
@@ -125,4 +125,4 @@
#define I8042_BUFFER_SIZE 32
-#endif _I8042_H
+#endif /* _I8042_H */
Index: serio.c
===================================================================
RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/input/serio/serio.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- serio.c 22 Jan 2002 21:12:03 -0000 1.15
+++ serio.c 10 Jul 2002 18:08:04 -0000 1.16
@@ -32,6 +32,11 @@
#include <linux/module.h>
#include <linux/serio.h>
#include <linux/errno.h>
+#include <linux/wait.h>
+#include <linux/completion.h>
+#include <linux/sched.h>
+#include <linux/smp_lock.h>
+#include <linux/suspend.h>
MODULE_AUTHOR("Vojtech Pavlik <vo...@uc...>");
MODULE_DESCRIPTION("Serio abstraction core");
@@ -47,6 +52,7 @@
static struct serio *serio_list;
static struct serio_dev *serio_dev;
+static int serio_pid;
static void serio_find_dev(struct serio *serio)
{
@@ -59,11 +65,50 @@
}
}
+#define SERIO_RESCAN 1
+
+static DECLARE_WAIT_QUEUE_HEAD(serio_wait);
+static DECLARE_COMPLETION(serio_exited);
+
+void serio_handle_events(void)
+{
+ struct serio *serio = serio_list;
+
+ while (serio) {
+ if (serio->event & SERIO_RESCAN) {
+ if (serio->dev && serio->dev->disconnect)
+ serio->dev->disconnect(serio);
+ serio_find_dev(serio);
+ }
+
+ serio->event = 0;
+ serio = serio->next;
+ }
+}
+
+static int serio_thread(void *nothing)
+{
+ lock_kernel();
+ daemonize();
+ strcpy(current->comm, "kseriod");
+
+ do {
+ serio_handle_events();
+ if (current->flags & PF_FREEZE)
+ refrigerator(PF_IOTHREAD);
+ interruptible_sleep_on(&serio_wait);
+ } while (!signal_pending(current));
+
+ printk(KERN_DEBUG "serio: kseriod exiting");
+
+ unlock_kernel();
+ complete_and_exit(&serio_exited, 0);
+}
+
void serio_rescan(struct serio *serio)
{
- if (serio->dev && serio->dev->disconnect)
- serio->dev->disconnect(serio);
- serio_find_dev(serio);
+ serio->event |= SERIO_RESCAN;
+ wake_up(&serio_wait);
}
void serio_register_port(struct serio *serio)
@@ -127,3 +172,29 @@
serio->close(serio);
serio->dev = NULL;
}
+
+int serio_init(void)
+{
+ int pid;
+
+ pid = kernel_thread(serio_thread, NULL,
+ CLONE_FS | CLONE_FILES | CLONE_SIGHAND);
+
+ if (!pid) {
+ printk(KERN_WARNING "serio: Failed to start kseriod\n");
+ return -1;
+ }
+
+ serio_pid = pid;
+
+ return 0;
+}
+
+void serio_exit(void)
+{
+ kill_proc(serio_pid, SIGTERM, 1);
+ wait_for_completion(&serio_exited);
+}
+
+module_init(serio_init);
+module_exit(serio_exit);
--- Config.help DELETED ---
--- ct82c710.c DELETED ---
--- parkbd.c DELETED ---
--- rpckbd.c DELETED ---
--- serport.c DELETED ---
|
|
From: James S. <jsi...@us...> - 2002-07-10 18:08:07
|
Update of /cvsroot/linuxconsole/ruby/linux/drivers/input/touchscreen In directory usw-pr-cvs1:/tmp/cvs-serv10580/linux/drivers/input/touchscreen Removed Files: Config.help gunze.c Log Message: Syned to 2.5.25 --- Config.help DELETED --- --- gunze.c DELETED --- |
Update of /cvsroot/linuxconsole/ruby/linux/drivers/input/keyboard
In directory usw-pr-cvs1:/tmp/cvs-serv10580/linux/drivers/input/keyboard
Modified Files:
atkbd.c
Removed Files:
Config.help Config.in Makefile amikbd.c maple_keyb.c
ps2serkbd.c sunkbd.c xtkbd.c
Log Message:
Syned to 2.5.25
Index: atkbd.c
===================================================================
RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/input/keyboard/atkbd.c,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -d -r1.33 -r1.34
--- atkbd.c 12 Feb 2002 09:34:34 -0000 1.33
+++ atkbd.c 10 Jul 2002 18:08:04 -0000 1.34
@@ -31,6 +31,7 @@
#include <linux/init.h>
#include <linux/input.h>
#include <linux/serio.h>
+#include <linux/tqueue.h>
MODULE_AUTHOR("Vojtech Pavlik <vo...@uc...>");
MODULE_DESCRIPTION("AT and PS/2 keyboard driver");
@@ -120,14 +121,12 @@
struct serio *serio;
char name[64];
char phys[32];
- struct tq_struct tq;
unsigned char cmdbuf[4];
unsigned char cmdcnt;
unsigned char set;
- char release;
- char ack;
- char emul;
- char error;
+ unsigned char release;
+ signed char ack;
+ unsigned char emul;
unsigned short id;
};
@@ -161,8 +160,7 @@
switch (atkbd->keycode[code]) {
case ATKBD_KEY_BAT:
- queue_task(&atkbd->tq, &tq_immediate);
- mark_bh(IMMEDIATE_BH);
+ serio_rescan(atkbd->serio);
return;
case ATKBD_KEY_EMUL0:
atkbd->emul = 1;
@@ -431,21 +429,6 @@
}
/*
- * atkbd_powerup() is called when the keyboard sends the 0xaa character,
- * meaning that it was disconnected and reconnected. We close the port
- * in that case and let the upper layer find an appropriate driver for
- * the device that was connected. It may be a mouse, or a keyboard, we
- * don't know yet.
- */
-
-static void atkbd_powerup(void *data)
-{
- struct atkbd *atkbd = data;
- mdelay(40); /* FIXME!!! Wait some nicer way */
- serio_rescan(atkbd->serio);
-}
-
-/*
* atkbd_connect() is called when the serio module finds and interface
* that isn't handled yet by an appropriate device driver. We check if
* there is an AT keyboard out there and if yes, we register ourselves
@@ -476,9 +459,6 @@
atkbd->dev.event = atkbd_event;
atkbd->dev.private = atkbd;
- atkbd->tq.routine = atkbd_powerup;
- atkbd->tq.data = atkbd;
-
serio->private = atkbd;
if (serio_open(serio, dev)) {
@@ -503,7 +483,7 @@
if (atkbd->set == 4) {
atkbd->dev.ledbit[0] |= BIT(LED_COMPOSE) | BIT(LED_SUSPEND) | BIT(LED_SLEEP) | BIT(LED_MUTE);
- sprintf(atkbd->name, "AT Set 2 Extended keyboard\n");
+ sprintf(atkbd->name, "AT Set 2 Extended keyboard");
} else
sprintf(atkbd->name, "AT Set %d keyboard", atkbd->set);
--- Config.help DELETED ---
--- Config.in DELETED ---
--- Makefile DELETED ---
--- amikbd.c DELETED ---
--- maple_keyb.c DELETED ---
--- ps2serkbd.c DELETED ---
--- sunkbd.c DELETED ---
--- xtkbd.c DELETED ---
|