linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Cc: Roderick Colenbrander <roderick@gaikai.com>,
	linux-input@vger.kernel.org,
	Roderick Colenbrander <roderick.colenbrander@sony.com>
Subject: Re: [PATCH] Input: joydev - ignore accelerometer devices
Date: Mon, 19 Jun 2017 19:57:10 -0700	[thread overview]
Message-ID: <20170620025710.GF21379@dtor-ws> (raw)
In-Reply-To: <20170612070953.GA29589@mail.corp.redhat.com>

On Mon, Jun 12, 2017 at 09:09:53AM +0200, Benjamin Tissoires wrote:
> On Jun 09 2017 or thereabouts, Roderick Colenbrander wrote:
> > From: Roderick Colenbrander <roderick.colenbrander@sony.com>
> > 
> > Gamepads like DualShock 3 / 4 as of 4.12 started reporting motion
> > sensors on a separate evdev node. Joydev is picking these devices
> > up as well, but they don't make sense for the joydev interface.
> > 
> > Signed-off-by: Roderick Colenbrander <roderick.colenbrander@sony.com>
> > ---
> 
> Acked-By: Benjamin Tissoires <benjamin.tissoires@redhat.com>

Hmm, I think you can quite often use accelerometer as a joystick, it is
only the composite devices that we want to ignore I think.

> 
> Cheers,
> Benjamin
> 
> >  drivers/input/joydev.c | 4 ++++
> >  1 file changed, 4 insertions(+)
> > 
> > diff --git a/drivers/input/joydev.c b/drivers/input/joydev.c
> > index 29d677c..a5ceaaf 100644
> > --- a/drivers/input/joydev.c
> > +++ b/drivers/input/joydev.c
> > @@ -819,6 +819,10 @@ static bool joydev_match(struct input_handler *handler, struct input_dev *dev)
> >  	if (joydev_dev_is_absolute_mouse(dev))
> >  		return false;
> >  
> > +	/* Avoid accelerometers */
> > +	if (test_bit(INPUT_PROP_ACCELEROMETER, dev->propbit))
> > +		return false;
> > +
> >  	return true;
> >  }
> >  
> > -- 
> > 2.9.3
> > 

-- 
Dmitry

  reply	other threads:[~2017-06-20  2:57 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-09 20:35 [PATCH] Input: joydev fixes for 4.12 Roderick Colenbrander
2017-06-09 20:35 ` [PATCH] Input: joydev - ignore accelerometer devices Roderick Colenbrander
2017-06-12  7:09   ` Benjamin Tissoires
2017-06-20  2:57     ` Dmitry Torokhov [this message]
2017-06-20 16:58       ` Roderick Colenbrander
2017-07-11  0:42         ` Roderick Colenbrander

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=20170620025710.GF21379@dtor-ws \
    --to=dmitry.torokhov@gmail.com \
    --cc=benjamin.tissoires@redhat.com \
    --cc=linux-input@vger.kernel.org \
    --cc=roderick.colenbrander@sony.com \
    --cc=roderick@gaikai.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).