linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 0/8] power: bq27xxx: add support for NVRAM R/W access
@ 2017-01-22  7:13 Matt Ranostay
  2017-01-22  7:13 ` [PATCH v4 1/8] devicetree: property-units: add mWh and mAh units Matt Ranostay
                   ` (4 more replies)
  0 siblings, 5 replies; 33+ messages in thread
From: Matt Ranostay @ 2017-01-22  7:13 UTC (permalink / raw)
  To: linux-pm, devicetree; +Cc: sre, tony, Matt Ranostay

Changes from v1:
* add documentation for mWh and mAh property units
* change devicetree entries to match new property units

Changes from v2:
* split i2c changes into respective patches
* add documentation for battery information for fuel gauge
* rebased documentation patches on change on the list
* abstracted the battery configuration for the state machine
  to an generic struct and platform data access function

Changes from v3:
* add "fixed-battery" compatible field to be be more consistant
  with devicetree

Matt Ranostay (8):
  devicetree: property-units: add mWh and mAh units
  devicetree: power: add battery state machine documentation
  power: power_supply: add battery information struct
  power: power_supply: add battery info platform data retrieval
  power: bq27xxx_battery: add BQ27425 chip id
  power: bq27xxx_battery: add i2c bulk read/write functions
  devicetree: power: bq27xxx: add monitored battery documentation
  power: bq27xxx_battery: add initial state machine support

 .../devicetree/bindings/power/supply/battery.txt   |  24 ++
 .../devicetree/bindings/power/supply/bq27xxx.txt   |   8 +
 .../devicetree/bindings/property-units.txt         |   2 +
 drivers/power/supply/bq27xxx_battery.c             | 253 ++++++++++++++++++++-
 drivers/power/supply/bq27xxx_battery_i2c.c         |  64 +++++-
 drivers/power/supply/power_supply_core.c           |  41 ++++
 include/linux/power/bq27xxx_battery.h              |   7 +-
 include/linux/power_supply.h                       |  16 ++
 8 files changed, 411 insertions(+), 4 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/power/supply/battery.txt

-- 
2.10.2


^ permalink raw reply	[flat|nested] 33+ messages in thread
* Re: [PATCH v4 6/8] power: bq27xxx_battery: add i2c bulk read/write functions
@ 2017-01-29 20:08 Liam Breck
  2017-01-29 22:22 ` Sebastian Reichel
  0 siblings, 1 reply; 33+ messages in thread
From: Liam Breck @ 2017-01-29 20:08 UTC (permalink / raw)
  To: Sebastian Reichel; +Cc: Matt Ranostay, linux-pm, Tony Lindgren

On Sun, 2017-01-29 at 18:38:26, Sebastian Reichel wrote:
>> diff --git a/include/linux/power/bq27xxx_battery.h b/include/linux/power/bq27xxx_battery.h
>> index 3f265dbf11af..581402380d6e 100644
>> --- a/include/linux/power/bq27xxx_battery.h
>> +++ b/include/linux/power/bq27xxx_battery.h
>> @@ -41,6 +41,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);
>
>So I had a look at patch 8 and I think we should start with finally
>converting bq27xxx to regmap API and probably a second regmap for
>the block data stuff. That way you get all the debugging info in
>debugfs and the driver looks much cleaner.
										
Could we complete this patchset using the I2C api? We haven't added to it
extensively, and regmap is unrelated to the purpose of this patchset.

Also maybe the primary maintainers of BQ27xxx should be on the hook for
that api change :-)

Plus we're blocked here on devicetree support for BQ24190 waiting for
power_supply_battery_info.

Thanks

^ permalink raw reply	[flat|nested] 33+ messages in thread

end of thread, other threads:[~2017-01-31 21:07 UTC | newest]

Thread overview: 33+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-22  7:13 [PATCH v4 0/8] power: bq27xxx: add support for NVRAM R/W access Matt Ranostay
2017-01-22  7:13 ` [PATCH v4 1/8] devicetree: property-units: add mWh and mAh units Matt Ranostay
2017-01-23 17:50   ` Rob Herring
2017-01-22  7:13 ` [PATCH v4 2/8] devicetree: power: add battery state machine documentation Matt Ranostay
2017-01-22 22:22   ` Liam Breck
2017-01-24 19:56     ` Liam Breck
     [not found]       ` <CAKvHMgS9ZxE2qxDqeAVRJFzerjkJV=io58aQjtU51j=kFzbYtw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-01-29 17:27         ` Sebastian Reichel
2017-01-26  6:19     ` Liam Breck
2017-01-26  7:02       ` Matt Ranostay
2017-01-29 17:20         ` Sebastian Reichel
2017-01-29 23:22           ` Liam Breck
2017-01-30  2:30             ` Sebastian Reichel
2017-01-30 10:54               ` Liam Breck
     [not found]                 ` <CAKvHMgQi1tRyUXh0504rP8VUVkFVPt_4NnYTOrBXeO4dde6KMg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-01-30 21:40                   ` Liam Breck
     [not found]     ` <20170122222212.27086-1-liam-RYWXG+zxWwBdeoIcmNTgJF6hYfS7NtTn@public.gmane.org>
2017-01-29 18:06       ` Sebastian Reichel
2017-01-29 23:32         ` Liam Breck
     [not found]           ` <CAKvHMgTrFjjEWwK-NeGOF1o6KRQPXYUvcqWcDwaW+5ZKjQ7VZA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-01-30  2:39             ` Sebastian Reichel
2017-01-30  2:46               ` Liam Breck
2017-01-31 20:59                 ` Liam Breck
     [not found] ` <20170122071404.9654-1-matt-sk+viVC6FLCDq+mSdOJa79kegs52MxvZ@public.gmane.org>
2017-01-22  7:13   ` [PATCH v4 3/8] power: power_supply: add battery information struct Matt Ranostay
     [not found]     ` <20170122071404.9654-4-matt-sk+viVC6FLCDq+mSdOJa79kegs52MxvZ@public.gmane.org>
2017-01-29 18:23       ` Sebastian Reichel
2017-01-22  7:14   ` [PATCH v4 4/8] power: power_supply: add battery info platform data retrieval Matt Ranostay
     [not found]     ` <20170122071404.9654-5-matt-sk+viVC6FLCDq+mSdOJa79kegs52MxvZ@public.gmane.org>
2017-01-29 18:28       ` Sebastian Reichel
2017-01-22  7:14   ` [PATCH v4 5/8] power: bq27xxx_battery: add BQ27425 chip id Matt Ranostay
2017-01-29 15:35     ` Sebastian Reichel
2017-01-29 20:29       ` Liam Breck
2017-01-22  7:14   ` [PATCH v4 7/8] devicetree: power: bq27xxx: add monitored battery documentation Matt Ranostay
2017-01-22  7:14 ` [PATCH v4 6/8] power: bq27xxx_battery: add i2c bulk read/write functions Matt Ranostay
2017-01-29 18:38   ` Sebastian Reichel
2017-01-22  7:14 ` [PATCH v4 8/8] power: bq27xxx_battery: add initial state machine support Matt Ranostay
  -- strict thread matches above, loose matches on Subject: below --
2017-01-29 20:08 [PATCH v4 6/8] power: bq27xxx_battery: add i2c bulk read/write functions Liam Breck
2017-01-29 22:22 ` Sebastian Reichel
2017-01-29 23:02   ` Liam Breck

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).