12 #include <linux/kernel.h>
13 #include <linux/module.h>
14 #include <linux/device.h>
15 #include <linux/types.h>
21 #include "../w1_int.h"
22 #include "../w1_family.h"
24 #define HDQ_CMD_READ (0)
25 #define HDQ_CMD_WRITE (1<<7)
29 static int w1_bq27000_read(
struct device *
dev,
unsigned int reg)
43 .read = w1_bq27000_read,
44 .name =
"bq27000-battery",
47 static int w1_bq27000_add_slave(
struct w1_slave *
sl)
58 &bq27000_battery_info,
59 sizeof(bq27000_battery_info));
60 pdev->
dev.parent = &sl->dev;
76 static void w1_bq27000_remove_slave(
struct w1_slave *sl)
84 .add_slave = w1_bq27000_add_slave,
85 .remove_slave = w1_bq27000_remove_slave,
88 static struct w1_family w1_bq27000_family = {
90 .fops = &w1_bq27000_fops,
93 static int __init w1_bq27000_init(
void)
96 w1_bq27000_family.
fid = F_ID;
101 static void __exit w1_bq27000_exit(
void)