From patchwork Wed Oct 23 02:43:48 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ikjoon Jang X-Patchwork-Id: 11205615 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 59E5F13BD for ; Wed, 23 Oct 2019 02:43:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 370F82053B for ; Wed, 23 Oct 2019 02:43:58 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="mOy5hTZQ" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389242AbfJWCn4 (ORCPT ); Tue, 22 Oct 2019 22:43:56 -0400 Received: from mail-pf1-f176.google.com ([209.85.210.176]:33873 "EHLO mail-pf1-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731185AbfJWCn4 (ORCPT ); Tue, 22 Oct 2019 22:43:56 -0400 Received: by mail-pf1-f176.google.com with SMTP id b128so11938478pfa.1 for ; Tue, 22 Oct 2019 19:43:55 -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=mofPZU0gDfCeMdQs09aoNyZbpVsgKBRv49oSTcbrnzI=; b=mOy5hTZQlIbUw/dLIeqJ54nqXPthp1Z+w+N0xfknDKFXtqQwMk7Wnfn5/rNspav5uV MDdW15WOQGDrNUHwqTPtFPR2ayZOR8PMkZQPsCoIGFkMa15/YWeG535VD4rhqVXQc9QF hbxhmYfc7eY5CvzZRVxMHsmJhf0O38G/wX6CI= 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=mofPZU0gDfCeMdQs09aoNyZbpVsgKBRv49oSTcbrnzI=; b=gnQkOJWZ5+WE0GsCDsw4wDi533PNkCXciOaMarsT8sm+1SvmSlFLuA8zk1CJARcnFU Jdf8c0uzvbKAULU69AmI2QOqlG+9ofFZMOukMEDz9940ahuocBqfqhRX6HGtJvJ5Q10n So8eOSEZBI6ogYugln4XpRWoDElr9VEMS6I8SYFiWlY/uybq8i4ZIkC2Bj7lqLkijH0W Caibxwzw0rWbhvmtKF33qkDGq+lzpLRy9pvHpP1ieG+mx4hkBiL7+SGE5XifVK0wikiV 1wxB6B1wLrDN/Ef7fnwUEghJwhBn8Yq75qebNGGImKSpklc6cl/+r47HnEmj2dKqylWi 4sFw== X-Gm-Message-State: APjAAAVl/14d1C79ZRaN1U87bo4EvzMMHiY9n1LFu8mfM84OoYf0eIET f4PuZMk17J5DhMTFLZ0Nt6ERmHnAPJo= X-Google-Smtp-Source: APXvYqxv+U6sKv24k78c6mmhFtzdjMFTEVjKujp5UDRJgvxJ5YW1F0J5Ur7LHviLgSGCAZnRoVmNKQ== X-Received: by 2002:a63:fe56:: with SMTP id x22mr7379113pgj.282.1571798635041; Tue, 22 Oct 2019 19:43:55 -0700 (PDT) Received: from ikjn-p920.tpe.corp.google.com ([2401:fa00:1:10:254e:2b40:ef8:ee17]) by smtp.gmail.com with ESMTPSA id o64sm45970901pjb.24.2019.10.22.19.43.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 22 Oct 2019 19:43:54 -0700 (PDT) From: Ikjoon Jang To: linux-input@vger.kernel.org, devicetree@vger.kernel.org Cc: Dmitry Torokhov , Rob Herring , Mark Rutland , Jiri Kosina , Benjamin Tissoires , linux-kernel@vger.kernel.org, Nicolas Boitchat , Ikjoon Jang Subject: [PATCH v3 1/2] dt-bindings: input: Add DT bindings for Whiskers switch Date: Wed, 23 Oct 2019 10:43:48 +0800 Message-Id: <20191023024348.225969-1-ikjn@chromium.org> X-Mailer: git-send-email 2.23.0.866.gb869b98d4c-goog MIME-Version: 1.0 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org Add the DT binding document for Hammer's TABLET_MODE switch. Signed-off-by: Ikjoon Jang --- .../devicetree/bindings/input/cros-cbas.yaml | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 Documentation/devicetree/bindings/input/cros-cbas.yaml diff --git a/Documentation/devicetree/bindings/input/cros-cbas.yaml b/Documentation/devicetree/bindings/input/cros-cbas.yaml new file mode 100644 index 000000000000..3bc989c6a295 --- /dev/null +++ b/Documentation/devicetree/bindings/input/cros-cbas.yaml @@ -0,0 +1,22 @@ +# SPDX-License-Identifier: GPL-2.0 +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/input/cros-cbas.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: ChromeOS Hammer's Base Attached Switch + +maintainers: + - Dmitry Torokhov + +description: + This device is used to signal when a detachable base is attached to a + Chrome OS tablet. The node for this device must be under a cros-ec node + like google,cros-ec-spi or google,cros-ec-i2c. + +properties: + compatible: + const: google,cros-cbas + +required: + - compatible From patchwork Wed Oct 23 02:44:10 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ikjoon Jang X-Patchwork-Id: 11205617 X-Patchwork-Delegate: jikos@jikos.cz Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8C3D9112B for ; Wed, 23 Oct 2019 02:44:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6A144214B2 for ; Wed, 23 Oct 2019 02:44:20 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="Cz1S/hEA" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730655AbfJWCoT (ORCPT ); Tue, 22 Oct 2019 22:44:19 -0400 Received: from mail-pg1-f193.google.com ([209.85.215.193]:44849 "EHLO mail-pg1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389296AbfJWCoR (ORCPT ); Tue, 22 Oct 2019 22:44:17 -0400 Received: by mail-pg1-f193.google.com with SMTP id e10so11181644pgd.11 for ; Tue, 22 Oct 2019 19:44:16 -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=5W92hpu9o2rfIqUdBJQ593S46hA9FmRbacTloyOcBmk=; b=Cz1S/hEASfHabZysQzaNJmmdPyjwvzDxCl1oMvCDts3RUy9CMp1HWjleV6TLy73uQZ VEVjfHBa1t4z4EZf/BVd8O1H/KZg6D1UKruKKNxzP9xuOSjWEmzWS9GqonDPvhBi5yQz pftvpUgBN2d7vkXepwS8iDeeHqzPoFjpvnHdo= 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=5W92hpu9o2rfIqUdBJQ593S46hA9FmRbacTloyOcBmk=; b=XquiMOHP3/sf/DqBQe67/LdrJYVuYbew5fzetwlmaBNIQnxs+SgczXxXLiUwFke9xo o97NrVjLIhTrNhI7FX5mcRH3+3QAwIHRYUbOniewtPkmMX44eaO/d1+/QgqP2qspP5qw WrMVVMIHgd7ydTyVwlI+ljKQJKKz0KoAjBSb6Gxp6Bk8YPws+bK1cEX0q/peJwP4hdtQ oYLO0F++Db8qApnXfgsvZBkNxa8zV9B1rcSS4gtkFn/3g5odXAwlURUwUoS22pq3YiFl 9Ufa3N0PoMpFDd/XPVDHw9JQMrJ3xvuOPI2SpJRYGQ3SHL+zda3SXXiwDqY1Zb9YudXv RB6w== X-Gm-Message-State: APjAAAW+NNwTicpiBggcTuoNjAcxiIbKiS/+VbJrN2vjOZssw2s5zygq +mScdE+darSLXi2c+D2nRpTkQ5rB0ug= X-Google-Smtp-Source: APXvYqx3SnrbDx9WrU4Kjo0xAHrjmP5RwWDnuypSKuZ+TG2NTLP+7/l2++P8mHJJIiGGuejLVOoLJg== X-Received: by 2002:a17:90a:246c:: with SMTP id h99mr8213439pje.127.1571798656034; Tue, 22 Oct 2019 19:44:16 -0700 (PDT) Received: from ikjn-p920.tpe.corp.google.com ([2401:fa00:1:10:254e:2b40:ef8:ee17]) by smtp.gmail.com with ESMTPSA id h2sm30134631pfq.108.2019.10.22.19.44.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 22 Oct 2019 19:44:15 -0700 (PDT) From: Ikjoon Jang To: linux-input@vger.kernel.org, devicetree@vger.kernel.org Cc: Dmitry Torokhov , Rob Herring , Mark Rutland , Jiri Kosina , Benjamin Tissoires , linux-kernel@vger.kernel.org, Nicolas Boitchat , Ikjoon Jang Subject: [PATCH v3 2/2] HID: google: Add of_match table to Whiskers switch device. Date: Wed, 23 Oct 2019 10:44:10 +0800 Message-Id: <20191023024410.226524-1-ikjn@chromium.org> X-Mailer: git-send-email 2.23.0.866.gb869b98d4c-goog MIME-Version: 1.0 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org Add a device tree match table. Signed-off-by: Ikjoon Jang Reviewed-by: Dmitry Torokhov --- 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 84f8c127ebdc..b726f8a15044 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 @@ -264,12 +265,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, }, };