mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-28 10:05:19 +07:00
1a59d1b8e0
Based on 1 normalized pattern(s): this program is free software you can redistribute it and or modify it under the terms of the gnu general public license as published by the free software foundation either version 2 of the license or at your option any later version this program is distributed in the hope that it will be useful but without any warranty without even the implied warranty of merchantability or fitness for a particular purpose see the gnu general public license for more details you should have received a copy of the gnu general public license along with this program if not write to the free software foundation inc 59 temple place suite 330 boston ma 02111 1307 usa extracted by the scancode license scanner the SPDX license identifier GPL-2.0-or-later has been chosen to replace the boilerplate/reference in 1334 file(s). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Allison Randal <allison@lohutok.net> Reviewed-by: Richard Fontana <rfontana@redhat.com> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190527070033.113240726@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
79 lines
2.1 KiB
C
79 lines
2.1 KiB
C
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
|
/*
|
|
* Asus PC WMI hotkey driver
|
|
*
|
|
* Copyright(C) 2010 Intel Corporation.
|
|
* Copyright(C) 2010-2011 Corentin Chary <corentin.chary@gmail.com>
|
|
*
|
|
* Portions based on wistron_btns.c:
|
|
* Copyright (C) 2005 Miloslav Trmac <mitr@volny.cz>
|
|
* Copyright (C) 2005 Bernhard Rosenkraenzer <bero@arklinux.org>
|
|
* Copyright (C) 2005 Dmitry Torokhov <dtor@mail.ru>
|
|
*/
|
|
|
|
#ifndef _ASUS_WMI_H_
|
|
#define _ASUS_WMI_H_
|
|
|
|
#include <linux/platform_device.h>
|
|
#include <linux/i8042.h>
|
|
|
|
#define ASUS_WMI_KEY_IGNORE (-1)
|
|
#define ASUS_WMI_BRN_DOWN 0x20
|
|
#define ASUS_WMI_BRN_UP 0x2f
|
|
|
|
struct module;
|
|
struct key_entry;
|
|
struct asus_wmi;
|
|
|
|
struct quirk_entry {
|
|
bool hotplug_wireless;
|
|
bool scalar_panel_brightness;
|
|
bool store_backlight_power;
|
|
bool wmi_backlight_power;
|
|
bool wmi_backlight_native;
|
|
bool wmi_force_als_set;
|
|
int wapf;
|
|
/*
|
|
* For machines with AMD graphic chips, it will send out WMI event
|
|
* and ACPI interrupt at the same time while hitting the hotkey.
|
|
* To simplify the problem, we just have to ignore the WMI event,
|
|
* and let the ACPI interrupt to send out the key event.
|
|
*/
|
|
int no_display_toggle;
|
|
u32 xusb2pr;
|
|
|
|
bool (*i8042_filter)(unsigned char data, unsigned char str,
|
|
struct serio *serio);
|
|
};
|
|
|
|
struct asus_wmi_driver {
|
|
int brightness;
|
|
int panel_power;
|
|
int wlan_ctrl_by_user;
|
|
|
|
const char *name;
|
|
struct module *owner;
|
|
|
|
const char *event_guid;
|
|
|
|
const struct key_entry *keymap;
|
|
const char *input_name;
|
|
const char *input_phys;
|
|
struct quirk_entry *quirks;
|
|
/* Returns new code, value, and autorelease values in arguments.
|
|
* Return ASUS_WMI_KEY_IGNORE in code if event should be ignored. */
|
|
void (*key_filter) (struct asus_wmi_driver *driver, int *code,
|
|
unsigned int *value, bool *autorelease);
|
|
|
|
int (*probe) (struct platform_device *device);
|
|
void (*detect_quirks) (struct asus_wmi_driver *driver);
|
|
|
|
struct platform_driver platform_driver;
|
|
struct platform_device *platform_device;
|
|
};
|
|
|
|
int asus_wmi_register_driver(struct asus_wmi_driver *driver);
|
|
void asus_wmi_unregister_driver(struct asus_wmi_driver *driver);
|
|
|
|
#endif /* !_ASUS_WMI_H_ */
|