a3d.c (0a1340c185734a57fbf4775927966ad4a1347b02) a3d.c (8715c1cfadf8cce24e79d254f95bd4a84c7741f0)
1/*
2 * $Id: a3d.c,v 1.21 2002/01/22 20:11:50 vojtech Exp $
3 *
4 * Copyright (c) 1998-2001 Vojtech Pavlik
5 */
6
7/*
8 * FP-Gaming Assasin 3D joystick driver for Linux

--- 227 unchanged lines hidden (view full) ---

236}
237
238/*
239 * a3d_open() is a callback from the input open routine.
240 */
241
242static int a3d_open(struct input_dev *dev)
243{
1/*
2 * $Id: a3d.c,v 1.21 2002/01/22 20:11:50 vojtech Exp $
3 *
4 * Copyright (c) 1998-2001 Vojtech Pavlik
5 */
6
7/*
8 * FP-Gaming Assasin 3D joystick driver for Linux

--- 227 unchanged lines hidden (view full) ---

236}
237
238/*
239 * a3d_open() is a callback from the input open routine.
240 */
241
242static int a3d_open(struct input_dev *dev)
243{
244 struct a3d *a3d = dev->private;
244 struct a3d *a3d = input_get_drvdata(dev);
245
246 gameport_start_polling(a3d->gameport);
247 return 0;
248}
249
250/*
251 * a3d_close() is a callback from the input close routine.
252 */
253
254static void a3d_close(struct input_dev *dev)
255{
245
246 gameport_start_polling(a3d->gameport);
247 return 0;
248}
249
250/*
251 * a3d_close() is a callback from the input close routine.
252 */
253
254static void a3d_close(struct input_dev *dev)
255{
256 struct a3d *a3d = dev->private;
256 struct a3d *a3d = input_get_drvdata(dev);
257
258 gameport_stop_polling(a3d->gameport);
259}
260
261/*
262 * a3d_connect() probes for A3D joysticks.
263 */
264

--- 45 unchanged lines hidden (view full) ---

310
311 input_dev->name = a3d_names[a3d->mode];
312 input_dev->phys = a3d->phys;
313 input_dev->id.bustype = BUS_GAMEPORT;
314 input_dev->id.vendor = GAMEPORT_ID_VENDOR_MADCATZ;
315 input_dev->id.product = a3d->mode;
316 input_dev->id.version = 0x0100;
317 input_dev->cdev.dev = &gameport->dev;
257
258 gameport_stop_polling(a3d->gameport);
259}
260
261/*
262 * a3d_connect() probes for A3D joysticks.
263 */
264

--- 45 unchanged lines hidden (view full) ---

310
311 input_dev->name = a3d_names[a3d->mode];
312 input_dev->phys = a3d->phys;
313 input_dev->id.bustype = BUS_GAMEPORT;
314 input_dev->id.vendor = GAMEPORT_ID_VENDOR_MADCATZ;
315 input_dev->id.product = a3d->mode;
316 input_dev->id.version = 0x0100;
317 input_dev->cdev.dev = &gameport->dev;
318 input_dev->private = a3d;
319 input_dev->open = a3d_open;
320 input_dev->close = a3d_close;
321
318 input_dev->open = a3d_open;
319 input_dev->close = a3d_close;
320
321 input_set_drvdata(input_dev, a3d);
322
322 if (a3d->mode == A3D_MODE_PXL) {
323
324 int axes[] = { ABS_X, ABS_Y, ABS_THROTTLE, ABS_RUDDER };
325
326 a3d->length = 33;
327
328 input_dev->evbit[0] |= BIT(EV_ABS) | BIT(EV_KEY) | BIT(EV_REL);
329 input_dev->relbit[0] |= BIT(REL_X) | BIT(REL_Y);

--- 93 unchanged lines hidden ---
323 if (a3d->mode == A3D_MODE_PXL) {
324
325 int axes[] = { ABS_X, ABS_Y, ABS_THROTTLE, ABS_RUDDER };
326
327 a3d->length = 33;
328
329 input_dev->evbit[0] |= BIT(EV_ABS) | BIT(EV_KEY) | BIT(EV_REL);
330 input_dev->relbit[0] |= BIT(REL_X) | BIT(REL_Y);

--- 93 unchanged lines hidden ---