From: Frank Praznik <frank.praznik@gmail.com>
To: Antonio Ospite <ao2@ao2.it>, Frank Praznik <frank.praznik@oh.rr.com>
Cc: linux-input@vger.kernel.org, jkosina@suse.cz, dh.herrmann@gmail.com
Subject: Re: [PATCH 0/6] HID: sony: More Sony controller fixes and improvements.
Date: Tue, 04 Mar 2014 09:54:30 -0500 [thread overview]
Message-ID: <5315E926.6@gmail.com> (raw)
In-Reply-To: <20140304133426.ea711f53198ec62894a630de@ao2.it>
On 3/4/2014 07:34, Antonio Ospite wrote:
> This can be done in the driver. See
> https://www.mail-archive.com/linux-input@vger.kernel.org/msg08103.html
>
>
> xpad is a joystick driver, while hid-sony is a HID driver.
I tried it and the hack works from HID space with some tweaking, but,
yeah, it's a hack and doesn't belong in *any* driver.
> Let me answer the last question first, the rationale was:
>
> 1. the common use case for the sixaxis is considered to be its use
> via Bluetooth, can we agree on that?
> 2. under this assumption BlueZ was chosen as a convenient place to do
> the pairing and association.
> 3. Paring requires to access the device via USB in order to retrieve
> its bdaddr and set the master bdaddr.
> 4. Once we are accessing the device via USB and BT in the BlueZ plugin
> anyway, just let's set the LEDs here.
>
> A more general "excuse" is that clutter in userspace is slightly more
> acceptable than clutter in kernel code.
>
> And to reply to the other questions, yes, the bluez plugin is not
> perfect by any means: it enforces dependencies, it's not using the leds
> class yet, but it can be improved and IMHO it's still the most
> convenient way to have responsibilities separated: the kernel driver
> provides access to the hardware functionality and the userspace
> software decides what to do with them.
>
> However, since you are the one currently working on things you are
> entitled with a stronger voice here, I am just whispering my opinions :)
>
> Ciao,
> Antonio
>
I understand your rationale, but I still think that the driver should
assign sane defaults for cases where there isn't userspace software to
set the LEDs. Leaving the Sixaxis LEDs blinking doesn't differentiate
between whether or not the controller is connected or trying to connect
and on the Dualshock 4 the default is a bright-white battery draining
light. On the other hand, the current default of 'all-off', which has
been the default since the initial LED patch, doesn't indicate whether
the controller connected successfully or timed-out when using Bluetooth.
I currently have David's suggestion of assigning an id via an IDA
allocator implemented in my working copy. This can be used to both
initialize the LEDs relative to other Sony controllers and provide a
sane unique identifier for the battery identification string instead of
the constantly incrementing atomic integer used now. This is the most
ideal solution IMO since it clearly communicates the current power and
connection status of the controller, lets the user easily differentiate
between controllers 1, 2, etc... and it provides defaults that most
users shouldn't find annoying. Of course, these are just defaults so if
you want to use a BlueZ plugin or something else to set the values via
userspace, there is nothing stopping you.
I'm going wait on v2 of this series until Benjamin Tissoires finishes
his latest patches since I think patch #2 and beyond will conflict with
his work. Patch #1 is just a trivial one-line fix though, so that
should still be good to go.
prev parent reply other threads:[~2014-03-04 14:54 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-01 3:58 [PATCH 0/6] HID: sony: More Sony controller fixes and improvements Frank Praznik
2014-03-01 3:58 ` [PATCH 1/6] HID: sony: Fix Sixaxis cable state detection Frank Praznik
2014-03-01 3:58 ` [PATCH 2/6] HID: sony: Convert startup and shutdown functions to use a uniform parameter type Frank Praznik
2014-03-01 3:58 ` [PATCH 3/6] HID: sony: Use inliners for work queue initialization and cancellation Frank Praznik
2014-03-01 3:58 ` [PATCH 4/6] HID: sony: Add blink support to the LEDs Frank Praznik
2014-03-01 14:20 ` Antonio Ospite
2014-03-02 23:43 ` Frank Praznik
2014-03-01 3:59 ` [PATCH 5/6] HID: sony: Add an led trigger to report controller battery status Frank Praznik
2014-03-01 14:36 ` Antonio Ospite
2014-03-02 23:48 ` Frank Praznik
2014-03-01 3:59 ` [PATCH 6/6] HID: sony: Turn on the LEDs by default Frank Praznik
2014-03-01 14:38 ` Antonio Ospite
2014-03-01 13:53 ` [PATCH 0/6] HID: sony: More Sony controller fixes and improvements Antonio Ospite
2014-03-02 16:26 ` Frank Praznik
2014-03-02 17:21 ` David Herrmann
2014-03-04 12:34 ` Antonio Ospite
2014-03-04 14:54 ` Frank Praznik [this message]
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=5315E926.6@gmail.com \
--to=frank.praznik@gmail.com \
--cc=ao2@ao2.it \
--cc=dh.herrmann@gmail.com \
--cc=frank.praznik@oh.rr.com \
--cc=jkosina@suse.cz \
--cc=linux-input@vger.kernel.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 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).