Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp2229859imm; Thu, 18 Oct 2018 11:04:06 -0700 (PDT) X-Google-Smtp-Source: ACcGV6185Tis0+ynRMO49gAUJXeMp2EqzkDmgFEP+D4j5OKeu+TSe0skrgO6z7GiM9e4z9p6aevk X-Received: by 2002:a17:902:e01:: with SMTP id 1-v6mr25969400plw.207.1539885845998; Thu, 18 Oct 2018 11:04:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539885845; cv=none; d=google.com; s=arc-20160816; b=L3Qw4RVQbuaJ4wGU8n+7PPmh+QCgPNVgRhIbBe1chHKBX1rHtkKWPPbNZN6sx6ad4D qxpx93vYy9sTeKI0HO2Rv08PASWf1xopCOcxkISS7pRWR/wlpm/8kDcxg5X0xBornj3B pLVzUxm+np2KvwOu3wRA+OR99alGvjfj5TxgIl/fsbAdaIHwYzBqOZkcRiwX3BnsYfzm a1Bneq4AIx8uuRIdcBoQzzNLEkjMg+J2uF8iuQE0lIcD8IPKcp10E1mpvTjvdDolDW2f 9zwk6jGQJIHjl2W9WdflOWrDARRsnyO/oqTA78ZgEEHnnVG1sRAzQdrtsKvvRCRmNHPx 0N6w== 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=AtxutWCFtqiogq6QjDngb4+ADfzoT2A7mQgUMoNbUDY=; b=YDaZO//BG1T6eYDXr8e9qJsi2h/8ViEnkWljiE9z03VpdyY5/bfCk2ZIBWNDCsz0i4 I9m/IWDrYPVaXcI6+bdNdhX0iULR+KYo8Y7eKMpZYWif/XpzbAVNUpHF3w89g5WEcY3c JpK8uVXmbnnuWCq4XjSmTMOUKL/oDsNrWwpZkPejzsGmegQkL9y3IkCTgJDhHMU27kt8 MLOHoBAv/l32iJhI4V0tEISP+9WYGElH0jYCKge3pNVrtnCNprfTlp3+3hLGt5+M2x1o lXA0yvb3hFEYwq/aBqTDfNmQdvH51BhMli9qNsmwM3qcimjE4kxdxWvWpzHOByOd7D1c DmNQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=i2bouZrK; 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 b2-v6si22883278plm.25.2018.10.18.11.03.50; Thu, 18 Oct 2018 11:04:05 -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=i2bouZrK; 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 S1729807AbeJSCEs (ORCPT + 99 others); Thu, 18 Oct 2018 22:04:48 -0400 Received: from mail.kernel.org ([198.145.29.99]:52986 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729137AbeJSCEs (ORCPT ); Thu, 18 Oct 2018 22:04:48 -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 3816121476; Thu, 18 Oct 2018 18:02:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1539885760; bh=dPa1fDm7k0emiirKR9u+e5UmgqSN3uWismJwpj2Y2Zs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=i2bouZrKyDdtZowmBHfaQRIxTfGr2ZCsJnzQEmYtoOOlHhHiytOPazskOF8sah4Ir nqyWQods8nfeSygUZDQac3fOyXEcaoijGgRB0k93mb7betl2LVIpreOEVWcV5SI/Ar M6E0SsHPSKETuwgBomWOdLygiuP4M41yBRF2l4oQ= 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.9 13/35] Input: atakbd - fix Atari keymap Date: Thu, 18 Oct 2018 19:54:42 +0200 Message-Id: <20181018175424.639227264@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181018175422.506152522@linuxfoundation.org> References: <20181018175422.506152522@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.9-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;