Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9171057pxu; Mon, 28 Dec 2020 08:20:15 -0800 (PST) X-Google-Smtp-Source: ABdhPJzXuLnwMWTX+e2zdBQIWZzAvkkDV5xHtEHtOm6QVyw5Gc8bDSWunnxV96m7kjZrcBbB3mEv X-Received: by 2002:a17:906:b04f:: with SMTP id bj15mr40882056ejb.383.1609172414904; Mon, 28 Dec 2020 08:20:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609172414; cv=none; d=google.com; s=arc-20160816; b=LrCglJ23xs9giAG1CGasTCkmc6/E8JapEszXajKRp/J17r7VCospx37xjf9Xzm5BFY JcfyeQFOI3lMWrVZIAtOBVHHVUNlFVoX1aCVQsAWoROpC+MF9WAKfgRf8yJf1EBjcTns LaS5S5owjDSQT44kwwDFNMI3FgcxffMViR7BKyxOM/RYy2nKnRajt/phmbT870ehOa3A zqTGSf/T2we0wxVPRq7E7i2lDKpUKENEnEl+P23KGa3QuxgZLDK1wlS3VMy//jjvuhAs +GFv3v2dW7Xv0SooTmNOKjtDHtPn83zmxqKOmjfAx7drHBznexcg+645B7GSodDwblh3 IhIQ== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=OFdwlQXcISVEB2XXntDWW3dr0Uj1FNnw4RE80fH8evA=; b=T3ft0f6nlFfTAK1k5lGcnS4lO+X7G5tPwDK+c8gvd8nG/IJG/Ox2GHJnpRUSXgZn0m xJkmvfydx9tVqfAHdbYO+nfPLC2RJhWTOOGO2kJwTgKxFaJPVIXJ85p4P6piJcgJ41AF Gn3A7KUPsZQriuRiS9BvFMxQekoAEexLBh1a+64UUslaA0GIqKkgGKM+uFrm9o04jTUu 4GN5BFpeJWTgeLNYxAJtrpxOh2SoUQpPKBCmzdXvwXS8E61rJ8PdIJReR8oCOdepBgAI u+c4uwmb8Uy03H3EX44xVgMVgx7KoQB/up5twSPnnTxqx2O7Ts4S9zL914Cz5z7OTq9T PLng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=D3Hxsbe8; 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=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r20si20760358edi.479.2020.12.28.08.19.42; Mon, 28 Dec 2020 08:20:14 -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=@linuxfoundation.org header.s=korg header.b=D3Hxsbe8; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732765AbgL1NPr (ORCPT + 99 others); Mon, 28 Dec 2020 08:15:47 -0500 Received: from mail.kernel.org ([198.145.29.99]:43822 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732757AbgL1NPq (ORCPT ); Mon, 28 Dec 2020 08:15:46 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 8AF91206ED; Mon, 28 Dec 2020 13:15:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609161331; bh=V2ODb96vyRtKwmpH35cYHAptDz6ZCJwVHgbA6g6OKJ4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=D3Hxsbe8cBT79yEB/woD43vjjQIiK5bE3AposmjvFH8OZCz3Tc0Ys0yFJsCdNoH3w NcOy7+FwdrGvKknmf0Fal+I7FwNnl2TwGWdx9+0RKKPyrnOHBuD1bR5v6/VEZ2LDVS ScTQJWMyF4VY/7Y9Qe1fyNPKjRqP3UUZihaVFlkI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Rajat Jain , Dmitry Torokhov , Sasha Levin Subject: [PATCH 4.14 179/242] Input: cros_ec_keyb - send scancodes in addition to key events Date: Mon, 28 Dec 2020 13:49:44 +0100 Message-Id: <20201228124913.496426290@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228124904.654293249@linuxfoundation.org> References: <20201228124904.654293249@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Dmitry Torokhov [ Upstream commit 80db2a087f425b63f0163bc95217abd01c637cb5 ] To let userspace know what 'scancodes' should be used in EVIOCGKEYCODE and EVIOCSKEYCODE ioctls, we should send EV_MSC/MSC_SCAN events in addition to EV_KEY/KEY_* events. The driver already declared MSC_SCAN capability, so it is only matter of actually sending the events. Link: https://lore.kernel.org/r/X87aOaSptPTvZ3nZ@google.com Acked-by: Rajat Jain Signed-off-by: Dmitry Torokhov Signed-off-by: Sasha Levin --- drivers/input/keyboard/cros_ec_keyb.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/input/keyboard/cros_ec_keyb.c b/drivers/input/keyboard/cros_ec_keyb.c index 0993b3f12df6a..149f4045f0f15 100644 --- a/drivers/input/keyboard/cros_ec_keyb.c +++ b/drivers/input/keyboard/cros_ec_keyb.c @@ -196,6 +196,7 @@ static void cros_ec_keyb_process(struct cros_ec_keyb *ckdev, "changed: [r%d c%d]: byte %02x\n", row, col, new_state); + input_event(idev, EV_MSC, MSC_SCAN, pos); input_report_key(idev, keycodes[pos], new_state); } -- 2.27.0