Lines Matching refs:batt_ps
27 struct power_supply batt_ps;
43 static int z2_batt_get_property(struct power_supply *batt_ps,
47 struct z2_charger *charger = container_of(batt_ps, struct z2_charger,
48 batt_ps);
86 static void z2_batt_ext_power_changed(struct power_supply *batt_ps)
88 struct z2_charger *charger = container_of(batt_ps, struct z2_charger,
89 batt_ps);
109 pr_debug("%s: %i -> %i\n", charger->batt_ps.name, old_status,
111 power_supply_changed(&charger->batt_ps);
167 charger->batt_ps.name = Z2_DEFAULT_NAME;
169 charger->batt_ps.name = info->batt_name;
171 charger->batt_ps.properties = prop;
172 charger->batt_ps.num_properties = props;
173 charger->batt_ps.type = POWER_SUPPLY_TYPE_BATTERY;
174 charger->batt_ps.get_property = z2_batt_get_property;
175 charger->batt_ps.external_power_changed = z2_batt_ext_power_changed;
176 charger->batt_ps.use_for_apm = 1;
231 ret = power_supply_register(&client->dev, &charger->batt_ps);
240 kfree(charger->batt_ps.properties);
258 power_supply_unregister(&charger->batt_ps);
260 kfree(charger->batt_ps.properties);