Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp264684pxb; Fri, 15 Jan 2021 12:27:04 -0800 (PST) X-Google-Smtp-Source: ABdhPJx9mtwXi8Wu2nUcGMWaECeMlSfSoRSCbzVR+tXuo7O/9W8FRmZOGVriJYQgcvSSM0lqv0S5 X-Received: by 2002:a50:a684:: with SMTP id e4mr11010339edc.148.1610742424617; Fri, 15 Jan 2021 12:27:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610742424; cv=none; d=google.com; s=arc-20160816; b=q7kWQnyIZnQcNQC7R3VTIngSPCX/74YCKP4siFSR3ue/+cscF7zHhdgNUKIyvLH8qE 5ph9ozj8tdR4MjTV3UCQtZxuzcoqo6gzfLUshp5i0jRYtJpUFHrVkEbLT8NbeYYG0XR/ 7K5uDgarpTou9zrzgsHBpMzd8Ac3Xr1MlKr1Sd4ZYmU+DmuvVLG/zH3Qozmidtz+w7T9 2/geusc+1pM4gcsLNHgh7L3uCKmOR+lNRfsbGTlvBJYa8nf3f4ZDMbK9syIUlJ0z5xHS 22jHZYsyFZiPnAApvKlxgny7rluRSzlJMR6mtu5dvjVXEGHkHQe4oc/KOmiGL7F07tye xjKg== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=8Jy+sRCJHRiWM+ceRz2fikqssAZSpSpfI/4rqhLv5UY=; b=FLjyWIg7pMRLsdX82CWo0GQB01mwDVpJH0nOnjY0QgdKS1vMlDPWwuF/me4Zq5arhW Lg3QYOip361svr+83+7Zk7xxZ9iW+rCftAdnU8mehfzgxQFwtD9FZeenIACbLiUx+tfw TjWUAsQJtYZg8AKGEtNOV6n4AFu+p8jleDYjW6X1PiFw9benUzFfaHAIv6mAxkjLqm4T ZlB7tPg9Yar/pvb49k+l6voFRfnzLMIgUHkHqKj7odBWambiJwFdTyQMyyOS/h7WwXr3 zXSadUm2AMTRZODfmhEgbd9cx/sdjiNUEyS8fxvKX+cMYPME6HRr5NbiYQyDV+wefeX0 XHOw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=n+Ld6svo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j11si4221321eja.691.2021.01.15.12.26.40; Fri, 15 Jan 2021 12:27:04 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=n+Ld6svo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S2388325AbhAOUZc (ORCPT + 99 others); Fri, 15 Jan 2021 15:25:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56530 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727280AbhAOUZa (ORCPT ); Fri, 15 Jan 2021 15:25:30 -0500 Received: from mail-pj1-x102a.google.com (mail-pj1-x102a.google.com [IPv6:2607:f8b0:4864:20::102a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B2771C061795 for ; Fri, 15 Jan 2021 12:24:35 -0800 (PST) Received: by mail-pj1-x102a.google.com with SMTP id x20so474277pjh.3 for ; Fri, 15 Jan 2021 12:24:35 -0800 (PST) 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=8Jy+sRCJHRiWM+ceRz2fikqssAZSpSpfI/4rqhLv5UY=; b=n+Ld6svog4T0o5pSqW43F4jUz1pZUfMnLmN+tPe4fjsQMhErj5dRDk5ofxhWBLA80s W8V9udmZoWB9o3Y2IPT4NNk7mntgXgIE8henc7cLzSnj2i1OCWLBsAkqUB5OOTpLrFgl hl4xJb5zZwtYkN2sRyGZVmosr5Up0LXyuHQE0= 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=8Jy+sRCJHRiWM+ceRz2fikqssAZSpSpfI/4rqhLv5UY=; b=IzNrkcNeyN4OzrVUjaGkgGkBPQZVZUMP3ZUsUimsp7kHxvdS0ckMmHHPl8cR3muGTI xEoctMoDw4GzM+AAfia8Cj1pag8vw/K29Fu5fzmR4l12LKJ4SVvIt4eD20N+JQfJ783y 0DC/6gtLCC+Lvbye2L8muP/klmr5gn/kEdPaYUfXbYQhZDq8yTEK6NSdHqhoi4/enxpN QpBOjb4R69NZsHnFogHd1/MSfs9OmaLzvNoef7NW74T5J+dV1vODdUspldpHtfEpvcSH WLmQxPbhJoU6uJQggvWnuEFkqgDS2RZLnYiuZmL4hlcPSPBXmInlOe3iuj3VwHeri4Li jbFw== X-Gm-Message-State: AOAM530QInHdeOa4JAcTW5H2ZRmHAtMEv0IAKiF7D0/MHSZN+MfJ3K4V btGacRly77i6lznrir2EghwDYFqpKw7uVg== X-Received: by 2002:a17:90a:4d84:: with SMTP id m4mr12524210pjh.145.1610742275062; Fri, 15 Jan 2021 12:24:35 -0800 (PST) Received: from philipchen.mtv.corp.google.com ([2620:15c:202:201:a6ae:11ff:fe11:fd59]) by smtp.gmail.com with ESMTPSA id x19sm401097pfp.207.2021.01.15.12.24.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Jan 2021 12:24:34 -0800 (PST) From: Philip Chen To: LKML , dmitry.torokhov@gmail.com Cc: swboyd@chromium.org, dianders@chromium.org, Philip Chen , Benson Leung , Enric Balletbo i Serra , Guenter Roeck , Rob Herring , Simon Glass , devicetree@vger.kernel.org, linux-input@vger.kernel.org Subject: [PATCH v7 1/2] dt-bindings: input: cros-ec-keyb: Add a new property Date: Fri, 15 Jan 2021 12:24:29 -0800 Message-Id: <20210115122412.v7.1.I025fb861cd5fa0ef5286b7dce514728e9df7ae74@changeid> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add a new property `function-row-physmap` to the device tree for the custom keyboard top row design. The property describes the rows/columns of the top row keys from left to right. Signed-off-by: Philip Chen --- Changes in v7: - Use MATRIX_KEY macro to describe `function-row-physmap` Changes in v6: - remove $ref and add `function-row-physmap` to the example Changes in v5: - add minItems and maxItems for `function-row-physmap` Changes in v2: - add `function-row-physmap` instead of `google,custom-keyb-top-row` .../bindings/input/google,cros-ec-keyb.yaml | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/Documentation/devicetree/bindings/input/google,cros-ec-keyb.yaml b/Documentation/devicetree/bindings/input/google,cros-ec-keyb.yaml index 8e50c14a9d778..5377b232fa10f 100644 --- a/Documentation/devicetree/bindings/input/google,cros-ec-keyb.yaml +++ b/Documentation/devicetree/bindings/input/google,cros-ec-keyb.yaml @@ -31,6 +31,17 @@ properties: if the EC does not have its own logic or hardware for this. type: boolean + function-row-physmap: + minItems: 1 + maxItems: 15 + description: | + An ordered u32 array describing the rows/columns (in the scan matrix) + of top row keys from physical left (KEY_F1) to right. Each entry + encodes the row/column as: + (((row) & 0xFF) << 24) | (((column) & 0xFF) << 16) + where the lower 16 bits are reserved. This property is specified only + when the keyboard has a custom design for the top row keys. + required: - compatible @@ -38,11 +49,24 @@ unevaluatedProperties: false examples: - | + #include cros-ec-keyb { compatible = "google,cros-ec-keyb"; keypad,num-rows = <8>; keypad,num-columns = <13>; google,needs-ghost-filter; + function-row-physmap = < + MATRIX_KEY(0x00, 0x02, 0) /* T1 */ + MATRIX_KEY(0x03, 0x02, 0) /* T2 */ + MATRIX_KEY(0x02, 0x02, 0) /* T3 */ + MATRIX_KEY(0x01, 0x02, 0) /* T4 */ + MATRIX_KEY(0x03, 0x04, 0) /* T5 */ + MATRIX_KEY(0x02, 0x04, 0) /* T6 */ + MATRIX_KEY(0x01, 0x04, 0) /* T7 */ + MATRIX_KEY(0x02, 0x09, 0) /* T8 */ + MATRIX_KEY(0x01, 0x09, 0) /* T9 */ + MATRIX_KEY(0x00, 0x04, 0) /* T10 */ + >; /* * Keymap entries take the form of 0xRRCCKKKK where * RR=Row CC=Column KKKK=Key Code -- 2.26.2