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");