162306a36Sopenharmony_ci// SPDX-License-Identifier: GPL-2.0-or-later
262306a36Sopenharmony_ci/*
362306a36Sopenharmony_ci * AverMedia RM-KS remote controller keytable
462306a36Sopenharmony_ci *
562306a36Sopenharmony_ci * Copyright (C) 2010 Antti Palosaari <crope@iki.fi>
662306a36Sopenharmony_ci */
762306a36Sopenharmony_ci
862306a36Sopenharmony_ci#include <media/rc-map.h>
962306a36Sopenharmony_ci#include <linux/module.h>
1062306a36Sopenharmony_ci
1162306a36Sopenharmony_ci/* Initial keytable is from Jose Alberto Reguero <jareguero@telefonica.net>
1262306a36Sopenharmony_ci   and Felipe Morales Moreno <felipe.morales.moreno@gmail.com> */
1362306a36Sopenharmony_ci/* Keytable fixed by Philippe Valembois <lephilousophe@users.sourceforge.net> */
1462306a36Sopenharmony_cistatic struct rc_map_table avermedia_rm_ks[] = {
1562306a36Sopenharmony_ci	{ 0x0501, KEY_POWER2 }, /* Power (RED POWER BUTTON) */
1662306a36Sopenharmony_ci	{ 0x0502, KEY_CHANNELUP }, /* Channel+ */
1762306a36Sopenharmony_ci	{ 0x0503, KEY_CHANNELDOWN }, /* Channel- */
1862306a36Sopenharmony_ci	{ 0x0504, KEY_VOLUMEUP }, /* Volume+ */
1962306a36Sopenharmony_ci	{ 0x0505, KEY_VOLUMEDOWN }, /* Volume- */
2062306a36Sopenharmony_ci	{ 0x0506, KEY_MUTE }, /* Mute */
2162306a36Sopenharmony_ci	{ 0x0507, KEY_AGAIN }, /* Recall */
2262306a36Sopenharmony_ci	{ 0x0508, KEY_VIDEO }, /* Source */
2362306a36Sopenharmony_ci	{ 0x0509, KEY_NUMERIC_1 }, /* 1 */
2462306a36Sopenharmony_ci	{ 0x050a, KEY_NUMERIC_2 }, /* 2 */
2562306a36Sopenharmony_ci	{ 0x050b, KEY_NUMERIC_3 }, /* 3 */
2662306a36Sopenharmony_ci	{ 0x050c, KEY_NUMERIC_4 }, /* 4 */
2762306a36Sopenharmony_ci	{ 0x050d, KEY_NUMERIC_5 }, /* 5 */
2862306a36Sopenharmony_ci	{ 0x050e, KEY_NUMERIC_6 }, /* 6 */
2962306a36Sopenharmony_ci	{ 0x050f, KEY_NUMERIC_7 }, /* 7 */
3062306a36Sopenharmony_ci	{ 0x0510, KEY_NUMERIC_8 }, /* 8 */
3162306a36Sopenharmony_ci	{ 0x0511, KEY_NUMERIC_9 }, /* 9 */
3262306a36Sopenharmony_ci	{ 0x0512, KEY_NUMERIC_0 }, /* 0 */
3362306a36Sopenharmony_ci	{ 0x0513, KEY_AUDIO }, /* Audio */
3462306a36Sopenharmony_ci	{ 0x0515, KEY_EPG }, /* EPG */
3562306a36Sopenharmony_ci	{ 0x0516, KEY_PLAYPAUSE }, /* Play/Pause */
3662306a36Sopenharmony_ci	{ 0x0517, KEY_RECORD }, /* Record */
3762306a36Sopenharmony_ci	{ 0x0518, KEY_STOP }, /* Stop */
3862306a36Sopenharmony_ci	{ 0x051c, KEY_BACK }, /* << */
3962306a36Sopenharmony_ci	{ 0x051d, KEY_FORWARD }, /* >> */
4062306a36Sopenharmony_ci	{ 0x054d, KEY_INFO }, /* Display information */
4162306a36Sopenharmony_ci	{ 0x0556, KEY_ZOOM }, /* Fullscreen */
4262306a36Sopenharmony_ci};
4362306a36Sopenharmony_ci
4462306a36Sopenharmony_cistatic struct rc_map_list avermedia_rm_ks_map = {
4562306a36Sopenharmony_ci	.map = {
4662306a36Sopenharmony_ci		.scan     = avermedia_rm_ks,
4762306a36Sopenharmony_ci		.size     = ARRAY_SIZE(avermedia_rm_ks),
4862306a36Sopenharmony_ci		.rc_proto = RC_PROTO_NEC,
4962306a36Sopenharmony_ci		.name     = RC_MAP_AVERMEDIA_RM_KS,
5062306a36Sopenharmony_ci	}
5162306a36Sopenharmony_ci};
5262306a36Sopenharmony_ci
5362306a36Sopenharmony_cistatic int __init init_rc_map_avermedia_rm_ks(void)
5462306a36Sopenharmony_ci{
5562306a36Sopenharmony_ci	return rc_map_register(&avermedia_rm_ks_map);
5662306a36Sopenharmony_ci}
5762306a36Sopenharmony_ci
5862306a36Sopenharmony_cistatic void __exit exit_rc_map_avermedia_rm_ks(void)
5962306a36Sopenharmony_ci{
6062306a36Sopenharmony_ci	rc_map_unregister(&avermedia_rm_ks_map);
6162306a36Sopenharmony_ci}
6262306a36Sopenharmony_ci
6362306a36Sopenharmony_cimodule_init(init_rc_map_avermedia_rm_ks)
6462306a36Sopenharmony_cimodule_exit(exit_rc_map_avermedia_rm_ks)
6562306a36Sopenharmony_ci
6662306a36Sopenharmony_ciMODULE_LICENSE("GPL");
6762306a36Sopenharmony_ciMODULE_AUTHOR("Antti Palosaari <crope@iki.fi>");
68