1 // SPDX-License-Identifier: GPL-2.0+
2 // kworld-plus-tv-analog.h - Keytable for kworld_plus_tv_analog Remote Controller
4 // keymap imported from ir-keymaps.c
6 // Copyright (c) 2010 by Mauro Carvalho Chehab
8 #include <media/rc-map.h>
9 #include <linux/module.h>
11 /* Kworld Plus TV Analog Lite PCI IR
12 Mauro Carvalho Chehab <mchehab@kernel.org>
15 static struct rc_map_table kworld_plus_tv_analog
[] = {
16 { 0x0c, KEY_MEDIA
}, /* Kworld key */
17 { 0x16, KEY_CLOSECD
}, /* -> ) */
20 { 0x00, KEY_NUMERIC_1
},
21 { 0x01, KEY_NUMERIC_2
},
23 /* Two keys have the same code: 3 and left */
24 { 0x02, KEY_NUMERIC_3
},
26 /* Two keys have the same code: 4 and right */
27 { 0x03, KEY_NUMERIC_4
},
28 { 0x04, KEY_NUMERIC_5
},
29 { 0x05, KEY_NUMERIC_6
},
30 { 0x06, KEY_NUMERIC_7
},
31 { 0x07, KEY_NUMERIC_8
},
32 { 0x08, KEY_NUMERIC_9
},
33 { 0x0a, KEY_NUMERIC_0
},
42 { 0x10, KEY_CHANNELUP
},
43 { 0x11, KEY_CHANNELDOWN
},
45 /* Couldn't map key left/key right since those
46 conflict with '3' and '4' scancodes
47 I dunno what the original driver does
50 { 0x13, KEY_VOLUMEUP
},
51 { 0x12, KEY_VOLUMEDOWN
},
53 /* The lower part of the IR
54 There are several duplicated keycodes there.
55 Most of them conflict with digits.
56 Add mappings just to the unused scancodes.
57 Somehow, the original driver has a way to know,
58 but this doesn't seem to be on some GPIO.
59 Also, it is not related to the time between keyup
62 { 0x19, KEY_TIME
}, /* Timeshift */
68 { 0x15, KEY_AUDIO
}, /* ((*)) */
70 { 0x1c, KEY_CAMERA
}, /* snapshot */
72 { 0x18, KEY_RED
}, /* B */
73 { 0x23, KEY_GREEN
}, /* C */
76 static struct rc_map_list kworld_plus_tv_analog_map
= {
78 .scan
= kworld_plus_tv_analog
,
79 .size
= ARRAY_SIZE(kworld_plus_tv_analog
),
80 .rc_proto
= RC_PROTO_UNKNOWN
, /* Legacy IR type */
81 .name
= RC_MAP_KWORLD_PLUS_TV_ANALOG
,
85 static int __init
init_rc_map_kworld_plus_tv_analog(void)
87 return rc_map_register(&kworld_plus_tv_analog_map
);
90 static void __exit
exit_rc_map_kworld_plus_tv_analog(void)
92 rc_map_unregister(&kworld_plus_tv_analog_map
);
95 module_init(init_rc_map_kworld_plus_tv_analog
)
96 module_exit(exit_rc_map_kworld_plus_tv_analog
)
98 MODULE_LICENSE("GPL");
99 MODULE_AUTHOR("Mauro Carvalho Chehab");