2019-05-19 13:51:31 +00:00
|
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
2010-10-08 00:56:48 +00:00
|
|
|
/*
|
|
|
|
* TerraTec remote controller keytable
|
|
|
|
*
|
|
|
|
* Copyright (C) 2010 Antti Palosaari <crope@iki.fi>
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <media/rc-map.h>
|
2011-07-03 18:03:12 +00:00
|
|
|
#include <linux/module.h>
|
2010-10-08 00:56:48 +00:00
|
|
|
|
|
|
|
/* TerraTec slim remote, 7 rows, 4 columns. */
|
|
|
|
/* Uses NEC extended 0x02bd. */
|
[media] rc: Name RC keymap tables as rc_map_table
Remote keytables had different names all over the place. Part of the fault
is due to a bad naming when rc subsystem was created, but there were lots
of old names that were still here.
Use a common standard for everything.
Patch generated by this script:
for i in `find drivers/staging -type f -name *.[ch]` `find include/media -type f -name *.[ch]` `find drivers/media -type f -name *.[ch]`; do sed s,ir_scancode,rc_map_table,g <$i >a && mv a $i; done
for i in `find drivers/staging -type f -name *.[ch]` `find include/media -type f -name *.[ch]` `find drivers/media -type f -name *.[ch]`; do sed s,ir_codes_,rc_map_,g <$i >a && mv a $i; done
for i in `find drivers/staging -type f -name *.[ch]` `find include/media -type f -name *.[ch]` `find drivers/media -type f -name *.[ch]`; do sed s,rc_key_map,rc_map_table,g <$i >a && mv a $i; done
for i in `find drivers/staging -type f -name *.[ch]` `find include/media -type f -name *.[ch]` `find drivers/media -type f -name *.[ch]`; do sed s,rc_map_table_size,rc_map_size,g <$i >a && mv a $i; done
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-11-17 18:46:09 +00:00
|
|
|
static struct rc_map_table terratec_slim[] = {
|
2019-06-24 15:42:14 +00:00
|
|
|
{ 0x02bd00, KEY_NUMERIC_1 },
|
|
|
|
{ 0x02bd01, KEY_NUMERIC_2 },
|
|
|
|
{ 0x02bd02, KEY_NUMERIC_3 },
|
|
|
|
{ 0x02bd03, KEY_NUMERIC_4 },
|
|
|
|
{ 0x02bd04, KEY_NUMERIC_5 },
|
|
|
|
{ 0x02bd05, KEY_NUMERIC_6 },
|
|
|
|
{ 0x02bd06, KEY_NUMERIC_7 },
|
|
|
|
{ 0x02bd07, KEY_NUMERIC_8 },
|
|
|
|
{ 0x02bd08, KEY_NUMERIC_9 },
|
|
|
|
{ 0x02bd09, KEY_NUMERIC_0 },
|
2010-10-08 00:56:48 +00:00
|
|
|
{ 0x02bd0a, KEY_MUTE },
|
2010-10-12 20:13:08 +00:00
|
|
|
{ 0x02bd0b, KEY_NEW }, /* symbol: PIP */
|
2010-10-08 00:56:48 +00:00
|
|
|
{ 0x02bd0e, KEY_VOLUMEDOWN },
|
|
|
|
{ 0x02bd0f, KEY_PLAYPAUSE },
|
|
|
|
{ 0x02bd10, KEY_RIGHT },
|
|
|
|
{ 0x02bd11, KEY_LEFT },
|
|
|
|
{ 0x02bd12, KEY_UP },
|
|
|
|
{ 0x02bd13, KEY_DOWN },
|
|
|
|
{ 0x02bd15, KEY_OK },
|
|
|
|
{ 0x02bd16, KEY_STOP },
|
|
|
|
{ 0x02bd17, KEY_CAMERA }, /* snapshot */
|
|
|
|
{ 0x02bd18, KEY_CHANNELUP },
|
|
|
|
{ 0x02bd19, KEY_RECORD },
|
|
|
|
{ 0x02bd1a, KEY_CHANNELDOWN },
|
|
|
|
{ 0x02bd1c, KEY_ESC },
|
|
|
|
{ 0x02bd1f, KEY_VOLUMEUP },
|
|
|
|
{ 0x02bd44, KEY_EPG },
|
|
|
|
{ 0x02bd45, KEY_POWER2 }, /* [red power button] */
|
|
|
|
};
|
|
|
|
|
2010-11-17 18:56:53 +00:00
|
|
|
static struct rc_map_list terratec_slim_map = {
|
2010-10-08 00:56:48 +00:00
|
|
|
.map = {
|
2017-08-07 20:20:58 +00:00
|
|
|
.scan = terratec_slim,
|
|
|
|
.size = ARRAY_SIZE(terratec_slim),
|
2018-07-17 21:33:05 +00:00
|
|
|
.rc_proto = RC_PROTO_NECX,
|
2017-08-07 20:20:58 +00:00
|
|
|
.name = RC_MAP_TERRATEC_SLIM,
|
2010-10-08 00:56:48 +00:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
static int __init init_rc_map_terratec_slim(void)
|
|
|
|
{
|
2010-11-17 18:56:53 +00:00
|
|
|
return rc_map_register(&terratec_slim_map);
|
2010-10-08 00:56:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void __exit exit_rc_map_terratec_slim(void)
|
|
|
|
{
|
2010-11-17 18:56:53 +00:00
|
|
|
rc_map_unregister(&terratec_slim_map);
|
2010-10-08 00:56:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
module_init(init_rc_map_terratec_slim)
|
|
|
|
module_exit(exit_rc_map_terratec_slim)
|
|
|
|
|
|
|
|
MODULE_LICENSE("GPL");
|
|
|
|
MODULE_AUTHOR("Antti Palosaari <crope@iki.fi>");
|