From patchwork Wed Mar 27 01:48:03 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Life is hard, and then you die" X-Patchwork-Id: 10872377 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6EBF5922 for ; Wed, 27 Mar 2019 01:48:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 586E428CEF for ; Wed, 27 Mar 2019 01:48:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4C7C828D5E; Wed, 27 Mar 2019 01:48:19 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CD47C28CEF for ; Wed, 27 Mar 2019 01:48:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732432AbfC0BsS (ORCPT ); Tue, 26 Mar 2019 21:48:18 -0400 Received: from chill.innovation.ch ([216.218.245.220]:48314 "EHLO chill.innovation.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731934AbfC0BsR (ORCPT ); Tue, 26 Mar 2019 21:48:17 -0400 Received: from localhost (localhost [127.0.0.1]) by chill.innovation.ch (Postfix) with ESMTP id 3862464013F; Tue, 26 Mar 2019 18:48:17 -0700 (PDT) X-Virus-Scanned: amavisd-new at Received: from chill.innovation.ch ([127.0.0.1]) by localhost (chill.innovation.ch [127.0.0.1]) (amavisd-new, port 10024) with LMTP id G_IDRkml_2Eo; Tue, 26 Mar 2019 18:48:15 -0700 (PDT) From: =?utf-8?q?Ronald_Tschal=C3=A4r?= DKIM-Filter: OpenDKIM Filter v2.10.3 chill.innovation.ch DBB6E640114 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=innovation.ch; s=default; t=1553651295; bh=jKJAI4BVg7Agjkv6HfZrBiBPJ9+GI2U7E3AkTvssGmA=; h=From:To:Cc:Subject:Date:From; b=R1p1fRucG2nLlZZHzhy4Ovm2Fb98NXzo3HKFfhJzXL+H5oOBuJa1w8nZhv/RRUFnn DxNHoHJHTbgRKa6HW07gR8K94caP+h9GzRBqm/77+BhTginGSeOR8XLwnld8xw9A6i DB1gK15N5hTtop7/yS8z6b5g4VKuOExtEIFy9vZbfrwpvpHv8dis16s9hHC8+vdSD8 r5wHhqpeMlpahP+Kbti29pEmjHlHTrSGKuCJeznC8DJBi4cdMP5Y8MBMGdq8O7ZAEL uzcruqePoCh7xWTdnzE1wymP3pRad9GD7CJOp5bAC2nJIZTcAwWWiNOkOz0O22xoDF WeH/fsSmJmNsA== To: Dmitry Torokhov , Henrik Rydberg , Andy Shevchenko , Sergey Senozhatsky , Steven Rostedt , Greg Kroah-Hartman , "Rafael J. Wysocki" Cc: Lukas Wunner , Federico Lorenzi , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 0/4] Add Apple SPI keyboard and trackpad driver Date: Tue, 26 Mar 2019 18:48:03 -0700 Message-Id: <20190327014807.7472-1-ronald@innovation.ch> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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. The second and third patches add a new dev_print_hex_dump() helper as the dev_xxx() analog of print_hex_dump(). The fourth patch finally contains the new applespi driver. Changes in v3: Applied all feedback from review by Andy Shevchenko, including: - move dev_print_hex_dump() to driver core - clean up keyboard modifier bits testing/modifying - remove DEV() macro - minor style issues The full set of changes to applespi can be viewed at https://github.com/roadrunner2/macbook12-spi-driver/ as individual commits f832caa..3a6262e in the upstreaming-review branch. Ronald Tschalär (4): drm/bridge: sil_sii8620: depend on INPUT instead of selecting it. lib/hexdump.c: factor out generic hexdump formatting for reuse. driver core: add dev_print_hex_dump() logging function. Input: add Apple SPI keyboard and trackpad driver. drivers/base/core.c | 43 + drivers/gpu/drm/bridge/Kconfig | 2 +- drivers/input/keyboard/Kconfig | 15 + drivers/input/keyboard/Makefile | 1 + drivers/input/keyboard/applespi.c | 1988 +++++++++++++++++++++++++++++ include/linux/device.h | 15 + include/linux/printk.h | 12 + lib/hexdump.c | 95 +- 8 files changed, 2146 insertions(+), 25 deletions(-) create mode 100644 drivers/input/keyboard/applespi.c