0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013 #ifndef _DELL_SMBIOS_H_
0014 #define _DELL_SMBIOS_H_
0015
0016 #include <linux/device.h>
0017 #include <uapi/linux/wmi.h>
0018
0019
0020 #define CLASS_KBD_BACKLIGHT 4
0021 #define SELECT_KBD_BACKLIGHT 11
0022
0023
0024
0025
0026 #define BRIGHTNESS_TOKEN 0x007d
0027 #define KBD_LED_AC_TOKEN 0x0451
0028 #define KBD_LED_OFF_TOKEN 0x01E1
0029 #define KBD_LED_ON_TOKEN 0x01E2
0030 #define KBD_LED_AUTO_TOKEN 0x01E3
0031 #define KBD_LED_AUTO_25_TOKEN 0x02EA
0032 #define KBD_LED_AUTO_50_TOKEN 0x02EB
0033 #define KBD_LED_AUTO_75_TOKEN 0x02EC
0034 #define KBD_LED_AUTO_100_TOKEN 0x02F6
0035 #define GLOBAL_MIC_MUTE_ENABLE 0x0364
0036 #define GLOBAL_MIC_MUTE_DISABLE 0x0365
0037
0038 struct notifier_block;
0039
0040 struct calling_interface_token {
0041 u16 tokenID;
0042 u16 location;
0043 union {
0044 u16 value;
0045 u16 stringlength;
0046 };
0047 };
0048
0049 struct calling_interface_structure {
0050 struct dmi_header header;
0051 u16 cmdIOAddress;
0052 u8 cmdIOCode;
0053 u32 supportedCmds;
0054 struct calling_interface_token tokens[];
0055 } __packed;
0056
0057 int dell_smbios_register_device(struct device *d, void *call_fn);
0058 void dell_smbios_unregister_device(struct device *d);
0059
0060 int dell_smbios_error(int value);
0061 int dell_smbios_call_filter(struct device *d,
0062 struct calling_interface_buffer *buffer);
0063 int dell_smbios_call(struct calling_interface_buffer *buffer);
0064
0065 struct calling_interface_token *dell_smbios_find_token(int tokenid);
0066
0067 enum dell_laptop_notifier_actions {
0068 DELL_LAPTOP_KBD_BACKLIGHT_BRIGHTNESS_CHANGED,
0069 };
0070
0071 int dell_laptop_register_notifier(struct notifier_block *nb);
0072 int dell_laptop_unregister_notifier(struct notifier_block *nb);
0073 void dell_laptop_call_notifier(unsigned long action, void *data);
0074
0075
0076 #ifdef CONFIG_DELL_SMBIOS_WMI
0077 int init_dell_smbios_wmi(void);
0078 void exit_dell_smbios_wmi(void);
0079 #else
0080 static inline int init_dell_smbios_wmi(void)
0081 {
0082 return -ENODEV;
0083 }
0084 static inline void exit_dell_smbios_wmi(void)
0085 {}
0086 #endif
0087
0088 #ifdef CONFIG_DELL_SMBIOS_SMM
0089 int init_dell_smbios_smm(void);
0090 void exit_dell_smbios_smm(void);
0091 #else
0092 static inline int init_dell_smbios_smm(void)
0093 {
0094 return -ENODEV;
0095 }
0096 static inline void exit_dell_smbios_smm(void)
0097 {}
0098 #endif
0099
0100 #endif