All of lore.kernel.org
 help / color / mirror / Atom feed
From: Frank Praznik <frank.praznik@gmail.com>
To: simon@mungewell.org
Cc: Frank Praznik <frank.praznik@oh.rr.com>,
	HID CORE LAYER <linux-input@vger.kernel.org>,
	Jiri Kosina <jkosina@suse.cz>
Subject: Re: Bug: HID-Sony: DS4 touch-pad corrupts Axis0
Date: Tue, 22 Apr 2014 13:31:32 -0400	[thread overview]
Message-ID: <5356A774.5050505@gmail.com> (raw)
In-Reply-To: <35342da9a382362bc86ab7abfa7ee07a.squirrel@mungewell.org>

On 4/22/2014 12:50, simon@mungewell.org wrote:
>> The joydev device *is* missing the mappings for the touchpad axes for
>> some reason (JSIOCGAXES returns 14 instead of 17 like it should).  I'm
>> not sure why though.  In the Sony driver the touchpad axis bits are set
>> in the probe function and work correctly via the evdev interface and
>> looking in the joydev module it should properly handle and map all axes
>> up to ABS_MAX so the problem probably lies somewhere else.  If I had to
>> guess, it seems like the joydev device is being created after the HID
>> descriptor is parsed, but before the device probe function is called.
>>
>> Can anyone more familiar with the general input system comment on why
>> this might be happening?
> I find it suspicious that it doesn't happen the first time (after boot)
> that the controller is plugged in, but then does every subsequent time...
> maybe some un-init memory somewhere.
>
> Is this kernel behaviour, or down to the controller state (ie alive after
> first plug)? We see that the DS3 behaves differently wrt leds depending on
> whether it is asleep or alive when plugged in.
>
> I'll dig a little deeper tonight to see if I can track the problem down.
> Simon.
>

It might be a matter of the joydev module not being loaded into memory 
the first time thus allowing the probe function to complete and set the 
proper axis bits before the js* device is created.  On subsequent 
connects the module would already be loaded so the js* device would be 
created before the extra axis bits are set, assuming that my earlier 
hypothesis is correct and the joystick device is being created before 
the probe function returns.

The joydev system also zero initializes the mapping arrays and doesn't 
filter out unmapped axis or button events, which is why the unmapped 
axes always effect axis 0.

  reply	other threads:[~2014-04-22 17:31 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-21 16:49 Bug: HID-Sony: DS4 touch-pad corrupts Axis0 simon
2014-04-21 17:18 ` simon
2014-04-21 17:30 ` Frank Praznik
2014-04-21 20:16   ` Frank Praznik
2014-04-22 16:50     ` simon
2014-04-22 17:31       ` Frank Praznik [this message]
2014-04-23  3:21         ` simon

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=5356A774.5050505@gmail.com \
    --to=frank.praznik@gmail.com \
    --cc=frank.praznik@oh.rr.com \
    --cc=jkosina@suse.cz \
    --cc=linux-input@vger.kernel.org \
    --cc=simon@mungewell.org \
    /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.