From patchwork Thu Oct 19 19:43:29 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiancheng Xue X-Patchwork-Id: 116369 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp389197qgn; Thu, 19 Oct 2017 04:41:11 -0700 (PDT) X-Google-Smtp-Source: ABhQp+SQGttippCmBH4HHhcns+xEd32EJ2Ig92rxs/evVvmMpBAyQOvfavxawqNL6WkrK3d5Uw9i X-Received: by 10.99.63.199 with SMTP id m190mr1125661pga.201.1508413271227; Thu, 19 Oct 2017 04:41:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1508413271; cv=none; d=google.com; s=arc-20160816; b=C2UWJ04oL4R5B6qD+xpnutFTJcwSXwSfZ6n0IVGUxVE2Fk2lukuXQqv2uzqzgR55EQ yeMgwHL0EM3X4p5M0D+p8hE4BRWXifDyeSbJDBIKL8M82ALOWs62yhiiTZzRHsAZeWHJ bUwMS9qBrtE1NDZjDpr17wyQvN+GGYpsNB1M7HKP13Xcw/g2zaNncy2W0OtBeE1IZgEg PAWghMW6MtVg2c5Rk5YjQUp3sb9L7u28i0svmtJUR0gFDH0KX32uORoC4jgDwt18c9em I+ihN6S5WBkyf5TA0pUnOjCcGGnyLzsXngdtA6/Rh4Bzjwt0QUETzZHjvK41J9KmV/+G t6bw== 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=Cg+lm7+kiZoDMZDuUmxSk7dCA/ypuGOr5kczo/kxxRo=; b=zE+fh3s8r1H17c6NR7x5altOBTwp8yJTHBCljKMkTXem0fOfVQ5EfSxN+My0cEbnUZ JfjMHWx7YepSEqqjh4fFFC1DawIpgSjnQ+g2BGkd6gdgomV/1K2kWBdBJHAHssMwRgrQ VCgCaMkpbVx+gaq8H6BBGMo+wnoWWNZV/DOStfs4vHXW0uBq08wJJykwZ7nmj2RqEb0N tr/PJjPP/AHDKd80/SCwTW56EK75cU8JQAEaGQWY7tKpA9uT3ZYycwYEnf+AP/YGPTWF rMEyAMphOElamebBf8eiSebOCGrTUpgvvxsl6oa8SRqg0W/LvuHwGQivYyBCTHR4F+KV YEoQ== 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 e9si9562166pln.708.2017.10.19.04.41.10; Thu, 19 Oct 2017 04:41:11 -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 S1753254AbdJSLlI (ORCPT + 27 others); Thu, 19 Oct 2017 07:41:08 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:8996 "EHLO szxga05-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752916AbdJSLlE (ORCPT ); Thu, 19 Oct 2017 07:41:04 -0400 Received: from 172.30.72.58 (EHLO DGGEMS414-HUB.china.huawei.com) ([172.30.72.58]) by dggrg05-dlp.huawei.com (MOS 4.4.6-GA FastPath queued) with ESMTP id DJL42714; Thu, 19 Oct 2017 19:40:48 +0800 (CST) Received: from arch-ubuntu.huawei.com (10.69.192.66) by DGGEMS414-HUB.china.huawei.com (10.3.19.214) with Microsoft SMTP Server id 14.3.301.0; Thu, 19 Oct 2017 19:39:00 +0800 From: Jiancheng Xue To: CC: , , , , , , , Younian Wang Subject: [PATCH v2 1/2] [media] rc/keymaps: add support for RC of hisilicon TV demo boards Date: Thu, 19 Oct 2017 15:43:29 -0400 Message-ID: <1508442210-43958-2-git-send-email-xuejiancheng@hisilicon.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1508442210-43958-1-git-send-email-xuejiancheng@hisilicon.com> References: <1508442210-43958-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.0A020201.59E88F40.016F, 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: 4f1fa5c2ddcbd76073c052bd220a02d3 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 | 81 ++++++++++++++++++++++++++++++ 2 files changed, 82 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..03bef29 --- /dev/null +++ b/drivers/media/rc/keymaps/rc-hisi-tv-demo.c @@ -0,0 +1,81 @@ +/* + * Keytable for remote controller of HiSilicon tv demo board. + * + * Copyright (c) 2017 HiSilicon Technologies Co., Ltd. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + */ + +#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-tv-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 Thu Oct 19 19:43:30 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiancheng Xue X-Patchwork-Id: 116368 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp389011qgn; Thu, 19 Oct 2017 04:40:59 -0700 (PDT) X-Google-Smtp-Source: ABhQp+RAxytiJcU2Sh9SMDZ2emsqFxOVEGdVfQkemOoQYDBDyrJGnJSukAEYCLs+IH1kmt6QB7j7 X-Received: by 10.98.163.196 with SMTP id q65mr1243082pfl.7.1508413259567; Thu, 19 Oct 2017 04:40:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1508413259; cv=none; d=google.com; s=arc-20160816; b=L/uqgHVpORHboEJmDGrXp5HJmGzd9oJqWadFRulYoU8jSR0ujVMca4LpUaN3pQkG71 xmjCVZ+g+URvc9Zvia08PMNKN6Xns/mmDdV5NYQUb0yirDo8vASFxunJlw2OyzrCGTvz aKZruAaXaMOTyPbSOx5mL9S7ckkkZcVF6oHc81BLJdcHPHmVZQsbAyBKl1jty2lpcH++ T8cgS2GEEgS3nq2N9aesFAm+lFC1IIjgHnNwlc4XL1dsYw+9sj4E4E+6uUcK0xC2ju+w YXYfeqWlXMnEhaT5WJmkgzMSqH15tZzfkmNh/diA3VVh0W6XCZT6QwBdx8zUjjn3yd+q m82Q== 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=cIhN1eGl17BKQ6ZQjdP5HDId13YlcB/3+Yf/BLQEk08=; b=FTsnxPW3DHdQP/VBxzxAfwn4O/Pv4l/ZL+am5A61TdkXi7r07JD7QgJ6KyBdqFB7tb eIypOoDG/5joaa4UFYlRk8hicH1TuwQR5fTe4y3hI7Inus0CG31wae5sMCpnQZVLD0SR eKTHrYJUcJ7wb7ZugaL4KEh+0ruz+FcUdXeWNT6mkk2A94p2iXsFHXOo7W80/POQ9RtS Pe3SaSooYCdkMmxrD65ZDdXs3RF5WPR4GqsoJ2seI/5ixdurJQZVEiqsPyRp5PI36y0I yw/34uKv5LJ5pY+BpKxncThijkH2IKdZJ5n9cLo8xD4c1Xw2PaUCy+R8f3UgBP4/s2FM nI5Q== 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 g193si606147pfc.29.2017.10.19.04.40.59; Thu, 19 Oct 2017 04:40:59 -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 S1753215AbdJSLk5 (ORCPT + 27 others); Thu, 19 Oct 2017 07:40:57 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:8995 "EHLO szxga05-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752916AbdJSLkz (ORCPT ); Thu, 19 Oct 2017 07:40:55 -0400 Received: from 172.30.72.58 (EHLO DGGEMS414-HUB.china.huawei.com) ([172.30.72.58]) by dggrg05-dlp.huawei.com (MOS 4.4.6-GA FastPath queued) with ESMTP id DJL42713; Thu, 19 Oct 2017 19:40:48 +0800 (CST) Received: from arch-ubuntu.huawei.com (10.69.192.66) by DGGEMS414-HUB.china.huawei.com (10.3.19.214) with Microsoft SMTP Server id 14.3.301.0; Thu, 19 Oct 2017 19:39:01 +0800 From: Jiancheng Xue To: CC: , , , , , , , Younian Wang Subject: [PATCH v2 2/2] [media] rc/keymaps: add support for RC of hisilicon poplar board Date: Thu, 19 Oct 2017 15:43:30 -0400 Message-ID: <1508442210-43958-3-git-send-email-xuejiancheng@hisilicon.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1508442210-43958-1-git-send-email-xuejiancheng@hisilicon.com> References: <1508442210-43958-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.0A010202.59E88F3D.00E5, 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: 0fd363d9e5eabba63c8f971fe805c9b6 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 | 69 +++++++++++++++++++++++++++++++ 2 files changed, 70 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..5f50800 --- /dev/null +++ b/drivers/media/rc/keymaps/rc-hisi-poplar.c @@ -0,0 +1,69 @@ +/* + * Keytable for remote controller of HiSilicon poplar board. + * + * Copyright (c) 2017 HiSilicon Technologies Co., Ltd. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + */ + +#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");