#include <linux/module.h>
#include <linux/sysfs.h>
#include <linux/device.h>
#include <linux/hid.h>
#include <linux/input.h>
#include <linux/leds.h>
#include <linux/workqueue.h>
#include "hid-ids.h"
#define LENOVO_KEY_MICMUTE …
struct lenovo_drvdata { … };
#define map_key_clear …
#define TP10UBKBD_LED_OUTPUT_REPORT …
#define TP10UBKBD_FN_LOCK_LED …
#define TP10UBKBD_MUTE_LED …
#define TP10UBKBD_MICMUTE_LED …
#define TP10UBKBD_LED_OFF …
#define TP10UBKBD_LED_ON …
static int lenovo_led_set_tp10ubkbd(struct hid_device *hdev, u8 led_code,
enum led_brightness value)
{ … }
static void lenovo_tp10ubkbd_sync_fn_lock(struct work_struct *work)
{ … }
static const __u8 lenovo_pro_dock_need_fixup_collection[] = …;
static const __u8 lenovo_tpIIbtkbd_need_fixup_collection[] = …;
static __u8 *lenovo_report_fixup(struct hid_device *hdev, __u8 *rdesc,
unsigned int *rsize)
{ … }
static int lenovo_input_mapping_tpkbd(struct hid_device *hdev,
struct hid_input *hi, struct hid_field *field,
struct hid_usage *usage, unsigned long **bit, int *max)
{ … }
static int lenovo_input_mapping_cptkbd(struct hid_device *hdev,
struct hid_input *hi, struct hid_field *field,
struct hid_usage *usage, unsigned long **bit, int *max)
{ … }
static int lenovo_input_mapping_tpIIkbd(struct hid_device *hdev,
struct hid_input *hi, struct hid_field *field,
struct hid_usage *usage, unsigned long **bit, int *max)
{ … }
static int lenovo_input_mapping_scrollpoint(struct hid_device *hdev,
struct hid_input *hi, struct hid_field *field,
struct hid_usage *usage, unsigned long **bit, int *max)
{ … }
static int lenovo_input_mapping_tp10_ultrabook_kbd(struct hid_device *hdev,
struct hid_input *hi, struct hid_field *field,
struct hid_usage *usage, unsigned long **bit, int *max)
{ … }
static int lenovo_input_mapping_x1_tab_kbd(struct hid_device *hdev,
struct hid_input *hi, struct hid_field *field,
struct hid_usage *usage, unsigned long **bit, int *max)
{ … }
static int lenovo_input_mapping(struct hid_device *hdev,
struct hid_input *hi, struct hid_field *field,
struct hid_usage *usage, unsigned long **bit, int *max)
{ … }
#undef map_key_clear
static int lenovo_send_cmd_cptkbd(struct hid_device *hdev,
unsigned char byte2, unsigned char byte3)
{ … }
static void lenovo_features_set_cptkbd(struct hid_device *hdev)
{ … }
static ssize_t attr_fn_lock_show(struct device *dev,
struct device_attribute *attr,
char *buf)
{ … }
static ssize_t attr_fn_lock_store(struct device *dev,
struct device_attribute *attr,
const char *buf,
size_t count)
{ … }
static ssize_t attr_sensitivity_show_cptkbd(struct device *dev,
struct device_attribute *attr,
char *buf)
{ … }
static ssize_t attr_sensitivity_store_cptkbd(struct device *dev,
struct device_attribute *attr,
const char *buf,
size_t count)
{ … }
static ssize_t attr_middleclick_workaround_show_cptkbd(struct device *dev,
struct device_attribute *attr,
char *buf)
{ … }
static ssize_t attr_middleclick_workaround_store_cptkbd(struct device *dev,
struct device_attribute *attr,
const char *buf,
size_t count)
{ … }
static struct device_attribute dev_attr_fn_lock = …;
static struct device_attribute dev_attr_sensitivity_cptkbd = …;
static struct device_attribute dev_attr_middleclick_workaround_cptkbd = …;
static struct attribute *lenovo_attributes_cptkbd[] = …;
static const struct attribute_group lenovo_attr_group_cptkbd = …;
static int lenovo_raw_event(struct hid_device *hdev,
struct hid_report *report, u8 *data, int size)
{ … }
static int lenovo_event_tp10ubkbd(struct hid_device *hdev,
struct hid_field *field, struct hid_usage *usage, __s32 value)
{ … }
static int lenovo_event_cptkbd(struct hid_device *hdev,
struct hid_field *field, struct hid_usage *usage, __s32 value)
{ … }
static int lenovo_event(struct hid_device *hdev, struct hid_field *field,
struct hid_usage *usage, __s32 value)
{ … }
static int lenovo_features_set_tpkbd(struct hid_device *hdev)
{ … }
static ssize_t attr_press_to_select_show_tpkbd(struct device *dev,
struct device_attribute *attr,
char *buf)
{ … }
static ssize_t attr_press_to_select_store_tpkbd(struct device *dev,
struct device_attribute *attr,
const char *buf,
size_t count)
{ … }
static ssize_t attr_dragging_show_tpkbd(struct device *dev,
struct device_attribute *attr,
char *buf)
{ … }
static ssize_t attr_dragging_store_tpkbd(struct device *dev,
struct device_attribute *attr,
const char *buf,
size_t count)
{ … }
static ssize_t attr_release_to_select_show_tpkbd(struct device *dev,
struct device_attribute *attr,
char *buf)
{ … }
static ssize_t attr_release_to_select_store_tpkbd(struct device *dev,
struct device_attribute *attr,
const char *buf,
size_t count)
{ … }
static ssize_t attr_select_right_show_tpkbd(struct device *dev,
struct device_attribute *attr,
char *buf)
{ … }
static ssize_t attr_select_right_store_tpkbd(struct device *dev,
struct device_attribute *attr,
const char *buf,
size_t count)
{ … }
static ssize_t attr_sensitivity_show_tpkbd(struct device *dev,
struct device_attribute *attr,
char *buf)
{ … }
static ssize_t attr_sensitivity_store_tpkbd(struct device *dev,
struct device_attribute *attr,
const char *buf,
size_t count)
{ … }
static ssize_t attr_press_speed_show_tpkbd(struct device *dev,
struct device_attribute *attr,
char *buf)
{ … }
static ssize_t attr_press_speed_store_tpkbd(struct device *dev,
struct device_attribute *attr,
const char *buf,
size_t count)
{ … }
static struct device_attribute dev_attr_press_to_select_tpkbd = …;
static struct device_attribute dev_attr_dragging_tpkbd = …;
static struct device_attribute dev_attr_release_to_select_tpkbd = …;
static struct device_attribute dev_attr_select_right_tpkbd = …;
static struct device_attribute dev_attr_sensitivity_tpkbd = …;
static struct device_attribute dev_attr_press_speed_tpkbd = …;
static struct attribute *lenovo_attributes_tpkbd[] = …;
static const struct attribute_group lenovo_attr_group_tpkbd = …;
static void lenovo_led_set_tpkbd(struct hid_device *hdev)
{ … }
static int lenovo_led_brightness_set(struct led_classdev *led_cdev,
enum led_brightness value)
{ … }
static int lenovo_register_leds(struct hid_device *hdev)
{ … }
static int lenovo_probe_tpkbd(struct hid_device *hdev)
{ … }
static int lenovo_probe_cptkbd(struct hid_device *hdev)
{ … }
static struct attribute *lenovo_attributes_tp10ubkbd[] = …;
static const struct attribute_group lenovo_attr_group_tp10ubkbd = …;
static int lenovo_probe_tp10ubkbd(struct hid_device *hdev)
{ … }
static int lenovo_probe(struct hid_device *hdev,
const struct hid_device_id *id)
{ … }
#ifdef CONFIG_PM
static int lenovo_reset_resume(struct hid_device *hdev)
{ … }
#endif
static void lenovo_remove_tpkbd(struct hid_device *hdev)
{ … }
static void lenovo_remove_cptkbd(struct hid_device *hdev)
{ … }
static void lenovo_remove_tp10ubkbd(struct hid_device *hdev)
{ … }
static void lenovo_remove(struct hid_device *hdev)
{ … }
static int lenovo_input_configured(struct hid_device *hdev,
struct hid_input *hi)
{ … }
static const struct hid_device_id lenovo_devices[] = …;
MODULE_DEVICE_TABLE(hid, lenovo_devices);
static struct hid_driver lenovo_driver = …;
module_hid_driver(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;