Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp3054358imj; Mon, 18 Feb 2019 18:39:56 -0800 (PST) X-Google-Smtp-Source: AHgI3IbxteI6fZuXYWNvdgnlt1DGk+Va/qQL8KTXluHLsOTkzKtR+4v+xgfI0YDT654LGmqjCji5 X-Received: by 2002:a17:902:bc3:: with SMTP id 61mr28713461plr.15.1550543996771; Mon, 18 Feb 2019 18:39:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550543996; cv=none; d=google.com; s=arc-20160816; b=G8hpMHjEokPu7+spnu8472Pab9LIhL4nu6+vZCfo1eZWlcl74PI6QL59Dv2B0Fud9j RY/JNXSvogFYeSPv6v558KaVgld3Q3588kEq1C9EolvmBQN0hTeZCpLdXyUcociplViM lvxYQKs9ZTg5d/RyiImNJ/p22qKul+aIAk5TeG3jrnjHTl8EamXX5wq1hAniK6q6BlqZ zWqF9q/EQWxP1KEnlGZRu//4HWJReKh+YLhZLhD5vTO2uqABAOgPSiPUOSxjySMtTg4I 24HvUHQERhQSaMhpzZ9BtmwNdwXhrNtRT93o1HD01j2EMPW29Raa3yEK0fwrx5e+joKy R4yA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from; bh=tEMvJzSNPOc1d/D8tibZWq4w0NHljd30tR6hkF4D7tA=; b=vd/VGp8skWrJq+3QiWrRbVtmqI5DuMEmVVGuF/emnb3N0bsfUc/iHo8y5v/YnGqYKb clAtxGCokJU5NOaXvz/qtuVM8s5iqqEW43Srs/JDmrYhhYT2qYszyTfp1ccTO6xlA+h/ SnW95T54mNnhR464N6T/eWdvO5lxzhWJ6ggEfev34Ug38M3PdX9v0YOnX6djDH/GMx9H jmvMZJhO88Id5piUgYejo4JPQM3TjFaz89XskjgiR4efmhJ6+aUviDmaAoiGjIfOMiCS VkdUhLw4hIhNm7xiQfHxVF8bgJZknveI7ez81b1FqrtbsGsiKxt0Zy5JMAgQfwrbjlgX 7ewA== ARC-Authentication-Results: i=1; mx.google.com; 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 z8si14113440pgf.577.2019.02.18.18.39.41; Mon, 18 Feb 2019 18:39:56 -0800 (PST) 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; 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 S1731248AbfBRV7m convert rfc822-to-8bit (ORCPT + 99 others); Mon, 18 Feb 2019 16:59:42 -0500 Received: from mail-oln040092068088.outbound.protection.outlook.com ([40.92.68.88]:47112 "EHLO EUR02-HE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1731178AbfBRV7j (ORCPT ); Mon, 18 Feb 2019 16:59:39 -0500 Received: from VE1EUR02FT036.eop-EUR02.prod.protection.outlook.com (10.152.12.54) by VE1EUR02HT080.eop-EUR02.prod.protection.outlook.com (10.152.13.171) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1580.10; Mon, 18 Feb 2019 21:59:36 +0000 Received: from AM3PR03MB0966.eurprd03.prod.outlook.com (10.152.12.51) by VE1EUR02FT036.mail.protection.outlook.com (10.152.13.197) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1580.10 via Frontend Transport; Mon, 18 Feb 2019 21:59:36 +0000 Received: from AM3PR03MB0966.eurprd03.prod.outlook.com ([fe80::8011:1f4d:3804:e5f3]) by AM3PR03MB0966.eurprd03.prod.outlook.com ([fe80::8011:1f4d:3804:e5f3%10]) with mapi id 15.20.1622.018; Mon, 18 Feb 2019 21:59:36 +0000 From: Jonas Karlman To: "linux-media@vger.kernel.org" CC: Mauro Carvalho Chehab , Sean Young , "linux-kernel@vger.kernel.org" , Jonas Karlman Subject: [PATCH 1/3] [media] rc/keymaps: add keytable for Pine64 IR Remote Controller Thread-Topic: [PATCH 1/3] [media] rc/keymaps: add keytable for Pine64 IR Remote Controller Thread-Index: AQHUx9U8H3wCPt1wSEKj5vg9/61RJw== Date: Mon, 18 Feb 2019 21:59:36 +0000 Message-ID: References: <20190218215915.2782-1-jonas@kwiboo.se> In-Reply-To: <20190218215915.2782-1-jonas@kwiboo.se> Accept-Language: sv-SE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: AM5P189CA0034.EURP189.PROD.OUTLOOK.COM (2603:10a6:206:15::47) To AM3PR03MB0966.eurprd03.prod.outlook.com (2a01:111:e400:884c::23) x-incomingtopheadermarker: OriginalChecksum:4F62B4110C22785338389040E444E344EBBECBAE9D95FC2EF31C87345B12A619;UpperCasedChecksum:9B05FDBCC47EDAAE94CBA4C021F022DE869153EA06BD484376DE64F5174EA214;SizeAsReceived:8538;Count:64 x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.17.1 x-tmn: [ONA2JunIWJ7bnuv8Th2KjKWajxtCapI8] x-microsoft-original-message-id: <20190218215915.2782-2-jonas@kwiboo.se> x-ms-publictraffictype: Email x-incomingheadercount: 64 x-eopattributedmessage: 0 x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(20181119070)(201702061078)(5061506573)(5061507331)(1603103135)(2017031320274)(2017031323274)(2017031324274)(2017031322404)(1601125500)(1603101475)(1701031045);SRVR:VE1EUR02HT080; x-ms-traffictypediagnostic: VE1EUR02HT080: x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(4566010)(82015058);SRVR:VE1EUR02HT080;BCL:0;PCL:0;RULEID:;SRVR:VE1EUR02HT080; x-microsoft-antispam-message-info: qvNSoI5HSId4CEXxHhc/s28IcUFa9gWSFb94YbtdUTC5nqSExQzV3R3kq0rX1qxi Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 54485d23-c432-40fe-8436-6091d627118c X-MS-Exchange-CrossTenant-Network-Message-Id: 4739ca8f-6441-4616-6ac9-08d695ec5ee8 X-MS-Exchange-CrossTenant-rms-persistedconsumerorg: 54485d23-c432-40fe-8436-6091d627118c X-MS-Exchange-CrossTenant-originalarrivaltime: 18 Feb 2019 21:59:35.4933 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Internet X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1EUR02HT080 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This RC map is based on remote key schema at [1], the mouse button key did not have an obvious target and was mapped to KEY_CONTEXT_MENU. [1] http://files.pine64.org/doc/Pine%20A64%20Schematic/remote-wit-logo.jpg Signed-off-by: Jonas Karlman --- drivers/media/rc/keymaps/Makefile | 1 + drivers/media/rc/keymaps/rc-pine64.c | 59 ++++++++++++++++++++++++++++ include/media/rc-map.h | 1 + 3 files changed, 61 insertions(+) create mode 100644 drivers/media/rc/keymaps/rc-pine64.c diff --git a/drivers/media/rc/keymaps/Makefile b/drivers/media/rc/keymaps/Makefile index 5b1399af6b3a..0ea52f65bb03 100644 --- a/drivers/media/rc/keymaps/Makefile +++ b/drivers/media/rc/keymaps/Makefile @@ -76,6 +76,7 @@ obj-$(CONFIG_RC_MAP) += rc-adstech-dvb-t-pci.o \ rc-norwood.o \ rc-npgtech.o \ rc-pctv-sedna.o \ + rc-pine64.o \ rc-pinnacle-color.o \ rc-pinnacle-grey.o \ rc-pinnacle-pctv-hd.o \ diff --git a/drivers/media/rc/keymaps/rc-pine64.c b/drivers/media/rc/keymaps/rc-pine64.c new file mode 100644 index 000000000000..94e5624f63f4 --- /dev/null +++ b/drivers/media/rc/keymaps/rc-pine64.c @@ -0,0 +1,59 @@ +// SPDX-License-Identifier: GPL-2.0+ +// Keytable for Pine64 IR Remote Controller +// Copyright (c) 2017 Jonas Karlman + +#include +#include + +static struct rc_map_table pine64[] = { + { 0x404000, KEY_NUMERIC_0 }, + { 0x404001, KEY_NUMERIC_1 }, + { 0x404002, KEY_NUMERIC_2 }, + { 0x404003, KEY_NUMERIC_3 }, + { 0x404004, KEY_NUMERIC_4 }, + { 0x404005, KEY_NUMERIC_5 }, + { 0x404006, KEY_NUMERIC_6 }, + { 0x404007, KEY_NUMERIC_7 }, + { 0x404008, KEY_NUMERIC_8 }, + { 0x404009, KEY_NUMERIC_9 }, + { 0x40400a, KEY_MUTE }, + { 0x40400b, KEY_UP }, + { 0x40400c, KEY_BACKSPACE }, + { 0x40400d, KEY_OK }, + { 0x40400e, KEY_DOWN }, + { 0x404010, KEY_LEFT }, + { 0x404011, KEY_RIGHT }, + { 0x404017, KEY_VOLUMEDOWN }, + { 0x404018, KEY_VOLUMEUP }, + { 0x40401a, KEY_HOME }, + { 0x40401d, KEY_MENU }, + { 0x40401f, KEY_WWW }, + { 0x404045, KEY_BACK }, + { 0x404047, KEY_CONTEXT_MENU }, + { 0x40404d, KEY_POWER }, +}; + +static struct rc_map_list pine64_map = { + .map = { + .scan = pine64, + .size = ARRAY_SIZE(pine64), + .rc_proto = RC_PROTO_NECX, + .name = RC_MAP_PINE64, + } +}; + +static int __init init_rc_map_pine64(void) +{ + return rc_map_register(&pine64_map); +} + +static void __exit exit_rc_map_pine64(void) +{ + rc_map_unregister(&pine64_map); +} + +module_init(init_rc_map_pine64) +module_exit(exit_rc_map_pine64) + +MODULE_LICENSE("GPL"); +MODULE_AUTHOR("Jonas Karlman"); diff --git a/include/media/rc-map.h b/include/media/rc-map.h index d621acadfbf3..52b554aa784d 100644 --- a/include/media/rc-map.h +++ b/include/media/rc-map.h @@ -236,6 +236,7 @@ struct rc_map *rc_map_get(const char *name); #define RC_MAP_NORWOOD "rc-norwood" #define RC_MAP_NPGTECH "rc-npgtech" #define RC_MAP_PCTV_SEDNA "rc-pctv-sedna" +#define RC_MAP_PINE64 "rc-pine64" #define RC_MAP_PINNACLE_COLOR "rc-pinnacle-color" #define RC_MAP_PINNACLE_GREY "rc-pinnacle-grey" #define RC_MAP_PINNACLE_PCTV_HD "rc-pinnacle-pctv-hd" -- 2.17.1