From: Benjamin Tissoires <benjamin.tissoires@redhat.com>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>,
Andrew Duggan <aduggan@synaptics.com>
Cc: linux-kernel@vger.kernel.org, linux-input@vger.kernel.org
Subject: [PATCH v2 0/3] Bind RMI4 over SMBus from PS/2
Date: Thu, 16 Feb 2017 18:50:57 +0100 [thread overview]
Message-ID: <20170216175100.1668-1-benjamin.tissoires@redhat.com> (raw)
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
next reply other threads:[~2017-02-16 17:51 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-16 17:50 Benjamin Tissoires [this message]
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
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=20170216175100.1668-1-benjamin.tissoires@redhat.com \
--to=benjamin.tissoires@redhat.com \
--cc=aduggan@synaptics.com \
--cc=dmitry.torokhov@gmail.com \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@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).