From patchwork Thu Apr 15 03:29:57 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ikjoon Jang X-Patchwork-Id: 12204197 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EBC01C43462 for ; Thu, 15 Apr 2021 03:30:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CD793608FC for ; Thu, 15 Apr 2021 03:30:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229843AbhDODak (ORCPT ); Wed, 14 Apr 2021 23:30:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34900 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229996AbhDODae (ORCPT ); Wed, 14 Apr 2021 23:30:34 -0400 Received: from mail-pf1-x431.google.com (mail-pf1-x431.google.com [IPv6:2607:f8b0:4864:20::431]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B63A3C061760 for ; Wed, 14 Apr 2021 20:30:08 -0700 (PDT) Received: by mail-pf1-x431.google.com with SMTP id w6so603237pfc.8 for ; Wed, 14 Apr 2021 20:30:08 -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=AqTCmxCVXgLJsXqXTluosraXffm24ijyPJ7oIm03HUg=; b=hTv5o9+BrrE9EjC5denORW74HCF/42J7he8+Mx0uWBZ3C28CT6ebw/hsjvDuB+UF9A zjmO6Nuw3ItN1cnh/p3RQDlGkYcPyIpKofML84pTYZQQkU8drprtOTub7CrBOOHilPlf JkFisLLIsgX+NBMhogntTdF3kDl0Su9WJKXJ4= 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=AqTCmxCVXgLJsXqXTluosraXffm24ijyPJ7oIm03HUg=; b=JRF/OPveLQ7Y0NYbf16aaWGfM6ONR2pAyMtmlhqHsh7LWx5wgCVcqh+saC3481Vkp8 ZWZR4yr2agTbniNOQAQSqV8hjm6249DPUwp3jfLYiBz73p4s2PcvFGRC+r9EauRwxgg9 1VcN0EAeEVC/q5XOwXkgnBfZ1GZ4F8KXsAZJoKgWGGtWb1xD6suEMxbVBJhpnAq3WKFt Ih304Bl8m+/rjswLfLVRvssmzioDwQn88SE6Er6SIN4nnxVqlx+SvUZOuA5tbKn3x4tI 3lFzY9ukwlt5NIxd4H5/fYgDJZL9FgtMhf0Z5M6r8yhNv6hsx2+bqBxnJt+kwOukNl16 20zQ== X-Gm-Message-State: AOAM532JXAsu2KCmDAeEC96hHQ0XvTP+1qcYW9lhkGOFTY2JXs3GNDIQ qRjsNjb19wXfwJBDG0VhQkUT7g4vuinjBg== X-Google-Smtp-Source: ABdhPJzWZIDaJ7ZCMyQwwmkIH+E2r8i72JxGRuxVcUtvX0FJErfjLa8ExIklqYcWRBEqZgfChLrvhQ== X-Received: by 2002:aa7:8d84:0:b029:1f8:3449:1bc6 with SMTP id i4-20020aa78d840000b02901f834491bc6mr1262712pfr.76.1618457408048; Wed, 14 Apr 2021 20:30:08 -0700 (PDT) Received: from ikjn-p920.tpe.corp.google.com ([2401:fa00:1:b:2d50:863d:8932:d6bc]) by smtp.gmail.com with ESMTPSA id n3sm351622pga.92.2021.04.14.20.30.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Apr 2021 20:30:07 -0700 (PDT) From: Ikjoon Jang To: linux-input@vger.kernel.org, devicetree@vger.kernel.org Cc: Dmitry Torokhov , Hsin-Yi Wang , Nicolas Boichat , Ikjoon Jang , Benson Leung , Enric Balletbo i Serra , Guenter Roeck , Lee Jones , Rob Herring , linux-kernel@vger.kernel.org Subject: [PATCH v5 1/2] mfd: google,cros-ec: add DT bindings for a baseboard's switch device Date: Thu, 15 Apr 2021 11:29:57 +0800 Message-Id: <20210415032958.740233-2-ikjn@chromium.org> X-Mailer: git-send-email 2.31.1.295.g9ea45b61b8-goog In-Reply-To: <20210415032958.740233-1-ikjn@chromium.org> References: <20210415032958.740233-1-ikjn@chromium.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org This is for ChromeOS tablets which have a 'cros_cbas' switch device in the "Whiskers" base board. This device can be instantiated only by device tree on ARM platforms. ChromeOS EC doesn't provide a way to probe the device. Signed-off-by: Ikjoon Jang Reviewed-by: Rob Herring Acked-by: Enric Balletbo i Serra --- Changes in v5: - Add missing blank lines and change the description property's position. - Add a note to description: "this device cannot be detected at runtime." Changes in v4: Define cros-cbase bindings inside google,cros-ec.yaml instead of a separated binding document. .../bindings/mfd/google,cros-ec.yaml | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/Documentation/devicetree/bindings/mfd/google,cros-ec.yaml b/Documentation/devicetree/bindings/mfd/google,cros-ec.yaml index 76bf16ee27ec..8dcce176b72e 100644 --- a/Documentation/devicetree/bindings/mfd/google,cros-ec.yaml +++ b/Documentation/devicetree/bindings/mfd/google,cros-ec.yaml @@ -114,6 +114,22 @@ properties: - "#address-cells" - "#size-cells" + cbas: + type: object + + description: + This device is used to signal when a detachable base is attached + to a Chrome OS tablet. This device cannot be detected at runtime. + + properties: + compatible: + const: google,cros-cbas + + required: + - compatible + + additionalProperties: false + patternProperties: "^i2c-tunnel[0-9]*$": type: object @@ -180,6 +196,10 @@ examples: interrupts = <99 0>; interrupt-parent = <&gpio7>; spi-max-frequency = <5000000>; + + base_detection: cbas { + compatible = "google,cros-cbas"; + }; }; }; From patchwork Thu Apr 15 03:29:58 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ikjoon Jang X-Patchwork-Id: 12204199 X-Patchwork-Delegate: jikos@jikos.cz Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 26C20C43460 for ; Thu, 15 Apr 2021 03:30:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0591E61222 for ; Thu, 15 Apr 2021 03:30:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229867AbhDODaf (ORCPT ); Wed, 14 Apr 2021 23:30:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34910 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229927AbhDODae (ORCPT ); Wed, 14 Apr 2021 23:30:34 -0400 Received: from mail-pj1-x102e.google.com (mail-pj1-x102e.google.com [IPv6:2607:f8b0:4864:20::102e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 05E2FC06138C for ; Wed, 14 Apr 2021 20:30:10 -0700 (PDT) Received: by mail-pj1-x102e.google.com with SMTP id em21-20020a17090b0155b029014e204a81e6so4012581pjb.1 for ; Wed, 14 Apr 2021 20:30:10 -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=L/J0PuGsoQ9jKaU7QDPzGYAqcrZkxGOtbfN36+E+p8I=; b=LGHLZBSOwzpZ9O510rIL4ZM32mfTVVIY11xJJeGRe404aX0hfcWxjokJKytl+/wxiO bSuhMJNi1caURHh9x8TSTzB4INo7Yy5crEqzvacuN3sQjzQppEtluAKaHfRmW8467vuk KomjIjGzFdAYynHossjAeKnE+UL6wviA9+iHc= 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=L/J0PuGsoQ9jKaU7QDPzGYAqcrZkxGOtbfN36+E+p8I=; b=I1sbsrmRavkuskuLsbOzbakPJ2I//xhDnteF+hDmsEFdVzUd+4WnyRZMFXJzQ4LTtA ukiYG29GPV6WnD/e6aEYpBK4KU/Qtn6HFEbeiYuU4AzbCA29cQqSPqvvdaJaqRRtwey+ 04zgh/6BcMEI1C2L7SXnrp22MyV6zRvOiI8nahEglRZ5Zup/8loRBm6mDZq2O+1Hi60B 6koWMxz9tDfI9whir8HIB4c6+2VeYSFx8ZgQv9s5rwxjQ7hh6kMKGBGwHLT4lMb+0PRD BKMUoHzBczh59az0unyKXv1I8IYB44tXhXp8KoAKFkpTbmafY79N9KI2pp5zzB1Ymts/ xkhA== X-Gm-Message-State: AOAM532VCrBPXuHQE8WG1DSNmrdZ/VfCRYUiAcUQ6+dQ7lfDRcYeOGQ9 dsQTSDtRLfvstzp3P8dty4Ftu2FHsPzwzQ== X-Google-Smtp-Source: ABdhPJwoj7f2JqKoECZlBfOxjMxLfaPaqA7yxldayc265YPN0gbhK0JJj702ZI/Wz77wEj5Y8ROZWA== X-Received: by 2002:a17:90a:e298:: with SMTP id d24mr1455055pjz.37.1618457410343; Wed, 14 Apr 2021 20:30:10 -0700 (PDT) Received: from ikjn-p920.tpe.corp.google.com ([2401:fa00:1:b:2d50:863d:8932:d6bc]) by smtp.gmail.com with ESMTPSA id n3sm351622pga.92.2021.04.14.20.30.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Apr 2021 20:30:09 -0700 (PDT) From: Ikjoon Jang To: linux-input@vger.kernel.org, devicetree@vger.kernel.org Cc: Dmitry Torokhov , Hsin-Yi Wang , Nicolas Boichat , Ikjoon Jang , Dmitry Torokhov , Jiri Kosina , Benjamin Tissoires , Jiri Kosina , linux-kernel@vger.kernel.org Subject: [PATCH v5 2/2] HID: google: Add of_match table to Whiskers switch device. Date: Thu, 15 Apr 2021 11:29:58 +0800 Message-Id: <20210415032958.740233-3-ikjn@chromium.org> X-Mailer: git-send-email 2.31.1.295.g9ea45b61b8-goog In-Reply-To: <20210415032958.740233-1-ikjn@chromium.org> References: <20210415032958.740233-1-ikjn@chromium.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org Add a device tree match table for "cros-cbas" switch device. Signed-off-by: Ikjoon Jang Reviewed-by: Dmitry Torokhov Acked-by: Jiri Kosina --- (no changes since v1) Please note that v3 was submitted in 28 Oct 2019, 1.5yrs ago. Link(v2): https://patchwork.kernel.org/project/linux-input/patch/20191021030158.32464-1-ikjn@chromium.org/ --- drivers/hid/hid-google-hammer.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/hid/hid-google-hammer.c b/drivers/hid/hid-google-hammer.c index d9319622da44..be4f9f3dbbba 100644 --- a/drivers/hid/hid-google-hammer.c +++ b/drivers/hid/hid-google-hammer.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include @@ -272,12 +273,21 @@ static const struct acpi_device_id cbas_ec_acpi_ids[] = { }; MODULE_DEVICE_TABLE(acpi, cbas_ec_acpi_ids); +#ifdef CONFIG_OF +static const struct of_device_id cbas_ec_of_match[] = { + { .compatible = "google,cros-cbas" }, + { }, +}; +MODULE_DEVICE_TABLE(of, cbas_ec_of_match); +#endif + static struct platform_driver cbas_ec_driver = { .probe = cbas_ec_probe, .remove = cbas_ec_remove, .driver = { .name = "cbas_ec", .acpi_match_table = ACPI_PTR(cbas_ec_acpi_ids), + .of_match_table = of_match_ptr(cbas_ec_of_match), .pm = &cbas_ec_pm_ops, }, };