From: Liam Breck <liam@networkimprov.net>
To: Sebastian Reichel <sre@kernel.org>
Cc: "Andrew F. Davis" <afd@ti.com>,
linux-pm@vger.kernel.org,
Matt Ranostay <matt@ranostay.consulting>
Subject: [PATCH v11 0/10] devicetree battery support and client bq27xxx_battery
Date: Mon, 20 Mar 2017 02:43:25 -0700 [thread overview]
Message-ID: <20170320094335.19224-1-liam@networkimprov.net> (raw)
Overview:
* new devicetree battery node specifies static battery data
* fuel gauge and charger nodes shall use monitored-battery=<&battery_node>
* new power_supply_get_battery_info() reads battery data from devicetree
* new struct power_supply_battery_info provides battery data to drivers
* drivers surface battery data in sysfs via related power_supply_prop_* fields
* bq27xxx driver calls the above and writes battery data to RAM/NVM for params
essential to correct operation: energy-full-design-microwatt-hours,
charge-full-design-microamp-hours, voltage-min-design-microvolt
Changes in v11:
power_supply_core:
* switch to compatible = "simple-battery"
* add docs to power_supply_class.txt
Documentation/devicetree/.../battery.txt:
* add description, drop refs to Linux, "simple-battery"
bq27xxx_battery:
* reset flash chips after DM update
* add bq27xxx_write/xfer()
* polishing from Andrew's feedback
* new patch to clean up error reporting
* new patch to consolidate duplicate register/property arrays
Changes in v10:
bq27xxx_battery:
* pass actual chip ID into _setup()
* add di->unseal_key & di->dm_regs; drop static arrays
* support bq27425, 441, 621
Changes in v9:
bq27xxx_battery:
* fix set_cfgupdate()
* support bq27500, 545, 421; defer others
* drop print_dm_blocks() patch
* minor polishing
Documentation/devicetree/.../battery.txt:
* describe rationale for enum power_supply_property names
Changes in v8:
bq27xxx_battery:
* wait on flag after set_cfgupdate & soft_reset
* drop print_config(), report status in update_dm_block()
* clarify error messages
* cleanup from Andrew's feedback; minor polishing
Changes in v7:
bq27xxx_battery:
* support chips where terminate_voltage & design_* live in separate blocks
* draft support for 421, 441, 621 chips
* new patch to log chip memory fields
* report bus I/O errors; return error code in bq27xxx_battery_i2c
* verify checksum in read_dm_block()
* use set_cfgupdate only if chip provides it, soft_reset on I/O error
* block_data_control=0 only in write_dm_block()
* note toxic code from TI bqtool in write_dm_block()
* lots of functionally neutral polishing
Documentation/devicetree/.../battery.txt:
* mention power_supply_get_battery_info()
Changes in v6:
* Documentation/devictree/... fixes
* bq27xxx_battery: clarify names
* bq27xxx_battery: verify that selected registers are supported
* bq27xxx_battery: allocate NVM buffer on stack
* bq27xxx_battery_i2c: fix return code of bulk_read
Changes in v5:
* incorporate feedback into Documentation/devicetree/.../battery.txt
* use power_supply_prop_* names in devicetree and power_supply_battery_info
* default fields to -EINVAL in power_supply_battery_info
* power_supply_get_battery_info() always looks for "monitored-battery"
* power_supply_get_battery_info() emits a warning if !psy->of_node
* squash patches for power_supply_battery_info
* bq27xxx_battery: check power_supply_battery_info values
* bq27xxx_battery: note missing power_supply_prop_* features
* bq27xxx_battery: new patch for access methods
Changes in v4:
* add "fixed-battery" compatible field to be be more consistant with devicetree
Changes in v3:
* 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 in v2:
* add documentation for uWh and uAh property units
* change devicetree entries to match new property units
Liam Breck (8):
devicetree: power: Add battery.txt
devicetree: power: bq27xxx: Add monitored-battery documentation
power: power_supply: Add power_supply_battery_info and API
power: bq27xxx_battery: Make error reporting consistent
power: bq27xxx_battery: Define access methods to write chip registers
power: bq27xxx_battery: Keep track of specific chip id
power: bq27xxx_battery: Add power_supply_battery_info support
power: bq27xxx_battery: Remove duplicate register arrays
Matt Ranostay (2):
devicetree: property-units: Add uWh and uAh units
power: bq27xxx_battery_i2c: Add I2C bulk read/write functions
.../devicetree/bindings/power/supply/battery.txt | 43 ++
.../devicetree/bindings/power/supply/bq27xxx.txt | 11 +-
.../devicetree/bindings/property-units.txt | 2 +
Documentation/power/power_supply_class.txt | 12 +
drivers/power/supply/bq27xxx_battery.c | 707 +++++++++++++++++----
drivers/power/supply/bq27xxx_battery_i2c.c | 98 ++-
drivers/power/supply/power_supply_core.c | 45 ++
include/linux/power/bq27xxx_battery.h | 26 +-
include/linux/power_supply.h | 18 +
9 files changed, 806 insertions(+), 156 deletions(-)
create mode 100644 Documentation/devicetree/bindings/power/supply/battery.txt
--
2.9.3
next reply other threads:[~2017-03-20 9:44 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-20 9:43 Liam Breck [this message]
[not found] ` <20170320094335.19224-1-liam-RYWXG+zxWwBdeoIcmNTgJF6hYfS7NtTn@public.gmane.org>
2017-03-20 9:43 ` [PATCH v11 01/10] devicetree: power: Add battery.txt Liam Breck
2017-03-24 15:55 ` Rob Herring
2017-03-24 21:11 ` Liam Breck
[not found] ` <20170320094335.19224-2-liam-RYWXG+zxWwBdeoIcmNTgJF6hYfS7NtTn@public.gmane.org>
2017-03-23 10:20 ` Sebastian Reichel
2017-03-23 10:30 ` Liam Breck
2017-03-23 12:18 ` Sebastian Reichel
2017-04-07 19:23 ` Liam Breck
[not found] ` <CAKvHMgTxRJXgfpDgqQ_+=ErFEZAh9CodjVn5ZOoCfqPqSZWetA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-04-14 0:33 ` Sebastian Reichel
2017-05-01 15:09 ` Sebastian Reichel
2017-03-20 9:43 ` [PATCH v11 03/10] devicetree: power: bq27xxx: Add monitored-battery documentation Liam Breck
2017-05-01 15:10 ` Sebastian Reichel
2017-03-20 9:43 ` [PATCH v11 02/10] devicetree: property-units: Add uWh and uAh units Liam Breck
2017-05-01 15:06 ` Sebastian Reichel
2017-03-20 9:43 ` [PATCH v11 04/10] power: power_supply: Add power_supply_battery_info and API Liam Breck
2017-03-20 20:59 ` Liam Breck
2017-03-23 10:17 ` Sebastian Reichel
2017-03-25 23:19 ` Liam Breck
2017-03-29 13:50 ` Sebastian Reichel
2017-05-01 15:11 ` Sebastian Reichel
2017-03-20 9:43 ` [PATCH v11 05/10] power: bq27xxx_battery: Make error reporting consistent Liam Breck
2017-03-20 16:57 ` Andrew F. Davis
2017-03-20 17:59 ` Liam Breck
2017-03-23 10:11 ` Sebastian Reichel
2017-03-23 10:24 ` Liam Breck
2017-03-23 10:33 ` Sebastian Reichel
2017-03-23 12:49 ` Liam Breck
2017-03-20 9:43 ` [PATCH v11 06/10] power: bq27xxx_battery: Define access methods to write chip registers Liam Breck
2017-03-21 20:54 ` kbuild test robot
2017-03-22 19:56 ` Andrew F. Davis
2017-03-20 9:43 ` [PATCH v11 07/10] power: bq27xxx_battery: Keep track of specific chip id Liam Breck
2017-03-23 10:28 ` Sebastian Reichel
2017-03-23 10:35 ` Liam Breck
2017-03-23 12:30 ` Sebastian Reichel
2017-03-23 12:39 ` Liam Breck
2017-03-23 13:06 ` Sebastian Reichel
2017-03-23 14:49 ` Andrew F. Davis
2017-03-23 21:44 ` Liam Breck
2017-03-24 11:48 ` Andrew F. Davis
2017-03-24 12:20 ` Liam Breck
2017-03-20 9:43 ` [PATCH v11 08/10] power: bq27xxx_battery: Add power_supply_battery_info support Liam Breck
2017-03-20 9:43 ` [PATCH v11 09/10] power: bq27xxx_battery_i2c: Add I2C bulk read/write functions Liam Breck
2017-03-20 9:43 ` [PATCH v11 10/10] power: bq27xxx_battery: Remove duplicate register arrays Liam Breck
[not found] ` <CAKvHMgS9ajgE3ZpseSkT=BiW5yBL03s-8XNFeHE=V0gz7W7x3w@mail.gmail.com>
2017-03-21 8:58 ` Fwd: " Liam Breck
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170320094335.19224-1-liam@networkimprov.net \
--to=liam@networkimprov.net \
--cc=afd@ti.com \
--cc=linux-pm@vger.kernel.org \
--cc=matt@ranostay.consulting \
--cc=sre@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).