xref: /linux/drivers/media/rc/keymaps/rc-winfast.c (revision 0ea5c948cb64bab5bc7a5516774eb8536f05aa0d)
1688c73c6SMauro Carvalho Chehab // SPDX-License-Identifier: GPL-2.0+
2688c73c6SMauro Carvalho Chehab // winfast.h - Keytable for winfast Remote Controller
3688c73c6SMauro Carvalho Chehab //
4688c73c6SMauro Carvalho Chehab // keymap imported from ir-keymaps.c
5688c73c6SMauro Carvalho Chehab //
6688c73c6SMauro Carvalho Chehab // Copyright (c) 2010 by Mauro 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 /* Table for Leadtek Winfast Remote Controls - used by both bttv and cx88 */
1232cf86f6SMauro Carvalho Chehab 
132f4f58d6SMauro Carvalho Chehab static struct rc_map_table winfast[] = {
1432cf86f6SMauro Carvalho Chehab 	/* Keys 0 to 9 */
151910ea42SBastien Nocera 	{ 0x12, KEY_NUMERIC_0 },
161910ea42SBastien Nocera 	{ 0x05, KEY_NUMERIC_1 },
171910ea42SBastien Nocera 	{ 0x06, KEY_NUMERIC_2 },
181910ea42SBastien Nocera 	{ 0x07, KEY_NUMERIC_3 },
191910ea42SBastien Nocera 	{ 0x09, KEY_NUMERIC_4 },
201910ea42SBastien Nocera 	{ 0x0a, KEY_NUMERIC_5 },
211910ea42SBastien Nocera 	{ 0x0b, KEY_NUMERIC_6 },
221910ea42SBastien Nocera 	{ 0x0d, KEY_NUMERIC_7 },
231910ea42SBastien Nocera 	{ 0x0e, KEY_NUMERIC_8 },
241910ea42SBastien Nocera 	{ 0x0f, KEY_NUMERIC_9 },
2532cf86f6SMauro Carvalho Chehab 
267f961c69SMauro Carvalho Chehab 	{ 0x00, KEY_POWER2 },
2732cf86f6SMauro Carvalho Chehab 	{ 0x1b, KEY_AUDIO },		/* Audio Source */
2832cf86f6SMauro Carvalho Chehab 	{ 0x02, KEY_TUNER },		/* TV/FM, not on Y0400052 */
2932cf86f6SMauro Carvalho Chehab 	{ 0x1e, KEY_VIDEO },		/* Video Source */
3032cf86f6SMauro Carvalho Chehab 	{ 0x16, KEY_INFO },		/* Display information */
3135e5ed7fSJarod Wilson 	{ 0x04, KEY_RIGHT },
3235e5ed7fSJarod Wilson 	{ 0x08, KEY_LEFT },
337f961c69SMauro Carvalho Chehab 	{ 0x0c, KEY_UP },
347f961c69SMauro Carvalho Chehab 	{ 0x10, KEY_DOWN },
3532cf86f6SMauro Carvalho Chehab 	{ 0x03, KEY_ZOOM },		/* fullscreen */
3632cf86f6SMauro Carvalho Chehab 	{ 0x1f, KEY_TEXT },		/* closed caption/teletext */
3732cf86f6SMauro Carvalho Chehab 	{ 0x20, KEY_SLEEP },
3832cf86f6SMauro Carvalho Chehab 	{ 0x29, KEY_CLEAR },		/* boss key */
3932cf86f6SMauro Carvalho Chehab 	{ 0x14, KEY_MUTE },
4032cf86f6SMauro Carvalho Chehab 	{ 0x2b, KEY_RED },
4132cf86f6SMauro Carvalho Chehab 	{ 0x2c, KEY_GREEN },
4232cf86f6SMauro Carvalho Chehab 	{ 0x2d, KEY_YELLOW },
4332cf86f6SMauro Carvalho Chehab 	{ 0x2e, KEY_BLUE },
4432cf86f6SMauro Carvalho Chehab 	{ 0x18, KEY_KPPLUS },		/* fine tune + , not on Y040052 */
4532cf86f6SMauro Carvalho Chehab 	{ 0x19, KEY_KPMINUS },		/* fine tune - , not on Y040052 */
467f961c69SMauro Carvalho Chehab 	{ 0x2a, KEY_TV2 },		/* PIP (Picture in picture */
4732cf86f6SMauro Carvalho Chehab 	{ 0x21, KEY_DOT },
4832cf86f6SMauro Carvalho Chehab 	{ 0x13, KEY_ENTER },
4932cf86f6SMauro Carvalho Chehab 	{ 0x11, KEY_LAST },		/* Recall (last channel */
5032cf86f6SMauro Carvalho Chehab 	{ 0x22, KEY_PREVIOUS },
5132cf86f6SMauro Carvalho Chehab 	{ 0x23, KEY_PLAYPAUSE },
5232cf86f6SMauro Carvalho Chehab 	{ 0x24, KEY_NEXT },
5332cf86f6SMauro Carvalho Chehab 	{ 0x25, KEY_TIME },		/* Time Shifting */
5432cf86f6SMauro Carvalho Chehab 	{ 0x26, KEY_STOP },
5532cf86f6SMauro Carvalho Chehab 	{ 0x27, KEY_RECORD },
567f961c69SMauro Carvalho Chehab 	{ 0x28, KEY_CAMERA },		/* Screenshot */
5732cf86f6SMauro Carvalho Chehab 	{ 0x2f, KEY_MENU },
5832cf86f6SMauro Carvalho Chehab 	{ 0x30, KEY_CANCEL },
5932cf86f6SMauro Carvalho Chehab 	{ 0x31, KEY_CHANNEL },		/* Channel Surf */
6032cf86f6SMauro Carvalho Chehab 	{ 0x32, KEY_SUBTITLE },
6132cf86f6SMauro Carvalho Chehab 	{ 0x33, KEY_LANGUAGE },
6232cf86f6SMauro Carvalho Chehab 	{ 0x34, KEY_REWIND },
6332cf86f6SMauro Carvalho Chehab 	{ 0x35, KEY_FASTFORWARD },
6432cf86f6SMauro Carvalho Chehab 	{ 0x36, KEY_TV },
6532cf86f6SMauro Carvalho Chehab 	{ 0x37, KEY_RADIO },		/* FM */
6632cf86f6SMauro Carvalho Chehab 	{ 0x38, KEY_DVD },
6732cf86f6SMauro Carvalho Chehab 
6832cf86f6SMauro Carvalho Chehab 	{ 0x1a, KEY_MODE},		/* change to MCE mode on Y04G0051 */
697f961c69SMauro Carvalho Chehab 	{ 0x3e, KEY_VOLUMEUP },		/* MCE +VOL, on Y04G0033 */
707f961c69SMauro Carvalho Chehab 	{ 0x3a, KEY_VOLUMEDOWN },	/* MCE -VOL, on Y04G0033 */
717f961c69SMauro Carvalho Chehab 	{ 0x3b, KEY_CHANNELUP },	/* MCE +CH,  on Y04G0033 */
727f961c69SMauro Carvalho Chehab 	{ 0x3f, KEY_CHANNELDOWN }	/* MCE -CH,  on Y04G0033 */
7332cf86f6SMauro Carvalho Chehab };
7432cf86f6SMauro Carvalho Chehab 
75d100e659SMauro Carvalho Chehab static struct rc_map_list winfast_map = {
7632cf86f6SMauro Carvalho Chehab 	.map = {
7732cf86f6SMauro Carvalho Chehab 		.scan     = winfast,
7832cf86f6SMauro Carvalho Chehab 		.size     = ARRAY_SIZE(winfast),
796d741bfeSSean Young 		.rc_proto = RC_PROTO_UNKNOWN,	/* Legacy IR type */
8032cf86f6SMauro Carvalho Chehab 		.name     = RC_MAP_WINFAST,
8132cf86f6SMauro Carvalho Chehab 	}
8232cf86f6SMauro Carvalho Chehab };
8332cf86f6SMauro Carvalho Chehab 
init_rc_map_winfast(void)8432cf86f6SMauro Carvalho Chehab static int __init init_rc_map_winfast(void)
8532cf86f6SMauro Carvalho Chehab {
86d100e659SMauro Carvalho Chehab 	return rc_map_register(&winfast_map);
8732cf86f6SMauro Carvalho Chehab }
8832cf86f6SMauro Carvalho Chehab 
exit_rc_map_winfast(void)8932cf86f6SMauro Carvalho Chehab static void __exit exit_rc_map_winfast(void)
9032cf86f6SMauro Carvalho Chehab {
91d100e659SMauro Carvalho Chehab 	rc_map_unregister(&winfast_map);
9232cf86f6SMauro Carvalho Chehab }
9332cf86f6SMauro Carvalho Chehab 
9432cf86f6SMauro Carvalho Chehab module_init(init_rc_map_winfast)
9532cf86f6SMauro Carvalho Chehab module_exit(exit_rc_map_winfast)
9632cf86f6SMauro Carvalho Chehab 
9732cf86f6SMauro Carvalho Chehab MODULE_LICENSE("GPL");
9837e59f87SMauro Carvalho Chehab MODULE_AUTHOR("Mauro Carvalho Chehab");
99*462e108bSHans Verkuil MODULE_DESCRIPTION("Leadtek Winfast remote controller keytable");
100