source: G950FXXS5DSI1
[GitHub/exynos8895/android_kernel_samsung_universal8895.git] / drivers / battery_v2 / sec_battery.c
index 7ff91a9321eafb3c136c80003ce817d682914909..8af67d97cead2c7152b00a5433fbf6d25c55c1cc 100755 (executable)
@@ -401,6 +401,9 @@ static int sec_bat_get_wireless_current(struct sec_battery_info *battery, int in
                        if (battery->cable_type == SEC_BATTERY_CABLE_WIRELESS_PACK) {
                                if (incurr > battery->pdata->wc_cv_pack_current)
                                        incurr = battery->pdata->wc_cv_pack_current;
+                       } else if (battery->cable_type == SEC_BATTERY_CABLE_WIRELESS_TX) {
+                               if (incurr > battery->pdata->wc_cv_tx_current)
+                                       incurr = battery->pdata->wc_cv_tx_current;
                        } else if (incurr > battery->pdata->wc_cv_current) {
                                incurr = battery->pdata->wc_cv_current;
                        }
@@ -8352,6 +8355,13 @@ static int sec_bat_parse_dt(struct device *dev,
                pdata->wc_cv_current = 820;
        }
 
+       ret = of_property_read_u32(np, "battery,wc_cv_tx_current",
+               &pdata->wc_cv_tx_current);
+       if (ret) {
+               pr_info("%s : wc_cv_tx_current is Empty\n", __func__);
+               pdata->wc_cv_tx_current = 650;
+       }
+
        ret = of_property_read_u32(np, "battery,wc_cv_pack_current",
                &pdata->wc_cv_pack_current);
        if (ret) {