From 85f6fd13cf1adaa9420104d6ec297ed9a9499f5c Mon Sep 17 00:00:00 2001 From: Keunho Hwang Date: Thu, 10 May 2018 21:05:25 +0900 Subject: [PATCH] [HACK] [9610] driver: turn on charger always if notifier is not enabled Change-Id: I1173c66588e6e9d32eaaac00763a70ded0f3155f Signed-off-by: Keunho Hwang --- drivers/power/supply/s2mu00x_battery.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/power/supply/s2mu00x_battery.c b/drivers/power/supply/s2mu00x_battery.c index bc0350226595..22fd77a7e7e1 100644 --- a/drivers/power/supply/s2mu00x_battery.c +++ b/drivers/power/supply/s2mu00x_battery.c @@ -1430,6 +1430,16 @@ static int s2mu00x_battery_probe(struct platform_device *pdev) MUIC_NOTIFY_DEV_CHARGER); #endif +#if !defined(CONFIG_MUIC_NOTIFIER) && !defined(CONFIG_IFCONN_NOTIFIER) + /* If notifier is not enabled, turn on charger always + * limit input/charging current 500mA to protect device + */ + battery->cable_type = POWER_SUPPLY_TYPE_MAINS; + battery->pdata->charging_current[battery->cable_type].input_current_limit = 500; + battery->pdata->charging_current[battery->cable_type].fast_charging_current = 500; + set_bat_status_by_cable(battery); +#endif + /* Kick off monitoring thread */ pr_info("%s: start battery monitoring work\n", __func__); queue_delayed_work(battery->monitor_wqueue, &battery->monitor_work, 5*HZ); -- 2.20.1