=2D----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Fri, 6 Jun 2003 05:21 am, Juan Pablo Sousa wrote:
> hi,
>
> is it posible to make a driver for a joystick that only has buttons (a
> mat)? I tried with the 2.4 kernel series and didn't succeed, is it
> designed taht way or was I doing something wrong. The quick solution was
> to initialize 2 axis for the joystick that weren't used.
I take it that you want to provide a low level driver that talks to the inp=
ut=20
layer, and outputs via the normal joydev driver to userspace. If so, then=20
there is no way. You must have at least one absolute axis - see below for=20
what the criteria is for a device to be associated with the joydev output:
See below for the description of what the=20
static struct input_device_id joydev_ids[] =3D {
{
.flags =3D INPUT_DEVICE_ID_MATCH_EVBIT |=20
INPUT_DEVICE_ID_MATCH_ABSBIT,
.evbit =3D { BIT(EV_ABS) },
.absbit =3D { BIT(ABS_X) },
},
{
.flags =3D INPUT_DEVICE_ID_MATCH_EVBIT |=20
INPUT_DEVICE_ID_MATCH_ABSBIT,
.evbit =3D { BIT(EV_ABS) },
.absbit =3D { BIT(ABS_WHEEL) },
},
{
.flags =3D INPUT_DEVICE_ID_MATCH_EVBIT |=20
INPUT_DEVICE_ID_MATCH_ABSBIT,
.evbit =3D { BIT(EV_ABS) },
.absbit =3D { BIT(ABS_THROTTLE) },
},
{ }, /* Terminating entry */
};
If the device doesn't have an absolute axis, would it be easier to use the=
=20
input layer and event output? What do you need in userspace?
Brad
=2D----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)
iD8DBQE+4DwYW6pHgIdAuOMRArzlAJsFAhz4TLd8xVBRFdWkTvtWuv7+xgCdFVWi
RA1fjGEOoeKotcCJRjtx2SI=3D
=3DPTJC
=2D----END PGP SIGNATURE-----
|