Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp1346718ybp; Fri, 11 Oct 2019 12:47:57 -0700 (PDT) X-Google-Smtp-Source: APXvYqxAVAgeRMKGQXw4XExHbPfwsgTUt6xy0vc+BAQmBWnlybVYB7qwgffsha3sGDQqNaTybJin X-Received: by 2002:aa7:c751:: with SMTP id c17mr15392084eds.29.1570823277779; Fri, 11 Oct 2019 12:47:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570823277; cv=none; d=google.com; s=arc-20160816; b=OgqTf3yzyz5Ys0QUZ6APUsEQj5+DF8VFOb1INAb68SaAdvg84iwCS5toK5CynKh9e8 ZU3LzlPv5IEx6+3WUFJDeb1CnWOnncZ0CiHCtBhytR7VRcHUhhcfeTJBcP06bXRQM/k3 5D04WC+u59U4Fxk/4k3OYWMBUJrwSNNhwcQSR2erlPcJ2hxcH/4a/pczt1T6sze+lRvL TW7W7VD3+B5OK5UP3IfFD+1E3MLdHle7EzPAcoEm1FeTY0bRdlQ1WsNouqjxftdBwsuj MXHNHUc4TD/M0r32t9Iw0T8W1XdW7f8E1CpTHun6aJeL3OGl/sGfepWEODKnJ3EnsOLM tb4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=/3bS4G5Y0I+plz0u2dyxfCOEMTUK76uRvLiuR7/nWEY=; b=dOPZOCU1nFiUVn5ufAli+09ENJelDSu+tjKFQL+LJ89eEPeyXiSs9SIKPYdkw0kGJR DfceLeGsuCSuUCSBb/bHc8jWD3uVKNUlp0tAZpxYUksN/JIR5wqmxD6M4e49le4H3Sg9 eGiLIbJJNk4V36VHayAJppG42KQBNcwh2Ot4xNp+sOtlmICmdBhkxWZkjzTNee18m8rM kphyvCdiolTqBUs54AG1mi9pNQsQK4ccn3M03iWDbLZz9zVE7NnAzgxliqcpjJkqWAu4 t5nd+YSz07jlhX4j0N67M9kbq4SoK8EyIVRTdlxkdt362iNiFUcxnJfqVHtEZ9kJP2fT Bl8g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Db87KbZq; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r8si5538674ejr.33.2019.10.11.12.47.32; Fri, 11 Oct 2019 12:47:57 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Db87KbZq; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728938AbfJKTod (ORCPT + 99 others); Fri, 11 Oct 2019 15:44:33 -0400 Received: from mail-wm1-f67.google.com ([209.85.128.67]:40566 "EHLO mail-wm1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728783AbfJKToc (ORCPT ); Fri, 11 Oct 2019 15:44:32 -0400 Received: by mail-wm1-f67.google.com with SMTP id b24so11253453wmj.5; Fri, 11 Oct 2019 12:44:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=/3bS4G5Y0I+plz0u2dyxfCOEMTUK76uRvLiuR7/nWEY=; b=Db87KbZqbSS83AEg5Tr203MMM0ypVYmyWiVGOBPWn7qoDCRjtAqo2YLiRh14/52nXe XTlDtHdULRYmGVlWKml8XqGNheSQdP9CCLUJ+0TbgmDzzuvuRz5l8hlqy8gyk8uqQDK6 E62S2KqftvNXPKz/SdsTNF5X4G4NCJx4W6HODlXem30zT10bmbBK2Y13HpxctwCNdB5/ DQu1GItvLZ3dKMD3YiVsRBVRhAE89tjhEFopqzfmzZLMAEnmKzFZBVU+FQJfJIHBOnz9 5tpgyED2GJ4zHEz/Lioy8hdEQH8+9Di2Kym7ZyP/Ywag7Ls/nbeUdiOqcrTLTwxegEau Lexg== 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; bh=/3bS4G5Y0I+plz0u2dyxfCOEMTUK76uRvLiuR7/nWEY=; b=NhCvyp5pDWwbyZhYP0aVjK1uvW9AMWYSkySwVKQRjlhjTHxDgmTsWAwRcQb0pnlmvt cR4ElHjqtsJA0LZ6F+wvgNOzsBFq18yfIr0371F0DYzI4OX/do2gmK1qkPWykIQ1Zf+b sYPQwFKFEkLrtVaD2oVAmyMfQP1r+H6kf84AoMlqrVnMZriafHPFZ2l5FZvAP+ijEA8e yzluSdtktsqrTIAofkAGfzVxMTNq0bCbezZH5Z1pZflfICCwBNmQ0nKO3Gce5njKh7U/ hc14PsyMbqrPBgcNncsUCufICZGMByZO8nOg/9//NC/xKNYLAGRsivqChQGXUhpWYyrO LHGA== X-Gm-Message-State: APjAAAWST7khaUvHStWgjNVZ177ucaqj53VPZ1gDxbwQHV/jp/ymr285 9cAM9JxZpfU3UwmnkJNbcA0MAnGrA1Q69w== X-Received: by 2002:a7b:c8c5:: with SMTP id f5mr4427343wml.170.1570823070119; Fri, 11 Oct 2019 12:44:30 -0700 (PDT) Received: from localhost.localdomain ([89.216.49.66]) by smtp.gmail.com with ESMTPSA id x16sm6622451wrl.32.2019.10.11.12.44.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 11 Oct 2019 12:44:29 -0700 (PDT) From: Christian Hewitt To: Mauro Carvalho Chehab , Benjamin Valentin , Sean Young , linux-kernel@vger.kernel.org, linux-media@vger.kernel.org Cc: Christian Hewitt Subject: [PATCH] media: rc: add keymap for Tronsmart Vega S95/S96 remote Date: Fri, 11 Oct 2019 23:43:42 +0400 Message-Id: <1570823022-3827-1-git-send-email-christianshewitt@gmail.com> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add a keymap for the Tronsmart Vega S95 and S96 Android (Amlogic S905/S912) STB devices. Both use the same IR remote. Signed-off-by: Christian Hewitt --- drivers/media/rc/keymaps/Makefile | 1 + drivers/media/rc/keymaps/rc-vega-s9x.c | 56 ++++++++++++++++++++++++++++++++++ include/media/rc-map.h | 1 + 3 files changed, 58 insertions(+) create mode 100644 drivers/media/rc/keymaps/rc-vega-s9x.c diff --git a/drivers/media/rc/keymaps/Makefile b/drivers/media/rc/keymaps/Makefile index a56fc63..4ab4af0 100644 --- a/drivers/media/rc/keymaps/Makefile +++ b/drivers/media/rc/keymaps/Makefile @@ -114,6 +114,7 @@ obj-$(CONFIG_RC_MAP) += rc-adstech-dvb-t-pci.o \ rc-tt-1500.o \ rc-twinhan-dtv-cab-ci.o \ rc-twinhan1027.o \ + rc-vega-s9x.o \ rc-videomate-m1f.o \ rc-videomate-s350.o \ rc-videomate-tv-pvr.o \ diff --git a/drivers/media/rc/keymaps/rc-vega-s9x.c b/drivers/media/rc/keymaps/rc-vega-s9x.c new file mode 100644 index 0000000..a573acc --- /dev/null +++ b/drivers/media/rc/keymaps/rc-vega-s9x.c @@ -0,0 +1,56 @@ +// SPDX-License-Identifier: GPL-2.0+ +// +// Copyright (C) 2019 Christian Hewitt + +#include +#include + +// +// Keytable for the Tronsmart Vega S9x remote control +// + +static struct rc_map_table vega_s9x[] = { + + { 0x18, KEY_POWER }, + { 0x17, KEY_MUTE }, // mouse + + { 0x46, KEY_UP }, + { 0x47, KEY_LEFT }, + { 0x55, KEY_OK }, + { 0x15, KEY_RIGHT }, + { 0x16, KEY_DOWN }, + + { 0x06, KEY_HOME }, + { 0x42, KEY_PLAYPAUSE}, + { 0x40, KEY_BACK }, + + { 0x14, KEY_VOLUMEDOWN }, + { 0x04, KEY_MENU }, + { 0x10, KEY_VOLUMEUP }, + +}; + +static struct rc_map_list vega_s9x_map = { + .map = { + .scan = vega_s9x, + .size = ARRAY_SIZE(vega_s9x), + .rc_proto = RC_PROTO_NEC, + .name = RC_MAP_VEGA_S9X, + } +}; + +static int __init init_rc_map_vega_s9x(void) +{ + return rc_map_register(&vega_s9x_map); +} + +static void __exit exit_rc_map_vega_s9x(void) +{ + rc_map_unregister(&vega_s9x_map); +} + +module_init(init_rc_map_vega_s9x) +module_exit(exit_rc_map_vega_s9x) + +MODULE_LICENSE("GPL"); +MODULE_AUTHOR("Christian Hewitt