Skip to content

Commit 5c5923c

Browse files
aaronemasseykartben
authored andcommitted
drives: fuel_gauge: Remove unused battery_cutoff property
The FUEL_GAUGE_BATTERY_CUTOFF enum property was never used and never tested nor was it intended to be. This property unfortunately made it past review. Remove it. This is unlikely to cause a breakage since no upstream driver ever implemented it as a property. Signed-off-by: Aaron Massey <[email protected]>
1 parent 634df1e commit 5c5923c

File tree

3 files changed

+1
-11
lines changed

3 files changed

+1
-11
lines changed

include/zephyr/drivers/fuel_gauge.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,6 @@ enum fuel_gauge_prop_type {
3939
*/
4040
FUEL_GAUGE_AVG_CURRENT = 0,
4141

42-
/** Used to cutoff the battery from the system - useful for storage/shipping of devices */
43-
FUEL_GAUGE_BATTERY_CUTOFF,
4442
/** Battery current (uA); negative=discharging */
4543
FUEL_GAUGE_CURRENT,
4644
/** Whether the battery underlying the fuel-gauge is cut off from charge */

samples/drivers/fuel_gauge/README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Features
2525
********
2626
By using this fuel gauge you can get the following information:
2727

28-
* Read all public fuel gauge properties except ``FUEL_GAUGE_BATTERY_CUTOFF``
28+
* Read all public fuel gauge properties
2929
* Battery charge status as percentage (periodically)
3030
* Battery voltage (periodically)
3131

samples/drivers/fuel_gauge/src/main.c

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@ const char *fuel_gauge_prop_to_str(enum fuel_gauge_prop_type prop)
2020
switch (prop) {
2121
case FUEL_GAUGE_AVG_CURRENT:
2222
return "FUEL_GAUGE_AVG_CURRENT";
23-
case FUEL_GAUGE_BATTERY_CUTOFF:
24-
return "FUEL_GAUGE_BATTERY_CUTOFF";
2523
case FUEL_GAUGE_CURRENT:
2624
return "FUEL_GAUGE_CURRENT";
2725
case FUEL_GAUGE_CHARGE_CUTOFF:
@@ -116,12 +114,6 @@ int main(void)
116114
LOG_INF("Test-Read generic fuel gauge properties to verify which are supported");
117115
LOG_INF("Info: not all properties are supported by all fuel gauges!");
118116

119-
/*
120-
* FUEL_GAUGE_BATTERY_CUTOFF will not be tested because this is a special property
121-
* and is intended to be used to cutoff the battery from the system - useful for
122-
* storage/shipping of devices
123-
*/
124-
125117
fuel_gauge_prop_t test_props[] = {
126118
FUEL_GAUGE_AVG_CURRENT,
127119
FUEL_GAUGE_CURRENT,

0 commit comments

Comments
 (0)