From patchwork Wed Oct 18 10:54:56 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiancheng Xue X-Patchwork-Id: 116169 Delivered-To: patch@linaro.org Received: by 10.140.22.163 with SMTP id 32csp5578733qgn; Tue, 17 Oct 2017 19:50:40 -0700 (PDT) X-Google-Smtp-Source: AOwi7QAOMAvOFeJSGCbUi0P4DuuHj6Ueze4CPSlY/Wzuk5i9A8vcFddLTXcssY3iTS+A6lQYIuQt X-Received: by 10.99.177.4 with SMTP id r4mr12609194pgf.391.1508295040463; Tue, 17 Oct 2017 19:50:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1508295040; cv=none; d=google.com; s=arc-20160816; b=UkdWpZpJOoScgKpsTbVxWtRZzhEDTViRuLXBhqMjn59hXtuHYLQj33HOjPbUXzxmeu AsyUAIOlKky5lP9TihdjxQ0i0+9pCH0moGQftiZgltgCj980U5429jyZ8oksOwtt0hzv AQrcr7oBCFezpmAxQhZZGbeL/fdRYznQWrWRR8+pa0BZlZ2X3heOOT6nKo/8E2PhB1WR OpK0AGFZMnBbn+F0cYDc+1gnt2b6zcF+xQcsWvgu0uJ2qAlB6ijbZAlt5f9xrMYF0Kj/ 3uPmtWApljgJeieyARriWYjX+SMlglctFnEmUwFQJAVZVvZRALKgr7lz2x/BVnBRCTRC N41g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:arc-authentication-results; bh=fIq7tkdASKkl1PGGv2tEy8nqbY90mHA8CJf59ut8jEc=; b=rbEx6O9k5DG9t3MUgD6LSkVIRMt1CQ0tuFhLTf8f6soLGuHZXZs6P30GvejB+gDEuz kcl19Ea5aWqQB5K1LujOr1YxLzJ88IxoWpdWZYOIGgOp0AMmI3UIp1WwkGQczZBJ1ic4 MJTs/tI0KXz7E/shtcwdR0QW9PyzvLbD5iFuVUSpdxnSWrWKAdJI6sVn9NauAz4zbVSl k8VgqxAp9ecmjREZfo0Hl5L3TXfXK8g435vFLHZndTVtnufCn6Zf2gIwmIxTwe5pFZzE znrn186UMxfD0SLiu7Iy5M8xCfGIGQU+YWyc1+SFZs44UqLp36TRVqTLMUJpvf1EVxmz W+nA== 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 j2si7031961plk.165.2017.10.17.19.50.39; Tue, 17 Oct 2017 19:50:40 -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; 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 S933079AbdJRCug (ORCPT + 27 others); Tue, 17 Oct 2017 22:50:36 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:8491 "EHLO szxga04-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752543AbdJRCue (ORCPT ); Tue, 17 Oct 2017 22:50:34 -0400 Received: from 172.30.72.58 (EHLO DGGEMS412-HUB.china.huawei.com) ([172.30.72.58]) by dggrg04-dlp.huawei.com (MOS 4.4.6-GA FastPath queued) with ESMTP id DJG65680; Wed, 18 Oct 2017 10:50:22 +0800 (CST) Received: from arch-ubuntu.huawei.com (10.69.192.66) by DGGEMS412-HUB.china.huawei.com (10.3.19.212) with Microsoft SMTP Server id 14.3.301.0; Wed, 18 Oct 2017 10:50:12 +0800 From: Jiancheng Xue To: CC: , , , , Younian Wang , Jiancheng Xue Subject: [PATCH 1/2] [media] rc/keymaps: add support for RC of hisilicon TV demo boards Date: Wed, 18 Oct 2017 06:54:56 -0400 Message-ID: <1508324097-5514-2-git-send-email-xuejiancheng@hisilicon.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1508324097-5514-1-git-send-email-xuejiancheng@hisilicon.com> References: <1508324097-5514-1-git-send-email-xuejiancheng@hisilicon.com> MIME-Version: 1.0 X-Originating-IP: [10.69.192.66] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A090204.59E6C16F.0041, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0, ip=0.0.0.0, so=2014-11-16 11:51:01, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: a2ea967b6b4a043ab6a987c2f17ee27b Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Younian Wang This is a NEC protocol type remote controller distributed with hisilicon TV demo boards. Signed-off-by: Younian Wang Signed-off-by: Jiancheng Xue --- drivers/media/rc/keymaps/Makefile | 1 + drivers/media/rc/keymaps/rc-hisi-tv-demo.c | 70 ++++++++++++++++++++++++++++++ 2 files changed, 71 insertions(+) create mode 100644 drivers/media/rc/keymaps/rc-hisi-tv-demo.c -- 2.7.4 diff --git a/drivers/media/rc/keymaps/Makefile b/drivers/media/rc/keymaps/Makefile index af6496d..83ec9c3 100644 --- a/drivers/media/rc/keymaps/Makefile +++ b/drivers/media/rc/keymaps/Makefile @@ -47,6 +47,7 @@ obj-$(CONFIG_RC_MAP) += rc-adstech-dvb-t-pci.o \ rc-geekbox.o \ rc-genius-tvgo-a11mce.o \ rc-gotview7135.o \ + rc-hisi-tv-demo.o \ rc-imon-mce.o \ rc-imon-pad.o \ rc-iodata-bctv7e.o \ diff --git a/drivers/media/rc/keymaps/rc-hisi-tv-demo.c b/drivers/media/rc/keymaps/rc-hisi-tv-demo.c new file mode 100644 index 0000000..410b17d --- /dev/null +++ b/drivers/media/rc/keymaps/rc-hisi-tv-demo.c @@ -0,0 +1,70 @@ +#include +#include + +static struct rc_map_table hisi_tv_demo_keymap[] = { + { 0x00000092, KEY_1}, + { 0x00000093, KEY_2}, + { 0x000000cc, KEY_3}, + { 0x0000009f, KEY_4}, + { 0x0000008e, KEY_5}, + { 0x0000008f, KEY_6}, + { 0x000000c8, KEY_7}, + { 0x00000094, KEY_8}, + { 0x0000008a, KEY_9}, + { 0x0000008b, KEY_0}, + { 0x000000ce, KEY_ENTER}, + { 0x000000ca, KEY_UP}, + { 0x00000099, KEY_LEFT}, + { 0x00000084, KEY_PAGEUP}, + { 0x000000c1, KEY_RIGHT}, + { 0x000000d2, KEY_DOWN}, + { 0x00000089, KEY_PAGEDOWN}, + { 0x000000d1, KEY_MUTE}, + { 0x00000098, KEY_VOLUMEDOWN}, + { 0x00000090, KEY_VOLUMEUP}, + { 0x0000009c, KEY_POWER}, + { 0x000000d6, KEY_STOP}, + { 0x00000097, KEY_MENU}, + { 0x000000cb, KEY_BACK}, + { 0x000000da, KEY_PLAYPAUSE}, + { 0x00000080, KEY_INFO}, + { 0x000000c3, KEY_REWIND}, + { 0x00000087, KEY_HOMEPAGE}, + { 0x000000d0, KEY_FASTFORWARD}, + { 0x000000c4, KEY_SOUND}, + { 0x00000082, BTN_1}, + { 0x000000c7, BTN_2}, + { 0x00000086, KEY_PROGRAM}, + { 0x000000d9, KEY_SUBTITLE}, + { 0x00000085, KEY_ZOOM}, + { 0x0000009b, KEY_RED}, + { 0x0000009a, KEY_GREEN}, + { 0x000000c0, KEY_YELLOW}, + { 0x000000c2, KEY_BLUE}, + { 0x0000009d, KEY_CHANNELDOWN}, + { 0x000000cf, KEY_CHANNELUP}, +}; + +static struct rc_map_list hisi_tv_demo_map = { + .map = { + .scan = hisi_tv_demo_keymap, + .size = ARRAY_SIZE(hisi_tv_demo_keymap), + .rc_proto = RC_PROTO_NEC, + .name = "rc-hisi-demo", + } +}; + +static int __init init_rc_map_hisi_tv_demo(void) +{ + return rc_map_register(&hisi_tv_demo_map); +} + +static void __exit exit_rc_map_hisi_tv_demo(void) +{ + rc_map_unregister(&hisi_tv_demo_map); +} + +module_init(init_rc_map_hisi_tv_demo) +module_exit(exit_rc_map_hisi_tv_demo) + +MODULE_LICENSE("GPL v2"); From patchwork Wed Oct 18 10:54:57 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiancheng Xue X-Patchwork-Id: 116171 Delivered-To: patch@linaro.org Received: by 10.140.22.163 with SMTP id 32csp5579919qgn; Tue, 17 Oct 2017 19:52:37 -0700 (PDT) X-Google-Smtp-Source: AOwi7QDsuBRdTeczRUfA+HImAyg2zquPY6aQ7CNTqh6CY7vMIZC69phETzZiXKQ+kF8cNjx2+a8y X-Received: by 10.98.245.66 with SMTP id n63mr13678143pfh.102.1508295157700; Tue, 17 Oct 2017 19:52:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1508295157; cv=none; d=google.com; s=arc-20160816; b=J5kveAMMNDh1vlTmCp4P6GBb7OxbX0IBCHtnElBY+Yw17KH+5rippfSHnfFyS/DUds KrStMc7HI9B5O0o0RKXOkHR+qYhFiv76onsRK3AmZ2p+vXE2L+XDD3F6V2xfu7N3MZRG YW1WgJOVQs736qE103KsrTab+wSXwVeIgZs+E/yR/gfV/yMWTKLqQbtbUs0E9XCNC8sV jwIYxyPrc+n0pgE/zI/gmDEsCtL6urvzfJ6Yi2ZPJUnDZZUMJ2bNbdR6yY22wXJErxX+ 9g7XWNvgg0hsvi8aze8xq+yOzXdNDE8HALBmKssXb3owyo0X6PK6hvXxTxD0bEFfcSw1 7gcA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:arc-authentication-results; bh=xpNVdFn8z7AqutN5c6hsypny0gaMHIM2CfXMttvMG90=; b=fLJ8KbGCZ8uYwuCIWld1pHyQnhJ7/gdO/00WG6reQiV6uTbg8zOaDVgq0LZ/p20upb fZSZ+4l+Ait68rZohjajMqK67+eXYOdFuwHucacbzEcscFv/cJoYvCXs/uiMKKrMjS9v GIIVZnfmEqCi/OvHII5cvqrsEmwlIDDfx9VTihMNVZa0LZkL9bCGPoqZjy3bPXp5pCRr TrSVKvf7tkNp4jj/OEQXdv97rkEdP2oIwYUG6eSSzrgJmrRr09Dr1zjJwv9T6zw2JdaA nLHMi2gxHoTPo+aWL7CKWqkvc1IhXQVoNpPxe9zUfr79lHpS/YVLrrx0ArC9CGaMmW5R 2k+Q== 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 33si6975013pls.291.2017.10.17.19.52.37; Tue, 17 Oct 2017 19:52:37 -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; 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 S933250AbdJRCwg (ORCPT + 27 others); Tue, 17 Oct 2017 22:52:36 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:8492 "EHLO szxga04-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752724AbdJRCwe (ORCPT ); Tue, 17 Oct 2017 22:52:34 -0400 Received: from 172.30.72.58 (EHLO DGGEMS412-HUB.china.huawei.com) ([172.30.72.58]) by dggrg04-dlp.huawei.com (MOS 4.4.6-GA FastPath queued) with ESMTP id DJG65685; Wed, 18 Oct 2017 10:50:23 +0800 (CST) Received: from arch-ubuntu.huawei.com (10.69.192.66) by DGGEMS412-HUB.china.huawei.com (10.3.19.212) with Microsoft SMTP Server id 14.3.301.0; Wed, 18 Oct 2017 10:50:13 +0800 From: Jiancheng Xue To: CC: , , , , Younian Wang , Jiancheng Xue Subject: [PATCH 2/2] [media] rc/keymaps: add support for RC of hisilicon poplar board Date: Wed, 18 Oct 2017 06:54:57 -0400 Message-ID: <1508324097-5514-3-git-send-email-xuejiancheng@hisilicon.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1508324097-5514-1-git-send-email-xuejiancheng@hisilicon.com> References: <1508324097-5514-1-git-send-email-xuejiancheng@hisilicon.com> MIME-Version: 1.0 X-Originating-IP: [10.69.192.66] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A010203.59E6C16F.0027, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0, ip=0.0.0.0, so=2014-11-16 11:51:01, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: b9657849bee3e0a087a4ac04429179ae Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Younian Wang This is a NEC protocol type remote controller distributed with 96boards poplar@tocoding board. Signed-off-by: Younian Wang Signed-off-by: Jiancheng Xue --- drivers/media/rc/keymaps/Makefile | 1 + drivers/media/rc/keymaps/rc-hisi-poplar.c | 58 +++++++++++++++++++++++++++++++ 2 files changed, 59 insertions(+) create mode 100644 drivers/media/rc/keymaps/rc-hisi-poplar.c -- 2.7.4 diff --git a/drivers/media/rc/keymaps/Makefile b/drivers/media/rc/keymaps/Makefile index 83ec9c3..8daabfc6 100644 --- a/drivers/media/rc/keymaps/Makefile +++ b/drivers/media/rc/keymaps/Makefile @@ -47,6 +47,7 @@ obj-$(CONFIG_RC_MAP) += rc-adstech-dvb-t-pci.o \ rc-geekbox.o \ rc-genius-tvgo-a11mce.o \ rc-gotview7135.o \ + rc-hisi-poplar.o \ rc-hisi-tv-demo.o \ rc-imon-mce.o \ rc-imon-pad.o \ diff --git a/drivers/media/rc/keymaps/rc-hisi-poplar.c b/drivers/media/rc/keymaps/rc-hisi-poplar.c new file mode 100644 index 0000000..730d556 --- /dev/null +++ b/drivers/media/rc/keymaps/rc-hisi-poplar.c @@ -0,0 +1,58 @@ +#include +#include + +static struct rc_map_table hisi_poplar_keymap[] = { + { 0x0000b292, KEY_1}, + { 0x0000b293, KEY_2}, + { 0x0000b2cc, KEY_3}, + { 0x0000b28e, KEY_4}, + { 0x0000b28f, KEY_5}, + { 0x0000b2c8, KEY_6}, + { 0x0000b28a, KEY_7}, + { 0x0000b28b, KEY_8}, + { 0x0000b2c4, KEY_9}, + { 0x0000b287, KEY_0}, + { 0x0000b282, KEY_HOMEPAGE}, + { 0x0000b2ca, KEY_UP}, + { 0x0000b299, KEY_LEFT}, + { 0x0000b2c1, KEY_RIGHT}, + { 0x0000b2d2, KEY_DOWN}, + { 0x0000b2c5, KEY_DELETE}, + { 0x0000b29c, KEY_MUTE}, + { 0x0000b281, KEY_VOLUMEDOWN}, + { 0x0000b280, KEY_VOLUMEUP}, + { 0x0000b2dc, KEY_POWER}, + { 0x0000b29a, KEY_MENU}, + { 0x0000b28d, KEY_SETUP}, + { 0x0000b2c5, KEY_BACK}, + { 0x0000b295, KEY_PLAYPAUSE}, + { 0x0000b2ce, KEY_ENTER}, + { 0x0000b285, KEY_CHANNELUP}, + { 0x0000b286, KEY_CHANNELDOWN}, + { 0x0000b2da, KEY_NUMERIC_STAR}, + { 0x0000b2d0, KEY_NUMERIC_POUND}, +}; + +static struct rc_map_list hisi_poplar_map = { + .map = { + .scan = hisi_poplar_keymap, + .size = ARRAY_SIZE(hisi_poplar_keymap), + .rc_proto = RC_PROTO_NEC, + .name = "rc-hisi-poplar", + } +}; + +static int __init init_rc_map_hisi_poplar(void) +{ + return rc_map_register(&hisi_poplar_map); +} + +static void __exit exit_rc_map_hisi_poplar(void) +{ + rc_map_unregister(&hisi_poplar_map); +} + +module_init(init_rc_map_hisi_poplar) +module_exit(exit_rc_map_hisi_poplar) + +MODULE_LICENSE("GPL v2");