162306a36Sopenharmony_ci// SPDX-License-Identifier: GPL-2.0-or-later
262306a36Sopenharmony_ci/* ITE Generic remotes Version 2
362306a36Sopenharmony_ci *
462306a36Sopenharmony_ci * Copyright (C) 2012 Malcolm Priestley (tvboxspy@gmail.com)
562306a36Sopenharmony_ci */
662306a36Sopenharmony_ci
762306a36Sopenharmony_ci#include <media/rc-map.h>
862306a36Sopenharmony_ci#include <linux/module.h>
962306a36Sopenharmony_ci
1062306a36Sopenharmony_ci
1162306a36Sopenharmony_cistatic struct rc_map_table it913x_v2_rc[] = {
1262306a36Sopenharmony_ci	/* Type 1 */
1362306a36Sopenharmony_ci	/* 9005 remote */
1462306a36Sopenharmony_ci	{ 0x807f12, KEY_POWER2 },	/* Power (RED POWER BUTTON)*/
1562306a36Sopenharmony_ci	{ 0x807f1a, KEY_VIDEO },	/* Source */
1662306a36Sopenharmony_ci	{ 0x807f1e, KEY_MUTE },		/* Mute */
1762306a36Sopenharmony_ci	{ 0x807f01, KEY_RECORD },	/* Record */
1862306a36Sopenharmony_ci	{ 0x807f02, KEY_CHANNELUP },	/* Channel+ */
1962306a36Sopenharmony_ci	{ 0x807f03, KEY_TIME },		/* TimeShift */
2062306a36Sopenharmony_ci	{ 0x807f04, KEY_VOLUMEUP },	/* Volume- */
2162306a36Sopenharmony_ci	{ 0x807f05, KEY_SCREEN },	/* FullScreen */
2262306a36Sopenharmony_ci	{ 0x807f06, KEY_VOLUMEDOWN },	/* Volume- */
2362306a36Sopenharmony_ci	{ 0x807f07, KEY_NUMERIC_0 },	/* 0 */
2462306a36Sopenharmony_ci	{ 0x807f08, KEY_CHANNELDOWN },	/* Channel- */
2562306a36Sopenharmony_ci	{ 0x807f09, KEY_PREVIOUS },	/* Recall */
2662306a36Sopenharmony_ci	{ 0x807f0a, KEY_NUMERIC_1 },	/* 1 */
2762306a36Sopenharmony_ci	{ 0x807f1b, KEY_NUMERIC_2 },	/* 2 */
2862306a36Sopenharmony_ci	{ 0x807f1f, KEY_NUMERIC_3 },	/* 3 */
2962306a36Sopenharmony_ci	{ 0x807f0c, KEY_NUMERIC_4 },	/* 4 */
3062306a36Sopenharmony_ci	{ 0x807f0d, KEY_NUMERIC_5 },	/* 5 */
3162306a36Sopenharmony_ci	{ 0x807f0e, KEY_NUMERIC_6 },	/* 6 */
3262306a36Sopenharmony_ci	{ 0x807f00, KEY_NUMERIC_7 },	/* 7 */
3362306a36Sopenharmony_ci	{ 0x807f0f, KEY_NUMERIC_8 },	/* 8 */
3462306a36Sopenharmony_ci	{ 0x807f19, KEY_NUMERIC_9 },	/* 9 */
3562306a36Sopenharmony_ci
3662306a36Sopenharmony_ci	/* Type 2 */
3762306a36Sopenharmony_ci	/* keys stereo, snapshot unassigned */
3862306a36Sopenharmony_ci	{ 0x866b00, KEY_NUMERIC_0 },
3962306a36Sopenharmony_ci	{ 0x866b01, KEY_NUMERIC_1 },
4062306a36Sopenharmony_ci	{ 0x866b02, KEY_NUMERIC_2 },
4162306a36Sopenharmony_ci	{ 0x866b03, KEY_NUMERIC_3 },
4262306a36Sopenharmony_ci	{ 0x866b04, KEY_NUMERIC_4 },
4362306a36Sopenharmony_ci	{ 0x866b05, KEY_NUMERIC_5 },
4462306a36Sopenharmony_ci	{ 0x866b06, KEY_NUMERIC_6 },
4562306a36Sopenharmony_ci	{ 0x866b07, KEY_NUMERIC_7 },
4662306a36Sopenharmony_ci	{ 0x866b08, KEY_NUMERIC_8 },
4762306a36Sopenharmony_ci	{ 0x866b09, KEY_NUMERIC_9 },
4862306a36Sopenharmony_ci	{ 0x866b12, KEY_POWER },
4962306a36Sopenharmony_ci	{ 0x866b13, KEY_MUTE },
5062306a36Sopenharmony_ci	{ 0x866b0a, KEY_PREVIOUS }, /* Recall */
5162306a36Sopenharmony_ci	{ 0x866b1e, KEY_PAUSE },
5262306a36Sopenharmony_ci	{ 0x866b0c, KEY_VOLUMEUP },
5362306a36Sopenharmony_ci	{ 0x866b18, KEY_VOLUMEDOWN },
5462306a36Sopenharmony_ci	{ 0x866b0b, KEY_CHANNELUP },
5562306a36Sopenharmony_ci	{ 0x866b18, KEY_CHANNELDOWN },
5662306a36Sopenharmony_ci	{ 0x866b10, KEY_ZOOM },
5762306a36Sopenharmony_ci	{ 0x866b1d, KEY_RECORD },
5862306a36Sopenharmony_ci	{ 0x866b0e, KEY_STOP },
5962306a36Sopenharmony_ci	{ 0x866b11, KEY_EPG},
6062306a36Sopenharmony_ci	{ 0x866b1a, KEY_FASTFORWARD },
6162306a36Sopenharmony_ci	{ 0x866b0f, KEY_REWIND },
6262306a36Sopenharmony_ci	{ 0x866b1c, KEY_TV },
6362306a36Sopenharmony_ci	{ 0x866b1b, KEY_TEXT },
6462306a36Sopenharmony_ci
6562306a36Sopenharmony_ci};
6662306a36Sopenharmony_ci
6762306a36Sopenharmony_cistatic struct rc_map_list it913x_v2_map = {
6862306a36Sopenharmony_ci	.map = {
6962306a36Sopenharmony_ci		.scan     = it913x_v2_rc,
7062306a36Sopenharmony_ci		.size     = ARRAY_SIZE(it913x_v2_rc),
7162306a36Sopenharmony_ci		.rc_proto = RC_PROTO_NECX,
7262306a36Sopenharmony_ci		.name     = RC_MAP_IT913X_V2,
7362306a36Sopenharmony_ci	}
7462306a36Sopenharmony_ci};
7562306a36Sopenharmony_ci
7662306a36Sopenharmony_cistatic int __init init_rc_it913x_v2_map(void)
7762306a36Sopenharmony_ci{
7862306a36Sopenharmony_ci	return rc_map_register(&it913x_v2_map);
7962306a36Sopenharmony_ci}
8062306a36Sopenharmony_ci
8162306a36Sopenharmony_cistatic void __exit exit_rc_it913x_v2_map(void)
8262306a36Sopenharmony_ci{
8362306a36Sopenharmony_ci	rc_map_unregister(&it913x_v2_map);
8462306a36Sopenharmony_ci}
8562306a36Sopenharmony_ci
8662306a36Sopenharmony_cimodule_init(init_rc_it913x_v2_map)
8762306a36Sopenharmony_cimodule_exit(exit_rc_it913x_v2_map)
8862306a36Sopenharmony_ci
8962306a36Sopenharmony_ciMODULE_LICENSE("GPL");
9062306a36Sopenharmony_ciMODULE_AUTHOR("Malcolm Priestley tvboxspy@gmail.com");
91