13 #include <linux/kernel.h>
14 #include <linux/module.h>
15 #include <linux/i2c.h>
17 #include <linux/slab.h>
49 dev_err(&client->
dev,
"Failed to allocate register map: %d\n",
54 chip->
id =
id->driver_data;
67 i2c_set_clientdata(chip->
client, chip);
114 #ifdef CONFIG_PM_SLEEP
115 static int pm80x_suspend(
struct device *
dev)
121 if (device_may_wakeup(chip->
dev))
122 enable_irq_wake(chip->
irq);
127 static int pm80x_resume(
struct device *dev)
130 struct pm80x_chip *chip = i2c_get_clientdata(client);
133 if (device_may_wakeup(chip->
dev))
134 disable_irq_wake(chip->
irq);