-static struct jz_batt_info qi_lb60_battery_pdata = {
- .dc_dect_gpio = GPIO_DC_DETE_N,
- .usb_dect_gpio = GPIO_USB_DETE,
- .charg_stat_gpio = GPIO_CHARG_STAT_N,
-
- .min_voltag = 3600000,
- .max_voltag = 4200000,
- .batt_tech = POWER_SUPPLY_TECHNOLOGY_LIPO,
+static struct jz_battery_platform_data qi_lb60_battery_pdata = {
+ .gpio_charge = GPIO_CHARG_STAT_N,
+ .gpio_charge_active_low = 1,
+ .info = {
+ .name = "battery",
+ .technology = POWER_SUPPLY_TECHNOLOGY_LIPO,
+ .voltage_max_design = 4200000,
+ .voltage_min_design = 3600000,
+ },
+};
+
+static char *qi_lb60_batteries[] = {
+ "battery",
+};
+
+static struct gpio_charger_platform_data qi_lb60_charger_pdata = {
+ .name = "USB",
+ .type = POWER_SUPPLY_TYPE_USB,
+ .gpio = GPIO_USB_DETE,
+ .gpio_active_low = 1,
+ .batteries = qi_lb60_batteries,
+ .num_batteries = ARRAY_SIZE(qi_lb60_batteries),
+};
+
+static struct platform_device qi_lb60_charger_device = {
+ .name = "gpio-charger",
+ .dev = {
+ .platform_data = &qi_lb60_charger_pdata,
+ },