All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jiri Kosina <jikos@kernel.org>
To: "Colenbrander, Roelof" <Roderick.Colenbrander@sony.com>
Cc: Todd Kelner <tsopdump@gmail.com>,
	Benjamin Tissoires <benjamin.tissoires@redhat.com>,
	"linux-input@vger.kernel.org" <linux-input@vger.kernel.org>,
	Frank Praznik <frank.praznik@gmail.com>,
	Simon Wood <simon@mungewell.org>
Subject: RE: [PATCH] HID: sony: Add touchpad support for Sony's NSG-MR5U and NSG-MR7U remotes
Date: Fri, 24 Mar 2017 15:15:32 +0100 (CET)	[thread overview]
Message-ID: <alpine.LSU.2.20.1703241459510.31814@cbobk.fhfr.pm> (raw)
In-Reply-To: <1DD62093774CEE42AFC16E785A10880489C9FFB9@USCULXMSG08.am.sony.com>

On Wed, 22 Mar 2017, Colenbrander, Roelof wrote:

> On a sidenote I'm starting to wonder how we should deal with multiple 
> devices in this driver in the future. The driver is starting to support 
> many different kinds of devices (mostly game controllers) and a few 
> other devices (vaio). They are all HID, but behave very differently and 
> some share concepts e.g. LEDs, touchpads or motion sensors. It is 
> starting to become more and more painful to handle many very different 
> devices in kind of one driver even though they are not really related. 
> There are layers of abstractions to dispatch to the right 'subdriver' 
> e.g. in sony_raw_event and many other places. There is a shared driver 
> structure (sony_sc), but some portions like function pointers or work 
> structs only apply to some devices.

If this is going to become a real problem, the most straightforward 
solution to me would be to actually separate the driver into completely 
different 'sub-drivers', but have them link at the end of the day into one 
'hid-sony', mostly for compatibility reasons (but also to keep following 
the general pattern we have).

> Also thinking a bit in how to use this driver in actual products. We may 
> only want certain pieces (e.g. game controller support) and not support 
> for the other devices either because we already have another driver for 
> it or we don't want to include this code as we don't intend to support 
> it (and verify behaviour) on said product. It is in nobody's interest to 
> have multiple code bases.

You can always blacklist/unbind the device if you're going to ship some 
out-of-tree driver, but I don't think we should really optimize the 
in-kernel code for that.

Thanks,

-- 
Jiri Kosina
SUSE Labs


  reply	other threads:[~2017-03-24 14:15 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-11  5:00 [PATCH] HID: sony: Add touchpad support for Sony's NSG-MR5U and NSG-MR7U remotes Todd Kelner
2017-03-21 14:06 ` Jiri Kosina
2017-03-21 23:56   ` Colenbrander, Roelof
2017-03-22  1:10     ` Colenbrander, Roelof
2017-03-24 14:15       ` Jiri Kosina [this message]
2017-07-31 14:01 ` Jiri Kosina
     [not found] <20170128023942.GA11682@gmail.com>
     [not found] ` <20170130095618.GA26482@mail.corp.redhat.com>
     [not found]   ` <20170131000243.GA3725@gmail.com>
     [not found]     ` <20170201085358.GE31658@mail.corp.redhat.com>
2017-02-01  8:56       ` Benjamin Tissoires
  -- strict thread matches above, loose matches on Subject: below --
2017-01-28  2:42 Todd Kelner

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=alpine.LSU.2.20.1703241459510.31814@cbobk.fhfr.pm \
    --to=jikos@kernel.org \
    --cc=Roderick.Colenbrander@sony.com \
    --cc=benjamin.tissoires@redhat.com \
    --cc=frank.praznik@gmail.com \
    --cc=linux-input@vger.kernel.org \
    --cc=simon@mungewell.org \
    --cc=tsopdump@gmail.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 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.