From patchwork Fri Oct 23 23:22:52 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Doug Anderson X-Patchwork-Id: 1387013 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=lSvoOZ0B; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by ozlabs.org (Postfix) with ESMTP id 4CJ0f82PDLz9sTc for ; Sat, 24 Oct 2020 10:23:28 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754523AbgJWXX0 (ORCPT ); Fri, 23 Oct 2020 19:23:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56610 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754377AbgJWXX0 (ORCPT ); Fri, 23 Oct 2020 19:23:26 -0400 Received: from mail-pl1-x644.google.com (mail-pl1-x644.google.com [IPv6:2607:f8b0:4864:20::644]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 55865C0613D2 for ; Fri, 23 Oct 2020 16:23:26 -0700 (PDT) Received: by mail-pl1-x644.google.com with SMTP id t4so1818968plq.13 for ; Fri, 23 Oct 2020 16:23:26 -0700 (PDT) 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=OfVT8h9wTg39Kkdz/cTYNaLpjH3zKVjSrnAnLMVOwP0=; b=lSvoOZ0BrlQ2aaIRwKZoX+KgWKXDVGWOc2TQ+iLwXjyTbcvzz3q2hQ4sBPZQ3+2uPM Uyn4Wa+ret40vchMTDYMZw7LPMi8Jd3+Qvtf5yohR7zQCgwKssECfRopec1uvE9luaZx Cw+xk6X3RgJ9vqDLMPha6RpDTeasaxHj/FkA4= 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=OfVT8h9wTg39Kkdz/cTYNaLpjH3zKVjSrnAnLMVOwP0=; b=poKTdWwYP8D1fryjAvJwQ50+JHDlseetVq5LhtjoeJw0kbJjaapIKtQkd6MJuI6A3d 8jvzq7ArmO+I3c/q0KnQo0u5VoA8mgQOmixhPOCahOZ8ebGhwcGubLhCM34WBOeoKUF/ LPs6hNvgIW7NPZc3jFgfoqXXY7vg05e74gPRL9KcREqIb3VsQPGs3bgaFAWdJ7wIo6cZ Jv2tV8DUTo2CTI2cDzysSgiexW9BrR7QuZXjpD3lfuJAtq3dzj01yM4XIMW8CjSndFkb r/TRQxmFc4icPpYc9lGB1MTOrrX2CBX6U5I6RM34dEJRvYE9x6HfAPwn1SYWNY7clwdF 5ImA== X-Gm-Message-State: AOAM530r7Grcz3QA4l63xoSLReGGkzNGlijdQAMNra3Hg2UuAEQ+fSpb RisjapKUp4FUPtUZuY0u2agufw== X-Google-Smtp-Source: ABdhPJxUQtoeCUCQzbsz0jKCxEwV0OYgkw3J7AFEwHa0RFT0DIhHaQxFc+KB42j7kNQWqOCOQ90AYQ== X-Received: by 2002:a17:90a:66cc:: with SMTP id z12mr5453371pjl.145.1603495405901; Fri, 23 Oct 2020 16:23:25 -0700 (PDT) Received: from tictac2.mtv.corp.google.com ([2620:15c:202:1:42b0:34ff:fe3d:58e6]) by smtp.gmail.com with ESMTPSA id v17sm3789476pjy.40.2020.10.23.16.23.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Oct 2020 16:23:25 -0700 (PDT) From: Douglas Anderson To: jkosina@suse.cz, benjamin.tissoires@redhat.com, gregkh@linuxfoundation.org Cc: andrea@borgia.bo.it, kai.heng.feng@canonical.com, linux-input@vger.kernel.org, swboyd@chromium.org, hdegoede@redhat.com, Douglas Anderson , Dmitry Torokhov , Rob Herring , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 1/3] dt-bindings: HID: i2c-hid: Label this binding as deprecated Date: Fri, 23 Oct 2020 16:22:52 -0700 Message-Id: <20201023162220.v2.1.I45b53fe84e2215946f900f5b28bab1aa9d029ac7@changeid> X-Mailer: git-send-email 2.29.0.rc1.297.gfa9743e501-goog MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org As pointed out by Rob Herring [1], we should have a device-specific compatible string. This means people shouldn't be using the "i2c-over-hid" compatible string anymore, or at least not without a more specific compatible string before it. Specifically: 1. For newly added devices we should just have the device-specific device string (no "hid-over-i2c" fallback) and infer the timings and hid-descr-addr from there. 2. If there's a need for a device tree to be backward compatible, we should list the device-specific compatible string and add the "hid-over-i2c" fallback and the various timings. [1] https://lore.kernel.org/r/20201019211036.GA3595039@bogus Signed-off-by: Douglas Anderson --- Changes in v2: - ("dt-bindings: HID: i2c-hid: Label this binding as deprecated") new in v2. Documentation/devicetree/bindings/input/hid-over-i2c.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Documentation/devicetree/bindings/input/hid-over-i2c.txt b/Documentation/devicetree/bindings/input/hid-over-i2c.txt index c76bafaf98d2..733a5f053280 100644 --- a/Documentation/devicetree/bindings/input/hid-over-i2c.txt +++ b/Documentation/devicetree/bindings/input/hid-over-i2c.txt @@ -1,5 +1,8 @@ * HID over I2C Device-Tree bindings +WARNING: this binding is deprecated. Instead of using this, create specific +bindings for each hid-over-i2c device. + HID over I2C provides support for various Human Interface Devices over the I2C bus. These devices can be for example touchpads, keyboards, touch screens or sensors. From patchwork Fri Oct 23 23:22:53 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Doug Anderson X-Patchwork-Id: 1387014 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=mp/78y+G; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by ozlabs.org (Postfix) with ESMTP id 4CJ0fK2xsGz9sTf for ; Sat, 24 Oct 2020 10:23:37 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758585AbgJWXX2 (ORCPT ); Fri, 23 Oct 2020 19:23:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56620 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758565AbgJWXX1 (ORCPT ); Fri, 23 Oct 2020 19:23:27 -0400 Received: from mail-pf1-x443.google.com (mail-pf1-x443.google.com [IPv6:2607:f8b0:4864:20::443]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D1E95C0613D2 for ; Fri, 23 Oct 2020 16:23:27 -0700 (PDT) Received: by mail-pf1-x443.google.com with SMTP id e7so2678010pfn.12 for ; Fri, 23 Oct 2020 16:23:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=d8xAtwDVMhNalLtWYZPCO9wz9pojtecxgYkkAm7a2YE=; b=mp/78y+GJ0rc6wdkGEh20lyDMfXAtkv4947P3Lkr8AilrLo9WP0oBIeknsHvQAe0el HEcgpmS7KrMrOHe9XqHuqCHhRnQy2hZnwyDji2aXxGt8lRYiA+RCr4HDTDe3/WMb5AmO wEuDDF+XTo2+MHfz9KDQBACMF+CVBN+1nmVWQ= 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=d8xAtwDVMhNalLtWYZPCO9wz9pojtecxgYkkAm7a2YE=; b=QSoqhO+KLkHlBS9K0vtkUNKk6t3Oq6NnKTUWVL6+Oy/gcYeUHd2IpsUHYZ33T6D4g0 e5hgZ97jAq8H5RSIKGEUyTHGiP8EoPc7zskhoFzVMZZLy5GmixyJkRNvG2zM/4WpKSoJ FJPscS9+q4MAJtO1eQoykm1BZjElBUeNwAfutOMRLAP0AQKMuXvi96C+wvCvg59HedBI BM6GS/Pf7OEusQVgWn3EmtLZZprYepC8J4Z7b2uSTPdU1LLbvilozCJYvAU27zoqcTyP teVSe3LsKxP8DlLgYnujpJfe6wYu6bm60qXMNNjLpYWBXsywVVBH4c4ZLXLXHfJNXW7W dvuw== X-Gm-Message-State: AOAM531FRW19qDnnniHl0oPreop5UsUVB1SHm+59dJkTzQS29E58idfF 7L1xsS1ZpkWKt9ra+Mz3ivqSuQ== X-Google-Smtp-Source: ABdhPJx1sO6DuIlMnW+hVd4EBOhapt9SdD8UJIqqO1NSna53HQ08BKrQi3asON0KdwrvPVKG6PMS1w== X-Received: by 2002:a63:c55:: with SMTP id 21mr3663254pgm.392.1603495407402; Fri, 23 Oct 2020 16:23:27 -0700 (PDT) Received: from tictac2.mtv.corp.google.com ([2620:15c:202:1:42b0:34ff:fe3d:58e6]) by smtp.gmail.com with ESMTPSA id v17sm3789476pjy.40.2020.10.23.16.23.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Oct 2020 16:23:26 -0700 (PDT) From: Douglas Anderson To: jkosina@suse.cz, benjamin.tissoires@redhat.com, gregkh@linuxfoundation.org Cc: andrea@borgia.bo.it, kai.heng.feng@canonical.com, linux-input@vger.kernel.org, swboyd@chromium.org, hdegoede@redhat.com, Douglas Anderson , Dmitry Torokhov , Rob Herring , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 2/3] dt-bindings: HID: i2c-hid: Introduce bindings for the Goodix GT7375P Date: Fri, 23 Oct 2020 16:22:53 -0700 Message-Id: <20201023162220.v2.2.Ibb28033c81d87fcc13a6ba28c6ea7ac154d65f93@changeid> X-Mailer: git-send-email 2.29.0.rc1.297.gfa9743e501-goog In-Reply-To: <20201023162220.v2.1.I45b53fe84e2215946f900f5b28bab1aa9d029ac7@changeid> References: <20201023162220.v2.1.I45b53fe84e2215946f900f5b28bab1aa9d029ac7@changeid> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org This adds new bindings for the Goodix GT7375P touchscreen. While this touchscreen works with generic "i2c-over-hid", the current advice is to give it its own compatible string. The cleanest way to do this is to give it its own bindings. Among other things, this has the advantage that we can list the two possible i2c addresses for this device, which gives extra checking. Signed-off-by: Douglas Anderson --- Changes in v2: - ("dt-bindings: HID: i2c-hid: Introduce bindings for the Goodix GT7375P") new in v2. .../bindings/input/goodix,gt7375p.yaml | 64 +++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 Documentation/devicetree/bindings/input/goodix,gt7375p.yaml diff --git a/Documentation/devicetree/bindings/input/goodix,gt7375p.yaml b/Documentation/devicetree/bindings/input/goodix,gt7375p.yaml new file mode 100644 index 000000000000..b5008f89e26c --- /dev/null +++ b/Documentation/devicetree/bindings/input/goodix,gt7375p.yaml @@ -0,0 +1,64 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/input/goodix,gt7375p.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Goodix GT7375P touchscreen + +maintainers: + - Benjamin Tissoires + - Douglas Anderson + +description: + Supports the Goodix GT7375P touchscreen. + +properties: + compatible: + items: + - const: goodix,gt7375p + + reg: + enum: + - 0x5d + - 0x14 + + interrupts: + maxItems: 1 + + reset-gpios: + true + + vdd-supply: + description: The 3.3V supply to the touchscreen. + +required: + - compatible + - reg + - interrupts + - reset-gpios + - vdd-supply + +additionalProperties: false + +examples: + - | + #include + #include + #include + + i2c { + #address-cells = <1>; + #size-cells = <0>; + + ap_ts: touchscreen@5d { + compatible = "hid-over-i2c"; + reg = <0x5d>; + + interrupt-parent = <&tlmm>; + interrupts = <9 IRQ_TYPE_LEVEL_LOW>; + + reset-gpios = <&tlmm 8 GPIO_ACTIVE_LOW>; + vdd-supply = <&pp3300_ts>; + }; + };