linux/drivers/hid/hid-twinhan.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * HID driver for TwinHan IR remote control
 *
 * Based on hid-gyration.c
 *
 * Copyright (c) 2009 Bruno Prémont <[email protected]>
 */

/*
 */

#include <linux/device.h>
#include <linux/input.h>
#include <linux/hid.h>
#include <linux/module.h>

#include "hid-ids.h"

/*	Remote control key layout + listing:
 *
 * 	Full Screen                              Power
 *	KEY_SCREEN                          KEY_POWER2
 *
 *	1                     2                      3
 *	KEY_NUMERIC_1   KEY_NUMERIC_2    KEY_NUMERIC_3
 *
 *	4                     5                      6
 *	KEY_NUMERIC_4   KEY_NUMERIC_5    KEY_NUMERIC_6
 *
 *	7                     8                      9
 *	KEY_NUMERIC_7   KEY_NUMERIC_8    KEY_NUMERIC_9
 *
 *	REC                   0               Favorite
 *	KEY_RECORD      KEY_NUMERIC_0    KEY_FAVORITES
 *
 *	Rewind                                 Forward
 *	KEY_REWIND           CH+           KEY_FORWARD
 *	               KEY_CHANNELUP
 *
 *	VOL-                  >                   VOL+
 *	KEY_VOLUMEDOWN    KEY_PLAY        KEY_VOLUMEUP
 *
 *	                     CH-
 *	              KEY_CHANNELDOWN
 *	Recall                                    Stop
 *	KEY_RESTART                           KEY_STOP
 *
 *	Timeshift/Pause     Mute                Cancel
 *	KEY_PAUSE         KEY_MUTE          KEY_CANCEL
 *
 *	Capture            Preview                 EPG
 *	KEY_PRINT        KEY_PROGRAM           KEY_EPG
 *
 *	Record List          Tab              Teletext
 *	KEY_LIST            KEY_TAB           KEY_TEXT
 */

#define th_map_key_clear(c)
static int twinhan_input_mapping(struct hid_device *hdev, struct hid_input *hi,
		struct hid_field *field, struct hid_usage *usage,
		unsigned long **bit, int *max)
{}

static const struct hid_device_id twinhan_devices[] =;
MODULE_DEVICE_TABLE(hid, twinhan_devices);

static struct hid_driver twinhan_driver =;
module_hid_driver();

MODULE_DESCRIPTION();
MODULE_LICENSE();