Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9179812pxu; Mon, 28 Dec 2020 08:33:46 -0800 (PST) X-Google-Smtp-Source: ABdhPJyOZeHaIIkSszLy1ayBcNQplQRPn7ZbEakXCUSuIE+42fl4i+k0eRwTFrjoRtsaNh+TZPh6 X-Received: by 2002:aa7:c884:: with SMTP id p4mr42183845eds.72.1609173226434; Mon, 28 Dec 2020 08:33:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609173226; cv=none; d=google.com; s=arc-20160816; b=dK9m3ZfkpMUJQFKMpCOPGGpqXUz1RQ8wzy/fVQ1pDZs9DB9c6rfixbUUDLuGmUrlZg HrpgsRsEdu8Ai2ULHLzKnNPt5VyKAzYvBBQWV2iKkqUV12pJqll5stbijEVG0lTghcsL I9chidrEZLC7KREtzdRGFQ4xy1ndGfBEWH6PW94Dj6blGnDrgOhIrc2I9xLm/S0fdtI8 hoHMoJhq50nlwGfP+1jDFynYqgIyBkrJbL9JVH6pW8gDSXxiRkHq2UY85rnhFq35BvRu vfB7gAC0oYlJForQzkvXTecqCS6hhx4HwiuYSTjQesA64I48FDp6NawIdDxnJH3e2lei wB5Q== 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=8gwRCIN0ThkOXBYvy/PmAnNbfvs9Xz45Fc/dE5/ljFk=; b=uKHV+Xab2RuvwNOfDx4zjxcRYMsmQihTVPfNswy2VWoo8pi9Hm9XtpKHtFfoCgU+Cm xF5nWL3YimC4F3aemGIRezRBeC8thvyRw5bCapKI8xbsSP16RTNh9wz2+2en7+MivXoV 7irW9hAQaTypY+oFbffDnbPL23crH+nBROjf6COQfQhStbGy8dYARCyVNmoSU12FvpzF hEymbXwwtI/WxPz8qeOVUYfy+4/sZKWSSKc/HwRsrYiUy+n1LV8gas3FnBkRVepz6VIl MewUbVrlblqMUgMzsGhnx0K+/J4rXhXp8+KZarsn0obpGTLCItdaEYF65gmFca5QBzOG SNkA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=fLyR3uCx; 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 a13si21058078edb.419.2020.12.28.08.33.22; Mon, 28 Dec 2020 08:33:46 -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=fLyR3uCx; 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 S2441852AbgL1Qbs (ORCPT + 99 others); Mon, 28 Dec 2020 11:31:48 -0500 Received: from mail.kernel.org ([198.145.29.99]:60500 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730492AbgL1NEk (ORCPT ); Mon, 28 Dec 2020 08:04:40 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 23324208B6; Mon, 28 Dec 2020 13:04:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609160664; bh=DNj8wKmS+On55spJH+hBnLHl71y+QuPxP82hLgDYX0Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fLyR3uCxebTlWWNYjCB2IKBCtvQBOltUbffTQ0Ci5sQL6HhgMPT2aQjGDC9nuY6ve 6D51Tn33nXF5njkYN08rEzkJFCcD4jt0y+9SCr6JrfYgWXTcpMxvjf1tjErcMlEEcs BkI9q2w/YHeARHRcgxI4WsQN/Vw4M3fuCzvQwTIk= 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.9 129/175] Input: cros_ec_keyb - send scancodes in addition to key events Date: Mon, 28 Dec 2020 13:49:42 +0100 Message-Id: <20201228124859.505795207@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228124853.216621466@linuxfoundation.org> References: <20201228124853.216621466@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 25943e9bc8bff..328792e26a9f6 100644 --- a/drivers/input/keyboard/cros_ec_keyb.c +++ b/drivers/input/keyboard/cros_ec_keyb.c @@ -140,6 +140,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