16 #include <linux/module.h>
19 #include <linux/slab.h>
24 static struct mfd_cell tps65912s[] = {
26 .name =
"tps65912-pmic",
37 err = tps65912->
read(tps65912, reg, 1, &data);
39 dev_err(tps65912->
dev,
"Read from reg 0x%x failed\n", reg);
44 err = tps65912->
write(tps65912, reg, 1, &data);
46 dev_err(tps65912->
dev,
"Write to reg 0x%x failed\n", reg);
60 err = tps65912->
read(tps65912, reg, 1, &data);
62 dev_err(tps65912->
dev,
"Read from reg 0x%x failed\n", reg);
67 err = tps65912->
write(tps65912, reg, 1, &data);
69 dev_err(tps65912->
dev,
"Write to reg 0x%x failed\n", reg);
82 err = tps65912->
read(tps65912, reg, 1, &val);
89 static inline int tps65912_write(
struct tps65912 *tps65912,
u8 reg,
u8 val)
91 return tps65912->
write(tps65912, reg, 1, &val);
100 data = tps65912_read(tps65912, reg);
102 dev_err(tps65912->
dev,
"Read from reg 0x%x failed\n", reg);
115 err = tps65912_write(tps65912, reg, val);
117 dev_err(tps65912->
dev,
"Write for reg 0x%x failed\n", reg);
131 if (init_data ==
NULL)
153 init_data->
irq = pmic_plat_data->
irq;