Commit 71339646 authored by Vojtech Pavlik's avatar Vojtech Pavlik

Use Johann Deneux's own i-force configuration and build code.

parent 19f5e3da
...@@ -103,24 +103,6 @@ CONFIG_JOYSTICK_TMDC ...@@ -103,24 +103,6 @@ CONFIG_JOYSTICK_TMDC
The module will be called tmdc.o. If you want to compile it as a The module will be called tmdc.o. If you want to compile it as a
module, say M here and read <file:Documentation/modules.txt>. module, say M here and read <file:Documentation/modules.txt>.
CONFIG_JOYSTICK_IFORCE_USB
Say Y here if you have an I-Force joystick or steering wheel
connected to your USB port.
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 iforce.o. If you want to compile it as a
module, say M here and read <file:Documentation/modules.txt>.
CONFIG_JOYSTICK_IFORCE_232
Say Y here if you have an I-Force joystick or steering wheel
connected to your serial (COM) port.
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 iforce.o. If you want to compile it as a
module, say M here and read <file:Documentation/modules.txt>.
CONFIG_JOYSTICK_WARRIOR CONFIG_JOYSTICK_WARRIOR
Say Y here if you have a Logitech WingMan Warrior joystick connected Say Y here if you have a Logitech WingMan Warrior joystick connected
to your computer's serial port. to your computer's serial port.
......
...@@ -14,9 +14,7 @@ dep_tristate ' Guillemot joysticks and gamepads' CONFIG_JOYSTICK_GUILLEMOT $CON ...@@ -14,9 +14,7 @@ dep_tristate ' Guillemot joysticks and gamepads' CONFIG_JOYSTICK_GUILLEMOT $CON
dep_tristate ' InterAct digital joysticks and gamepads' CONFIG_JOYSTICK_INTERACT $CONFIG_INPUT $CONFIG_INPUT_JOYSTICK $CONFIG_GAMEPORT dep_tristate ' InterAct digital joysticks and gamepads' CONFIG_JOYSTICK_INTERACT $CONFIG_INPUT $CONFIG_INPUT_JOYSTICK $CONFIG_GAMEPORT
dep_tristate ' Microsoft SideWinder digital joysticks and gamepads' CONFIG_JOYSTICK_SIDEWINDER $CONFIG_INPUT $CONFIG_INPUT_JOYSTICK $CONFIG_GAMEPORT dep_tristate ' Microsoft SideWinder digital joysticks and gamepads' CONFIG_JOYSTICK_SIDEWINDER $CONFIG_INPUT $CONFIG_INPUT_JOYSTICK $CONFIG_GAMEPORT
dep_tristate ' ThrustMaster DirectConnect joysticks and gamepads' CONFIG_JOYSTICK_TMDC $CONFIG_INPUT $CONFIG_INPUT_JOYSTICK $CONFIG_GAMEPORT dep_tristate ' ThrustMaster DirectConnect joysticks and gamepads' CONFIG_JOYSTICK_TMDC $CONFIG_INPUT $CONFIG_INPUT_JOYSTICK $CONFIG_GAMEPORT
source drivers/input/joystick/iforce/Config.in
dep_tristate ' I-Force USB joysticks and wheels' CONFIG_JOYSTICK_IFORCE_USB $CONFIG_INPUT $CONFIG_INPUT_JOYSTICK $CONFIG_USB
dep_tristate ' I-Force Serial joysticks and wheels' CONFIG_JOYSTICK_IFORCE_232 $CONFIG_INPUT $CONFIG_INPUT_JOYSTICK $CONFIG_SERIO
dep_tristate ' Logitech WingMan Warrior joystick' CONFIG_JOYSTICK_WARRIOR $CONFIG_INPUT $CONFIG_INPUT_JOYSTICK $CONFIG_SERIO dep_tristate ' Logitech WingMan Warrior joystick' CONFIG_JOYSTICK_WARRIOR $CONFIG_INPUT $CONFIG_INPUT_JOYSTICK $CONFIG_SERIO
dep_tristate ' LogiCad3d Magellan/SpaceMouse 6dof controllers' CONFIG_JOYSTICK_MAGELLAN $CONFIG_INPUT $CONFIG_INPUT_JOYSTICK $CONFIG_SERIO dep_tristate ' LogiCad3d Magellan/SpaceMouse 6dof controllers' CONFIG_JOYSTICK_MAGELLAN $CONFIG_INPUT $CONFIG_INPUT_JOYSTICK $CONFIG_SERIO
dep_tristate ' SpaceTec SpaceOrb/Avenger 6dof controllers' CONFIG_JOYSTICK_SPACEORB $CONFIG_INPUT $CONFIG_INPUT_JOYSTICK $CONFIG_SERIO dep_tristate ' SpaceTec SpaceOrb/Avenger 6dof controllers' CONFIG_JOYSTICK_SPACEORB $CONFIG_INPUT $CONFIG_INPUT_JOYSTICK $CONFIG_SERIO
......
...@@ -2,24 +2,6 @@ ...@@ -2,24 +2,6 @@
# Makefile for the input core drivers. # Makefile for the input core drivers.
# #
# I-Force may need both USB and RS-232
CONFIG_JOYSTICK_IFORCE := n
ifeq ($(CONFIG_JOYSTICK_IFORCE_232),y)
ifeq ($(CONFIG_JOYSTICK_IFORCE_USB),y)
CONFIG_JOYSTICK_IFORCE := y
endif
endif
ifeq ($(CONFIG_JOYSTICK_IFORCE_232),m)
CONFIG_JOYSTICK_IFORCE := m
endif
ifeq ($(CONFIG_JOYSTICK_IFORCE_USB),m)
CONFIG_JOYSTICK_IFORCE := m
endif
# Each configuration option enables a list of files. # Each configuration option enables a list of files.
obj-$(CONFIG_JOYSTICK_A3D) += a3d.o obj-$(CONFIG_JOYSTICK_A3D) += a3d.o
......
CONFIG_JOYSTICK_IFORCE
Say Y here if you have an I-Force joystick or steering wheel
You also must choose at least one of the two options below.
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 iforce.o. If you want to compile it as a
module, say M here and read <file:Documentation/modules.txt>.
CONFIG_JOYSTICK_IFORCE_USB
Say Y here if you have an I-Force joystick or steering wheel
connected to your USB port.
CONFIG_JOYSTICK_IFORCE_232
Say Y here if you have an I-Force joystick or steering wheel
connected to your serial (COM) port.
You will need an additional utility called inputattach, see
Documentation/input/joystick.txt and ff.txt.
#
# I-Force driver configuration
#
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
fi
if [ "$CONFIG_SERIO" != "n" ]; then
bool ' I-Force Serial joysticks and wheels' CONFIG_JOYSTICK_IFORCE_232
fi
fi
# #
# Makefile for the I-Force driver # Makefile for the I-Force driver
# #
# By Johann Deneux <deneux@ifrance.com>
#
# I-Force may need both USB and RS-232 # Goal definition
list-multi := iforce.o
iforce-objs := iforce-ff.o iforce-main.o iforce-packets.o
CONFIG_JOYSTICK_IFORCE := n obj-$(CONFIG_JOYSTICK_IFORCE) += iforce.o
ifeq ($(CONFIG_JOYSTICK_IFORCE_232),y) ifeq ($(CONFIG_JOYSTICK_IFORCE_232),y)
ifeq ($(CONFIG_JOYSTICK_IFORCE_USB),y) iforce-objs += iforce-serio.o
CONFIG_JOYSTICK_IFORCE := y
endif
endif endif
ifeq ($(CONFIG_JOYSTICK_IFORCE_232),m) ifeq ($(CONFIG_JOYSTICK_IFORCE_USB),y)
CONFIG_JOYSTICK_IFORCE := m iforce-objs += iforce-usb.o
endif endif
ifeq ($(CONFIG_JOYSTICK_IFORCE_USB),m) EXTRA_CFLAGS = -Werror-implicit-function-declaration
CONFIG_JOYSTICK_IFORCE := m
endif
obj-$(CONFIG_JOYSTICK_IFORCE) += iforce.o
# The global Rules.make. # The global Rules.make.
include $(TOPDIR)/Rules.make include $(TOPDIR)/Rules.make
# iforce.o is a multipart module. # Additional rules
iforce.o: $(iforce-objs)
IFORCEOBJS = iforce-ff.o iforce-main.o iforce-packets.o $(LD) -r -o $@ $(iforce-objs)
ifneq ($(CONFIG_JOYSTICK_IFORCE_232),)
IFORCEOBJS += iforce-serio.o
endif
ifneq ($(CONFIG_JOYSTICK_IFORCE_USB),)
IFORCEOBJS += iforce-usb.o
endif
iforce.o: $(IFORCEOBJS)
$(LD) -i $(IFORCEOBJS) -o $@
/* /*
* $Id: iforce-main.c,v 1.18 2002/06/09 11:03:03 jdeneux Exp $ * $Id: iforce-main.c,v 1.19 2002/07/07 10:22:50 jdeneux Exp $
* *
* Copyright (c) 2000-2002 Vojtech Pavlik <vojtech@ucw.cz> * Copyright (c) 2000-2002 Vojtech Pavlik <vojtech@ucw.cz>
* Copyright (c) 2001-2002 Johann Deneux <deneux@ifrance.com> * Copyright (c) 2001-2002 Johann Deneux <deneux@ifrance.com>
...@@ -248,7 +248,7 @@ static int iforce_open(struct input_dev *dev) ...@@ -248,7 +248,7 @@ static int iforce_open(struct input_dev *dev)
struct iforce *iforce = dev->private; struct iforce *iforce = dev->private;
switch (iforce->bus) { switch (iforce->bus) {
#ifdef IFORCE_USB #ifdef CONFIG_JOYSTICK_IFORCE_USB
case IFORCE_USB: case IFORCE_USB:
iforce->irq->dev = iforce->usbdev; iforce->irq->dev = iforce->usbdev;
if (usb_submit_urb(iforce->irq, GFP_KERNEL)) if (usb_submit_urb(iforce->irq, GFP_KERNEL))
...@@ -305,7 +305,7 @@ static void iforce_release(struct input_dev *dev) ...@@ -305,7 +305,7 @@ static void iforce_release(struct input_dev *dev)
iforce_send_packet(iforce, FF_CMD_ENABLE, "\001"); iforce_send_packet(iforce, FF_CMD_ENABLE, "\001");
switch (iforce->bus) { switch (iforce->bus) {
#ifdef IFORCE_USB #ifdef CONFIG_JOYSTICK_IFORCE_USB
case IFORCE_USB: case IFORCE_USB:
usb_unlink_urb(iforce->irq); usb_unlink_urb(iforce->irq);
...@@ -323,12 +323,12 @@ static void iforce_release(struct input_dev *dev) ...@@ -323,12 +323,12 @@ static void iforce_release(struct input_dev *dev)
void iforce_delete_device(struct iforce *iforce) void iforce_delete_device(struct iforce *iforce)
{ {
switch (iforce->bus) { switch (iforce->bus) {
#ifdef IFORCE_USB #ifdef CONFIG_JOYSTICK_IFORCE_USB
case IFORCE_USB: case IFORCE_USB:
iforce_usb_delete(iforce); iforce_usb_delete(iforce);
break; break;
#endif #endif
#ifdef IFORCE_232 #ifdef CONFIG_JOYSTICK_IFORCE_232
case IFORCE_232: case IFORCE_232:
//TODO: Wait for the last packets to be sent //TODO: Wait for the last packets to be sent
break; break;
...@@ -520,10 +520,10 @@ int iforce_init_device(struct iforce *iforce) ...@@ -520,10 +520,10 @@ int iforce_init_device(struct iforce *iforce)
static int __init iforce_init(void) static int __init iforce_init(void)
{ {
#ifdef IFORCE_USB #ifdef CONFIG_JOYSTICK_IFORCE_USB
usb_register(&iforce_usb_driver); usb_register(&iforce_usb_driver);
#endif #endif
#ifdef IFORCE_232 #ifdef CONFIG_JOYSTICK_IFORCE_232
serio_register_device(&iforce_serio_dev); serio_register_device(&iforce_serio_dev);
#endif #endif
return 0; return 0;
...@@ -531,10 +531,10 @@ static int __init iforce_init(void) ...@@ -531,10 +531,10 @@ static int __init iforce_init(void)
static void __exit iforce_exit(void) static void __exit iforce_exit(void)
{ {
#ifdef IFORCE_USB #ifdef CONFIG_JOYSTICK_IFORCE_USB
usb_deregister(&iforce_usb_driver); usb_deregister(&iforce_usb_driver);
#endif #endif
#ifdef IFORCE_232 #ifdef CONFIG_JOYSTICK_IFORCE_232
serio_unregister_device(&iforce_serio_dev); serio_unregister_device(&iforce_serio_dev);
#endif #endif
} }
......
/* /*
* $Id: iforce-packets.c,v 1.15 2002/06/09 11:08:04 jdeneux Exp $ * $Id: iforce-packets.c,v 1.16 2002/07/07 10:22:50 jdeneux Exp $
* *
* Copyright (c) 2000-2002 Vojtech Pavlik <vojtech@ucw.cz> * Copyright (c) 2000-2002 Vojtech Pavlik <vojtech@ucw.cz>
* Copyright (c) 2001-2002 Johann Deneux <deneux@ifrance.com> * Copyright (c) 2001-2002 Johann Deneux <deneux@ifrance.com>
...@@ -101,13 +101,13 @@ int iforce_send_packet(struct iforce *iforce, u16 cmd, unsigned char* data) ...@@ -101,13 +101,13 @@ int iforce_send_packet(struct iforce *iforce, u16 cmd, unsigned char* data)
*/ */
switch (iforce->bus) { switch (iforce->bus) {
#ifdef IFORCE_232 #ifdef CONFIG_JOYSTICK_IFORCE_232
case IFORCE_232: case IFORCE_232:
if (empty) if (empty)
iforce_serial_xmit(iforce); iforce_serial_xmit(iforce);
break; break;
#endif #endif
#ifdef IFORCE_USB #ifdef CONFIG_JOYSTICK_IFORCE_USB
case IFORCE_USB: case IFORCE_USB:
if (iforce->usbdev && empty && if (iforce->usbdev && empty &&
...@@ -161,7 +161,7 @@ void iforce_process_packet(struct iforce *iforce, u16 cmd, unsigned char *data) ...@@ -161,7 +161,7 @@ void iforce_process_packet(struct iforce *iforce, u16 cmd, unsigned char *data)
printk(KERN_WARNING "iforce-packets.c: re-entrant call to iforce_process %d\n", being_used); printk(KERN_WARNING "iforce-packets.c: re-entrant call to iforce_process %d\n", being_used);
being_used++; being_used++;
#ifdef IFORCE_232 #ifdef CONFIG_JOYSTICK_IFORCE_232
if (HI(iforce->expect_packet) == HI(cmd)) { if (HI(iforce->expect_packet) == HI(cmd)) {
iforce->expect_packet = 0; iforce->expect_packet = 0;
iforce->ecmd = cmd; iforce->ecmd = cmd;
...@@ -251,7 +251,7 @@ int iforce_get_id_packet(struct iforce *iforce, char *packet) ...@@ -251,7 +251,7 @@ int iforce_get_id_packet(struct iforce *iforce, char *packet)
case IFORCE_USB: case IFORCE_USB:
#ifdef IFORCE_USB #ifdef CONFIG_JOYSTICK_IFORCE_USB
iforce->cr.bRequest = packet[0]; iforce->cr.bRequest = packet[0];
iforce->ctrl->dev = iforce->usbdev; iforce->ctrl->dev = iforce->usbdev;
...@@ -281,7 +281,7 @@ int iforce_get_id_packet(struct iforce *iforce, char *packet) ...@@ -281,7 +281,7 @@ int iforce_get_id_packet(struct iforce *iforce, char *packet)
case IFORCE_232: case IFORCE_232:
#ifdef IFORCE_232 #ifdef CONFIG_JOYSTICK_IFORCE_232
iforce->expect_packet = FF_CMD_QUERY; iforce->expect_packet = FF_CMD_QUERY;
iforce_send_packet(iforce, FF_CMD_QUERY, packet); iforce_send_packet(iforce, FF_CMD_QUERY, packet);
......
/* /*
* $Id: iforce.h,v 1.12 2002/06/09 11:08:04 jdeneux Exp $ * $Id: iforce.h,v 1.13 2002/07/07 10:22:50 jdeneux Exp $
* *
* Copyright (c) 2000-2002 Vojtech Pavlik <vojtech@ucw.cz> * Copyright (c) 2000-2002 Vojtech Pavlik <vojtech@ucw.cz>
* Copyright (c) 2001-2002 Johann Deneux <deneux@ifrance.com> * Copyright (c) 2001-2002 Johann Deneux <deneux@ifrance.com>
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
#include <linux/circ_buf.h> #include <linux/circ_buf.h>
#include <asm/semaphore.h> #include <asm/semaphore.h>
/* FF: This module provides arbitrary resource management routines. /* This module provides arbitrary resource management routines.
* I use it to manage the device's memory. * I use it to manage the device's memory.
* Despite the name of this module, I am *not* going to access the ioports. * Despite the name of this module, I am *not* going to access the ioports.
*/ */
...@@ -47,12 +47,9 @@ ...@@ -47,12 +47,9 @@
#define IFORCE_MAX_LENGTH 16 #define IFORCE_MAX_LENGTH 16
#if defined(CONFIG_JOYSTICK_IFORCE_232) /* iforce::bus */
#define IFORCE_232 1 #define IFORCE_232 1
#endif
#if defined(CONFIG_JOYSTICK_IFORCE_USB)
#define IFORCE_USB 2 #define IFORCE_USB 2
#endif
#define FALSE 0 #define FALSE 0
#define TRUE 1 #define TRUE 1
...@@ -129,12 +126,12 @@ struct iforce { ...@@ -129,12 +126,12 @@ struct iforce {
u16 ecmd; u16 ecmd;
u16 expect_packet; u16 expect_packet;
#ifdef IFORCE_232 #ifdef CONFIG_JOYSTICK_IFORCE_232
struct serio *serio; /* RS232 transfer */ struct serio *serio; /* RS232 transfer */
int idx, pkt, len, id; int idx, pkt, len, id;
unsigned char csum; unsigned char csum;
#endif #endif
#ifdef IFORCE_USB #ifdef CONFIG_JOYSTICK_IFORCE_USB
struct usb_device *usbdev; /* USB transfer */ struct usb_device *usbdev; /* USB transfer */
struct urb *irq, *out, *ctrl; struct urb *irq, *out, *ctrl;
struct usb_ctrlrequest cr; struct usb_ctrlrequest cr;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment