From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.6 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4A359C352A3 for ; Thu, 13 Feb 2020 22:15:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1F3372086A for ; Thu, 13 Feb 2020 22:15:31 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Y1UTBh4c" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727772AbgBMWPa (ORCPT ); Thu, 13 Feb 2020 17:15:30 -0500 Received: from mail-wr1-f67.google.com ([209.85.221.67]:32953 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727722AbgBMWPa (ORCPT ); Thu, 13 Feb 2020 17:15:30 -0500 Received: by mail-wr1-f67.google.com with SMTP id u6so8692933wrt.0 for ; Thu, 13 Feb 2020 14:15:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=JNHMsrFpW6UxmjPYn9L8QH02HyfSoGO3j/SqFO5X3Sg=; b=Y1UTBh4cKwum14du9DtpH1dK+W6N6rldqWcRqa17b0kpzJoc2WVIRpIfRYyhyzhOjZ P1QsLuv3hYxhDLRmvoIwEpsDSSD5Jh9kHG0Oqe8IZkqyZcnZFf56sicYV1GfMlpRDn3F MKRxNo/g4XwlClQaCA6pbJ9xsy+4pfha+fFOndMzocTcZyAMPyYzDLfTODhiM7Y93xak j6pE63Lxepv2O5wPwsjt12llh2U77iZL3cBheO+c6PQB3UUdo/08QoSbz5TAc+Nq0MFu iZKWue5dz+zPPsLyMTpRR54a3R0hRxncdB85j6SMnvdABZQnEaTTvzuiuqhZSGtTw+r9 42rQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=JNHMsrFpW6UxmjPYn9L8QH02HyfSoGO3j/SqFO5X3Sg=; b=CLXTc13TaIFOE1X0jJYc1mgAc5xClXsFN28/zYjbOrugHpW+T6UUnAmAf6rLmV6Lbw K2daYbRES5Pzf3k5dDP250wDru4Dzvg4Kpgz+t0YgdHYWo/SSHKvjZ/38s/xywm7zPRQ 93lTve6uJ28i3erhXK+HYEts6ybsT8y0T+YgZzmKh64pKPBwVpuiroUsOTFsQX7aeTW+ KAAuW4Lf73I9KR9ENEgh1lc0KSDIUlNB+XpBGdEAm4uM6CQukEo89X9Tno4eFJhaNtSe TXmlDN4FKQYzt/YNj2qF4tX2/50ZLb/FVuB1CTw3X321+WVsncWd/BZ8xhybSK1NMp6C seNA== X-Gm-Message-State: APjAAAVRgzLxwEu0xM9GPa8gmFEyyX6Chvdyl96GR1HhL5WnEjxFlV5O 12HvklGArs843GM/15BvkEMuMDUb X-Google-Smtp-Source: APXvYqy8qjWmrikXRItnTX9olAYWWfbD3wCZJD6stOK/ag37WlKsTH/8vNUP5vmDzeJ9k+oHaEE38g== X-Received: by 2002:a5d:5403:: with SMTP id g3mr25130175wrv.302.1581632127506; Thu, 13 Feb 2020 14:15:27 -0800 (PST) Received: from localhost ([37.237.208.38]) by smtp.gmail.com with ESMTPSA id d204sm4657711wmd.30.2020.02.13.14.15.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Feb 2020 14:15:27 -0800 (PST) From: Mohammad Rasim To: linux-media@vger.kernel.org, Sean Young , Mauro Carvalho Chehab , Kevin Hilman , linux-amlogic@lists.infradead.org Cc: Mohammad Rasim Subject: [PATCH v4 1/2] media: rc: add keymap for Videostrong KII Pro Date: Fri, 14 Feb 2020 01:15:12 +0300 Message-Id: <20200213221513.28540-2-mohammad.rasim96@gmail.com> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200213221513.28540-1-mohammad.rasim96@gmail.com> References: <20200213221513.28540-1-mohammad.rasim96@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org This is an NEC remote control device shipped with the Videostrong KII Pro tv box. Signed-off-by: Mohammad Rasim --- drivers/media/rc/keymaps/Makefile | 1 + .../media/rc/keymaps/rc-videostrong-kii-pro.c | 83 +++++++++++++++++++ include/media/rc-map.h | 1 + 3 files changed, 85 insertions(+) create mode 100644 drivers/media/rc/keymaps/rc-videostrong-kii-pro.c diff --git a/drivers/media/rc/keymaps/Makefile b/drivers/media/rc/keymaps/Makefile index 63261ef6380a..aaa1bf81d00d 100644 --- a/drivers/media/rc/keymaps/Makefile +++ b/drivers/media/rc/keymaps/Makefile @@ -119,6 +119,7 @@ obj-$(CONFIG_RC_MAP) += rc-adstech-dvb-t-pci.o \ rc-videomate-m1f.o \ rc-videomate-s350.o \ rc-videomate-tv-pvr.o \ + rc-videostrong-kii-pro.o \ rc-wetek-hub.o \ rc-wetek-play2.o \ rc-winfast.o \ diff --git a/drivers/media/rc/keymaps/rc-videostrong-kii-pro.c b/drivers/media/rc/keymaps/rc-videostrong-kii-pro.c new file mode 100644 index 000000000000..74a278ffa3f1 --- /dev/null +++ b/drivers/media/rc/keymaps/rc-videostrong-kii-pro.c @@ -0,0 +1,83 @@ +// SPDX-License-Identifier: GPL-2.0+ +// +// Copyright (C) 2019 Mohammad Rasim + +#include +#include + +// +// Keytable for the Videostrong KII Pro STB remote control +// + +static struct rc_map_table kii_pro[] = { + { 0x59, KEY_POWER }, + { 0x19, KEY_MUTE }, + { 0x42, KEY_RED }, + { 0x40, KEY_GREEN }, + { 0x00, KEY_YELLOW }, + { 0x03, KEY_BLUE }, + { 0x4a, KEY_BACK }, + { 0x48, KEY_FORWARD }, + { 0x08, KEY_PREVIOUSSONG}, + { 0x0b, KEY_NEXTSONG}, + { 0x46, KEY_PLAYPAUSE }, + { 0x44, KEY_STOP }, + { 0x1f, KEY_FAVORITES}, //KEY_F5? + { 0x04, KEY_PVR}, + { 0x4d, KEY_EPG}, + { 0x02, KEY_INFO}, + { 0x09, KEY_SUBTITLE}, + { 0x01, KEY_AUDIO}, + { 0x0d, KEY_HOMEPAGE}, + { 0x11, KEY_TV}, // DTV ? + { 0x06, KEY_UP}, + { 0x5a, KEY_LEFT}, + { 0x1a, KEY_ENTER}, // KEY_OK ? + { 0x1b, KEY_RIGHT}, + { 0x16, KEY_DOWN}, + { 0x45, KEY_MENU}, + { 0x05, KEY_ESC}, + { 0x13, KEY_VOLUMEUP }, + { 0x17, KEY_VOLUMEDOWN }, + { 0x58, KEY_APPSELECT}, + { 0x12, KEY_VENDOR}, // mouse + { 0x55, KEY_PAGEUP}, // KEY_CHANNELUP ? + { 0x15, KEY_PAGEDOWN}, //KEY_CHANNELDOWN ? + { 0x52, KEY_1}, + { 0x50, KEY_2}, + { 0x10, KEY_3}, + { 0x56, KEY_4}, + { 0x54, KEY_5}, + { 0x14, KEY_6}, + { 0x4e, KEY_7}, + { 0x4c, KEY_8}, + { 0x0c, KEY_9}, + { 0x18, KEY_F7}, + { 0x0f, KEY_0}, + { 0x51, KEY_BACKSPACE}, +}; + +static struct rc_map_list kii_pro_map = { + .map = { + .scan = kii_pro, + .size = ARRAY_SIZE(kii_pro), + .rc_proto = RC_PROTO_NEC, + .name = RC_MAP_KII_PRO, + } +}; + +static int __init init_rc_map_kii_pro(void) +{ + return rc_map_register(&kii_pro_map); +} + +static void __exit exit_rc_map_kii_pro(void) +{ + rc_map_unregister(&kii_pro_map); +} + +module_init(init_rc_map_kii_pro) +module_exit(exit_rc_map_kii_pro) + +MODULE_LICENSE("GPL"); +MODULE_AUTHOR("Mohammad Rasim "); diff --git a/include/media/rc-map.h b/include/media/rc-map.h index f99575a0d29c..d22810dcd85c 100644 --- a/include/media/rc-map.h +++ b/include/media/rc-map.h @@ -274,6 +274,7 @@ struct rc_map *rc_map_get(const char *name); #define RC_MAP_VIDEOMATE_K100 "rc-videomate-k100" #define RC_MAP_VIDEOMATE_S350 "rc-videomate-s350" #define RC_MAP_VIDEOMATE_TV_PVR "rc-videomate-tv-pvr" +#define RC_MAP_KII_PRO "rc-videostrong-kii-pro" #define RC_MAP_WETEK_HUB "rc-wetek-hub" #define RC_MAP_WETEK_PLAY2 "rc-wetek-play2" #define RC_MAP_WINFAST "rc-winfast" -- 2.25.0