2024-03-25 20:31:56

by Andrew Davis

[permalink] [raw]
Subject: [PATCH 1/6] power: supply: bq27xxx: Move temperature reading out of update loop

Most of the functions that read values return a status and put the value
itself in an a function parameter. Update temperature reading to match.

As temp is not checked for changes as part of the update loop, remove
the read of the temperature from the periodic update loop. This saves
I2C/1W bandwidth. It also means we do not have to cache it, fresh
values are read when requested.

Signed-off-by: Andrew Davis <[email protected]>
---
drivers/power/supply/bq27xxx_battery.c | 17 ++++++++++-------
include/linux/power/bq27xxx_battery.h | 1 -
2 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/drivers/power/supply/bq27xxx_battery.c b/drivers/power/supply/bq27xxx_battery.c
index abca568344686..00b2a56039ac0 100644
--- a/drivers/power/supply/bq27xxx_battery.c
+++ b/drivers/power/supply/bq27xxx_battery.c
@@ -1652,10 +1652,11 @@ static int bq27xxx_battery_read_energy(struct bq27xxx_device_info *di)
}

/*
- * Return the battery temperature in tenths of degree Kelvin
+ * Return the battery temperature in tenths of degree Celsius
* Or < 0 if something fails.
*/
-static int bq27xxx_battery_read_temperature(struct bq27xxx_device_info *di)
+static int bq27xxx_battery_read_temperature(struct bq27xxx_device_info *di,
+ union power_supply_propval *val)
{
int temp;

@@ -1668,7 +1669,12 @@ static int bq27xxx_battery_read_temperature(struct bq27xxx_device_info *di)
if (di->opts & BQ27XXX_O_ZERO)
temp = 5 * temp / 2;

- return temp;
+ /* Convert decidegree Kelvin to Celsius */
+ temp -= 2731;
+
+ val->intval = temp;
+
+ return 0;
}

