From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: "Ronald Tschalär" <ronald@innovation.ch>
Cc: Henrik Rydberg <rydberg@bitmath.org>,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
Andrzej Hajda <a.hajda@samsung.com>,
Inki Dae <inki.dae@samsung.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Lukas Wunner <lukas@wunner.de>,
Federico Lorenzi <federico@travelground.com>,
Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
linux-input@vger.kernel.org, dri-devel@lists.freedesktop.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v7 2/2] Input: add Apple SPI keyboard and trackpad driver.
Date: Tue, 16 Jul 2019 20:47:44 +0200 [thread overview]
Message-ID: <20190716184744.GC1140@penguin> (raw)
In-Reply-To: <20190419081926.13567-3-ronald@innovation.ch>
Hi Ronald,
On Fri, Apr 19, 2019 at 01:19:26AM -0700, Ronald Tschalär wrote:
> The keyboard and trackpad on recent MacBook's (since 8,1) and
> MacBookPro's (13,* and 14,*) are attached to an SPI controller instead
> of USB, as previously. The higher level protocol is not publicly
> documented and hence has been reverse engineered. As a consequence there
> are still a number of unknown fields and commands. However, the known
> parts have been working well and received extensive testing and use.
>
> In order for this driver to work, the proper SPI drivers need to be
> loaded too; for MB8,1 these are spi_pxa2xx_platform and spi_pxa2xx_pci;
> for all others they are spi_pxa2xx_platform and intel_lpss_pci. For this
> reason enabling this driver in the config implies enabling the above
> drivers.
I applied the patch (but changed __u8 to u8 as that's preferred form for
inside the kernel, and added error handling for input_mt_init_slots) but
we need to do some more work on the driver.
My main issue is with registering touchpad device asynchronously,
independent from the probe() function. This means (as far as I can tell)
that any error is not really appropriately handled (as by that time it
is too late to signal errors from probe()) and devm functions are not
going to be called, leaving remnants of the resources in memory on
driver unload. It also brings in issues with suspend/resume (what
happens if you suspend really quickly while device is not registered
yet?), etc, etc.
Can we switch to calling DEV_INFO command synchronously from probe()? If
we are concerned about it taking relatively long time we can always
annotate the driver as having probe_type = PROBE_PREFER_ASYNCHRONOUS so
that other devices can be probed simultaneously with applespi.
Thanks.
--
Dmitry
next prev parent reply other threads:[~2019-07-16 18:47 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-19 8:19 [PATCH v7 0/2] Add Apple SPI keyboard and trackpad driver Ronald Tschalär
2019-04-19 8:19 ` [PATCH v7 1/2] drm/bridge: sil_sii8620: make remote control optional Ronald Tschalär
[not found] ` <CGME20190702135052eucas1p11e2621af0514505789c7947b84cf133c@eucas1p1.samsung.com>
2019-07-02 13:50 ` Andrzej Hajda
2019-07-03 6:39 ` Life is hard, and then you die
2019-07-15 18:04 ` Dmitry Torokhov
2019-07-15 20:00 ` Dmitry Torokhov
2019-04-19 8:19 ` [PATCH v7 2/2] Input: add Apple SPI keyboard and trackpad driver Ronald Tschalär
2019-07-16 18:47 ` Dmitry Torokhov [this message]
2019-07-17 10:24 ` Life is hard, and then you die
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=20190716184744.GC1140@penguin \
--to=dmitry.torokhov@gmail.com \
--cc=a.hajda@samsung.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=federico@travelground.com \
--cc=gregkh@linuxfoundation.org \
--cc=inki.dae@samsung.com \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lukas@wunner.de \
--cc=ronald@innovation.ch \
--cc=rydberg@bitmath.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).