diff options
author | Matt Ranostay <matt@ranostay.consulting> | 2017-06-07 21:37:54 +0300 |
---|---|---|
committer | Sebastian Reichel <sebastian.reichel@collabora.co.uk> | 2017-06-08 17:29:29 +0300 |
commit | 14073f6614f62dc7862c83575b042424599cc867 (patch) | |
tree | 9c06ffc1a43d767df4d085147c32450899ac81d5 /include/linux | |
parent | e2517f3bb44b1ac3772858f4bca0be05d36f492d (diff) | |
download | linux-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')
-rw-r--r-- | include/linux/power/bq27xxx_battery.h | 3 |
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 { |