Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp2261927imm; Thu, 18 Oct 2018 11:36:03 -0700 (PDT) X-Google-Smtp-Source: ACcGV625PHmERHaa4IfAPhGeSr06B4tzZoebCnX3v4KVu1f/vVM3YBVbi2Cr4s0jwEHv3SjLPL/Z X-Received: by 2002:a63:64c2:: with SMTP id y185-v6mr29137751pgb.411.1539887763803; Thu, 18 Oct 2018 11:36:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539887763; cv=none; d=google.com; s=arc-20160816; b=WfUvrXTvBo0do+7qpVl36nJ8rTE1Wr/k0LrnXpwRw8Nm9g7ZZ0v/F4LNAx+p1V94SJ WOnuR/z0yo0OYh9bZWI+QK0LbnrPqZ/36XocAB++Yw1wBOSV8/jKqjF7hWrqq6PbGUJW sf6YscjbfcHi3OUwmRHdwMoCkoE7Jh4NIhsm2Jd6UOoJ2kUMDr37PQkpBX9Ebs+47fzo nJkeHclFUfVAd3L/iks/bSXCgoV5DGF+tCy+tocXXnfk3AKA9XXz4ARr2MZZYkwcPn2U /qj4kNlGeqIDLo47647eFDW9EVhie5/TrIM1Xexy/Ur0yv2XIo0Lf+lFnTefN9xz06Ee WYuQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=UbmRd48DeKZm7L4E7Uw/oZcpAER4HUIjZ57MZK2SJM4=; b=N6smTFif/n8dFo/iUbqqWf+qiW4TB5wLKZWsMBahfmAz9qdvQDM/fmjCcP+bBkQSop 337nWzSCjpRn/Bm3ssKjdfS0KwZweLGAW7JJd4HjVMgQWbJP/O/72IICn8xD76zLHp0e dvV/aNfRyI/yuJCUnGQsqk57qm9vOX1TffaV97on0nOCbuY9I80MiRj7jO3UbYQcnyyH wRNCrPmR70KgR36nIj8HuOmC1JsTlxTKJaU7K+SI3Cs7M+uVjHBTxjDwAT8cROMXo1Ng 4lAUJxOhoXz0HXe1z0aQytOgLh0N1X2Ym05F5hTND6d4uxcqm+64xjzGXD9Ima+vlVlS KHFw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=QMQk9ANV; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t33-v6si21698026pgk.141.2018.10.18.11.35.47; Thu, 18 Oct 2018 11:36:03 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=QMQk9ANV; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730642AbeJSCJS (ORCPT + 99 others); Thu, 18 Oct 2018 22:09:18 -0400 Received: from mail.kernel.org ([198.145.29.99]:58700 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730620AbeJSCJS (ORCPT ); Thu, 18 Oct 2018 22:09:18 -0400 Received: from localhost (ip-213-127-77-176.ip.prioritytelecom.net [213.127.77.176]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id AAB25204FD; Thu, 18 Oct 2018 18:07:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1539886030; bh=YyJPP8U1CcgwLQrjHpUnLIVdOyUQ3+FBtI/M7hLhcjY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QMQk9ANVnHTLcH9OdUqq5YKbSofiKYE9x4Qo74uxCudiSihmU2ov2WO3wHx3xz9rz Cz/J8rTGWL3M3nGLTLYR52HBoq+u3oP7OScBV58jc3Ug2WYp2aag77nb5PdqgWkJWF wxv+Y3T3/KIWOBij5Kiv1Vrz9Yfn2YyuVyMM63bU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Michael Schmitz , Andreas Schwab , Dmitry Torokhov , Sasha Levin Subject: [PATCH 4.4 37/48] Input: atakbd - fix Atari keymap Date: Thu, 18 Oct 2018 19:55:12 +0200 Message-Id: <20181018175429.913176042@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181018175427.133690306@linuxfoundation.org> References: <20181018175427.133690306@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: Andreas Schwab [ Upstream commit 9e62df51be993035c577371ffee5477697a56aad ] Fix errors in Atari keymap (mostly in keypad, help and undo keys). Patch provided on debian-68k ML by Andreas Schwab , keymap array size and unhandled scancode limit adjusted to 0x73 by me. Tested-by: Michael Schmitz Signed-off-by: Michael Schmitz Signed-off-by: Andreas Schwab Signed-off-by: Dmitry Torokhov Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/input/keyboard/atakbd.c | 64 ++++++++++++++++------------------------ 1 file changed, 26 insertions(+), 38 deletions(-) --- a/drivers/input/keyboard/atakbd.c +++ b/drivers/input/keyboard/atakbd.c @@ -79,8 +79,7 @@ MODULE_LICENSE("GPL"); */ -static unsigned char atakbd_keycode[0x72] = { /* American layout */ - [0] = KEY_GRAVE, +static unsigned char atakbd_keycode[0x73] = { /* American layout */ [1] = KEY_ESC, [2] = KEY_1, [3] = KEY_2, @@ -121,9 +120,9 @@ static unsigned char atakbd_keycode[0x72 [38] = KEY_L, [39] = KEY_SEMICOLON, [40] = KEY_APOSTROPHE, - [41] = KEY_BACKSLASH, /* FIXME, '#' */ + [41] = KEY_GRAVE, [42] = KEY_LEFTSHIFT, - [43] = KEY_GRAVE, /* FIXME: '~' */ + [43] = KEY_BACKSLASH, [44] = KEY_Z, [45] = KEY_X, [46] = KEY_C, @@ -149,45 +148,34 @@ static unsigned char atakbd_keycode[0x72 [66] = KEY_F8, [67] = KEY_F9, [68] = KEY_F10, - [69] = KEY_ESC, - [70] = KEY_DELETE, - [71] = KEY_KP7, - [72] = KEY_KP8, - [73] = KEY_KP9, + [71] = KEY_HOME, + [72] = KEY_UP, [74] = KEY_KPMINUS, - [75] = KEY_KP4, - [76] = KEY_KP5, - [77] = KEY_KP6, + [75] = KEY_LEFT, + [77] = KEY_RIGHT, [78] = KEY_KPPLUS, - [79] = KEY_KP1, - [80] = KEY_KP2, - [81] = KEY_KP3, - [82] = KEY_KP0, - [83] = KEY_KPDOT, - [90] = KEY_KPLEFTPAREN, - [91] = KEY_KPRIGHTPAREN, - [92] = KEY_KPASTERISK, /* FIXME */ - [93] = KEY_KPASTERISK, - [94] = KEY_KPPLUS, - [95] = KEY_HELP, + [80] = KEY_DOWN, + [82] = KEY_INSERT, + [83] = KEY_DELETE, [96] = KEY_102ND, - [97] = KEY_KPASTERISK, /* FIXME */ - [98] = KEY_KPSLASH, + [97] = KEY_UNDO, + [98] = KEY_HELP, [99] = KEY_KPLEFTPAREN, [100] = KEY_KPRIGHTPAREN, [101] = KEY_KPSLASH, [102] = KEY_KPASTERISK, - [103] = KEY_UP, - [104] = KEY_KPASTERISK, /* FIXME */ - [105] = KEY_LEFT, - [106] = KEY_RIGHT, - [107] = KEY_KPASTERISK, /* FIXME */ - [108] = KEY_DOWN, - [109] = KEY_KPASTERISK, /* FIXME */ - [110] = KEY_KPASTERISK, /* FIXME */ - [111] = KEY_KPASTERISK, /* FIXME */ - [112] = KEY_KPASTERISK, /* FIXME */ - [113] = KEY_KPASTERISK /* FIXME */ + [103] = KEY_KP7, + [104] = KEY_KP8, + [105] = KEY_KP9, + [106] = KEY_KP4, + [107] = KEY_KP5, + [108] = KEY_KP6, + [109] = KEY_KP1, + [110] = KEY_KP2, + [111] = KEY_KP3, + [112] = KEY_KP0, + [113] = KEY_KPDOT, + [114] = KEY_KPENTER, }; static struct input_dev *atakbd_dev; @@ -195,7 +183,7 @@ static struct input_dev *atakbd_dev; static void atakbd_interrupt(unsigned char scancode, char down) { - if (scancode < 0x72) { /* scancodes < 0xf2 are keys */ + if (scancode < 0x73) { /* scancodes < 0xf3 are keys */ // report raw events here? @@ -209,7 +197,7 @@ static void atakbd_interrupt(unsigned ch input_report_key(atakbd_dev, scancode, down); input_sync(atakbd_dev); } - } else /* scancodes >= 0xf2 are mouse data, most likely */ + } else /* scancodes >= 0xf3 are mouse data, most likely */ printk(KERN_INFO "atakbd: unhandled scancode %x\n", scancode); return;