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

Commit 7b12eb13 authored by xianzhu.zhang's avatar xianzhu.zhang
Browse files

[FP5-839]:add the ship_mode node for battery

 &&&%%%comment:[FP5-839]:add the ship_mode node for battery
 &&&%%%bug number:[FP5-839]
 &&&%%%product name:t6490_fp5_target_dev
 &&&%%%root cause:Specification
 &&&%%%Bug category:T2M
 &&&%%%Module_Impact:kernel
 &&&%%%Test_Suggestion:when write 0 to /sys/class/power_supply/battery/ship_mode , device will shutdown
 &&&%%%Solution:add the ship_mode node function in kernel and adsp
 &&&%%%Test_Report:test is ok
 &&&%%%VAL Can Test:NO

Change-Id: I4aa37f4824106dba4f8ac80037100f86009039dc
parent dc6be7b2
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -1165,6 +1165,10 @@ static int battery_psy_set_ship_mode(struct battery_chg_dev *bcdev, int val)
{
	int rc = 0;
	u32 ship_mode = val;
	/*zxz add ,adsp need the value is 0 '#define BATTMNGR_SHIP_MODE_PMIC  0 ' ,  so we force the val to 0 here, if 
	user set ship mode .
	*/
	ship_mode = 0;
	rc = write_property_id(bcdev, &bcdev->psy_list[PSY_TYPE_BATTERY], BATT_SHIP_MODE, ship_mode);
    if (rc < 0) {
		pr_err("%s: Failed to set ship_mode %u, rc=%d\n", __func__, ship_mode, rc);