summaryrefslogtreecommitdiff
path: root/include/linux/power
diff options
context:
space:
mode:
authorMatt Ranostay <matt@ranostay.consulting>2017-06-07 21:37:54 +0300
committerSebastian Reichel <sebastian.reichel@collabora.co.uk>2017-06-08 17:29:29 +0300
commit14073f6614f62dc7862c83575b042424599cc867 (patch)
tree9c06ffc1a43d767df4d085147c32450899ac81d5 /include/linux/power
parente2517f3bb44b1ac3772858f4bca0be05d36f492d (diff)
downloadlinux-14073f6614f62dc7862c83575b042424599cc867.tar.xz
power: supply: bq27xxx: Add bulk transfer bus methods
Declare bus.write/read_bulk/write_bulk(). Add I2C write/read_bulk/write_bulk() to implement the above. Add bq27xxx_write/read_block/write_block() helpers to call the above. Signed-off-by: Matt Ranostay <matt@ranostay.consulting> Signed-off-by: Liam Breck <kernel@networkimprov.net> Acked-by: "Andrew F. Davis" <afd@ti.com> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
Diffstat (limited to 'include/linux/power')
-rw-r--r--include/linux/power/bq27xxx_battery.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/power/bq27xxx_battery.h b/include/linux/power/bq27xxx_battery.h
index b312bcef53da..c3369fa605f9 100644
--- a/include/linux/power/bq27xxx_battery.h
+++ b/include/linux/power/bq27xxx_battery.h
@@ -40,6 +40,9 @@ struct bq27xxx_platform_data {
struct bq27xxx_device_info;
struct bq27xxx_access_methods {
int (*read)(struct bq27xxx_device_info *di, u8 reg, bool single);
+ int (*write)(struct bq27xxx_device_info *di, u8 reg, int value, bool single);
+ int (*read_bulk)(struct bq27xxx_device_info *di, u8 reg, u8 *data, int len);
+ int (*write_bulk)(struct bq27xxx_device_info *di, u8 reg, u8 *data, int len);
};
struct bq27xxx_reg_cache {