From patchwork Wed Nov 4 01:29:25 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Doug Anderson X-Patchwork-Id: 1393583 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=23.128.96.18; helo=vger.kernel.org; envelope-from=devicetree-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=fHKmoVtG; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by ozlabs.org (Postfix) with ESMTP id 4CQpx21Ly0z9sTL for ; Wed, 4 Nov 2020 12:29:58 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729876AbgKDB35 (ORCPT ); Tue, 3 Nov 2020 20:29:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37578 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725769AbgKDB3z (ORCPT ); Tue, 3 Nov 2020 20:29:55 -0500 Received: from mail-pl1-x643.google.com (mail-pl1-x643.google.com [IPv6:2607:f8b0:4864:20::643]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9B14CC0401C2 for ; Tue, 3 Nov 2020 17:29:53 -0800 (PST) Received: by mail-pl1-x643.google.com with SMTP id b12so9488987plr.4 for ; Tue, 03 Nov 2020 17:29:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=aMTaSm89kT5TDRihafmXN8fpXabsdYs0qDU43+JwbS0=; b=fHKmoVtGYK4sREwOdOU4Lct3hnbiNwEW+GYbl98M7c1mvS5wdl8AE21fkfFF0sd0FZ C2PVeaBbQw/o9686zJwDajQOuToUyje3hR7IdmOUKKuOhsdEIXFfQkVk5CNd+5h2cYJj ANOgtGhRljNjiHSSOrTiMGFLQTcQDPiuAQ1t4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=aMTaSm89kT5TDRihafmXN8fpXabsdYs0qDU43+JwbS0=; b=PGTf1SuSWs5/0GjmNjy+0mPV9XOGlWRUA6ftTnDhfZa9X7gASMKIk7CpfpSycZvAlo bANSbG5EGM/w7E2NCvb5AK+t+cEZQaj4C90pL0v5AFMQZ0qFncowJ+MYUDnfe0CbXUxa tXBcjHfA6YaiQeoPbsF8mpk32wbxZQyhwTqHGogxmmCjRwRvkxNHo3kbOQBi6ZjQSYCL SGxGXeoGqcwp+PXzPgFi/I/aPMquQFNj9hYFVuZStMuLdFtABJxIgP1ma2VYhNUZj9A4 hzQ/Aj87V4OMVZNVMNzwMF0MU5FPszjpbn3bhRw/pZsZHe4ZpX1x/FPzYUrQN6qdTCcI zsVA== X-Gm-Message-State: AOAM533J6kxURiTEkFmf4pof6d4PSquqGDZAlSdfzCpdyhUeJe8Pymqy boYY/G78bx6ZutbTQpaRD7XbdA== X-Google-Smtp-Source: ABdhPJxCpGL3gLtUMaj65HaRL8OI22vjNZDD93pNWHBqdtvQvNhwYi5Rfdlm5Nm68IFVufqOv1Misg== X-Received: by 2002:a17:902:654a:b029:d5:e98f:2436 with SMTP id d10-20020a170902654ab02900d5e98f2436mr27621181pln.21.1604453393066; Tue, 03 Nov 2020 17:29:53 -0800 (PST) Received: from tictac2.mtv.corp.google.com ([2620:15c:202:1:42b0:34ff:fe3d:58e6]) by smtp.gmail.com with ESMTPSA id m3sm347424pjv.52.2020.11.03.17.29.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Nov 2020 17:29:52 -0800 (PST) From: Douglas Anderson To: jkosina@suse.cz, benjamin.tissoires@redhat.com, gregkh@linuxfoundation.org, Dmitry Torokhov Cc: linux-input@vger.kernel.org, swboyd@chromium.org, andrea@borgia.bo.it, kai.heng.feng@canonical.com, hdegoede@redhat.com, robh+dt@kernel.org, Douglas Anderson , Aaron Ma , Anson Huang , Bjorn Andersson , Catalin Marinas , Geert Uytterhoeven , Jiri Kosina , Krzysztof Kozlowski , Li Yang , Masahiro Yamada , Michael Walle , Olof Johansson , Pavel Balan , Shawn Guo , Vinod Koul , Will Deacon , Xiaofei Tan , You-Sheng Yang , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v4 0/4] HID: i2c-hid: Reorganize to allow supporting goodix,gt7375p Date: Tue, 3 Nov 2020 17:29:25 -0800 Message-Id: <20201104012929.3850691-1-dianders@chromium.org> X-Mailer: git-send-email 2.29.1.341.ge80a0c044ae-goog MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org The goal of this series is to support the Goodix GT7375P touchscreen. This touchscreen is special because it has power sequencing requirements that necessitate driving a reset GPIO. To do this, we totally rejigger the way i2c-hid is organized so that it's easier to jam the Goodix support in there. This series was: - Tested on a device that uses normal i2c-hid - Tested on a device that pretended to have a Goodix i2c-hid device on it. I don't have a device with GT7375P setup yet and the person who has been testing remotely for me hasn't tested this exact series. I think it should still work, though. - NOT tested on any ACPI devices (just compile tested). There are probably still small nits, but hopefully we're getting closer to something people like. Changes in v4: - Fully rejigger so ACPI and OF are full subclasses. - ("arm64: defconfig: Update config names for i2c-hid rejigger") new for v4. - Totally redid based on the new subclass system. Changes in v3: - Rework to use subclassing. - Removed Benjamin as a maintainer. - Fixed compatible in example. - Updated description. - Rework to use subclassing. Changes in v2: - Use a separate compatible string for this new touchscreen. - Get timings based on the compatible string. - ("dt-bindings: HID: i2c-hid: Introduce bindings for the Goodix GT7375P") new in v2. Douglas Anderson (4): HID: i2c-hid: Reorganize so ACPI and OF are subclasses arm64: defconfig: Update config names for i2c-hid rejigger dt-bindings: HID: i2c-hid: Introduce bindings for the Goodix GT7375P HID: i2c-hid: Introduce goodix-i2c-hid as a subclass of i2c-hid .../bindings/input/goodix,gt7375p.yaml | 63 +++++ arch/arm64/configs/defconfig | 3 +- drivers/hid/Makefile | 2 +- drivers/hid/i2c-hid/Kconfig | 47 +++- drivers/hid/i2c-hid/Makefile | 6 +- drivers/hid/i2c-hid/i2c-hid-acpi.c | 167 ++++++++++++ drivers/hid/i2c-hid/i2c-hid-core.c | 253 +++--------------- drivers/hid/i2c-hid/i2c-hid-of-goodix.c | 120 +++++++++ drivers/hid/i2c-hid/i2c-hid-of.c | 149 +++++++++++ drivers/hid/i2c-hid/i2c-hid.h | 24 ++ include/linux/platform_data/i2c-hid.h | 41 --- 11 files changed, 607 insertions(+), 268 deletions(-) create mode 100644 Documentation/devicetree/bindings/input/goodix,gt7375p.yaml create mode 100644 drivers/hid/i2c-hid/i2c-hid-acpi.c create mode 100644 drivers/hid/i2c-hid/i2c-hid-of-goodix.c create mode 100644 drivers/hid/i2c-hid/i2c-hid-of.c delete mode 100644 include/linux/platform_data/i2c-hid.h