linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Benjamin Tissoires <benjamin.tissoires@redhat.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Andrew Duggan <aduggan@synaptics.com>,
	Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	Christopher Heiny <cheiny@synaptics.com>,
	Nick Dyer <nick@shmanahar.org>,
	linux-input@vger.kernel.org, linux-kernel@vger.kernel.org,
	Lyude Paul <thatslyude@gmail.com>
Subject: Re: [PATCH] Input: synaptics-rmi4 - make F03 a tristate symbol
Date: Wed, 11 Jan 2017 18:48:13 +0100	[thread overview]
Message-ID: <20170111174813.GB7997@mail.corp.redhat.com> (raw)
In-Reply-To: <4430320.ODnESzmqU3@wuerfel>

On Jan 11 2017 or thereabouts, Arnd Bergmann wrote:
> On Wednesday, January 11, 2017 5:28:28 PM CET Benjamin Tissoires wrote:
> > Yep, it was initially written that way, and IIRC there was some issues
> > depending on how the drivers were compiled. For example, if rmi4_core is
> > Y and some functions are m, you can't load the device initially, so you
> > send a -EPROBE_DEFER, but how can you be sure that the function will
> > ever be loaded?
> 
> I'm not sure if I understand your problem correctly, but normally
> the way it's done is that the bus driver notifies user space that
> a new device has appeared on the bus, and udev looks for the right
> driver for the device, using a MODULE_DEVICE_TABLE list. Once the
> driver gets loaded, it binds to the device.
> 

I agree, but we never managed to make it properly working for RMI4. See
https://lkml.org/lkml/2015/11/5/726 where we decided to switch to a
static list of functions. Maybe we did not try hard enough, but we kept
the current bus/functions_as_drivers to be able to switch back to the
modular option,

> > Given that we need to have all the functions loaded during probe, we
> > decided to switch to a monolithic rmi4_core driver that has everything
> > it needs inside.
> 
> If everything is in one module, you can probably get rid of at
> least part of the bus abstraction as well and just call the functions
> directly.

Agree, though that means we won't be able to switch back. In the current
form it's overly engineered.

> 
> Looking through the driver some more, I also find the
> 'rmi_driver rmi_physical_driver' concept very odd, you seem to
> have a device on the bus that is actually just another representation
> of the parent device and that creates another set of devices for
> the functions. Either I misunderstand what this is for, or you have

I think you have this right.

> a candidate for cleanup there and once you remove it (by calling
> rmi_driver_probe() instead of rmi_register_transport_device()
> to oversimplify the idea), the actual probing for the function
> drivers becomes much easier to do right.
> 

Agree, that would simplify the code a lot. I just don't know how
important it is for other users of RMI4 to have a modular solution or if
the monolithic approach is a consensus now. The modular solution is
currently disabled, but we can "always" switch back with a small effort.

My opinion on this matter is that there is no need for the modular
functions, but others might have a different opinion.

Cheers,
Benjamin

  reply	other threads:[~2017-01-11 17:48 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-10 12:16 [PATCH] Input: synaptics-rmi4 - make F03 a tristate symbol Arnd Bergmann
2017-01-11  0:39 ` Andrew Duggan
2017-01-11 15:39   ` Arnd Bergmann
2017-01-11 16:28     ` Benjamin Tissoires
2017-01-11 16:54       ` Arnd Bergmann
2017-01-11 17:48         ` Benjamin Tissoires [this message]
2017-01-11 19:27           ` Christopher Heiny
2017-01-13  0:42             ` Andrew Duggan
2017-01-13 21:14               ` Arnd Bergmann
2017-01-13  6:22 ` Dmitry Torokhov
2017-01-13 21:06   ` Arnd Bergmann
2017-01-13 21:15     ` Dmitry Torokhov
2017-01-13 21:34       ` Arnd Bergmann
2017-01-13 21:42         ` Dmitry Torokhov
2017-01-14 12:09           ` Arnd Bergmann
2017-01-15 23:39             ` 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=20170111174813.GB7997@mail.corp.redhat.com \
    --to=benjamin.tissoires@redhat.com \
    --cc=aduggan@synaptics.com \
    --cc=arnd@arndb.de \
    --cc=cheiny@synaptics.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nick@shmanahar.org \
    --cc=thatslyude@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 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).