Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp270755pxb; Fri, 15 Jan 2021 12:38:06 -0800 (PST) X-Google-Smtp-Source: ABdhPJyJYZe/g19K7XlQf7npky4NysbmvE546WvxgoJTvR3miyXjm4Ur2OvQre/y2qKC2oYyrDJT X-Received: by 2002:a17:906:4a1a:: with SMTP id w26mr4032035eju.422.1610743086231; Fri, 15 Jan 2021 12:38:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610743086; cv=none; d=google.com; s=arc-20160816; b=NBEs5oQmRRKfy6gPvJqKxOL4QE5eSj8f1Z4xM5DjlxM1DR7pbIFZcD4f/SF/ysVZfR ghZwaQCj0sZIU7wwmwDY9D8gQ2ZGpyL36dK4CA3EyWN5XJC1r7S4FOPn+CZwOr4JiGly Yed6sDJng/ZEV+o1ghEozDLkkU39syMNLP3DdCdeDoP8cwsUeEXmCHsOoHpzEsqdaK2C Mi96FH/iVI0a0IolV5WzzIJ0rQ+BaHvOZfeKr/gOiPYf4pdsc6zpouJc2MsLlPWLqKWA qh8rxgmfIKZsvIlS+lc5W9/p01mNL3PFjR9TVGN9u7S8Tbw61TMaqoyCQtaZUT/6Pa7z yDrw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:message-id:date:to:cc:from:subject :references:in-reply-to:content-transfer-encoding:mime-version :dkim-signature; bh=4hMQzIP7zncuEyTAF7vrSSyWWXAfnsAF2txZ6DpQGl0=; b=T0zlzKf2/J4ABnqXAidpuUiZSsuBBQyS8NlpjnGf4rwad6Et2vACQQfXk1s7+QarkF y3C5cSEt9hJaz5uZrayaBG0CMQEtVMxDn3S4EARS4P1RNGhmYHokLUyyQxsM5s1EdL44 c66vuM5LlMHQ29Ky6k2eW0M0MkPFXbiY4bBNF/UAWy/YS61vD9nLWr94a7ODPwfo6yA5 zr5WH3DplTeeL2QQv8yUjsWqBEW3K5TsY05mgCzPJ8MA87vcFD911hVodrJu6IUXFhBT VNb07K/igTcOi4G6vkS7tWO0lESvXNC7Y70DDhHx3rj5AOJ0gzE/uRmFWz9aoahkDo4g CgpA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=lV+8rLzV; 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 l18si4217983eje.178.2021.01.15.12.37.41; Fri, 15 Jan 2021 12:38:06 -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=lV+8rLzV; 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 S1729094AbhAOUfm (ORCPT + 99 others); Fri, 15 Jan 2021 15:35:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58718 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727180AbhAOUfm (ORCPT ); Fri, 15 Jan 2021 15:35:42 -0500 Received: from mail-pl1-x634.google.com (mail-pl1-x634.google.com [IPv6:2607:f8b0:4864:20::634]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9E88BC061795 for ; Fri, 15 Jan 2021 12:34:43 -0800 (PST) Received: by mail-pl1-x634.google.com with SMTP id u11so1001323plg.13 for ; Fri, 15 Jan 2021 12:34:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:content-transfer-encoding:in-reply-to:references :subject:from:cc:to:date:message-id:user-agent; bh=4hMQzIP7zncuEyTAF7vrSSyWWXAfnsAF2txZ6DpQGl0=; b=lV+8rLzVC+fHAT1RWHN1CqmepqVfLE7nL2pb0A4UtoCnS2X9fb9QSl7Xnmd8FzGpfe N4aGc4YXEKfiApjhdY95uV63VYCRla77pGl4+Cdtm0C4KBZTWJRv8DOpJAY/bIxpAxS4 W56HkqP4Uhx43E/HMYYn6Ejirix+1jpb+WNWk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:content-transfer-encoding :in-reply-to:references:subject:from:cc:to:date:message-id :user-agent; bh=4hMQzIP7zncuEyTAF7vrSSyWWXAfnsAF2txZ6DpQGl0=; b=Yhy4lSPdeXvXa/TylFBDSGIx4m3bAAG3M6Cev3rSSwZTP2l6Q0tMlJKAnZ1CAXIOkL Tz+SdjEY0Ysbe5K2mXl1d61z0TToI8MHPfQhK03YJVYtGmoQkAOUpFL2a9pQ1YDJy3cb o4OceI7dowR6yAJwJIYQZh1RUYGYLLSDjXkvN1zng7Wp4yVlK1zFOUT8IPU0j6rlOdli 9CQ4WnixFoXtEWDc8nwOxOtsEsJBoHsKmTiGj49mwlGJO1+SavlHWuGZ2Hf1XzyrWU+B uNi3uH+c175TedSE5QcjH1GwDk5BndFApti+YiMwtYj8LJXVzBCO6f+BaJ6scDPiUVsQ mtwA== X-Gm-Message-State: AOAM531qHHBBiI+C+4X7rP+kdSLe4OiCrvSjdpjBvwzRkBYwT+F3KEcv hvc9QcCuAHWcmqNXXeZqpDcdxA== X-Received: by 2002:a17:902:8607:b029:db:eb10:eebb with SMTP id f7-20020a1709028607b02900dbeb10eebbmr14524055plo.43.1610742883241; Fri, 15 Jan 2021 12:34:43 -0800 (PST) Received: from chromium.org ([2620:15c:202:201:3e52:82ff:fe6c:83ab]) by smtp.gmail.com with ESMTPSA id y8sm1731960pfq.106.2021.01.15.12.34.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Jan 2021 12:34:42 -0800 (PST) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable In-Reply-To: <20210115122412.v7.2.I6542d7d9d0b246e7079bb16b41e697b2ac4b4e39@changeid> References: <20210115122412.v7.1.I025fb861cd5fa0ef5286b7dce514728e9df7ae74@changeid> <20210115122412.v7.2.I6542d7d9d0b246e7079bb16b41e697b2ac4b4e39@changeid> Subject: Re: [PATCH v7 2/2] Input: cros-ec-keyb - Expose function row physical map to userspace From: Stephen Boyd Cc: dianders@chromium.org, Philip Chen , Benson Leung , Enric Balletbo i Serra , Guenter Roeck , Lee Jones , Rajat Jain , linux-input@vger.kernel.org To: LKML , Philip Chen , dmitry.torokhov@gmail.com Date: Fri, 15 Jan 2021 12:34:41 -0800 Message-ID: <161074288129.3661239.8671522224671695448@swboyd.mtv.corp.google.com> User-Agent: alot/0.9.1 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Quoting Philip Chen (2021-01-15 12:24:30) > The top-row keys in a keyboard usually have dual functionalities. > E.g. A function key "F1" is also an action key "Browser back". >=20 > Therefore, when an application receives an action key code from > a top-row key press, the application needs to know how to correlate > the action key code with the function key code and do the conversion > whenever necessary. >=20 > Since the userpace already knows the key scanlines (row/column) > associated with a received key code. Essentially, the userspace only > needs a mapping between the key row/column and the matching physical > location in the top row. >=20 > So, enhance the cros-ec-keyb driver to create such a mapping > and expose it to userspace in the form of a function_row_physmap > attribute. The attribute would be a space separated ordered list of > row/column codes for the keys in the function row, in a left-to-right > order. >=20 > The attribute will only be present when the device has a custom design > for the top-row keys. >=20 > Signed-off-by: Philip Chen > --- Reviewed-by: Stephen Boyd