Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

media: rc: add keymap for HardKernel ODROID remote

This is a simple NEC remote control device shipped with the HardKernel
ODROID range of SBC devices.

Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>

authored by

Christian Hewitt and committed by
Mauro Carvalho Chehab
8f5f33f7 fa992b33

+56
+1
drivers/media/rc/keymaps/Makefile
··· 76 76 rc-nec-terratec-cinergy-xs.o \ 77 77 rc-norwood.o \ 78 78 rc-npgtech.o \ 79 + rc-odroid.o \ 79 80 rc-pctv-sedna.o \ 80 81 rc-pinnacle-color.o \ 81 82 rc-pinnacle-grey.o \
+54
drivers/media/rc/keymaps/rc-odroid.c
··· 1 + // SPDX-License-Identifier: GPL-2.0+ 2 + // 3 + // Copyright (C) 2019 Christian Hewitt <christianshewitt@gmail.com> 4 + 5 + #include <media/rc-map.h> 6 + #include <linux/module.h> 7 + 8 + // 9 + // Keytable for the HardKernel ODROID remote control 10 + // 11 + 12 + static struct rc_map_table odroid[] = { 13 + { 0xb2dc, KEY_POWER }, 14 + 15 + { 0xb288, KEY_MUTE }, 16 + { 0xb282, KEY_HOME }, 17 + 18 + { 0xb2ca, KEY_UP }, 19 + { 0xb299, KEY_LEFT }, 20 + { 0xb2ce, KEY_OK }, 21 + { 0xb2c1, KEY_RIGHT }, 22 + { 0xb2d2, KEY_DOWN }, 23 + 24 + { 0xb2c5, KEY_MENU }, 25 + { 0xb29a, KEY_BACK }, 26 + 27 + { 0xb281, KEY_VOLUMEDOWN }, 28 + { 0xb280, KEY_VOLUMEUP }, 29 + }; 30 + 31 + static struct rc_map_list odroid_map = { 32 + .map = { 33 + .scan = odroid, 34 + .size = ARRAY_SIZE(odroid), 35 + .rc_proto = RC_PROTO_NEC, 36 + .name = RC_MAP_ODROID, 37 + } 38 + }; 39 + 40 + static int __init init_rc_map_odroid(void) 41 + { 42 + return rc_map_register(&odroid_map); 43 + } 44 + 45 + static void __exit exit_rc_map_odroid(void) 46 + { 47 + rc_map_unregister(&odroid_map); 48 + } 49 + 50 + module_init(init_rc_map_odroid) 51 + module_exit(exit_rc_map_odroid) 52 + 53 + MODULE_LICENSE("GPL"); 54 + MODULE_AUTHOR("Christian Hewitt <christianshewitt@gmail.com");
+1
include/media/rc-map.h
··· 229 229 #define RC_MAP_NEC_TERRATEC_CINERGY_XS "rc-nec-terratec-cinergy-xs" 230 230 #define RC_MAP_NORWOOD "rc-norwood" 231 231 #define RC_MAP_NPGTECH "rc-npgtech" 232 + #define RC_MAP_ODROID "rc-odroid" 232 233 #define RC_MAP_PCTV_SEDNA "rc-pctv-sedna" 233 234 #define RC_MAP_PINNACLE_COLOR "rc-pinnacle-color" 234 235 #define RC_MAP_PINNACLE_GREY "rc-pinnacle-grey"