Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 53758763 authored by Fenglin Wu's avatar Fenglin Wu Committed by David Collins
Browse files

power: power_supply: Add property for ship mode



In ship mode the charger module opens the bat-fet and disconnects the
battery from the system. This is for the non-removable battery designs
to avoid them from being discharged when shipped/on-shelf.

The ship mode is enabled during the final stage of power-off typically
from the PON driver. Hence, add property POWER_SUPPLY_PROP_SET_SHIP_MODE
to force the device into ship-mode.

CRs-Fixed: 1092969
Change-Id: I43893355db063d99b6faf965093fad74ec0c9253
Signed-off-by: default avatarFenglin Wu <fenglinw@codeaurora.org>
parent a1792ad9
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -205,6 +205,7 @@ static struct device_attribute power_supply_attrs[] = {
	POWER_SUPPLY_ATTR(usb_hc),
	POWER_SUPPLY_ATTR(usb_otg),
	POWER_SUPPLY_ATTR(charge_enabled),
	POWER_SUPPLY_ATTR(set_ship_mode),
	/* Local extensions of type int64_t */
	POWER_SUPPLY_ATTR(charge_counter_ext),
	/* Properties of type `const char *' */
+1 −0
Original line number Diff line number Diff line
@@ -153,6 +153,7 @@ enum power_supply_property {
	POWER_SUPPLY_PROP_USB_HC,
	POWER_SUPPLY_PROP_USB_OTG,
	POWER_SUPPLY_PROP_CHARGE_ENABLED,
	POWER_SUPPLY_PROP_SET_SHIP_MODE,
	/* Local extensions of type int64_t */
	POWER_SUPPLY_PROP_CHARGE_COUNTER_EXT,
	/* Properties of type `const char *' */