11 #include <linux/kernel.h>
14 #include <linux/module.h>
21 static bool write_support;
23 MODULE_PARM_DESC(write_support,
"Dangerous, reboot and removal of battery may "
26 #define EC_SPACE_SIZE 256
28 static struct dentry *acpi_ec_debugfs_dir;
31 size_t count, loff_t *off)
38 loff_t init_off = *off;
43 if (*off + count >= size) {
50 err =
ec_read(*off, &data[*off - init_off]);
60 size_t count, loff_t *off)
67 loff_t init_off = *off;
79 u8 byte_write = data[*off - init_off];
93 .read = acpi_ec_read_io,
94 .write = acpi_ec_write_io,
104 if (ec_device_count == 0) {
106 if (!acpi_ec_debugfs_dir)
110 sprintf(name,
"ec%u", ec_device_count);
113 if (ec_device_count != 0)
136 static int __init acpi_ec_sys_init(
void)
146 static void __exit acpi_ec_sys_exit(
void)