linux/include/linux/platform_data/x86/asus-wmi.h

/* SPDX-License-Identifier: GPL-2.0 */
#ifndef __PLATFORM_DATA_X86_ASUS_WMI_H
#define __PLATFORM_DATA_X86_ASUS_WMI_H

#include <linux/errno.h>
#include <linux/types.h>

/* WMI Methods */
#define ASUS_WMI_METHODID_SPEC
#define ASUS_WMI_METHODID_SFBD
#define ASUS_WMI_METHODID_GLCD
#define ASUS_WMI_METHODID_GPID
#define ASUS_WMI_METHODID_QMOD
#define ASUS_WMI_METHODID_SPLV
#define ASUS_WMI_METHODID_AGFN
#define ASUS_WMI_METHODID_SFUN
#define ASUS_WMI_METHODID_SDSP
#define ASUS_WMI_METHODID_GDSP
#define ASUS_WMI_METHODID_DEVP
#define ASUS_WMI_METHODID_OSVR
#define ASUS_WMI_METHODID_DCTS
#define ASUS_WMI_METHODID_DSTS
#define ASUS_WMI_METHODID_BSTS
#define ASUS_WMI_METHODID_DEVS
#define ASUS_WMI_METHODID_CFVS
#define ASUS_WMI_METHODID_KBFT
#define ASUS_WMI_METHODID_INIT
#define ASUS_WMI_METHODID_HKEY

#define ASUS_WMI_UNSUPPORTED_METHOD

/* Wireless */
#define ASUS_WMI_DEVID_HW_SWITCH
#define ASUS_WMI_DEVID_WIRELESS_LED
#define ASUS_WMI_DEVID_CWAP
#define ASUS_WMI_DEVID_WLAN
#define ASUS_WMI_DEVID_WLAN_LED
#define ASUS_WMI_DEVID_BLUETOOTH
#define ASUS_WMI_DEVID_GPS
#define ASUS_WMI_DEVID_WIMAX
#define ASUS_WMI_DEVID_WWAN3G
#define ASUS_WMI_DEVID_UWB

/* Leds */
/* 0x000200XX and 0x000400XX */
#define ASUS_WMI_DEVID_LED1
#define ASUS_WMI_DEVID_LED2
#define ASUS_WMI_DEVID_LED3
#define ASUS_WMI_DEVID_LED4
#define ASUS_WMI_DEVID_LED5
#define ASUS_WMI_DEVID_LED6
#define ASUS_WMI_DEVID_MICMUTE_LED

/* Disable Camera LED */
#define ASUS_WMI_DEVID_CAMERA_LED_NEG
#define ASUS_WMI_DEVID_CAMERA_LED

/* Backlight and Brightness */
#define ASUS_WMI_DEVID_ALS_ENABLE
#define ASUS_WMI_DEVID_BACKLIGHT
#define ASUS_WMI_DEVID_BRIGHTNESS
#define ASUS_WMI_DEVID_KBD_BACKLIGHT
#define ASUS_WMI_DEVID_LIGHT_SENSOR
#define ASUS_WMI_DEVID_LIGHTBAR
/* This can only be used to disable the screen, not re-enable */
#define ASUS_WMI_DEVID_SCREENPAD_POWER
/* Writing a brightness re-enables the screen if disabled */
#define ASUS_WMI_DEVID_SCREENPAD_LIGHT
#define ASUS_WMI_DEVID_FAN_BOOST_MODE
#define ASUS_WMI_DEVID_THROTTLE_THERMAL_POLICY

/* Misc */
#define ASUS_WMI_DEVID_PANEL_OD
#define ASUS_WMI_DEVID_CAMERA
#define ASUS_WMI_DEVID_LID_FLIP
#define ASUS_WMI_DEVID_LID_FLIP_ROG
#define ASUS_WMI_DEVID_MINI_LED_MODE
#define ASUS_WMI_DEVID_MINI_LED_MODE2

