[HACK] [9610] driver: turn on charger always if notifier is not enabled
authorKeunho Hwang <keunho.hwang@samsung.com>
Thu, 10 May 2018 12:05:25 +0000 (21:05 +0900)
committerJaehyoung Choi <jkkkkk.choi@samsung.com>
Fri, 11 May 2018 07:38:37 +0000 (16:38 +0900)
Change-Id: I1173c66588e6e9d32eaaac00763a70ded0f3155f
Signed-off-by: Keunho Hwang <keunho.hwang@samsung.com>
drivers/power/supply/s2mu00x_battery.c

index bc03502265959b1f920f55cf4d1020c1488bd49d..22fd77a7e7e13a8e1dd19cd0da955caac064df11 100644 (file)
@@ -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);