116216333SThomas Gleixner // SPDX-License-Identifier: GPL-2.0-or-later
232cf86f6SMauro Carvalho Chehab /*
332cf86f6SMauro Carvalho Chehab * TerraTec remote controller keytable
432cf86f6SMauro Carvalho Chehab *
532cf86f6SMauro Carvalho Chehab * Copyright (C) 2010 Antti Palosaari <crope@iki.fi>
632cf86f6SMauro Carvalho Chehab */
732cf86f6SMauro Carvalho Chehab
832cf86f6SMauro Carvalho Chehab #include <media/rc-map.h>
97a707b89SPaul Gortmaker #include <linux/module.h>
1032cf86f6SMauro Carvalho Chehab
1132cf86f6SMauro Carvalho Chehab /* TerraTec slim remote, 7 rows, 4 columns. */
1232cf86f6SMauro Carvalho Chehab /* Uses NEC extended 0x02bd. */
132f4f58d6SMauro Carvalho Chehab static struct rc_map_table terratec_slim[] = {
14*1910ea42SBastien Nocera { 0x02bd00, KEY_NUMERIC_1 },
15*1910ea42SBastien Nocera { 0x02bd01, KEY_NUMERIC_2 },
16*1910ea42SBastien Nocera { 0x02bd02, KEY_NUMERIC_3 },
17*1910ea42SBastien Nocera { 0x02bd03, KEY_NUMERIC_4 },
18*1910ea42SBastien Nocera { 0x02bd04, KEY_NUMERIC_5 },
19*1910ea42SBastien Nocera { 0x02bd05, KEY_NUMERIC_6 },
20*1910ea42SBastien Nocera { 0x02bd06, KEY_NUMERIC_7 },
21*1910ea42SBastien Nocera { 0x02bd07, KEY_NUMERIC_8 },
22*1910ea42SBastien Nocera { 0x02bd08, KEY_NUMERIC_9 },
23*1910ea42SBastien Nocera { 0x02bd09, KEY_NUMERIC_0 },
2432cf86f6SMauro Carvalho Chehab { 0x02bd0a, KEY_MUTE },
2532cf86f6SMauro Carvalho Chehab { 0x02bd0b, KEY_NEW }, /* symbol: PIP */
2632cf86f6SMauro Carvalho Chehab { 0x02bd0e, KEY_VOLUMEDOWN },
2732cf86f6SMauro Carvalho Chehab { 0x02bd0f, KEY_PLAYPAUSE },
2832cf86f6SMauro Carvalho Chehab { 0x02bd10, KEY_RIGHT },
2932cf86f6SMauro Carvalho Chehab { 0x02bd11, KEY_LEFT },
3032cf86f6SMauro Carvalho Chehab { 0x02bd12, KEY_UP },
3132cf86f6SMauro Carvalho Chehab { 0x02bd13, KEY_DOWN },
3232cf86f6SMauro Carvalho Chehab { 0x02bd15, KEY_OK },
3332cf86f6SMauro Carvalho Chehab { 0x02bd16, KEY_STOP },
3432cf86f6SMauro Carvalho Chehab { 0x02bd17, KEY_CAMERA }, /* snapshot */
3532cf86f6SMauro Carvalho Chehab { 0x02bd18, KEY_CHANNELUP },
3632cf86f6SMauro Carvalho Chehab { 0x02bd19, KEY_RECORD },
3732cf86f6SMauro Carvalho Chehab { 0x02bd1a, KEY_CHANNELDOWN },
3832cf86f6SMauro Carvalho Chehab { 0x02bd1c, KEY_ESC },
3932cf86f6SMauro Carvalho Chehab { 0x02bd1f, KEY_VOLUMEUP },
4032cf86f6SMauro Carvalho Chehab { 0x02bd44, KEY_EPG },
4132cf86f6SMauro Carvalho Chehab { 0x02bd45, KEY_POWER2 }, /* [red power button] */
4232cf86f6SMauro Carvalho Chehab };
4332cf86f6SMauro Carvalho Chehab
44d100e659SMauro Carvalho Chehab static struct rc_map_list terratec_slim_map = {
4532cf86f6SMauro Carvalho Chehab .map = {
4632cf86f6SMauro Carvalho Chehab .scan = terratec_slim,
4732cf86f6SMauro Carvalho Chehab .size = ARRAY_SIZE(terratec_slim),
48c5f14af0SSean Young .rc_proto = RC_PROTO_NECX,
4932cf86f6SMauro Carvalho Chehab .name = RC_MAP_TERRATEC_SLIM,
5032cf86f6SMauro Carvalho Chehab }
5132cf86f6SMauro Carvalho Chehab };
5232cf86f6SMauro Carvalho Chehab
init_rc_map_terratec_slim(void)5332cf86f6SMauro Carvalho Chehab static int __init init_rc_map_terratec_slim(void)
5432cf86f6SMauro Carvalho Chehab {
55d100e659SMauro Carvalho Chehab return rc_map_register(&terratec_slim_map);
5632cf86f6SMauro Carvalho Chehab }
5732cf86f6SMauro Carvalho Chehab
exit_rc_map_terratec_slim(void)5832cf86f6SMauro Carvalho Chehab static void __exit exit_rc_map_terratec_slim(void)
5932cf86f6SMauro Carvalho Chehab {
60d100e659SMauro Carvalho Chehab rc_map_unregister(&terratec_slim_map);
6132cf86f6SMauro Carvalho Chehab }
6232cf86f6SMauro Carvalho Chehab
6332cf86f6SMauro Carvalho Chehab module_init(init_rc_map_terratec_slim)
6432cf86f6SMauro Carvalho Chehab module_exit(exit_rc_map_terratec_slim)
6532cf86f6SMauro Carvalho Chehab
6632cf86f6SMauro Carvalho Chehab MODULE_LICENSE("GPL");
6732cf86f6SMauro Carvalho Chehab MODULE_AUTHOR("Antti Palosaari <crope@iki.fi>");
68