Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp2241504ybl; Thu, 15 Aug 2019 08:41:22 -0700 (PDT) X-Google-Smtp-Source: APXvYqxrJMbdxr30U5hLdsz8LwzExUrTFCLmI7ISI7gMgnQX01FKAUKRRjdJ16Ry1pq1wkDDKObT X-Received: by 2002:a17:90a:28e4:: with SMTP id f91mr2716851pjd.99.1565883681983; Thu, 15 Aug 2019 08:41:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565883681; cv=none; d=google.com; s=arc-20160816; b=hSZ2nJ/e5n/nDv5qQ6bhb8+nmXI7qdgaAvo0RHF6k6ZVbRfpIPhCmUL/Fqtg37DnJf EZs8idnkExgdmQ8ixeLEK6pASK8UEhbKvARI+RPhifvh+RkxeIQgqxSbNk5AneaQB3qZ 2osk6iZqzB94Se/iQ70wOQ4OxaE71hZPD8LFmZZlrgDhG6UX9xEJvvtyKaevvlO/Td8A 75v1O+9ROcm6YK2xAOZ9E27phZOcSHgeondaEfCrIN1w2RJ7rVAV7umLqjt1PxUQLJHB z6e68QuNu23IRiCC9nZQT6Ng4qODWUdrCdbblTPemkiq9A9wQ55vpt/dpBVsTqHPL4qS PI4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=yhYg9hn/63+6B9t0MZk6qflb+4wVUlf/t544dzGkgaA=; b=ryOdSiZ7LU4YDUVNuY1aiThoi8jnB0o0dISn4/aCl5k20llK+7sEG7h+JKKQ3bV5Fl XcGbjYEn9DBYC5Gsf4L1eFzzH9wbud8/5G6DZIXG8aiq78BbSw72CMqKyd0noq6ygKx/ Lknj5lT+gwittcCWqvwaxVqOf5r7fsv4rK0h6SCWzy3Vtk12Bc8tiHuVtvS16VJvcI9M d9VQBxdxGSJKntSxh/RZQ6xw+SmfI3N1UIMDNpXhr5833ra4FjC1Mk6E9cmNL8geUVK9 QTQtIqerI+G7HPX2IsW66cTmAWIWkfFqUU4YrUD2M/m5JqTTNYS+BNBqE9ot/0jwGm87 Q+SQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=PtfoiYD5; 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 z14si1537915plo.298.2019.08.15.08.41.06; Thu, 15 Aug 2019 08:41:21 -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=PtfoiYD5; 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 S1733279AbfHOPAZ (ORCPT + 99 others); Thu, 15 Aug 2019 11:00:25 -0400 Received: from mail-wm1-f65.google.com ([209.85.128.65]:35754 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1733212AbfHOPAW (ORCPT ); Thu, 15 Aug 2019 11:00:22 -0400 Received: by mail-wm1-f65.google.com with SMTP id l2so1516773wmg.0; Thu, 15 Aug 2019 08:00:21 -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:in-reply-to:references; bh=yhYg9hn/63+6B9t0MZk6qflb+4wVUlf/t544dzGkgaA=; b=PtfoiYD59tzuZbU3w4AxfNa6ImyVyhMXzzVBxk0FEpIV0WlK4/3Fy8GEcsZBVNVX57 XlCsbZriIBoDiBmWt2y/m7M0QF8A6joO1mYsxx2uRsViRo8nmdi1uhrCBE2PP0yRGxqz vR7Q8dJsbzneqNv89cCy9d/6vbmgTQO2dg0gZGmcAFp3zZVgXZn8kcHiLwB2FNifO2w7 xARrKHMHY1HrDYq704EpD9JjZ+KnM00Kz+xt02Zd4UYZvMhCu/EbojHyLDmQyIJdmhhX GsK0fbn/tFC4Kej54gDxUECyYXohdYttMMtMBi3uwazxk4/XALZPH98bu2Z4vf800vqn 7LaA== 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; bh=yhYg9hn/63+6B9t0MZk6qflb+4wVUlf/t544dzGkgaA=; b=NIXJ/xWHrlV1qICCQ19R/JImQ/kokmtHoZF9Xy+BEIjYjoePDigUA4lACRN8WiRBs4 3aYplrr0Rx/C+VioV/9/HNfdHSAIbKMETcKdkhVnWwnns47GoA3KKB2PJWcqSrU+e18E 0m2sg2qDlnBfxV5aXOkEeSy9GITOGbJfVufZ6tyipXX+7xZbmw9UVX6eDnpiFy+dwIBN jjPdS8giusqMi/gOoSjDruictlKiiz/ngItDj3CTGS6z0808LCS07oZ3J3FAkeN0yLlF UqisUU7BL+IXhoBHnDqbdVrif4mBCpkk1LbOZ7+UpLeG4NbxCuJKVtwmsJQsMVc0rV6s V3FA== X-Gm-Message-State: APjAAAU/bD99R4S6Nf3cVAyZmd02g971iHLOS4mdhFRwPrAeWa1vpjzL Ey/cQ93l+5fj4kAxWrzZgzKg04X8FEcBOQ== X-Received: by 2002:a7b:c954:: with SMTP id i20mr3254460wml.169.1565881221114; Thu, 15 Aug 2019 08:00:21 -0700 (PDT) Received: from localhost.localdomain ([94.204.252.234]) by smtp.gmail.com with ESMTPSA id e4sm5041054wrh.39.2019.08.15.08.00.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 15 Aug 2019 08:00:20 -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 7/7] media: rc: add keymap for HardKernel ODROID remote Date: Thu, 15 Aug 2019 18:59:17 +0400 Message-Id: <1565881157-14644-8-git-send-email-christianshewitt@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1565881157-14644-1-git-send-email-christianshewitt@gmail.com> References: <1565881157-14644-1-git-send-email-christianshewitt@gmail.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This is a simple NEC remote control device shipped with the HardKernel ODROID range of SBC devices. Signed-off-by: Christian Hewitt --- drivers/media/rc/keymaps/Makefile | 1 + drivers/media/rc/keymaps/rc-odroid.c | 51 ++++++++++++++++++++++++++++++++++++ include/media/rc-map.h | 1 + 3 files changed, 53 insertions(+) create mode 100644 drivers/media/rc/keymaps/rc-odroid.c diff --git a/drivers/media/rc/keymaps/Makefile b/drivers/media/rc/keymaps/Makefile index d316a99..a56fc63 100644 --- a/drivers/media/rc/keymaps/Makefile +++ b/drivers/media/rc/keymaps/Makefile @@ -76,6 +76,7 @@ obj-$(CONFIG_RC_MAP) += rc-adstech-dvb-t-pci.o \ rc-nec-terratec-cinergy-xs.o \ rc-norwood.o \ rc-npgtech.o \ + rc-odroid.o \ rc-pctv-sedna.o \ rc-pinnacle-color.o \ rc-pinnacle-grey.o \ diff --git a/drivers/media/rc/keymaps/rc-odroid.c b/drivers/media/rc/keymaps/rc-odroid.c new file mode 100644 index 0000000..e95aab6 --- /dev/null +++ b/drivers/media/rc/keymaps/rc-odroid.c @@ -0,0 +1,55 @@ +// SPDX-License-Identifier: GPL-2.0+ +// +// Copyright (C) 2019 Christian Hewitt + +#include +#include + +// +// Keytable for the HardKernel ODROID remote control +// + +static struct rc_map_table odroid[] = { + + { 0xb2dc, KEY_POWER }, + + { 0xb288, KEY_MUTE }, + { 0xb282, KEY_HOME }, + + { 0xb2ca, KEY_UP }, + { 0xb299, KEY_LEFT }, + { 0xb2ce, KEY_OK }, + { 0xb2c1, KEY_RIGHT }, + { 0xb2d2, KEY_DOWN }, + + { 0xb2c5, KEY_MENU }, + { 0xb29a, KEY_BACK }, + + { 0xb281, KEY_VOLUMEDOWN }, + { 0xb280, KEY_VOLUMEUP }, +}; + +static struct rc_map_list odroid_map = { + .map = { + .scan = odroid, + .size = ARRAY_SIZE(odroid), + .rc_proto = RC_PROTO_NEC, + .name = RC_MAP_ODROID, + } +}; + +static int __init init_rc_map_odroid(void) +{ + return rc_map_register(&odroid_map); +} + +static void __exit exit_rc_map_odroid(void) +{ + rc_map_unregister(&odroid_map); +} + +module_init(init_rc_map_odroid) +module_exit(exit_rc_map_odroid) + +MODULE_LICENSE("GPL"); +MODULE_AUTHOR("Christian Hewitt