static void *platform_get_batt_charge_profile(void)
{
#ifdef CONFIG_BTNS_PMIC
	int retval = 0;
	retval = get_batt_prop(&ps_batt_chrg_prof);
	if (retval) {
		pr_err("Error reading battery profile from battid framework. Use hard coded value.\n");
		memcpy(&batt_chg_profile, &atl_820_batt, sizeof(struct ps_pse_mod_prof));
		ps_batt_chrg_prof.batt_prof = &batt_chg_profile;
		ps_batt_chrg_prof.chrg_prof_type = PSE_MOD_CHRG_PROF;
	}
#if defined(CONFIG_POWER_SUPPLY_CHARGING_ALGO_STEP) && defined(CONFIG_POWER_SUPPLY_BATTID)
	ps_batt_chrg_prof.chrg_prof_type = STEP_MOD_CHRG_PROF;
#endif
#else
	if (!em_config_get_charge_profile(&batt_chg_profile))
		ps_batt_chrg_prof.chrg_prof_type = CHRG_PROF_NONE;
	else
		ps_batt_chrg_prof.chrg_prof_type = PSE_MOD_CHRG_PROF;

	ps_batt_chrg_prof.batt_prof = &batt_chg_profile;
#endif
	battery_prop_changed(POWER_SUPPLY_BATTERY_INSERTED, &ps_batt_chrg_prof);
	return &ps_batt_chrg_prof;
}
static void *platform_get_batt_charge_profile(void)
{
	if (!em_config_get_charge_profile(&batt_chg_profile))
		ps_batt_chrg_prof.chrg_prof_type = CHRG_PROF_NONE;
	else
		ps_batt_chrg_prof.chrg_prof_type = PSE_MOD_CHRG_PROF;

	ps_batt_chrg_prof.batt_prof = &batt_chg_profile;
	battery_prop_changed(POWER_SUPPLY_BATTERY_INSERTED, &ps_batt_chrg_prof);
	return &ps_batt_chrg_prof;
}