From patchwork Tue Dec 11 11:23:52 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Saenz Julienne X-Patchwork-Id: 10723675 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 C29E213AF for ; Tue, 11 Dec 2018 11:24:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B09742A589 for ; Tue, 11 Dec 2018 11:24:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A2F1C2A5B4; Tue, 11 Dec 2018 11:24:37 +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=-7.9 required=2.0 tests=BAYES_00,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 3F7882A589 for ; Tue, 11 Dec 2018 11:24:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726375AbeLKLYg (ORCPT ); Tue, 11 Dec 2018 06:24:36 -0500 Received: from mx2.suse.de ([195.135.220.15]:42002 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726170AbeLKLYg (ORCPT ); Tue, 11 Dec 2018 06:24:36 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id D9B73AE6C; Tue, 11 Dec 2018 11:24:33 +0000 (UTC) From: Nicolas Saenz Julienne To: linux-kernel@vger.kernel.org Cc: linux-rpi-kernel@lists.infradead.org, stefan.wahren@i2se.com, eric@anholt.net, agraf@suse.de, afaerber@suse.com, Nicolas Saenz Julienne , Dmitry Torokhov , Masanari Iida , Rob Herring , Hans de Goede , Zhu Yi , Eugen Hristev , Corentin Labbe , Hans-Christian Noren Egtvedt , Mark Jonas , Heiko Schocher , linux-input@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH v2 0/2] input: driver for RPi's official 7" touchscreen Date: Tue, 11 Dec 2018 12:23:52 +0100 Message-Id: <20181211112408.9524-1-nsaenzjulienne@suse.de> X-Mailer: git-send-email 2.19.2 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 small series adds support for Raspberry pi's 7" touchscreen. Which alongside with the backlight driver are the last devices needed to have a functional touchscreen upstream. With this setup the board's VC4 firmware takes care of communicating with the touch chip and provides data though a shared memory area provided by the driver. The driver takes care of polling the firmware whenever at around 60Hz since there is no interrupt line available. The 1.0 revision of the touchscreen is based on the ft5426 chip. Technically, with some changes in edt-ft54x4.c we should be able to access the data directly through I2C. Yet this bus is meant to be owned by RPi's firmware and might access it anytime. For example, to configure RPi's camera device. As sharing the bus master interface is not possible a series of alternatives have been tested unsuccessfully [1]. It seems that we'll be unable to access the chip directly in a "clean" way which leaves us with this firmware based solution. The driver was rewritten based on the one available on the downstream Raspberry Pi kernel tree: https://github.com/raspberrypi/linux/. This series is based on v4.20-rc6 and was tested on a RPi 3 B+. Changelog v1 -> v2: - Remove all references to RPi3 - Spelling errors - Rename config string - Reorder devm_add_action_or_reset() - Remove __set_bit(EV* functions - Remove INPUT_MT_POINTER flag - Add missing header files - Create define to invalidate npointers - Fix commit ordering and titles RFC -> PATCH: - Better dependencies check in Kconfig - Add SPDX tag - Use polled input device API - Use input_mt_sync_frame() - Drop reference from dt node in probe - Use devm where possible - Small cosmetic changes [1] https://lists.infradead.org/pipermail/linux-rpi-kernel/2018-December/008444.html === Nicolas Saenz Julienne (2): dt-bindings: input: Add Raspberry Pi Touchscreen input: add official Raspberry Pi's touchscreen driver .../touchscreen/raspberrypi,firmware-ts.txt | 26 ++ drivers/input/touchscreen/Kconfig | 12 + drivers/input/touchscreen/Makefile | 1 + drivers/input/touchscreen/raspberrypi-ts.c | 227 ++++++++++++++++++ 4 files changed, 266 insertions(+) create mode 100644 Documentation/devicetree/bindings/input/touchscreen/raspberrypi,firmware-ts.txt create mode 100644 drivers/input/touchscreen/raspberrypi-ts.c