All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Ville Ranki <ville.ranki@iki.fi>
Cc: linux-input@vger.kernel.org
Subject: Re: [PATCH] Input: joydev - Recognize joysticks with Z axis as joysticks.
Date: Thu, 25 Aug 2016 09:45:30 -0700	[thread overview]
Message-ID: <20160825164530.GD11206@dtor-ws> (raw)
In-Reply-To: <1472134610-6438-1-git-send-email-ville.ranki@iki.fi>

On Thu, Aug 25, 2016 at 05:16:50PM +0300, Ville Ranki wrote:
> Current implementation of joydev's input_device_id
> table recognizes only devices with ABS_X, ABS_WHEEL
> or ABS_THROTTLE axes as joysticks.
> 
> There are joystick devices that do not have those axes,
> for example TRC Rudder device. The device in question
> has ABS_Z, ABS_RX and ABS_RY axes causing it not being
> detected as joystick.
> 
> This patch adds ABS_Z to the input_device_id list
> allowing devices with ABS_Z axis to be detected
> correctly.

I am curious why you still use joydev and not switch your client(s) to
evdev? Or is it some legacy game?

Thanks.

> 
> Signed-off-by: Ville Ranki <ville.ranki@iki.fi>
> ---
>  drivers/input/joydev.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/drivers/input/joydev.c b/drivers/input/joydev.c
> index 5d11fea..f3135ae 100644
> --- a/drivers/input/joydev.c
> +++ b/drivers/input/joydev.c
> @@ -950,6 +950,12 @@ static const struct input_device_id joydev_ids[] = {
>  		.flags = INPUT_DEVICE_ID_MATCH_EVBIT |
>  				INPUT_DEVICE_ID_MATCH_ABSBIT,
>  		.evbit = { BIT_MASK(EV_ABS) },
> +		.absbit = { BIT_MASK(ABS_Z) },
> +	},
> +	{
> +		.flags = INPUT_DEVICE_ID_MATCH_EVBIT |
> +				INPUT_DEVICE_ID_MATCH_ABSBIT,
> +		.evbit = { BIT_MASK(EV_ABS) },
>  		.absbit = { BIT_MASK(ABS_WHEEL) },
>  	},
>  	{
> -- 
> 2.7.4
> 

-- 
Dmitry

  reply	other threads:[~2016-08-25 16:45 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-25 14:16 [PATCH] Input: joydev - Recognize joysticks with Z axis as joysticks Ville Ranki
2016-08-25 16:45 ` Dmitry Torokhov [this message]
2016-08-25 20:56   ` Ville Ranki
2016-09-02  9:11     ` Ville Ranki
2016-09-15 14:18       ` Ville Ranki
2016-09-15 22:35 ` Dmitry Torokhov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160825164530.GD11206@dtor-ws \
    --to=dmitry.torokhov@gmail.com \
    --cc=linux-input@vger.kernel.org \
    --cc=ville.ranki@iki.fi \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.