#include <linux/acpi.h>
#include <linux/platform_device.h>
#include <linux/kernel.h>
#include <linux/list.h>
#include <linux/module.h>
#define ACPI_ATTR_NAME_LEN …
#define DEV_ATTR(_var, _name) …
#define GPIO_ATTR_GROUP(_group, _name, _num) …
static unsigned int chromeos_acpi_gpio_groups;
static int chromeos_acpi_handle_package(struct device *dev, union acpi_object *obj,
int pkg_num, int sub_pkg_num, char *name, char *buf)
{ … }
static int chromeos_acpi_evaluate_method(struct device *dev, int pkg_num, int sub_pkg_num,
char *name, char *buf)
{ … }
static int parse_attr_name(const char *name, char *attr_name, int *attr_num)
{ … }
static ssize_t chromeos_first_level_attr_show(struct device *dev, struct device_attribute *attr,
char *buf)
{ … }
static unsigned int get_gpio_pkg_num(struct device *dev)
{ … }
DEV_ATTR(…)
DEV_ATTR(…)
DEV_ATTR(…)
DEV_ATTR(…)
DEV_ATTR(…)
DEV_ATTR(…)
DEV_ATTR(…)
DEV_ATTR(…)
DEV_ATTR(…)
DEV_ATTR(…)
DEV_ATTR(…)
static struct attribute *first_level_attrs[] = …;
static const struct attribute_group first_level_attr_group = …;
GPIO_ATTR_GROUP(…)
GPIO_ATTR_GROUP(…)
GPIO_ATTR_GROUP(…)
GPIO_ATTR_GROUP(…)
GPIO_ATTR_GROUP(…)
GPIO_ATTR_GROUP(…)
GPIO_ATTR_GROUP(…)
GPIO_ATTR_GROUP(…)
static const struct attribute_group *chromeos_acpi_all_groups[] = …;
static int chromeos_acpi_device_probe(struct platform_device *pdev)
{ … }
static const struct acpi_device_id chromeos_device_ids[] = …;
MODULE_DEVICE_TABLE(acpi, chromeos_device_ids);
static struct platform_driver chromeos_acpi_device_driver = …;
module_platform_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;
MODULE_DESCRIPTION(…) …;