brintos

brintos / linux-shallow public Read only

0
0
Text · 1.6 KiB · 2121cad Raw
77 lines · c
1// SPDX-License-Identifier: GPL-2.0+2// Copyright (c) 2020 Christian Hewitt3 4#include <media/rc-map.h>5#include <linux/module.h>6 7/*8 * KHAMSIN is an IR/Bluetooth RCU supplied with the SmartLabs9 * SML-5442TW DVB-S/VOD box. The RCU has separate IR (TV) and10 * BT (STB) modes. This keymap suppors the IR controls.11 */12 13static struct rc_map_table khamsin[] = {14	{ 0x70702, KEY_POWER},15 16	{ 0x70701, KEY_VIDEO}, // source17 18	{ 0x7076c, KEY_RED},19	{ 0x70714, KEY_GREEN},20	{ 0x70715, KEY_YELLOW},21	{ 0x70716, KEY_BLUE},22 23	{ 0x7071a, KEY_MENU},24	{ 0x7074f, KEY_EPG},25 26	{ 0x70760, KEY_UP },27	{ 0x70761, KEY_DOWN },28	{ 0x70765, KEY_LEFT },29	{ 0x70762, KEY_RIGHT },30	{ 0x70768, KEY_ENTER },31 32	{ 0x7072d, KEY_ESC }, // back33 34	{ 0x70707, KEY_VOLUMEUP },35	{ 0x7070b, KEY_VOLUMEDOWN },36	{ 0x7070f, KEY_MUTE },37	{ 0x70712, KEY_CHANNELUP },38	{ 0x70710, KEY_CHANNELDOWN },39 40	{ 0x70704, KEY_1 },41	{ 0x70705, KEY_2 },42	{ 0x70706, KEY_3 },43	{ 0x70708, KEY_4 },44	{ 0x70709, KEY_5 },45	{ 0x7070a, KEY_6 },46	{ 0x7070c, KEY_7 },47	{ 0x7070d, KEY_8 },48	{ 0x7070e, KEY_9 },49	{ 0x70711, KEY_0 },50};51 52static struct rc_map_list khamsin_map = {53	.map = {54		.scan     = khamsin,55		.size     = ARRAY_SIZE(khamsin),56		.rc_proto = RC_PROTO_NECX,57		.name     = RC_MAP_KHAMSIN,58	}59};60 61static int __init init_rc_map_khamsin(void)62{63	return rc_map_register(&khamsin_map);64}65 66static void __exit exit_rc_map_khamsin(void)67{68	rc_map_unregister(&khamsin_map);69}70 71module_init(init_rc_map_khamsin)72module_exit(exit_rc_map_khamsin)73 74MODULE_LICENSE("GPL");75MODULE_AUTHOR("Christian Hewitt <christianshewitt@gmail.com>");76MODULE_DESCRIPTION("KHAMSIN remote controller keytable");77