162306a36Sopenharmony_ci// SPDX-License-Identifier: GPL-2.0-or-later
262306a36Sopenharmony_ci/*
362306a36Sopenharmony_ci * Medion X10 RF remote keytable
462306a36Sopenharmony_ci *
562306a36Sopenharmony_ci * Copyright (C) 2011 Anssi Hannula <anssi.hannula@?ki.fi>
662306a36Sopenharmony_ci *
762306a36Sopenharmony_ci * This file is based on a keytable provided by
862306a36Sopenharmony_ci * Jan Losinski <losinski@wh2.tu-dresden.de>
962306a36Sopenharmony_ci */
1062306a36Sopenharmony_ci
1162306a36Sopenharmony_ci#include <linux/module.h>
1262306a36Sopenharmony_ci#include <media/rc-map.h>
1362306a36Sopenharmony_ci
1462306a36Sopenharmony_cistatic struct rc_map_table medion_x10[] = {
1562306a36Sopenharmony_ci	{ 0x2c, KEY_TV },    /* TV */
1662306a36Sopenharmony_ci	{ 0x2d, KEY_VCR },   /* VCR */
1762306a36Sopenharmony_ci	{ 0x04, KEY_DVD },   /* DVD */
1862306a36Sopenharmony_ci	{ 0x06, KEY_AUDIO }, /* MUSIC */
1962306a36Sopenharmony_ci
2062306a36Sopenharmony_ci	{ 0x2e, KEY_RADIO },     /* RADIO */
2162306a36Sopenharmony_ci	{ 0x05, KEY_DIRECTORY }, /* PHOTO */
2262306a36Sopenharmony_ci	{ 0x2f, KEY_INFO },      /* TV-PREVIEW */
2362306a36Sopenharmony_ci	{ 0x30, KEY_LIST },      /* CHANNEL-LST */
2462306a36Sopenharmony_ci
2562306a36Sopenharmony_ci	{ 0x1b, KEY_SETUP }, /* SETUP */
2662306a36Sopenharmony_ci	{ 0x31, KEY_VIDEO }, /* VIDEO DESKTOP */
2762306a36Sopenharmony_ci
2862306a36Sopenharmony_ci	{ 0x08, KEY_VOLUMEDOWN },  /* VOL - */
2962306a36Sopenharmony_ci	{ 0x09, KEY_VOLUMEUP },    /* VOL + */
3062306a36Sopenharmony_ci	{ 0x0b, KEY_CHANNELUP },   /* CHAN + */
3162306a36Sopenharmony_ci	{ 0x0c, KEY_CHANNELDOWN }, /* CHAN - */
3262306a36Sopenharmony_ci	{ 0x00, KEY_MUTE },        /* MUTE */
3362306a36Sopenharmony_ci
3462306a36Sopenharmony_ci	{ 0x32, KEY_RED }, /* red */
3562306a36Sopenharmony_ci	{ 0x33, KEY_GREEN }, /* green */
3662306a36Sopenharmony_ci	{ 0x34, KEY_YELLOW }, /* yellow */
3762306a36Sopenharmony_ci	{ 0x35, KEY_BLUE }, /* blue */
3862306a36Sopenharmony_ci	{ 0x16, KEY_TEXT }, /* TXT */
3962306a36Sopenharmony_ci
4062306a36Sopenharmony_ci	{ 0x0d, KEY_NUMERIC_1 },
4162306a36Sopenharmony_ci	{ 0x0e, KEY_NUMERIC_2 },
4262306a36Sopenharmony_ci	{ 0x0f, KEY_NUMERIC_3 },
4362306a36Sopenharmony_ci	{ 0x10, KEY_NUMERIC_4 },
4462306a36Sopenharmony_ci	{ 0x11, KEY_NUMERIC_5 },
4562306a36Sopenharmony_ci	{ 0x12, KEY_NUMERIC_6 },
4662306a36Sopenharmony_ci	{ 0x13, KEY_NUMERIC_7 },
4762306a36Sopenharmony_ci	{ 0x14, KEY_NUMERIC_8 },
4862306a36Sopenharmony_ci	{ 0x15, KEY_NUMERIC_9 },
4962306a36Sopenharmony_ci	{ 0x17, KEY_NUMERIC_0 },
5062306a36Sopenharmony_ci	{ 0x1c, KEY_SEARCH }, /* TV/RAD, CH SRC */
5162306a36Sopenharmony_ci	{ 0x20, KEY_DELETE }, /* DELETE */
5262306a36Sopenharmony_ci
5362306a36Sopenharmony_ci	{ 0x36, KEY_KEYBOARD }, /* RENAME */
5462306a36Sopenharmony_ci	{ 0x18, KEY_SCREEN },   /* SNAPSHOT */
5562306a36Sopenharmony_ci
5662306a36Sopenharmony_ci	{ 0x1a, KEY_UP },    /* up */
5762306a36Sopenharmony_ci	{ 0x22, KEY_DOWN },  /* down */
5862306a36Sopenharmony_ci	{ 0x1d, KEY_LEFT },  /* left */
5962306a36Sopenharmony_ci	{ 0x1f, KEY_RIGHT }, /* right */
6062306a36Sopenharmony_ci	{ 0x1e, KEY_OK },    /* OK */
6162306a36Sopenharmony_ci
6262306a36Sopenharmony_ci	{ 0x37, KEY_SELECT }, /* ACQUIRE IMAGE */
6362306a36Sopenharmony_ci	{ 0x38, KEY_EDIT },   /* EDIT IMAGE */
6462306a36Sopenharmony_ci
6562306a36Sopenharmony_ci	{ 0x24, KEY_REWIND },   /* rewind  (<<) */
6662306a36Sopenharmony_ci	{ 0x25, KEY_PLAY },     /* play    ( >) */
6762306a36Sopenharmony_ci	{ 0x26, KEY_FORWARD },  /* forward (>>) */
6862306a36Sopenharmony_ci	{ 0x27, KEY_RECORD },   /* record  ( o) */
6962306a36Sopenharmony_ci	{ 0x28, KEY_STOP },     /* stop    ([]) */
7062306a36Sopenharmony_ci	{ 0x29, KEY_PAUSE },    /* pause   ('') */
7162306a36Sopenharmony_ci
7262306a36Sopenharmony_ci	{ 0x21, KEY_PREVIOUS },        /* prev */
7362306a36Sopenharmony_ci	{ 0x39, KEY_SWITCHVIDEOMODE }, /* F SCR */
7462306a36Sopenharmony_ci	{ 0x23, KEY_NEXT },            /* next */
7562306a36Sopenharmony_ci	{ 0x19, KEY_MENU },            /* MENU */
7662306a36Sopenharmony_ci	{ 0x3a, KEY_LANGUAGE },        /* AUDIO */
7762306a36Sopenharmony_ci
7862306a36Sopenharmony_ci	{ 0x02, KEY_POWER }, /* POWER */
7962306a36Sopenharmony_ci};
8062306a36Sopenharmony_ci
8162306a36Sopenharmony_cistatic struct rc_map_list medion_x10_map = {
8262306a36Sopenharmony_ci	.map = {
8362306a36Sopenharmony_ci		.scan     = medion_x10,
8462306a36Sopenharmony_ci		.size     = ARRAY_SIZE(medion_x10),
8562306a36Sopenharmony_ci		.rc_proto = RC_PROTO_OTHER,
8662306a36Sopenharmony_ci		.name     = RC_MAP_MEDION_X10,
8762306a36Sopenharmony_ci	}
8862306a36Sopenharmony_ci};
8962306a36Sopenharmony_ci
9062306a36Sopenharmony_cistatic int __init init_rc_map_medion_x10(void)
9162306a36Sopenharmony_ci{
9262306a36Sopenharmony_ci	return rc_map_register(&medion_x10_map);
9362306a36Sopenharmony_ci}
9462306a36Sopenharmony_ci
9562306a36Sopenharmony_cistatic void __exit exit_rc_map_medion_x10(void)
9662306a36Sopenharmony_ci{
9762306a36Sopenharmony_ci	rc_map_unregister(&medion_x10_map);
9862306a36Sopenharmony_ci}
9962306a36Sopenharmony_ci
10062306a36Sopenharmony_cimodule_init(init_rc_map_medion_x10)
10162306a36Sopenharmony_cimodule_exit(exit_rc_map_medion_x10)
10262306a36Sopenharmony_ci
10362306a36Sopenharmony_ciMODULE_LICENSE("GPL");
10462306a36Sopenharmony_ciMODULE_AUTHOR("Anssi Hannula <anssi.hannula@iki.fi>");
105