Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp2249075imm; Thu, 18 Oct 2018 11:22:33 -0700 (PDT) X-Google-Smtp-Source: ACcGV62h57+QkuCFyz80mAABpWHkB+VOCmpKMmEw54nGQd5/BVBX44t3Vzz//u0HPssKZSBqlErV X-Received: by 2002:a17:902:4381:: with SMTP id j1-v6mr30382213pld.59.1539886953875; Thu, 18 Oct 2018 11:22:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539886953; cv=none; d=google.com; s=arc-20160816; b=TlUdw070h8YjazV+8OtKjbYqD8N2gXFL6k1cYLhDoq3vUXLTo+yZTq7u0PSXK8weV0 DGC7aaKgU/jm/hPCOyMqN5s5IkiYS3K20CQW8uenwXHLQfoG4LD2pw02n4n1rRW4OiXi QMPOdS7f6YB2iYzW/uq2Hrgpu6TFRUtliYzq5L1XNZ7ys24IZ3BvGwQjNiYwz2DafZIA woU6XLENArNuiAjUZ0UFqWsWpdpYxTAGg/4qWfxiWAbc8HNfsK4wiMa9JjxeenFD7ENx YYwT0iRywSeYT1b6zeexFc6aMT4j0jPjfVc6An/EFm3GynNO8PKKYiPzmCg0XhBUOEel 0qSg== 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=lBkOFDiSmiloEm4A5nwKUEkyBlyiMtLXAqBfzHPxOiQ=; b=UlgGumTHhmr26sRxya4RAi/PCvmyR1cluu5qrkCnv358mcuaf+P8v7W16ZUMG0HQUi HEuYJViPg0WVJ8RmkbxTasaRYMgNuoCWMz48e1crO++DYQw4qsKU2Oop8ZKY9YD6RvIo YwOGydOC5yZtyQN7hnKtgHZ56NqsdhAmRt8wyBmrmvfYFabOmnMk82G0ir5A+LvBC2fq hhyr9Wm+LXLwFQXKvmouZaFgB6FiKIK5cjKKkZrl+iC1oTE5HZOthWD1O1XsYnS2+a7K 1vcqpPF5l6GhUgetvpK8hppaUuDjJdJQnh/WmBOJ4Xw47zrWzhxGxIRISY6ZiLc8+afk Hcgw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=1uNq+Hiz; 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 75-v6si19999383pfy.169.2018.10.18.11.22.18; Thu, 18 Oct 2018 11:22:33 -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=1uNq+Hiz; 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 S1728745AbeJSB67 (ORCPT + 99 others); Thu, 18 Oct 2018 21:58:59 -0400 Received: from mail.kernel.org ([198.145.29.99]:46718 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728729AbeJSB67 (ORCPT ); Thu, 18 Oct 2018 21:58:59 -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 B3191204FD; Thu, 18 Oct 2018 17:56:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1539885414; bh=Po2P5KtA1+/pPIGxbCYLmBR/qNPuHpJf0Zps5jZoy5M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=1uNq+HizaruCpoYSLpjw0X7NoS+X9Tg3jNRdjSjbJF/Ibf4FlmrTdWKpO08VdkkXO MGKIkglxNaAeFxsymfV47E4/EqqxIiaQhhcE8z09SBZb6XYwDG+SN++aefSKndC72g mr+bVPR4do78wxjpXxKF7YoXdq9XET2sYpmQbTxY= 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.18 21/53] Input: atakbd - fix Atari keymap Date: Thu, 18 Oct 2018 19:54:14 +0200 Message-Id: <20181018175420.437783796@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181018175416.561567978@linuxfoundation.org> References: <20181018175416.561567978@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.18-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;