162306a36Sopenharmony_ci// SPDX-License-Identifier: GPL-2.0+
262306a36Sopenharmony_ci// rc-dvb0700-big.c - Keytable for devices in dvb0700
362306a36Sopenharmony_ci//
462306a36Sopenharmony_ci// Copyright (c) 2010 by Mauro Carvalho Chehab
562306a36Sopenharmony_ci//
662306a36Sopenharmony_ci// TODO: This table is a real mess, as it merges RC codes from several
762306a36Sopenharmony_ci// devices into a big table. It also has both RC-5 and NEC codes inside.
862306a36Sopenharmony_ci// It should be broken into small tables, and the protocols should properly
962306a36Sopenharmony_ci// be identificated.
1062306a36Sopenharmony_ci//
1162306a36Sopenharmony_ci// The table were imported from dib0700_devices.c.
1262306a36Sopenharmony_ci
1362306a36Sopenharmony_ci#include <media/rc-map.h>
1462306a36Sopenharmony_ci#include <linux/module.h>
1562306a36Sopenharmony_ci
1662306a36Sopenharmony_cistatic struct rc_map_table dib0700_nec_table[] = {
1762306a36Sopenharmony_ci	/* Key codes for the Pixelview SBTVD remote */
1862306a36Sopenharmony_ci	{ 0x866b13, KEY_MUTE },
1962306a36Sopenharmony_ci	{ 0x866b12, KEY_POWER },
2062306a36Sopenharmony_ci	{ 0x866b01, KEY_NUMERIC_1 },
2162306a36Sopenharmony_ci	{ 0x866b02, KEY_NUMERIC_2 },
2262306a36Sopenharmony_ci	{ 0x866b03, KEY_NUMERIC_3 },
2362306a36Sopenharmony_ci	{ 0x866b04, KEY_NUMERIC_4 },
2462306a36Sopenharmony_ci	{ 0x866b05, KEY_NUMERIC_5 },
2562306a36Sopenharmony_ci	{ 0x866b06, KEY_NUMERIC_6 },
2662306a36Sopenharmony_ci	{ 0x866b07, KEY_NUMERIC_7 },
2762306a36Sopenharmony_ci	{ 0x866b08, KEY_NUMERIC_8 },
2862306a36Sopenharmony_ci	{ 0x866b09, KEY_NUMERIC_9 },
2962306a36Sopenharmony_ci	{ 0x866b00, KEY_NUMERIC_0 },
3062306a36Sopenharmony_ci	{ 0x866b0d, KEY_CHANNELUP },
3162306a36Sopenharmony_ci	{ 0x866b19, KEY_CHANNELDOWN },
3262306a36Sopenharmony_ci	{ 0x866b10, KEY_VOLUMEUP },
3362306a36Sopenharmony_ci	{ 0x866b0c, KEY_VOLUMEDOWN },
3462306a36Sopenharmony_ci
3562306a36Sopenharmony_ci	{ 0x866b0a, KEY_CAMERA },
3662306a36Sopenharmony_ci	{ 0x866b0b, KEY_ZOOM },
3762306a36Sopenharmony_ci	{ 0x866b1b, KEY_BACKSPACE },
3862306a36Sopenharmony_ci	{ 0x866b15, KEY_ENTER },
3962306a36Sopenharmony_ci
4062306a36Sopenharmony_ci	{ 0x866b1d, KEY_UP },
4162306a36Sopenharmony_ci	{ 0x866b1e, KEY_DOWN },
4262306a36Sopenharmony_ci	{ 0x866b0e, KEY_LEFT },
4362306a36Sopenharmony_ci	{ 0x866b0f, KEY_RIGHT },
4462306a36Sopenharmony_ci
4562306a36Sopenharmony_ci	{ 0x866b18, KEY_RECORD },
4662306a36Sopenharmony_ci	{ 0x866b1a, KEY_STOP },
4762306a36Sopenharmony_ci
4862306a36Sopenharmony_ci	/* Key codes for the EvolutePC TVWay+ remote */
4962306a36Sopenharmony_ci	{ 0x7a00, KEY_MENU },
5062306a36Sopenharmony_ci	{ 0x7a01, KEY_RECORD },
5162306a36Sopenharmony_ci	{ 0x7a02, KEY_PLAY },
5262306a36Sopenharmony_ci	{ 0x7a03, KEY_STOP },
5362306a36Sopenharmony_ci	{ 0x7a10, KEY_CHANNELUP },
5462306a36Sopenharmony_ci	{ 0x7a11, KEY_CHANNELDOWN },
5562306a36Sopenharmony_ci	{ 0x7a12, KEY_VOLUMEUP },
5662306a36Sopenharmony_ci	{ 0x7a13, KEY_VOLUMEDOWN },
5762306a36Sopenharmony_ci	{ 0x7a40, KEY_POWER },
5862306a36Sopenharmony_ci	{ 0x7a41, KEY_MUTE },
5962306a36Sopenharmony_ci
6062306a36Sopenharmony_ci	/* Key codes for the Elgato EyeTV Diversity silver remote */
6162306a36Sopenharmony_ci	{ 0x4501, KEY_POWER },
6262306a36Sopenharmony_ci	{ 0x4502, KEY_MUTE },
6362306a36Sopenharmony_ci	{ 0x4503, KEY_NUMERIC_1 },
6462306a36Sopenharmony_ci	{ 0x4504, KEY_NUMERIC_2 },
6562306a36Sopenharmony_ci	{ 0x4505, KEY_NUMERIC_3 },
6662306a36Sopenharmony_ci	{ 0x4506, KEY_NUMERIC_4 },
6762306a36Sopenharmony_ci	{ 0x4507, KEY_NUMERIC_5 },
6862306a36Sopenharmony_ci	{ 0x4508, KEY_NUMERIC_6 },
6962306a36Sopenharmony_ci	{ 0x4509, KEY_NUMERIC_7 },
7062306a36Sopenharmony_ci	{ 0x450a, KEY_NUMERIC_8 },
7162306a36Sopenharmony_ci	{ 0x450b, KEY_NUMERIC_9 },
7262306a36Sopenharmony_ci	{ 0x450c, KEY_LAST },
7362306a36Sopenharmony_ci	{ 0x450d, KEY_NUMERIC_0 },
7462306a36Sopenharmony_ci	{ 0x450e, KEY_ENTER },
7562306a36Sopenharmony_ci	{ 0x450f, KEY_RED },
7662306a36Sopenharmony_ci	{ 0x4510, KEY_CHANNELUP },
7762306a36Sopenharmony_ci	{ 0x4511, KEY_GREEN },
7862306a36Sopenharmony_ci	{ 0x4512, KEY_VOLUMEDOWN },
7962306a36Sopenharmony_ci	{ 0x4513, KEY_OK },
8062306a36Sopenharmony_ci	{ 0x4514, KEY_VOLUMEUP },
8162306a36Sopenharmony_ci	{ 0x4515, KEY_YELLOW },
8262306a36Sopenharmony_ci	{ 0x4516, KEY_CHANNELDOWN },
8362306a36Sopenharmony_ci	{ 0x4517, KEY_BLUE },
8462306a36Sopenharmony_ci	{ 0x4518, KEY_LEFT }, /* Skip backwards */
8562306a36Sopenharmony_ci	{ 0x4519, KEY_PLAYPAUSE },
8662306a36Sopenharmony_ci	{ 0x451a, KEY_RIGHT }, /* Skip forward */
8762306a36Sopenharmony_ci	{ 0x451b, KEY_REWIND },
8862306a36Sopenharmony_ci	{ 0x451c, KEY_L }, /* Live */
8962306a36Sopenharmony_ci	{ 0x451d, KEY_FASTFORWARD },
9062306a36Sopenharmony_ci	{ 0x451e, KEY_STOP }, /* 'Reveal' for Teletext */
9162306a36Sopenharmony_ci	{ 0x451f, KEY_MENU }, /* KEY_TEXT for Teletext */
9262306a36Sopenharmony_ci	{ 0x4540, KEY_RECORD }, /* Font 'Size' for Teletext */
9362306a36Sopenharmony_ci	{ 0x4541, KEY_SCREEN }, /*  Full screen toggle, 'Hold' for Teletext */
9462306a36Sopenharmony_ci	{ 0x4542, KEY_SELECT }, /* Select video input, 'Select' for Teletext */
9562306a36Sopenharmony_ci};
9662306a36Sopenharmony_ci
9762306a36Sopenharmony_cistatic struct rc_map_list dib0700_nec_map = {
9862306a36Sopenharmony_ci	.map = {
9962306a36Sopenharmony_ci		.scan     = dib0700_nec_table,
10062306a36Sopenharmony_ci		.size     = ARRAY_SIZE(dib0700_nec_table),
10162306a36Sopenharmony_ci		.rc_proto = RC_PROTO_NEC,
10262306a36Sopenharmony_ci		.name     = RC_MAP_DIB0700_NEC_TABLE,
10362306a36Sopenharmony_ci	}
10462306a36Sopenharmony_ci};
10562306a36Sopenharmony_ci
10662306a36Sopenharmony_cistatic int __init init_rc_map(void)
10762306a36Sopenharmony_ci{
10862306a36Sopenharmony_ci	return rc_map_register(&dib0700_nec_map);
10962306a36Sopenharmony_ci}
11062306a36Sopenharmony_ci
11162306a36Sopenharmony_cistatic void __exit exit_rc_map(void)
11262306a36Sopenharmony_ci{
11362306a36Sopenharmony_ci	rc_map_unregister(&dib0700_nec_map);
11462306a36Sopenharmony_ci}
11562306a36Sopenharmony_ci
11662306a36Sopenharmony_cimodule_init(init_rc_map)
11762306a36Sopenharmony_cimodule_exit(exit_rc_map)
11862306a36Sopenharmony_ci
11962306a36Sopenharmony_ciMODULE_LICENSE("GPL");
12062306a36Sopenharmony_ciMODULE_AUTHOR("Mauro Carvalho Chehab");
121