Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp574795pxb; Fri, 8 Jan 2021 12:13:58 -0800 (PST) X-Google-Smtp-Source: ABdhPJyR1wqWqSmwN0k7DfFIThH193zKYyTDmtpa8e/z/B5m4W9L6OTdc8C//9hupI5ZOMEyoBOg X-Received: by 2002:a17:906:848:: with SMTP id f8mr3634599ejd.404.1610136838620; Fri, 08 Jan 2021 12:13:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610136838; cv=none; d=google.com; s=arc-20160816; b=ji+BauccGPAMZ2t1WMxbMVDaWKGx63j54bT4Co5ndcq6oD73GH0I56TXjbPBcMa+/l LvtW8621zoFNgCfmhbI+NQOfaAjGdYxjyamSX2ph9IStb3j30ZKOiQAPeWA7Da2A31Ta rZ25h2vzGzxelQlBHQWBufF3fv8dA02mr5Yk80889Z7HPzGvjGG4bXtyiO+/lWPp/CBE ZB/KfxHlpCXY9sO8Ei5B/zPFzLRq8wjAuqRfsOu0f798dWAf0qLbC+uuPCkWdpn3aUIp tmfFhRzCTBW8jMQM56eeTikdqttJu90UTsmkU5QRW19t4kdvz9WatmeH8zHYqqF4z/Bl ygLQ== 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=sqnbKqpISV5+WcGpuVpiPkrjiHKz2oeV7SJM/0PfExs=; b=oy3H+jfw8mVc3W/b+nAXFEQ0aoXOctGYWe9qBvbTv2Jd1XYSYJLP/CCqDZ1MKFXx2h rsN1krlaDXzyb1somY0vGIUhBMfrOpDhEQH6not5XGwfjTS0AdXcdIptyjQFXvNP4cg6 ZjVOVmd/WB61Hrb+CFb2s4hANnffFsJLDtN5MTxXO7fEWOjMogOuxN3ZBC8Xxlko56eW WnO3bpyC/OwI3Io+Y33JI0/6bebRIC6FHMEdx1/TFXCfW1H28LsmJClCW6ANIN7cFWyu x2jZZJE7yqBAehO9/ogfMijZh4iVbheGT2x8vAuv7gbvyacAIJ3Ggr0XrYyxzJzPRfwM +3zA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=bARS1FD5; 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 11si3827594ejw.721.2021.01.08.12.13.34; Fri, 08 Jan 2021 12:13:58 -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=bARS1FD5; 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 S1729124AbhAHULl (ORCPT + 99 others); Fri, 8 Jan 2021 15:11:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51750 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729105AbhAHULj (ORCPT ); Fri, 8 Jan 2021 15:11:39 -0500 Received: from mail-pg1-x52b.google.com (mail-pg1-x52b.google.com [IPv6:2607:f8b0:4864:20::52b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 28E75C0612FE for ; Fri, 8 Jan 2021 12:10:59 -0800 (PST) Received: by mail-pg1-x52b.google.com with SMTP id n7so8329537pgg.2 for ; Fri, 08 Jan 2021 12:10:59 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=sqnbKqpISV5+WcGpuVpiPkrjiHKz2oeV7SJM/0PfExs=; b=bARS1FD5bNcPVbYwfwu7t43PAJE5GyJpZJACn5MSOsuYlRjYz0XiC0ktB36kZjXb8T XxPjEv23ulE0l9655O4C/kCQj2uw0B7opiwbmw8UjuLD/Rp93RLJin5y7L4iD6/EAhf3 AKR/vgIzCRD14qGv3sOfB009vPedBjHMdFZLE= 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=sqnbKqpISV5+WcGpuVpiPkrjiHKz2oeV7SJM/0PfExs=; b=GVSZNFRvh77LmSr9Cd0HB46XXccCSBR5LV+cKDBISwABmHaiRX0sh+UqkTBjLWT7+w sjb9LaN9AodOeLhQvu98BGaB2nkg67WbNhxlUbO+exJwgJtb8Z/jURMIZFehwR6A6tYb btZ+Xu2jEnZwYMLl0KwKR6qSIX7xHS9sS+R5GByZnKaxMX7bZjA+uyUzDPpugfp6HoZV 0blMdTVwMuJHWyA2SPSV0zYO1988c3Wbdi24Za3T01sLiEf31YLB12vVFkK4lYpKcO88 fbsfxeqHpdmSrETipwZAjRAHmHTp2RDJBecI3UgBc0d8L4njy2otYVOLoM1bRziD2iUW wcPA== X-Gm-Message-State: AOAM531cIgwg25GRCiFZiv0Z8vAPcLkF1ypnf40HYV5VCnXilWXo8mN/ 6zPf4rXK3gzF1ObFEwGHvMeTl6t3Oj8LDw== X-Received: by 2002:a63:65c5:: with SMTP id z188mr8575643pgb.332.1610136658496; Fri, 08 Jan 2021 12:10:58 -0800 (PST) Received: from philipchen.mtv.corp.google.com ([2620:15c:202:201:a6ae:11ff:fe11:fd59]) by smtp.gmail.com with ESMTPSA id s5sm9404651pfh.5.2021.01.08.12.10.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Jan 2021 12:10:58 -0800 (PST) From: Philip Chen To: LKML , dmitry.torokhov@gmail.com Cc: dianders@chromium.org, swboyd@chromium.org, Philip Chen , Benson Leung , Enric Balletbo i Serra , Guenter Roeck , Rob Herring , devicetree@vger.kernel.org Subject: [PATCH 2/2] ARM: dts: cros-ec-keyboard: use keymap marcos Date: Fri, 8 Jan 2021 12:10:51 -0800 Message-Id: <20210108120956.2.I969aec81269bb64b2fa970482511426180d6ea8c@changeid> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210108120956.1.Iaa8a60cf2ed4b7ad5e2fbb4ad76a1c600ee36113@changeid> References: <20210108120956.1.Iaa8a60cf2ed4b7ad5e2fbb4ad76a1c600ee36113@changeid> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The common cros-ec keymap has been defined as macros. This patch uses the macros to simply linux,keymap in cros-ec-keyboard.dtsi file. Signed-off-by: Philip Chen --- arch/arm/boot/dts/cros-ec-keyboard.dtsi | 91 +------------------------ 1 file changed, 3 insertions(+), 88 deletions(-) diff --git a/arch/arm/boot/dts/cros-ec-keyboard.dtsi b/arch/arm/boot/dts/cros-ec-keyboard.dtsi index 165c5bcd510e5..af994c8eb8163 100644 --- a/arch/arm/boot/dts/cros-ec-keyboard.dtsi +++ b/arch/arm/boot/dts/cros-ec-keyboard.dtsi @@ -6,6 +6,7 @@ */ #include +#include &cros_ec { keyboard-controller { @@ -15,94 +16,8 @@ keyboard-controller { google,needs-ghost-filter; linux,keymap = < - MATRIX_KEY(0x00, 0x01, KEY_LEFTMETA) - MATRIX_KEY(0x00, 0x02, KEY_F1) - MATRIX_KEY(0x00, 0x03, KEY_B) - MATRIX_KEY(0x00, 0x04, KEY_F10) - MATRIX_KEY(0x00, 0x05, KEY_RO) - MATRIX_KEY(0x00, 0x06, KEY_N) - MATRIX_KEY(0x00, 0x08, KEY_EQUAL) - MATRIX_KEY(0x00, 0x0a, KEY_RIGHTALT) - - MATRIX_KEY(0x01, 0x01, KEY_ESC) - MATRIX_KEY(0x01, 0x02, KEY_F4) - MATRIX_KEY(0x01, 0x03, KEY_G) - MATRIX_KEY(0x01, 0x04, KEY_F7) - MATRIX_KEY(0x01, 0x06, KEY_H) - MATRIX_KEY(0x01, 0x08, KEY_APOSTROPHE) - MATRIX_KEY(0x01, 0x09, KEY_F9) - MATRIX_KEY(0x01, 0x0b, KEY_BACKSPACE) - MATRIX_KEY(0x01, 0x0c, KEY_HENKAN) - - MATRIX_KEY(0x02, 0x00, KEY_LEFTCTRL) - MATRIX_KEY(0x02, 0x01, KEY_TAB) - MATRIX_KEY(0x02, 0x02, KEY_F3) - MATRIX_KEY(0x02, 0x03, KEY_T) - MATRIX_KEY(0x02, 0x04, KEY_F6) - MATRIX_KEY(0x02, 0x05, KEY_RIGHTBRACE) - MATRIX_KEY(0x02, 0x06, KEY_Y) - MATRIX_KEY(0x02, 0x07, KEY_102ND) - MATRIX_KEY(0x02, 0x08, KEY_LEFTBRACE) - MATRIX_KEY(0x02, 0x09, KEY_F8) - MATRIX_KEY(0x02, 0x0a, KEY_YEN) - - MATRIX_KEY(0x03, 0x00, KEY_LEFTMETA) - MATRIX_KEY(0x03, 0x01, KEY_GRAVE) - MATRIX_KEY(0x03, 0x02, KEY_F2) - MATRIX_KEY(0x03, 0x03, KEY_5) - MATRIX_KEY(0x03, 0x04, KEY_F5) - MATRIX_KEY(0x03, 0x06, KEY_6) - MATRIX_KEY(0x03, 0x08, KEY_MINUS) - MATRIX_KEY(0x03, 0x09, KEY_F13) - MATRIX_KEY(0x03, 0x0b, KEY_BACKSLASH) - MATRIX_KEY(0x03, 0x0c, KEY_MUHENKAN) - - MATRIX_KEY(0x04, 0x00, KEY_RIGHTCTRL) - MATRIX_KEY(0x04, 0x01, KEY_A) - MATRIX_KEY(0x04, 0x02, KEY_D) - MATRIX_KEY(0x04, 0x03, KEY_F) - MATRIX_KEY(0x04, 0x04, KEY_S) - MATRIX_KEY(0x04, 0x05, KEY_K) - MATRIX_KEY(0x04, 0x06, KEY_J) - MATRIX_KEY(0x04, 0x08, KEY_SEMICOLON) - MATRIX_KEY(0x04, 0x09, KEY_L) - MATRIX_KEY(0x04, 0x0a, KEY_BACKSLASH) - MATRIX_KEY(0x04, 0x0b, KEY_ENTER) - - MATRIX_KEY(0x05, 0x01, KEY_Z) - MATRIX_KEY(0x05, 0x02, KEY_C) - MATRIX_KEY(0x05, 0x03, KEY_V) - MATRIX_KEY(0x05, 0x04, KEY_X) - MATRIX_KEY(0x05, 0x05, KEY_COMMA) - MATRIX_KEY(0x05, 0x06, KEY_M) - MATRIX_KEY(0x05, 0x07, KEY_LEFTSHIFT) - MATRIX_KEY(0x05, 0x08, KEY_SLASH) - MATRIX_KEY(0x05, 0x09, KEY_DOT) - MATRIX_KEY(0x05, 0x0b, KEY_SPACE) - - MATRIX_KEY(0x06, 0x01, KEY_1) - MATRIX_KEY(0x06, 0x02, KEY_3) - MATRIX_KEY(0x06, 0x03, KEY_4) - MATRIX_KEY(0x06, 0x04, KEY_2) - MATRIX_KEY(0x06, 0x05, KEY_8) - MATRIX_KEY(0x06, 0x06, KEY_7) - MATRIX_KEY(0x06, 0x08, KEY_0) - MATRIX_KEY(0x06, 0x09, KEY_9) - MATRIX_KEY(0x06, 0x0a, KEY_LEFTALT) - MATRIX_KEY(0x06, 0x0b, KEY_DOWN) - MATRIX_KEY(0x06, 0x0c, KEY_RIGHT) - - MATRIX_KEY(0x07, 0x01, KEY_Q) - MATRIX_KEY(0x07, 0x02, KEY_E) - MATRIX_KEY(0x07, 0x03, KEY_R) - MATRIX_KEY(0x07, 0x04, KEY_W) - MATRIX_KEY(0x07, 0x05, KEY_I) - MATRIX_KEY(0x07, 0x06, KEY_U) - MATRIX_KEY(0x07, 0x07, KEY_RIGHTSHIFT) - MATRIX_KEY(0x07, 0x08, KEY_P) - MATRIX_KEY(0x07, 0x09, KEY_O) - MATRIX_KEY(0x07, 0x0b, KEY_UP) - MATRIX_KEY(0x07, 0x0c, KEY_LEFT) + CROS_STD_TOP_ROW_KEYMAP + CROS_STD_NON_TOP_ROW_KEYMAP >; }; }; -- 2.26.2