#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/acpi.h>
#include <linux/platform_device.h>
#define DPTF_POWER_SHOW(name, object) …
DPTF_POWER_SHOW(max_platform_power_mw, PMAX)
DPTF_POWER_SHOW(platform_power_source, PSRC)
DPTF_POWER_SHOW(adapter_rating_mw, ARTG)
DPTF_POWER_SHOW(battery_steady_power_mw, PBSS)
DPTF_POWER_SHOW(charger_type, CTYP)
DPTF_POWER_SHOW(rest_of_platform_power_mw, PROP)
DPTF_POWER_SHOW(max_steady_state_power_mw, PBSS)
DPTF_POWER_SHOW(high_freq_impedance_mohm, RBHF)
DPTF_POWER_SHOW(no_load_voltage_mv, VBNL)
DPTF_POWER_SHOW(current_discharge_capbility_ma, CMPP);
static DEVICE_ATTR_RO(max_platform_power_mw);
static DEVICE_ATTR_RO(platform_power_source);
static DEVICE_ATTR_RO(adapter_rating_mw);
static DEVICE_ATTR_RO(battery_steady_power_mw);
static DEVICE_ATTR_RO(charger_type);
static DEVICE_ATTR_RO(rest_of_platform_power_mw);
static DEVICE_ATTR_RO(max_steady_state_power_mw);
static DEVICE_ATTR_RO(high_freq_impedance_mohm);
static DEVICE_ATTR_RO(no_load_voltage_mv);
static DEVICE_ATTR_RO(current_discharge_capbility_ma);
static ssize_t prochot_confirm_store(struct device *dev,
struct device_attribute *attr,
const char *buf, size_t count)
{ … }
static DEVICE_ATTR_WO(prochot_confirm);
static struct attribute *dptf_power_attrs[] = …;
static const struct attribute_group dptf_power_attribute_group = …;
static struct attribute *dptf_battery_attrs[] = …;
static const struct attribute_group dptf_battery_attribute_group = …;
#define MAX_POWER_CHANGED …
#define POWER_STATE_CHANGED …
#define STEADY_STATE_POWER_CHANGED …
#define POWER_PROP_CHANGE_EVENT …
#define IMPEDANCE_CHANGED …
#define VOLTAGE_CURRENT_CHANGED …
static long long dptf_participant_type(acpi_handle handle)
{ … }
static void dptf_power_notify(acpi_handle handle, u32 event, void *data)
{ … }
static int dptf_power_add(struct platform_device *pdev)
{ … }
static void dptf_power_remove(struct platform_device *pdev)
{ … }
static const struct acpi_device_id int3407_device_ids[] = …;
MODULE_DEVICE_TABLE(acpi, int3407_device_ids);
static struct platform_driver dptf_power_driver = …;
module_platform_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;
MODULE_DESCRIPTION(…) …;