/*
@@ -1851,7 +1857,6 @@ static void bq27xxx_battery_update_unlocked(struct bq27xxx_device_info *di)
if ((cache.flags & 0xff) == 0xff)
cache.flags = -1; /* read error */
if (cache.flags >= 0) {
- cache.temperature = bq27xxx_battery_read_temperature(di);
if (di->regs[BQ27XXX_REG_TTE] != INVALID_REG_ADDR)
cache.time_to_empty = bq27xxx_battery_read_time(di, BQ27XXX_REG_TTE);
if (di->regs[BQ27XXX_REG_TTECP] != INVALID_REG_ADDR)
@@ -2038,9 +2043,7 @@ static int bq27xxx_battery_get_property(struct power_supply *psy,
ret = bq27xxx_battery_capacity_level(di, val);
break;
case POWER_SUPPLY_PROP_TEMP:
- ret = bq27xxx_simple_value(di->cache.temperature, val);
- if (ret == 0)
- val->intval -= 2731; /* convert decidegree k to c */
+ ret = bq27xxx_battery_read_temperature(di, val);
break;
case POWER_SUPPLY_PROP_TIME_TO_EMPTY_NOW:
ret = bq27xxx_simple_value(di->cache.time_to_empty, val);
diff --git a/include/linux/power/bq27xxx_battery.h b/include/linux/power/bq27xxx_battery.h
index b9e5bd2b42d36..64b2749d9562b 100644
--- a/include/linux/power/bq27xxx_battery.h
+++ b/include/linux/power/bq27xxx_battery.h
@@ -47,7 +47,6 @@ struct bq27xxx_access_methods {
};

struct bq27xxx_reg_cache {
- int temperature;
int time_to_empty;
int time_to_empty_avg;
int time_to_full;
--
2.39.2



2024-03-25 20:32:03

by Andrew Davis

[permalink] [raw]
Subject: [PATCH 5/6] power: supply: bq27xxx: Move cycle count reading out of update loop

Most of the functions that read values return a status and put the value
itself in an a function parameter. Update cycle count reading to match.

As cycle count is not checked for changes as part of the update loop,
remove the read of this from the periodic update loop. This saves I2C/1W
bandwidth. It also means we do not have to cache it, fresh values are
read when requested.

Signed-off-by: Andrew Davis <[email protected]>
---
drivers/power/supply/bq27xxx_battery.c | 11 ++++++-----
include/linux/power/bq27xxx_battery.h | 1 -
2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/power/supply/bq27xxx_battery.c b/drivers/power/supply/bq27xxx_battery.c
index eae2b9a60f407..fe1b0af143ca7 100644
--- a/drivers/power/supply/bq27xxx_battery.c
+++ b/drivers/power/supply/bq27xxx_battery.c
@@ -1690,7 +1690,8 @@ static int bq27xxx_battery_read_temperature(struct bq27xxx_device_info *di,
* Return the battery Cycle count total
* Or < 0 if something fails.
*/
-static int bq27xxx_battery_read_cyct(struct bq27xxx_device_info *di)
+static int bq27xxx_battery_read_cyct(struct bq27xxx_device_info *di,
+ union power_supply_propval *val)
{
int cyct;

@@ -1698,7 +1699,9 @@ static int bq27xxx_battery_read_cyct(struct bq27xxx_device_info *di)
if (cyct < 0)
dev_err(di->dev, "error reading cycle count total\n");

- return cyct;
+ val->intval = cyct;
+
+ return 0;
}

/*
@@ -1872,8 +1875,6 @@ static void bq27xxx_battery_update_unlocked(struct bq27xxx_device_info *di)
cache.capacity = bq27xxx_battery_read_soc(di);
di->cache.flags = cache.flags;
cache.health = bq27xxx_battery_read_health(di);
- if (di->regs[BQ27XXX_REG_CYCT] != INVALID_REG_ADDR)
- cache.cycle_count = bq27xxx_battery_read_cyct(di);

/*
* On gauges with signed current reporting the current must be
@@ -2082,7 +2083,7 @@ static int bq27xxx_battery_get_property(struct power_supply *psy,
case POWER_SUPPLY_PROP_VOLTAGE_MIN_DESIGN:
return -EINVAL;
case POWER_SUPPLY_PROP_CYCLE_COUNT:
- ret = bq27xxx_simple_value(di->cache.cycle_count, val);
+ ret = bq27xxx_battery_read_cyct(di, val);
break;
case POWER_SUPPLY_PROP_ENERGY_NOW:
ret = bq27xxx_battery_read_energy(di, val);
diff --git a/include/linux/power/bq27xxx_battery.h b/include/linux/power/bq27xxx_battery.h
index 5c75abf3cf069..d743270799d75 100644
--- a/include/linux/power/bq27xxx_battery.h
+++ b/include/linux/power/bq27xxx_battery.h
@@ -47,7 +47,6 @@ struct bq27xxx_access_methods {
};

struct bq27xxx_reg_cache {
- int cycle_count;
int capacity;
int flags;
int health;
--
2.39.2


2024-03-25 20:32:09

by Andrew Davis

[permalink] [raw]
Subject: [PATCH 4/6] power: supply: bq27xxx: Move energy reading out of update loop

Most of the functions that read values return a status and put the value
itself in an a function parameter. Update energy reading to match.

As energy is not checked for changes as part of the update loop,
remove the read of this from the periodic update loop. This saves
I2C/1W bandwidth. It also means we do not have to cache it, fresh
values are read when requested.

Signed-off-by: Andrew Davis <[email protected]>
---
drivers/power/supply/bq27xxx_battery.c | 11 ++++++-----
include/linux/power/bq27xxx_battery.h | 1 -
2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/power/supply/bq27xxx_battery.c b/drivers/power/supply/bq27xxx_battery.c
index 799ee0aa9ef79..eae2b9a60f407 100644
--- a/drivers/power/supply/bq27xxx_battery.c
+++ b/drivers/power/supply/bq27xxx_battery.c
@@ -1639,7 +1639,8 @@ static int bq27xxx_battery_read_dcap(struct bq27xxx_device_info *di,
* Return the battery Available energy in µWh
* Or < 0 if something fails.
*/
-static int bq27xxx_battery_read_energy(struct bq27xxx_device_info *di)
+static int bq27xxx_battery_read_energy(struct bq27xxx_device_info *di,
+ union power_supply_propval *val)
{
int ae;

@@ -1654,7 +1655,9 @@ static int bq27xxx_battery_read_energy(struct bq27xxx_device_info *di)
else
ae *= 1000;

- return ae;
+ val->intval = ae;
+
+ return 0;
}

/*
@@ -1867,8 +1870,6 @@ static void bq27xxx_battery_update_unlocked(struct bq27xxx_device_info *di)
cache.flags = -1; /* read error */
if (cache.flags >= 0) {
cache.capacity = bq27xxx_battery_read_soc(di);
- if (di->regs[BQ27XXX_REG_AE] != INVALID_REG_ADDR)
- cache.energy = bq27xxx_battery_read_energy(di);
di->cache.flags = cache.flags;
cache.health = bq27xxx_battery_read_health(di);
if (di->regs[BQ27XXX_REG_CYCT] != INVALID_REG_ADDR)
@@ -2084,7 +2085,7 @@ static int bq27xxx_battery_get_property(struct power_supply *psy,
ret = bq27xxx_simple_value(di->cache.cycle_count, val);
break;
case POWER_SUPPLY_PROP_ENERGY_NOW:
- ret = bq27xxx_simple_value(di->cache.energy, val);
+ ret = bq27xxx_battery_read_energy(di, val);
break;
case POWER_SUPPLY_PROP_POWER_AVG:
ret = bq27xxx_battery_pwr_avg(di, val);
diff --git a/include/linux/power/bq27xxx_battery.h b/include/linux/power/bq27xxx_battery.h
index 1c67fa46013b3..5c75abf3cf069 100644
--- a/include/linux/power/bq27xxx_battery.h
+++ b/include/linux/power/bq27xxx_battery.h
@@ -49,7 +49,6 @@ struct bq27xxx_access_methods {
struct bq27xxx_reg_cache {
int cycle_count;
int capacity;
- int energy;
int flags;
int health;
};
--
2.39.2


2024-03-25 20:32:28

by Andrew Davis

[permalink] [raw]
Subject: [PATCH 6/6] power: supply: bq27xxx: Move health reading out of update loop

Most of the functions that read values return a status and put the value
itself in an a function parameter. Update health reading to match.

As health is not checked for changes as part of the update loop, remove
the read of this from the periodic update loop. This saves I2C/1W
bandwidth. It also means we do not have to cache it, fresh values are
read when requested.

Signed-off-by: Andrew Davis <[email protected]>
---
drivers/power/supply/bq27xxx_battery.c | 30 +++++++++++++++-----------
include/linux/power/bq27xxx_battery.h | 1 -
2 files changed, 18 insertions(+), 13 deletions(-)

diff --git a/drivers/power/supply/bq27xxx_battery.c b/drivers/power/supply/bq27xxx_battery.c
index fe1b0af143ca7..750fda543308c 100644
--- a/drivers/power/supply/bq27xxx_battery.c
+++ b/drivers/power/supply/bq27xxx_battery.c
@@ -1777,19 +1777,26 @@ static bool bq27xxx_battery_capacity_inaccurate(struct bq27xxx_device_info *di,
return false;
}

-static int bq27xxx_battery_read_health(struct bq27xxx_device_info *di)
+static int bq27xxx_battery_read_health(struct bq27xxx_device_info *di,
+ union power_supply_propval *val)
{
+ int health;
+
/* Unlikely but important to return first */
if (unlikely(bq27xxx_battery_overtemp(di, di->cache.flags)))
- return POWER_SUPPLY_HEALTH_OVERHEAT;
- if (unlikely(bq27xxx_battery_undertemp(di, di->cache.flags)))
- return POWER_SUPPLY_HEALTH_COLD;
- if (unlikely(bq27xxx_battery_dead(di, di->cache.flags)))
- return POWER_SUPPLY_HEALTH_DEAD;
- if (unlikely(bq27xxx_battery_capacity_inaccurate(di, di->cache.flags)))
- return POWER_SUPPLY_HEALTH_CALIBRATION_REQUIRED;
-
- return POWER_SUPPLY_HEALTH_GOOD;
+ health = POWER_SUPPLY_HEALTH_OVERHEAT;
+ else if (unlikely(bq27xxx_battery_undertemp(di, di->cache.flags)))
+ health = POWER_SUPPLY_HEALTH_COLD;
+ else if (unlikely(bq27xxx_battery_dead(di, di->cache.flags)))
+ health = POWER_SUPPLY_HEALTH_DEAD;
+ else if (unlikely(bq27xxx_battery_capacity_inaccurate(di, di->cache.flags)))
+ health = POWER_SUPPLY_HEALTH_CALIBRATION_REQUIRED;
+ else
+ health = POWER_SUPPLY_HEALTH_GOOD;
+
+ val->intval = health;
+
+ return 0;
}

static bool bq27xxx_battery_is_full(struct bq27xxx_device_info *di, int flags)
@@ -1874,7 +1881,6 @@ static void bq27xxx_battery_update_unlocked(struct bq27xxx_device_info *di)
if (cache.flags >= 0) {
cache.capacity = bq27xxx_battery_read_soc(di);
di->cache.flags = cache.flags;
- cache.health = bq27xxx_battery_read_health(di);

/*
* On gauges with signed current reporting the current must be
@@ -2092,7 +2098,7 @@ static int bq27xxx_battery_get_property(struct power_supply *psy,
ret = bq27xxx_battery_pwr_avg(di, val);
break;
case POWER_SUPPLY_PROP_HEALTH:
- ret = bq27xxx_simple_value(di->cache.health, val);
+ ret = bq27xxx_battery_read_health(di, val);
break;
case POWER_SUPPLY_PROP_MANUFACTURER:
val->strval = BQ27XXX_MANUFACTURER;
diff --git a/include/linux/power/bq27xxx_battery.h b/include/linux/power/bq27xxx_battery.h
index d743270799d75..5180dc9f17064 100644
--- a/include/linux/power/bq27xxx_battery.h
+++ b/include/linux/power/bq27xxx_battery.h
@@ -49,7 +49,6 @@ struct bq27xxx_access_methods {
struct bq27xxx_reg_cache {
int capacity;
int flags;
- int health;
};

struct bq27xxx_device_info {
--
2.39.2


2024-03-25 20:38:13

by Andrew Davis

[permalink] [raw]
Subject: [PATCH 2/6] power: supply: bq27xxx: Move time reading out of update loop

Most of the functions that read values return a status and put the value
itself in an a function parameter. Update time reading to match.

As time is not checked for changes as part of the update loop, remove
the read of the this from the periodic update loop. This saves
I2C/1W bandwidth. It also means we do not have to cache it, fresh
values are read when requested.

Signed-off-by: Andrew Davis <[email protected]>
---
drivers/power/supply/bq27xxx_battery.c | 20 ++++++++------------
include/linux/power/bq27xxx_battery.h | 3 ---
2 files changed, 8 insertions(+), 15 deletions(-)

diff --git a/drivers/power/supply/bq27xxx_battery.c b/drivers/power/supply/bq27xxx_battery.c
index 00b2a56039ac0..dcfe3c10e7ed3 100644
--- a/drivers/power/supply/bq27xxx_battery.c
+++ b/drivers/power/supply/bq27xxx_battery.c
@@ -1696,7 +1696,8 @@ static int bq27xxx_battery_read_cyct(struct bq27xxx_device_info *di)
* Read a time register.
* Return < 0 if something fails.
*/
-static int bq27xxx_battery_read_time(struct bq27xxx_device_info *di, u8 reg)
+static int bq27xxx_battery_read_time(struct bq27xxx_device_info *di, u8 reg,
+ union power_supply_propval *val)
{
int tval;

@@ -1710,7 +1711,9 @@ static int bq27xxx_battery_read_time(struct bq27xxx_device_info *di, u8 reg)
if (tval == 65535)
return -ENODATA;

- return tval * 60;
+ val->intval = tval * 60;
+
+ return 0;
}

/*
@@ -1857,13 +1860,6 @@ static void bq27xxx_battery_update_unlocked(struct bq27xxx_device_info *di)
if ((cache.flags & 0xff) == 0xff)
cache.flags = -1; /* read error */
if (cache.flags >= 0) {
- if (di->regs[BQ27XXX_REG_TTE] != INVALID_REG_ADDR)
- cache.time_to_empty = bq27xxx_battery_read_time(di, BQ27XXX_REG_TTE);
- if (di->regs[BQ27XXX_REG_TTECP] != INVALID_REG_ADDR)
- cache.time_to_empty_avg = bq27xxx_battery_read_time(di, BQ27XXX_REG_TTECP);
- if (di->regs[BQ27XXX_REG_TTF] != INVALID_REG_ADDR)
- cache.time_to_full = bq27xxx_battery_read_time(di, BQ27XXX_REG_TTF);
-
cache.charge_full = bq27xxx_battery_read_fcc(di);
cache.capacity = bq27xxx_battery_read_soc(di);
if (di->regs[BQ27XXX_REG_AE] != INVALID_REG_ADDR)
@@ -2046,13 +2042,13 @@ static int bq27xxx_battery_get_property(struct power_supply *psy,
ret = bq27xxx_battery_read_temperature(di, val);
break;
case POWER_SUPPLY_PROP_TIME_TO_EMPTY_NOW:
- ret = bq27xxx_simple_value(di->cache.time_to_empty, val);
+ ret = bq27xxx_battery_read_time(di, BQ27XXX_REG_TTE, val);
break;
case POWER_SUPPLY_PROP_TIME_TO_EMPTY_AVG:
- ret = bq27xxx_simple_value(di->cache.time_to_empty_avg, val);
+ ret = bq27xxx_battery_read_time(di, BQ27XXX_REG_TTECP, val);
break;
case POWER_SUPPLY_PROP_TIME_TO_FULL_NOW:
- ret = bq27xxx_simple_value(di->cache.time_to_full, val);
+ ret = bq27xxx_battery_read_time(di, BQ27XXX_REG_TTF, val);
break;
case POWER_SUPPLY_PROP_TECHNOLOGY:
if (di->opts & BQ27XXX_O_MUL_CHEM)
diff --git a/include/linux/power/bq27xxx_battery.h b/include/linux/power/bq27xxx_battery.h
index 64b2749d9562b..e89ef989a5752 100644
--- a/include/linux/power/bq27xxx_battery.h
+++ b/include/linux/power/bq27xxx_battery.h
@@ -47,9 +47,6 @@ struct bq27xxx_access_methods {
};

struct bq27xxx_reg_cache {
- int time_to_empty;
- int time_to_empty_avg;
- int time_to_full;
int charge_full;
int cycle_count;
int capacity;
--
2.39.2


2024-03-25 22:47:01

by Andrew Davis

[permalink] [raw]
Subject: [PATCH 3/6] power: supply: bq27xxx: Move charge reading out of update loop

Most of the functions that read values return a status and put the value
itself in an a function parameter. Update charge reading to match.

As charge state is not checked for changes as part of the update loop,
remove the read of this from the periodic update loop. This saves
I2C/1W bandwidth. It also means we do not have to cache it, fresh
values are read when requested.

Signed-off-by: Andrew Davis <[email protected]>
---
drivers/power/supply/bq27xxx_battery.c | 29 +++++++++++++++-----------
include/linux/power/bq27xxx_battery.h | 1 -
2 files changed, 17 insertions(+), 13 deletions(-)

diff --git a/drivers/power/supply/bq27xxx_battery.c b/drivers/power/supply/bq27xxx_battery.c
index dcfe3c10e7ed3..799ee0aa9ef79 100644
--- a/drivers/power/supply/bq27xxx_battery.c
+++ b/drivers/power/supply/bq27xxx_battery.c
@@ -1545,7 +1545,8 @@ static int bq27xxx_battery_read_soc(struct bq27xxx_device_info *di)
* Return a battery charge value in µAh
* Or < 0 if something fails.
*/
-static int bq27xxx_battery_read_charge(struct bq27xxx_device_info *di, u8 reg)
+static int bq27xxx_battery_read_charge(struct bq27xxx_device_info *di, u8 reg,
+ union power_supply_propval *val)
{
int charge;

@@ -1561,34 +1562,39 @@ static int bq27xxx_battery_read_charge(struct bq27xxx_device_info *di, u8 reg)
else
charge *= 1000;

- return charge;
+ val->intval = charge;
+
+ return 0;
}

/*
* Return the battery Nominal available capacity in µAh
* Or < 0 if something fails.
*/
-static inline int bq27xxx_battery_read_nac(struct bq27xxx_device_info *di)
+static inline int bq27xxx_battery_read_nac(struct bq27xxx_device_info *di,
+ union power_supply_propval *val)
{
- return bq27xxx_battery_read_charge(di, BQ27XXX_REG_NAC);
+ return bq27xxx_battery_read_charge(di, BQ27XXX_REG_NAC, val);
}

/*
* Return the battery Remaining Capacity in µAh
* Or < 0 if something fails.
*/
-static inline int bq27xxx_battery_read_rc(struct bq27xxx_device_info *di)
+static inline int bq27xxx_battery_read_rc(struct bq27xxx_device_info *di,
+ union power_supply_propval *val)
{
- return bq27xxx_battery_read_charge(di, BQ27XXX_REG_RC);
+ return bq27xxx_battery_read_charge(di, BQ27XXX_REG_RC, val);
}

/*
* Return the battery Full Charge Capacity in µAh
* Or < 0 if something fails.
*/
-static inline int bq27xxx_battery_read_fcc(struct bq27xxx_device_info *di)
+static inline int bq27xxx_battery_read_fcc(struct bq27xxx_device_info *di,
+ union power_supply_propval *val)
{
- return bq27xxx_battery_read_charge(di, BQ27XXX_REG_FCC);
+ return bq27xxx_battery_read_charge(di, BQ27XXX_REG_FCC, val);
}

/*
@@ -1860,7 +1866,6 @@ static void bq27xxx_battery_update_unlocked(struct bq27xxx_device_info *di)
if ((cache.flags & 0xff) == 0xff)
cache.flags = -1; /* read error */
if (cache.flags >= 0) {
- cache.charge_full = bq27xxx_battery_read_fcc(di);
cache.capacity = bq27xxx_battery_read_soc(di);
if (di->regs[BQ27XXX_REG_AE] != INVALID_REG_ADDR)
cache.energy = bq27xxx_battery_read_energy(di);
@@ -2058,12 +2063,12 @@ static int bq27xxx_battery_get_property(struct power_supply *psy,
break;
case POWER_SUPPLY_PROP_CHARGE_NOW:
if (di->regs[BQ27XXX_REG_NAC] != INVALID_REG_ADDR)
- ret = bq27xxx_simple_value(bq27xxx_battery_read_nac(di), val);
+ ret = bq27xxx_battery_read_nac(di, val);
else
- ret = bq27xxx_simple_value(bq27xxx_battery_read_rc(di), val);
+ ret = bq27xxx_battery_read_rc(di, val);
break;
case POWER_SUPPLY_PROP_CHARGE_FULL:
- ret = bq27xxx_simple_value(di->cache.charge_full, val);
+ ret = bq27xxx_battery_read_fcc(di, val);
break;
case POWER_SUPPLY_PROP_CHARGE_FULL_DESIGN:
ret = bq27xxx_battery_read_dcap(di, val);
diff --git a/include/linux/power/bq27xxx_battery.h b/include/linux/power/bq27xxx_battery.h
index e89ef989a5752..1c67fa46013b3 100644
--- a/include/linux/power/bq27xxx_battery.h
+++ b/include/linux/power/bq27xxx_battery.h
@@ -47,7 +47,6 @@ struct bq27xxx_access_methods {
};

struct bq27xxx_reg_cache {
- int charge_full;
int cycle_count;
int capacity;
int energy;
--
2.39.2


2024-04-01 12:48:28

by Sebastian Reichel

[permalink] [raw]
Subject: Re: [PATCH 1/6] power: supply: bq27xxx: Move temperature reading out of update loop


On Mon, 25 Mar 2024 15:31:24 -0500, Andrew Davis wrote:
> Most of the functions that read values return a status and put the value
> itself in an a function parameter. Update temperature reading to match.
>
> As temp is not checked for changes as part of the update loop, remove
> the read of the temperature from the periodic update loop. This saves
> I2C/1W bandwidth. It also means we do not have to cache it, fresh
> values are read when requested.
>
> [...]

Applied, thanks!

[1/6] power: supply: bq27xxx: Move temperature reading out of update loop
commit: c32c617de8076d8fb2a16a4a2f3b5da5f3df398d
[2/6] power: supply: bq27xxx: Move time reading out of update loop
commit: 651a620aa4d49f5647e21e55fc71bb049bc03389
[3/6] power: supply: bq27xxx: Move charge reading out of update loop
commit: 8d846335204f25a2247e5e88e39e1604b6ecc133
[4/6] power: supply: bq27xxx: Move energy reading out of update loop
commit: 39cf1c4cd03254218a23ef955bd534e19328f618
[5/6] power: supply: bq27xxx: Move cycle count reading out of update loop
commit: 656489ac90f25f92190a1dd5c4e5c5293bd70323
[6/6] power: supply: bq27xxx: Move health reading out of update loop
commit: 50f0ff7c8cc4c1d10fabc4b3b3f3b9e942b08187

Best regards,
--
Sebastian Reichel <[email protected]>