static void *get_platform_data(void) { int ret; pdata.max_cc = 2000; pdata.max_cv = 4350; pdata.def_cc = 500; pdata.def_cv = 4350; pdata.def_ilim = 900; pdata.def_iterm = 300; pdata.def_max_temp = 55; pdata.def_min_temp = 0; pdata.otg_gpio = 3; /* GPIOC_03 */ /* configure output */ ret = gpio_request(pdata.otg_gpio, "otg_gpio"); if (ret) { pr_err("unable to request GPIO pin\n"); pdata.otg_gpio = -1; } else { lnw_gpio_set_alt(pdata.otg_gpio, 0); } platform_init_chrg_params(&pdata); return &pdata; }
static void dc_xpwr_chrg_pdata(void) { static struct dollarcove_chrg_pdata pdata; int ret; pdata.max_cc = 2000; pdata.max_cv = 4350; pdata.def_cc = 500; pdata.def_cv = 4350; pdata.def_ilim = 900; pdata.def_iterm = 300; pdata.def_max_temp = 55; pdata.def_min_temp = 0; pdata.otg_gpio = 117; /* GPIONC_15 */ /* configure output */ ret = gpio_request(pdata.otg_gpio, "otg_gpio"); if (ret) { pr_err("unable to request GPIO pin\n"); pdata.otg_gpio = -1; } else { lnw_gpio_set_alt(pdata.otg_gpio, 0); } platform_init_chrg_params(&pdata); intel_mid_pmic_set_pdata("dollar_cove_charger", (void *)&pdata, sizeof(pdata), 0); }