From patchwork Thu Jul 27 17:16:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Doug Anderson X-Patchwork-Id: 127105 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp1288383vqo; Thu, 27 Jul 2023 11:31:18 -0700 (PDT) X-Google-Smtp-Source: APBJJlFw3wwZ977zHf5MfWnvXUmPZ+5UXCNkw9XAicRr2lFwmzn4KT8kJ11QHtRPXEb3aw5SplsO X-Received: by 2002:a17:90b:fc4:b0:268:136d:4111 with SMTP id gd4-20020a17090b0fc400b00268136d4111mr4169607pjb.3.1690482677998; Thu, 27 Jul 2023 11:31:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690482677; cv=none; d=google.com; s=arc-20160816; b=Ago8P3fFlKSfAW9PComW4vP4FaP+RoQqt+vo4+hRTNIHox/VEKbadoXaD9v20TAyxU cLFEGFFfzLZOfylGPnMMBKVqAcY4I8EpWuvG4sRJO6FIkaml8Jh+fzSWaEReXIFzZ0zE 2V2cssEpvwa2HH+Eahoi+xIg7yFQhd9mtDTIrZp0zea9icrVp/YIiAO768EoAxEK2IvP OBf/bgoH8suUpDZWRYhm+O/wecCUr+AJ6Z9mMOlTV5y5a6d4/aYJiKRLBb3SHsD6FGO9 aFOQtOPh+Q73nDZU8AbSW8nNNWagDlx8SshbEI2PjgNMSe2QiPK7JEN8eYaU44aLps6A bphA== 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=wk2vuhX6NA1oRdFPUtDZvRSgubu1bvTtFKVaGPcS2eM=; fh=L5WpMYTDxMg/9ayRuCvB1kggfm4mDiAJyllY2j+GcGU=; b=K6j5/wgB+ZwCufIS450A2iZ6NJz2T5u2VLLvJ+FJCxmvh/4zR72BY9hdbD7+PBcesm Kikob2tvXj9AXPXz31iBorbblXMkj+R+XUfZds2ErigeL9Of5PWQCJqMEu43sVWloXxF iRvxKdldQ4e7tDEZRfy6ULQTItWY2ryIZMRBHe77eK3NZBDM2zAIw00VZoJzunIDnj+j 1+GGAMd573vrP4ko78IJTpl9eRQA34WubYXYctUfx8K1Jt9m7gpsPIDCt76KYJx2WBpM VBT8H+X+GRMzqACdJN9gg/kGC4IJBq0gZB7FMDUSqRBbr7exCm6aZy14ciAlnyl7DSor f3BQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=cg23VoOJ; 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 j2-20020a17090a3e0200b00263e8027e64si3187363pjc.138.2023.07.27.11.30.53; Thu, 27 Jul 2023 11:31:17 -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=cg23VoOJ; 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 S232498AbjG0RSk (ORCPT + 99 others); Thu, 27 Jul 2023 13:18:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50928 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232197AbjG0RSe (ORCPT ); Thu, 27 Jul 2023 13:18:34 -0400 Received: from mail-pf1-x42c.google.com (mail-pf1-x42c.google.com [IPv6:2607:f8b0:4864:20::42c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5029E196 for ; Thu, 27 Jul 2023 10:18:33 -0700 (PDT) Received: by mail-pf1-x42c.google.com with SMTP id d2e1a72fcca58-686be3cbea0so1576009b3a.0 for ; Thu, 27 Jul 2023 10:18:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1690478312; x=1691083112; 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=wk2vuhX6NA1oRdFPUtDZvRSgubu1bvTtFKVaGPcS2eM=; b=cg23VoOJGUGKrYEb12dX6zcgIY/F/f1vmlutdzAepj+MUdIH8138FBf7Hzmm2z2tb6 vm2/wze8DKygbvfJRaONjbVEYQjeTLvmR+L1bom4s+YOFLVkmARkgdRrpOb0oGuX4t7Y jRRSrrHjH5DoZJpu6PYAWUBvrfP9p2ojzxQUs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690478312; x=1691083112; 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=wk2vuhX6NA1oRdFPUtDZvRSgubu1bvTtFKVaGPcS2eM=; b=fFa+4whn8cX8c5ynSWxT+ydpR60fcFbi2UfgSVhJnIYsMAjjOL2F48gcVhoabJbLvK 3A2i4VqFgxLlV2KsZo99FdNUqAXzoKSDsr4yAPhJqY+XuK2IQsT4uEg/4qHNq5mgMe9R zhzKFENJj5naUAmqCxGM+7euGlXUxIGqY79J265FpL6YJHfYpBPx1UMZPnVbHouO/tMl KPeCcAuuPYvCrY+gdaOwESgi3B00tIM7SqYTc1tZ2GJvObSyc7CGYyoV+IN/KJem9i/a mUKRMKoBm1d7PEcAHW4b+i/wRsjhbSoY3TmrJJMDefFOCQz/XVVzILgiL1yUyaO8bNMF T8pA== X-Gm-Message-State: ABy/qLab5ZbuKa3OvgMQpmmk26B0Nz9kcR9baQjZ4KO+bHkn2MhWU3Ju HKW1JuOQJlTpxzfkyIRHqeC/GQ== X-Received: by 2002:a05:6a20:1603:b0:133:17f1:6436 with SMTP id l3-20020a056a20160300b0013317f16436mr4169051pzj.19.1690478312683; Thu, 27 Jul 2023 10:18:32 -0700 (PDT) Received: from tictac2.mtv.corp.google.com ([2620:15c:9d:2:2339:954b:b98f:611a]) by smtp.gmail.com with ESMTPSA id 17-20020aa79111000000b0064f76992905sm1702524pfh.202.2023.07.27.10.18.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Jul 2023 10:18:32 -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: linux-arm-msm@vger.kernel.org, yangcong5@huaqin.corp-partner.google.com, devicetree@vger.kernel.org, Daniel Vetter , hsinyi@google.com, Chris Morgan , linux-input@vger.kernel.org, cros-qcom-dts-watchers@chromium.org, Dmitry Torokhov , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Douglas Anderson , Krzysztof Kozlowski Subject: [PATCH v4 01/11] dt-bindings: HID: i2c-hid: Add "panel" property to i2c-hid backed touchscreens Date: Thu, 27 Jul 2023 10:16:28 -0700 Message-ID: <20230727101636.v4.1.Id68e30343bb1e11470582a9078b086176cfec46b@changeid> X-Mailer: git-send-email 2.41.0.487.g6d72f3e995-goog In-Reply-To: <20230727171750.633410-1-dianders@chromium.org> References: <20230727171750.633410-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_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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: 1772599564439588287 X-GMAIL-MSGID: 1772599564439588287 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 Reviewed-by: Maxime Ripard 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