#define pr_fmt(fmt) …
#include <linux/acpi.h>
#include <linux/bits.h>
#include <linux/device.h>
#include <linux/dev_printk.h>
#include <linux/dmi.h>
#include <linux/input.h>
#include <linux/input/sparse-keymap.h>
#include <linux/kernel.h>
#include <linux/leds.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/types.h>
#include <acpi/battery.h>
#define LED_DEVICE(_name, max, flag) …
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;
static bool fw_debug;
module_param(fw_debug, bool, 0);
MODULE_PARM_DESC(…) …;
#define LG_ADDRESS_SPACE_ID …
#define LG_ADDRESS_SPACE_DEBUG_FLAG_ADR …
#define LG_ADDRESS_SPACE_FAN_MODE_ADR …
#define LG_ADDRESS_SPACE_DTTM_FLAG_ADR …
#define LG_ADDRESS_SPACE_CPU_TEMP_ADR …
#define LG_ADDRESS_SPACE_CPU_TRIP_LOW_ADR …
#define LG_ADDRESS_SPACE_CPU_TRIP_HIGH_ADR …
#define LG_ADDRESS_SPACE_MB_TEMP_ADR …
#define LG_ADDRESS_SPACE_MB_TRIP_LOW_ADR …
#define LG_ADDRESS_SPACE_MB_TRIP_HIGH_ADR …
#define LG_ADDRESS_SPACE_DEBUG_MSG_START_ADR …
#define LG_ADDRESS_SPACE_DEBUG_MSG_END_ADR …
#define WMI_EVENT_GUID0 …
#define WMI_EVENT_GUID1 …
#define WMI_EVENT_GUID2 …
#define WMI_EVENT_GUID3 …
#define WMI_METHOD_WMAB …
#define WMI_METHOD_WMBB …
#define WMI_EVENT_GUID …
#define SB_GGOV_METHOD …
#define GOV_TLED …
#define WM_GET …
#define WM_SET …
#define WM_KEY_LIGHT …
#define WM_TLED …
#define WM_FN_LOCK …
#define WM_BATT_LIMIT …
#define WM_READER_MODE …
#define WM_FAN_MODE …
#define WMBB_USB_CHARGE …
#define WMBB_BATT_LIMIT …
#define PLATFORM_NAME …
MODULE_ALIAS(…) …;
MODULE_ALIAS(…) …;
MODULE_ALIAS(…) …;
MODULE_ALIAS(…) …;
MODULE_ALIAS(…) …;
MODULE_ALIAS(…) …;
static struct platform_device *pf_device;
static struct input_dev *wmi_input_dev;
static u32 inited;
#define INIT_INPUT_WMI_0 …
#define INIT_INPUT_WMI_2 …
#define INIT_INPUT_ACPI …
#define INIT_SPARSE_KEYMAP …
static int battery_limit_use_wmbb;
static struct led_classdev kbd_backlight;
static enum led_brightness get_kbd_backlight_level(struct device *dev);
static const struct key_entry wmi_keymap[] = …;
static int ggov(u32 arg0)
{ … }
static union acpi_object *lg_wmab(struct device *dev, u32 method, u32 arg1, u32 arg2)
{ … }
static union acpi_object *lg_wmbb(struct device *dev, u32 method_id, u32 arg1, u32 arg2)
{ … }
static void wmi_notify(union acpi_object *obj, void *context)
{ … }
static void wmi_input_setup(void)
{ … }
static void acpi_notify(struct acpi_device *device, u32 event)
{ … }
static ssize_t fan_mode_store(struct device *dev,
struct device_attribute *attr,
const char *buffer, size_t count)
{ … }
static ssize_t fan_mode_show(struct device *dev,
struct device_attribute *attr, char *buffer)
{ … }
static ssize_t usb_charge_store(struct device *dev,
struct device_attribute *attr,
const char *buffer, size_t count)
{ … }
static ssize_t usb_charge_show(struct device *dev,
struct device_attribute *attr, char *buffer)
{ … }
static ssize_t reader_mode_store(struct device *dev,
struct device_attribute *attr,
const char *buffer, size_t count)
{ … }
static ssize_t reader_mode_show(struct device *dev,
struct device_attribute *attr, char *buffer)
{ … }
static ssize_t fn_lock_store(struct device *dev,
struct device_attribute *attr,
const char *buffer, size_t count)
{ … }
static ssize_t fn_lock_show(struct device *dev,
struct device_attribute *attr, char *buffer)
{ … }
static ssize_t charge_control_end_threshold_store(struct device *dev,
struct device_attribute *attr,
const char *buf, size_t count)
{ … }
static ssize_t charge_control_end_threshold_show(struct device *device,
struct device_attribute *attr,
char *buf)
{ … }
static ssize_t battery_care_limit_show(struct device *dev,
struct device_attribute *attr,
char *buffer)
{ … }
static ssize_t battery_care_limit_store(struct device *dev,
struct device_attribute *attr,
const char *buffer, size_t count)
{ … }
static DEVICE_ATTR_RW(fan_mode);
static DEVICE_ATTR_RW(usb_charge);
static DEVICE_ATTR_RW(reader_mode);
static DEVICE_ATTR_RW(fn_lock);
static DEVICE_ATTR_RW(charge_control_end_threshold);
static DEVICE_ATTR_RW(battery_care_limit);
static int lg_battery_add(struct power_supply *battery, struct acpi_battery_hook *hook)
{ … }
static int lg_battery_remove(struct power_supply *battery, struct acpi_battery_hook *hook)
{ … }
static struct acpi_battery_hook battery_hook = …;
static struct attribute *dev_attributes[] = …;
static const struct attribute_group dev_attribute_group = …;
static void tpad_led_set(struct led_classdev *cdev,
enum led_brightness brightness)
{ … }
static enum led_brightness tpad_led_get(struct led_classdev *cdev)
{ … }
static LED_DEVICE(tpad_led, 1, 0);
static void kbd_backlight_set(struct led_classdev *cdev,
enum led_brightness brightness)
{ … }
static enum led_brightness get_kbd_backlight_level(struct device *dev)
{ … }
static enum led_brightness kbd_backlight_get(struct led_classdev *cdev)
{ … }
static LED_DEVICE(kbd_backlight, 255, LED_BRIGHT_HW_CHANGED);
static void wmi_input_destroy(void)
{ … }
static struct platform_driver pf_driver = …;
static acpi_status lg_laptop_address_space_write(struct device *dev, acpi_physical_address address,
size_t size, u64 value)
{ … }
static acpi_status lg_laptop_address_space_read(struct device *dev, acpi_physical_address address,
size_t size, u64 *value)
{ … }
static acpi_status lg_laptop_address_space_handler(u32 function, acpi_physical_address address,
u32 bits, u64 *value, void *handler_context,
void *region_context)
{ … }
static void lg_laptop_remove_address_space_handler(void *data)
{ … }
static int acpi_add(struct acpi_device *device)
{ … }
static void acpi_remove(struct acpi_device *device)
{ … }
static const struct acpi_device_id device_ids[] = …;
MODULE_DEVICE_TABLE(acpi, device_ids);
static struct acpi_driver acpi_driver = …;
static int __init acpi_init(void)
{ … }
static void __exit acpi_exit(void)
{ … }
module_init(…) …;
module_exit(acpi_exit);