#include <linux/acpi.h>
#include <linux/dmi.h>
#include <linux/input.h>
#include <linux/input/sparse-keymap.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/string_choices.h>
#include <linux/suspend.h>
#include "../dual_accel_detect.h"
enum intel_hid_tablet_sw_mode { … };
static bool enable_5_button_array;
module_param(enable_5_button_array, bool, 0444);
MODULE_PARM_DESC(…) …;
static int enable_sw_tablet_mode = …;
module_param(enable_sw_tablet_mode, int, 0444);
MODULE_PARM_DESC(…) …;
#define TABLET_MODE_FLAG …
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;
MODULE_AUTHOR(…) …;
static const struct acpi_device_id intel_hid_ids[] = …;
MODULE_DEVICE_TABLE(acpi, intel_hid_ids);
static const struct key_entry intel_hid_keymap[] = …;
static const struct key_entry intel_array_keymap[] = …;
static const struct dmi_system_id button_array_table[] = …;
static const struct dmi_system_id dmi_vgbs_allow_list[] = …;
static const struct dmi_system_id dmi_auto_add_switch[] = …;
struct intel_hid_priv { … };
#define HID_EVENT_FILTER_UUID …
enum intel_hid_dsm_fn_codes { … };
static const char *intel_hid_dsm_fn_to_method[INTEL_HID_DSM_FN_MAX] = …;
static unsigned long long intel_hid_dsm_fn_mask;
static guid_t intel_dsm_guid;
static bool intel_hid_execute_method(acpi_handle handle,
enum intel_hid_dsm_fn_codes fn_index,
unsigned long long arg)
{ … }
static bool intel_hid_evaluate_method(acpi_handle handle,
enum intel_hid_dsm_fn_codes fn_index,
unsigned long long *result)
{ … }
static void intel_hid_init_dsm(acpi_handle handle)
{ … }
static int intel_hid_set_enable(struct device *device, bool enable)
{ … }
static void intel_button_array_enable(struct device *device, bool enable)
{ … }
static int intel_hid_pm_prepare(struct device *device)
{ … }
static void intel_hid_pm_complete(struct device *device)
{ … }
static int intel_hid_pl_suspend_handler(struct device *device)
{ … }
static int intel_hid_pl_resume_handler(struct device *device)
{ … }
static const struct dev_pm_ops intel_hid_pl_pm_ops = …;
static int intel_hid_input_setup(struct platform_device *device)
{ … }
static int intel_button_array_input_setup(struct platform_device *device)
{ … }
static int intel_hid_switches_setup(struct platform_device *device)
{ … }
static void report_tablet_mode_state(struct platform_device *device)
{ … }
static bool report_tablet_mode_event(struct input_dev *input_dev, u32 event)
{ … }
static void notify_handler(acpi_handle handle, u32 event, void *context)
{ … }
static bool button_array_present(struct platform_device *device)
{ … }
static int intel_hid_probe(struct platform_device *device)
{ … }
static void intel_hid_remove(struct platform_device *device)
{ … }
static struct platform_driver intel_hid_pl_driver = …;
static acpi_status __init
check_acpi_dev(acpi_handle handle, u32 lvl, void *context, void **rv)
{ … }
static int __init intel_hid_init(void)
{ … }
module_init(…) …;
static void __exit intel_hid_exit(void)
{ … }
module_exit(intel_hid_exit);