/* Storage */
#define ASUS_WMI_DEVID_CARDREADER

/* Input */
#define ASUS_WMI_DEVID_TOUCHPAD
#define ASUS_WMI_DEVID_TOUCHPAD_LED
#define ASUS_WMI_DEVID_FNLOCK

/* Fan, Thermal */
#define ASUS_WMI_DEVID_THERMAL_CTRL
#define ASUS_WMI_DEVID_FAN_CTRL
#define ASUS_WMI_DEVID_CPU_FAN_CTRL
#define ASUS_WMI_DEVID_GPU_FAN_CTRL
#define ASUS_WMI_DEVID_MID_FAN_CTRL
#define ASUS_WMI_DEVID_CPU_FAN_CURVE
#define ASUS_WMI_DEVID_GPU_FAN_CURVE
#define ASUS_WMI_DEVID_MID_FAN_CURVE

/* Tunables for AUS ROG laptops */
#define ASUS_WMI_DEVID_PPT_PL2_SPPT
#define ASUS_WMI_DEVID_PPT_PL1_SPL
#define ASUS_WMI_DEVID_PPT_APU_SPPT
#define ASUS_WMI_DEVID_PPT_PLAT_SPPT
#define ASUS_WMI_DEVID_PPT_FPPT
#define ASUS_WMI_DEVID_NV_DYN_BOOST
#define ASUS_WMI_DEVID_NV_THERM_TARGET

/* Power */
#define ASUS_WMI_DEVID_PROCESSOR_STATE

/* Deep S3 / Resume on LID open */
#define ASUS_WMI_DEVID_LID_RESUME

/* Maximum charging percentage */
#define ASUS_WMI_DEVID_RSOC

/* Keyboard dock */
#define ASUS_WMI_DEVID_KBD_DOCK

/* Charging mode - 1=Barrel, 2=USB */
#define ASUS_WMI_DEVID_CHARGE_MODE

/* MCU powersave mode */
#define ASUS_WMI_DEVID_MCU_POWERSAVE

/* epu is connected? 1 == true */
#define ASUS_WMI_DEVID_EGPU_CONNECTED
/* egpu on/off */
#define ASUS_WMI_DEVID_EGPU

/* dgpu on/off */
#define ASUS_WMI_DEVID_DGPU

/* gpu mux switch, 0 = dGPU, 1 = Optimus */
#define ASUS_WMI_DEVID_GPU_MUX
#define ASUS_WMI_DEVID_GPU_MUX_VIVO

/* TUF laptop RGB modes/colours */
#define ASUS_WMI_DEVID_TUF_RGB_MODE
#define ASUS_WMI_DEVID_TUF_RGB_MODE2

/* TUF laptop RGB power/state */
#define ASUS_WMI_DEVID_TUF_RGB_STATE

/* Bootup sound control */
#define ASUS_WMI_DEVID_BOOT_SOUND

/* DSTS masks */
#define ASUS_WMI_DSTS_STATUS_BIT
#define ASUS_WMI_DSTS_UNKNOWN_BIT
#define ASUS_WMI_DSTS_PRESENCE_BIT
#define ASUS_WMI_DSTS_USER_BIT
#define ASUS_WMI_DSTS_BIOS_BIT
#define ASUS_WMI_DSTS_BRIGHTNESS_MASK
#define ASUS_WMI_DSTS_MAX_BRIGTH_MASK
#define ASUS_WMI_DSTS_LIGHTBAR_MASK

#if IS_REACHABLE(CONFIG_ASUS_WMI)
int asus_wmi_evaluate_method(u32 method_id, u32 arg0, u32 arg1, u32 *retval);
#else
static inline int asus_wmi_evaluate_method(u32 method_id, u32 arg0, u32 arg1,
					   u32 *retval)
{
	return -ENODEV;
}
#endif

#endif	/* __PLATFORM_DATA_X86_ASUS_WMI_H */