From patchwork Mon Apr 22 03:12:48 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: 10910619 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 A5073922 for ; Mon, 22 Apr 2019 03:20:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 93724284C5 for ; Mon, 22 Apr 2019 03:20:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 826B528649; Mon, 22 Apr 2019 03:20:04 +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=unavailable 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 597DB284C5 for ; Mon, 22 Apr 2019 03:20:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726619AbfDVDUC (ORCPT ); Sun, 21 Apr 2019 23:20:02 -0400 Received: from chill.innovation.ch ([216.218.245.220]:49770 "EHLO chill.innovation.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726210AbfDVDUC (ORCPT ); Sun, 21 Apr 2019 23:20:02 -0400 Received: from localhost (localhost [127.0.0.1]) by chill.innovation.ch (Postfix) with ESMTP id 063DE640143; Sun, 21 Apr 2019 20:12:57 -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 XzU6_h9T9Oky; Sun, 21 Apr 2019 20:12:55 -0700 (PDT) From: =?utf-8?q?Ronald_Tschal=C3=A4r?= DKIM-Filter: OpenDKIM Filter v2.10.3 chill.innovation.ch EED2E6400F4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=innovation.ch; s=default; t=1555902775; bh=13r71eV9Fi2rHcGMF2vHI/dTbBjcMBYsg02e6YazHxM=; h=From:To:Cc:Subject:Date:From; b=cpkXfM1OXhhNPxX2elcs1kfClUuBDytOGQZ1OQyz8/5NJ1yl9nXb4XfLaR+s1BTaZ Kl8E3/j0weM0YOGu+eIeQMr7S0M/HLSpafSA4yAsslTSt2TwvsThCWlQk0GN3anEYU ZFCwKUO3O2v+8KlDHOySxZvtR1O8QW7TuvbJjPAAdlXN8rOPBX6kjOj77abL/srqzG tsph5+01QkisZbwhfD2rmY0CbrIsB26+kaSwiNyua0FigLiRRG6g1NqlkscvnxW0b2 0JeNHlpJW6SedBr1F83/0L9XhHA4JlbB4pbaOgPB1PNzZkZAWwJzKHbUxNIB+ZdFXU tHYIeIvAtiPUQ== To: Jiri Kosina , Benjamin Tissoires , Jonathan Cameron , Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald-Stadler , Lee Jones Cc: linux-input@vger.kernel.org, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 0/3] Apple iBridge support Date: Sun, 21 Apr 2019 20:12:48 -0700 Message-Id: <20190422031251.11968-1-ronald@innovation.ch> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Sender: linux-iio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 2016 and 2017 MacBook Pro's have a T1 chip that drives the Touch Bar, ambient light sensor, webcam, and fingerprint sensor; this shows up as an iBridge USB device in the system. These patches provide initial support for the Touch Bar and ALS - the webcam is already handled by existing drivers, and no information is currently known on how to access the fingerprint sensor (other than it's apparently via one of the extra interfaces available in the OS X USB configuration). One thing of note here is that both the ALS and (some of) the Touch Bar functionality are exposed via the same USB interface (and hence same hid_device), so both drivers need to share this device. This necessitated creating a demux hid driver in the mfd driver to which multiple hid devices can be attached, and implied not being able to make use of the existing hid-sensor-als driver. Ronald Tschalär (3): mfd: apple-ibridge: Add Apple iBridge MFD driver. HID: apple-ib-tb: Add driver for the Touch Bar on MacBook Pro's. iio: light: apple-ib-als: Add driver for ALS on iBridge chip. drivers/hid/Kconfig | 10 + drivers/hid/Makefile | 1 + drivers/hid/apple-ib-tb.c | 1288 +++++++++++++++++++++++++++++ drivers/iio/light/Kconfig | 12 + drivers/iio/light/Makefile | 1 + drivers/iio/light/apple-ib-als.c | 694 ++++++++++++++++ drivers/mfd/Kconfig | 15 + drivers/mfd/Makefile | 1 + drivers/mfd/apple-ibridge.c | 883 ++++++++++++++++++++ include/linux/mfd/apple-ibridge.h | 39 + 10 files changed, 2944 insertions(+) create mode 100644 drivers/hid/apple-ib-tb.c create mode 100644 drivers/iio/light/apple-ib-als.c create mode 100644 drivers/mfd/apple-ibridge.c create mode 100644 include/linux/mfd/apple-ibridge.h