From: "Life is hard, and then you die" <ronald@innovation.ch>
To: Henrik Rydberg <rydberg@bitmath.org>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>,
Lukas Wunner <lukas@wunner.de>,
Federico Lorenzi <federico@travelground.com>,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
linux-input@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 0/2] Add Apple SPI keyboard and trackpad driver
Date: Tue, 5 Feb 2019 05:14:30 -0800 [thread overview]
Message-ID: <20190205131430.GA4225@innovation.ch> (raw)
In-Reply-To: <cdca5121-4f2b-2f74-8a1c-63fda385ee6f@bitmath.org>
Hi Henrik,
On Mon, Feb 04, 2019 at 09:47:55PM +0100, Henrik Rydberg wrote:
> Hi Ronald,
>
> > This changeset adds a driver for the SPI keyboard and trackpad on recent
> > MacBook's and MacBook Pro's. The driver has seen a fair amount of use
> > over the last 2 years (basically anybody running linux on these
> > machines), with only relatively small changes in the last year or so.
> > For those interested, the driver development has been hosted at
> > https://github.com/cb22/macbook12-spi-driver/ (as well as my clone at
> > https://github.com/roadrunner2/macbook12-spi-driver/).
> >
> > The first patch is just a placeholder for now and is provided in case
> > somebody wants to compile the driver while it's being reviewed here; the
> > real patch has been submitted to dri-devel and is being discussed there,
> > with the intent/hope that I can get an Ack and permission to merge it
> > through the input subsystem tree here as part of this patch series.
>
> Great to see this upstream. The patch obviously has a lot in common with the
> previous keyboard and touchpad drivers; foremost this is a change of
> transport protocol and not functionality. That said, the code is compact and
> clear enough to make it hard to motivate any major effort to share more of
> existing code, at least initially.
Yes, some pieces have been copy-pasted from the existing drivers.
However, when I last reviewed those pieces they seemed a bit small and
I had a hard time seeing how to share them usefully at least for some
of it.
The pieces in question on the keyboard side (from the hid-apple
driver) are really the 'applespi_fn_codes' and 'apple_iso_keyboard'
tables, the corresponding 'applespi_find_translation()' function, and
some bits in the of the 'applespi_code_to_key()' function. Pulling out
the tables and maybe the applespi_find_translation() function into a
common include might be a simple change and take care of most of the
shared stuff.
A few lines were also lifted from the bcm5974 driver, basically the
'struct tp_finger' and the 'report_tp_state()' function. Though here
it's even harder to see how to share, as there are various small
differences scattered throughout the implemenation of that function.
> Barring detailed comments that are likely
> to produce new revisions, this looks like really good work.
Thank you for looking at this.
Cheers,
Ronald
prev parent reply other threads:[~2019-02-05 13:14 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-04 8:19 [PATCH 0/2] Add Apple SPI keyboard and trackpad driver Ronald Tschalär
2019-02-04 8:19 ` [PATCH 1/2] drm/bridge: sil_sii8620: depend on INPUT instead of selecting it Ronald Tschalär
2019-02-04 8:19 ` [PATCH 2/2] Input: add Apple SPI keyboard and trackpad driver Ronald Tschalär
2019-02-04 18:20 ` kbuild test robot
2019-02-04 18:44 ` kbuild test robot
2019-02-05 10:21 ` Dan Carpenter
2019-02-05 13:15 ` Life is hard, and then you die
2019-02-05 11:45 ` Andy Shevchenko
2019-02-05 13:18 ` Life is hard, and then you die
2019-02-05 15:32 ` Andy Shevchenko
2019-02-06 20:22 ` Andy Shevchenko
2019-02-10 11:18 ` Life is hard, and then you die
2019-02-16 0:44 ` Andy Shevchenko
2019-02-18 9:08 ` Life is hard, and then you die
2019-02-18 12:00 ` Andy Shevchenko
2019-02-04 20:47 ` [PATCH 0/2] Add " Henrik Rydberg
2019-02-05 13:14 ` Life is hard, and then you die [this message]
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=20190205131430.GA4225@innovation.ch \
--to=ronald@innovation.ch \
--cc=andriy.shevchenko@linux.intel.com \
--cc=dmitry.torokhov@gmail.com \
--cc=federico@travelground.com \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lukas@wunner.de \
--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).