Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp3717399imm; Mon, 8 Oct 2018 08:26:26 -0700 (PDT) X-Google-Smtp-Source: ACcGV610PrHAPx3B/OSvL5hfDkYX90LDMaUQZS3cb8zvY66xx0dZvvulza0JQ63LiHa28Mcd9LZx X-Received: by 2002:a63:a42:: with SMTP id z2-v6mr21253623pgk.209.1539012386655; Mon, 08 Oct 2018 08:26:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539012386; cv=none; d=google.com; s=arc-20160816; b=VcQOh1fNbJwn5+4HUKLQMRNMLNmfdlDAThjO4GhlMgtJ2oLpWQrrKulOB3F1EbNyBj +vpwr1OZncrDoUhLhtiEhgv8uu/TUIG6+c3qZCfUSFnMorqJ8Ciuo8+FeKBR4i8u3T0M ORGXwiSRzgFn24Tqz6zWylbK7S82Me6MQBWd3y8+pzJBYcrQCOvkyFwxmw/NX7cZ7oUk e7oAU365hUah/mXMPWf8vOsDqNYQt6QfFXHMbz3u5Vcsvhp8GfApCALczqifR0gHj/Uo gmUJIbiAHhqFWCX2ywmXEEXpuVIHSzxza0hdNXuOdYy3F0/78q177pZWXRVfWIHDLee+ sz4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=k/c9I4MHDc6kyeHFP5/xZX30C1KMgflWQTnm6rd+PTA=; b=taMfgIvDo8HnmUQ6upXU53qTNhKldFYsvpwcfrnkWnyW7oqSbEDPzD4CponW18nyj4 RgGsQ2IvrhSnuLhlZ3VoCwp5s49UUN3EiZxoEKzAUJUq0R/G6gYMMsGP6jIe9UQQZh4Z f5t1wG+9i+uzncn69sNIkl9nJmCcX4uvb6anH8tEqJjdMw6wKfZ3lW6pblFTplvotAY4 PTWL/n0aWzVzgl3JIoXUX9dAzuxFzhu5xrq1iC7BBXA/a26Am9USy9O3Gc0tHvpD4Pqp t8YiXW6ImLsK//+YnuZVO2xEmAe0ex4UIlsATc4xcwhJyoZg9A7v2jIWvrpyoyachObY gdOA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=JslB8tbI; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c1-v6si15121633pld.107.2018.10.08.08.26.09; Mon, 08 Oct 2018 08:26:26 -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=JslB8tbI; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727328AbeJHWiE (ORCPT + 99 others); Mon, 8 Oct 2018 18:38:04 -0400 Received: from mail.kernel.org ([198.145.29.99]:56288 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726991AbeJHWiD (ORCPT ); Mon, 8 Oct 2018 18:38:03 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 003552089D; Mon, 8 Oct 2018 15:25:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1539012348; bh=PtC5GPjln3PJHAY06Uf2tyEiTgpacxpkWuxo7aNABdQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JslB8tbISzVi0ql9bbA8vYIT3aSTqx8j/fVcZTqFRXSP6k/ss3A5SYyn4jblVdWqq fD1GWF6z9zz31DaUNoTs3WG5cjNkjd5T2pXDwugBb1ymh/Jk6PAfnk/+wMu8AKn47t /T7qQORlj6RxiaQV6M1LYqqtCvTL8M5xE/O9PCJU= From: Sasha Levin To: stable@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Andreas Schwab , Michael Schmitz , Dmitry Torokhov , Sasha Levin Subject: [PATCH AUTOSEL 4.18 23/58] Input: atakbd - fix Atari keymap Date: Mon, 8 Oct 2018 11:24:48 -0400 Message-Id: <20181008152523.70705-23-sashal@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181008152523.70705-1-sashal@kernel.org> References: <20181008152523.70705-1-sashal@kernel.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- drivers/input/keyboard/atakbd.c | 64 ++++++++++++++------------------- 1 file changed, 26 insertions(+), 38 deletions(-) diff --git a/drivers/input/keyboard/atakbd.c b/drivers/input/keyboard/atakbd.c index f1235831283d..524a72bee55a 100644 --- 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] = { /* American layout */ [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] = { /* American layout */ [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 char scancode, char down) 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; -- 2.17.1