From patchwork Tue Jul 25 20:34:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Doug Anderson X-Patchwork-Id: 125801 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp2103vqo; Tue, 25 Jul 2023 13:45:07 -0700 (PDT) X-Google-Smtp-Source: APBJJlFqhzSv2eScnIgD46faBCIgncyGDK+69axj0sfXUGtYSEpvBuprorEKvxsLMRKlMos+/SlX X-Received: by 2002:a17:907:7625:b0:99b:4d3c:d7e4 with SMTP id jy5-20020a170907762500b0099b4d3cd7e4mr13407892ejc.63.1690317906767; Tue, 25 Jul 2023 13:45:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690317906; cv=none; d=google.com; s=arc-20160816; b=uAWO1vp/Vuh/zYs22CIle2bjCmAlTKUqCMfzE1vgmmGliVFvqvFAkrCSfCBc2bTI2Z p7Y4vWlPJqwAGxsexIdEmc8cW/v94KVf/QmeqmapZjGZpYfLgPwK3wN4hSNUue6dCdXn kRAYFVmiKFhg0pSf9POtGQce3PER3GzO23GBqG/D7JTD8T0EUWM096dpVsT+bRss0msu OSDf00VgjR6cNWXFvg3WeP0P+TeJirO7p4leMhZzjy6JFJQjGzZ/IWwi1KK4BKzj3ZdK /Bj092y5ka1QueJIQGwlVHTQSrHObR0+xOJraQziWYvoAhCMoGD3mlBh1jmEKOVs5WIY 5sDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Vug0/nTFX8HO+SAnOamtMcLZ6ZH608dzw2nZDsl1wy8=; fh=SR6gopKkpsJzcK81N+yIM2UKbfIRHNVfhaSPeEPS/8g=; b=ermnR5vR6/7R68HqEHFldWxRAGPp0f/YX75QmEgVSfIZdUEX+HiAY6BBoeJmXMblii 3U8FGUOBstIVml9yAvsonV5Zq3cDvMGqpZ35tSSoLSOwFOKGyTzmO0Q/mpXNExDQL23A thDLUMCan8uqe+pOT69gNVcs1XfK3PqGEiA9X0e2yUjuvrumZMvQnJLgOzSc9kRvfdLk O5RPi2RJKgkbBq4qWpDGTFeES1c3g6I/FKlL+tuyivhQhPrru5SDIzaHnoJvn0zIvfFg vsmyVxD7k4MqZOpBO9R0jWNcuxFZwvYGEF+cUJMGpF0GqlAZXvLU6ogZ7k+e+b7g4us1 JS+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=lbVLtx4h; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id lg4-20020a170906f88400b0098f564f636fsi8213490ejb.1000.2023.07.25.13.44.43; Tue, 25 Jul 2023 13:45:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=lbVLtx4h; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230498AbjGYUhB (ORCPT + 99 others); Tue, 25 Jul 2023 16:37:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34430 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230494AbjGYUg7 (ORCPT ); Tue, 25 Jul 2023 16:36:59 -0400 Received: from mail-pl1-x634.google.com (mail-pl1-x634.google.com [IPv6:2607:f8b0:4864:20::634]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BCD1D19A7 for ; Tue, 25 Jul 2023 13:36:57 -0700 (PDT) Received: by mail-pl1-x634.google.com with SMTP id d9443c01a7336-1bbc87ded50so3154145ad.1 for ; Tue, 25 Jul 2023 13:36:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1690317417; x=1690922217; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Vug0/nTFX8HO+SAnOamtMcLZ6ZH608dzw2nZDsl1wy8=; b=lbVLtx4hawMq5I080q+oToFTxyc6v6bosk165MRmbugZnfuhF31ItqVkRUAkZjutOw WIaLBwyPHkjC4XIR1DDCQtEx+c7Xxocb3RDBVJqDHyPqL4cNT2L7k/0maaU2NBk1kqWo SdNFbskTdR6zphWqI4pbKO0FGlCP2SxMpLr0U= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690317417; x=1690922217; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Vug0/nTFX8HO+SAnOamtMcLZ6ZH608dzw2nZDsl1wy8=; b=DNw6253z6SQmvT8oLz8n77QPt6ed6lYfSdwSHamNz4VXAT6EeRCHOZiAwPtpazpjzc LeU4gvq+GDMKPVeNyi8jy8kWave0ImJB/BOYYZ25VbwZBAUepDql80yoglzPWYxSZLsI YYiShpXAodv/pNa30aB0/TDQ8QbCe/gwitEHwdnjnNtF0/9OvPipc1QCH7W0yHk7kktA Yhtp/b3IEAcVNO3Lc1NWUq3qRi0fgGpPlLDt31YJd2WXi8cyXUPFOQc3VahNDyJ5ZtY6 eVZHW7W8JAk10gkeguYLJKVTJqHiBohUiYnBdkBQ/ewmsEu3SkPzqERIb6cPWriuttFO FGrQ== X-Gm-Message-State: ABy/qLYYdkiXYAwdJ66eXxxQiRtoZD5tgdyuofn1vlCWqEgraMKgiAu3 l425JN4U8V4Ewyrdhh2N+LzYEg== X-Received: by 2002:a17:90a:542:b0:267:f9ab:15bb with SMTP id h2-20020a17090a054200b00267f9ab15bbmr240485pjf.14.1690317417199; Tue, 25 Jul 2023 13:36:57 -0700 (PDT) Received: from tictac2.mtv.corp.google.com ([2620:15c:9d:2:c363:4681:f5b8:301]) by smtp.gmail.com with ESMTPSA id bg1-20020a17090b0d8100b002676e961261sm1396951pjb.1.2023.07.25.13.36.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Jul 2023 13:36:56 -0700 (PDT) From: Douglas Anderson To: Jiri Kosina , Benjamin Tissoires , Bjorn Andersson , Konrad Dybcio , Rob Herring , Frank Rowand , Krzysztof Kozlowski , Conor Dooley , Neil Armstrong , Sam Ravnborg , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann Cc: cros-qcom-dts-watchers@chromium.org, Chris Morgan , linux-input@vger.kernel.org, hsinyi@google.com, linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Dmitry Torokhov , devicetree@vger.kernel.org, Daniel Vetter , yangcong5@huaqin.corp-partner.google.com, Douglas Anderson , Krzysztof Kozlowski Subject: [PATCH v3 01/10] dt-bindings: HID: i2c-hid: Add "panel" property to i2c-hid backed touchscreens Date: Tue, 25 Jul 2023 13:34:36 -0700 Message-ID: <20230725133443.v3.1.Id68e30343bb1e11470582a9078b086176cfec46b@changeid> X-Mailer: git-send-email 2.41.0.487.g6d72f3e995-goog In-Reply-To: <20230725203545.2260506-1-dianders@chromium.org> References: <20230725203545.2260506-1-dianders@chromium.org> MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1772426789539503489 X-GMAIL-MSGID: 1772426789539503489 As talked about in the patch ("drm/panel: Add a way for other devices to follow panel state"), touchscreens that are connected to panels are generally expected to be power sequenced together with the panel they're attached to. Today, nothing provides information allowing you to find out that a touchscreen is connected to a panel. Let's add a phandle for this. The proerty is added to the generic touchscreen bindings and then enabled in the bindings for the i2c-hid backed devices. This can and should be added for other touchscreens in the future, but for now let's start small. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Douglas Anderson --- (no changes since v2) Changes in v2: - Move the description to the generic touchscreen.yaml. - Update the desc to make it clearer it's only for integrated devices. Documentation/devicetree/bindings/input/elan,ekth6915.yaml | 5 +++++ .../devicetree/bindings/input/goodix,gt7375p.yaml | 5 +++++ Documentation/devicetree/bindings/input/hid-over-i2c.yaml | 2 ++ .../devicetree/bindings/input/touchscreen/touchscreen.yaml | 7 +++++++ 4 files changed, 19 insertions(+) diff --git a/Documentation/devicetree/bindings/input/elan,ekth6915.yaml b/Documentation/devicetree/bindings/input/elan,ekth6915.yaml index 05e6f2df604c..3e2d216c6432 100644 --- a/Documentation/devicetree/bindings/input/elan,ekth6915.yaml +++ b/Documentation/devicetree/bindings/input/elan,ekth6915.yaml @@ -13,6 +13,9 @@ description: Supports the Elan eKTH6915 touchscreen controller. This touchscreen controller uses the i2c-hid protocol with a reset GPIO. +allOf: + - $ref: /schemas/input/touchscreen/touchscreen.yaml# + properties: compatible: items: @@ -24,6 +27,8 @@ properties: interrupts: maxItems: 1 + panel: true + reset-gpios: description: Reset GPIO; not all touchscreens using eKTH6915 hook this up. diff --git a/Documentation/devicetree/bindings/input/goodix,gt7375p.yaml b/Documentation/devicetree/bindings/input/goodix,gt7375p.yaml index 1edad1da1196..358cb8275bf1 100644 --- a/Documentation/devicetree/bindings/input/goodix,gt7375p.yaml +++ b/Documentation/devicetree/bindings/input/goodix,gt7375p.yaml @@ -14,6 +14,9 @@ description: This touchscreen uses the i2c-hid protocol but has some non-standard power sequencing required. +allOf: + - $ref: /schemas/input/touchscreen/touchscreen.yaml# + properties: compatible: oneOf: @@ -30,6 +33,8 @@ properties: interrupts: maxItems: 1 + panel: true + reset-gpios: true diff --git a/Documentation/devicetree/bindings/input/hid-over-i2c.yaml b/Documentation/devicetree/bindings/input/hid-over-i2c.yaml index 7156b08f7645..138caad96a29 100644 --- a/Documentation/devicetree/bindings/input/hid-over-i2c.yaml +++ b/Documentation/devicetree/bindings/input/hid-over-i2c.yaml @@ -44,6 +44,8 @@ properties: description: HID descriptor address $ref: /schemas/types.yaml#/definitions/uint32 + panel: true + post-power-on-delay-ms: description: Time required by the device after enabling its regulators or powering it on, before it is ready for communication. diff --git a/Documentation/devicetree/bindings/input/touchscreen/touchscreen.yaml b/Documentation/devicetree/bindings/input/touchscreen/touchscreen.yaml index 895592da9626..431c13335c40 100644 --- a/Documentation/devicetree/bindings/input/touchscreen/touchscreen.yaml +++ b/Documentation/devicetree/bindings/input/touchscreen/touchscreen.yaml @@ -10,6 +10,13 @@ maintainers: - Dmitry Torokhov properties: + panel: + description: If this touchscreen is integrally connected to a panel, this + is a reference to that panel. The presence of this reference indicates + that the touchscreen should be power sequenced together with the panel + and that they may share power and/or reset signals. + $ref: /schemas/types.yaml#/definitions/phandle + touchscreen-min-x: description: minimum x coordinate reported $ref: /schemas/types.yaml#/definitions/uint32