static kal_uint32 charging_get_battery_status(void *data) { kal_uint32 status = STATUS_OK; upmu_set_baton_tdet_en(1); upmu_set_rg_baton_en(1); *(kal_bool*)(data) = upmu_get_rgs_baton_undet(); return status; }
static kal_uint32 charging_get_battery_status(void *data) { kal_bool status = KAL_TRUE; #ifdef CONFIG_LGE_PM_BATTERY_PRESENT upmu_set_baton_tdet_en(1); upmu_set_rg_baton_en(1); if (upmu_get_rgs_baton_undet()) status = KAL_FALSE; #endif *(kal_bool*)(data) = status; return STATUS_OK; }