Lines Matching refs:psy
278 struct power_supply *psy = dev_get_drvdata(dev); in power_supply_show_property() local
284 value.intval = psy->desc->type; in power_supply_show_property()
286 ret = power_supply_get_property(psy, psp, &value); in power_supply_show_property()
308 ret = power_supply_show_usb_type(dev, psy->desc, in power_supply_show_property()
325 struct power_supply *psy = dev_get_drvdata(dev); in power_supply_store_property() local
352 ret = power_supply_set_property(psy, psp, &value); in power_supply_store_property()
364 struct power_supply *psy = dev_get_drvdata(dev); in power_supply_attr_is_visible() local
374 for (i = 0; i < psy->desc->num_properties; i++) { in power_supply_attr_is_visible()
375 int property = psy->desc->properties[i]; in power_supply_attr_is_visible()
378 if (psy->desc->property_is_writeable && in power_supply_attr_is_visible()
379 psy->desc->property_is_writeable(psy, property) > 0) in power_supply_attr_is_visible()
386 if (power_supply_battery_info_has_prop(psy->battery_info, attrno)) in power_supply_attr_is_visible()
469 const struct power_supply *psy = dev_get_drvdata(dev); in power_supply_uevent() local
477 if (!psy || !psy->desc) { in power_supply_uevent()
482 ret = add_uevent_var(env, "POWER_SUPPLY_NAME=%s", psy->desc->name); in power_supply_uevent()
490 if (psy->removing) in power_supply_uevent()
501 for (j = 0; j < psy->desc->num_properties; j++) { in power_supply_uevent()
502 set_bit(psy->desc->properties[j], psy_drv_properties); in power_supply_uevent()
503 ret = add_prop_uevent(dev, env, psy->desc->properties[j], in power_supply_uevent()
512 if (!power_supply_battery_info_has_prop(psy->battery_info, in power_supply_uevent()