linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/3] Bind RMI4 over SMBus from PS/2
@ 2017-02-16 17:50 Benjamin Tissoires
  2017-02-16 17:50 ` [PATCH v2 1/3] input: serio - allow others to specify a driver for a serio device Benjamin Tissoires
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Benjamin Tissoires @ 2017-02-16 17:50 UTC (permalink / raw)
  To: Dmitry Torokhov, Andrew Duggan; +Cc: linux-kernel, linux-input

Hi Dmitry,

quoting your last email about this topic:

> I think that by trying to "unwind" unsuccessful SMbus initialization you
> make the code much more complicated and fragile. I think we should
> select a path (PS/2 or SMbus) and commit to it. If we commit to SMBus
> then we need to communicate that fact to psmouse core so that it does
> not create input devices or psmouse attributes, and "short-circuit" the
> reconnect() routines to simply ignore requests and always report
> success.

I have tried in the past to unwind the psmouse input devices, and it was a pain.
So I thought of using a dummy serio driver that basically just calls
PSMOUSE_CMD_DISABLE at connect and returns 0 everywhere else.

I tried this in the past without much luck but I think I found a reliable
way today.

The good thing is that it seems that in that case, the rmi4_smbus driver
doesn't need any changes now that most serio states are ignored.

The new ps2smbus driver gets a little bit more complex, especially because
of kseriod. We need to wait for the .connect() of the serio driver to end
and have a stable PS/2 connection before starting the smbus work.

>From the tests I made today, it seems reliable: cold boot & suspend/resume
works, various "rescan" with drvctl with different synaptics_intertouch
parameter state work too.

I hope you'll find this solution acceptable.

Cheers,
Benjamin

Benjamin Tissoires (3):
  input: serio - allow others to specify a driver for a serio device
  Input: synaptics - allocate a Synaptics Intertouch device
  Input: add a PS/2 to SMBus platform module

 drivers/input/misc/Kconfig      |  11 ++
 drivers/input/misc/Makefile     |   1 +
 drivers/input/misc/ps2_smbus.c  | 382 ++++++++++++++++++++++++++++++++++++++++
 drivers/input/mouse/synaptics.c | 106 +++++++++++
 drivers/input/mouse/synaptics.h |   1 +
 drivers/input/rmi4/Kconfig      |   1 +
 drivers/input/serio/serio.c     |  20 +++
 include/linux/serio.h           |   5 +
 8 files changed, 527 insertions(+)
 create mode 100644 drivers/input/misc/ps2_smbus.c

-- 
2.9.3


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2017-02-17 11:46 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-16 17:50 [PATCH v2 0/3] Bind RMI4 over SMBus from PS/2 Benjamin Tissoires
2017-02-16 17:50 ` [PATCH v2 1/3] input: serio - allow others to specify a driver for a serio device Benjamin Tissoires
2017-02-16 17:50 ` [PATCH v2 2/3] Input: synaptics - allocate a Synaptics Intertouch device Benjamin Tissoires
2017-02-16 21:44   ` kbuild test robot
2017-02-16 21:44   ` [PATCH] Input: fix ptr_ret.cocci warnings kbuild test robot
2017-02-16 17:51 ` [PATCH v2 3/3] Input: add a PS/2 to SMBus platform module Benjamin Tissoires
2017-02-16 22:06   ` kbuild test robot
2017-02-17 11:46 ` [PATCH v2 4/3] Input: ps2smbus - force PS/2 disable before SMBus gets resumed Benjamin Tissoires

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).