Lines Matching +full:auto +full:- +full:trickle +full:- +full:charging

1 // SPDX-License-Identifier: GPL-2.0-only
78 [POWER_SUPPLY_STATUS_CHARGING] = "Charging",
80 [POWER_SUPPLY_STATUS_NOT_CHARGING] = "Not charging",
87 [POWER_SUPPLY_CHARGE_TYPE_TRICKLE] = "Trickle",
117 [POWER_SUPPLY_TECHNOLOGY_LION] = "Li-ion",
118 [POWER_SUPPLY_TECHNOLOGY_LIPO] = "Li-poly",
140 [POWER_SUPPLY_CHARGE_BEHAVIOUR_AUTO] = "auto",
141 [POWER_SUPPLY_CHARGE_BEHAVIOUR_INHIBIT_CHARGE] = "inhibit-charge",
142 [POWER_SUPPLY_CHARGE_BEHAVIOUR_FORCE_DISCHARGE] = "force-discharge",
237 return to_ps_attr(attr) - power_supply_attrs; in dev_attr_psp()
262 return -EINVAL; in power_supply_show_enum_with_available()
266 buf[count - 1] = '\n'; in power_supply_show_enum_with_available()
281 value.intval = psy->desc->type; in power_supply_show_property()
286 if (ret == -ENODATA) in power_supply_show_property()
289 attr->attr.name); in power_supply_show_property()
290 else if (ret != -ENODEV && ret != -EAGAIN) in power_supply_show_property()
293 attr->attr.name, ret); in power_supply_show_property()
303 psy->desc->usb_types, value.intval, buf); in power_supply_show_property()
306 ret = power_supply_charge_behaviour_show(dev, psy->desc->charge_behaviours, in power_supply_show_property()
313 if (ps_attr->text_values_len > 0 && in power_supply_show_property()
314 value.intval < ps_attr->text_values_len && value.intval >= 0) { in power_supply_show_property()
315 ret = sysfs_emit(buf, "%s\n", ps_attr->text_values[value.intval]); in power_supply_show_property()
333 ret = -EINVAL; in power_supply_store_property()
334 if (ps_attr->text_values_len > 0) { in power_supply_store_property()
335 ret = __sysfs_match_string(ps_attr->text_values, in power_supply_store_property()
336 ps_attr->text_values_len, buf); in power_supply_store_property()
377 for (i = 0; i < psy->desc->num_properties; i++) { in power_supply_attr_is_visible()
378 int property = psy->desc->properties[i]; in power_supply_attr_is_visible()
388 if (power_supply_battery_info_has_prop(psy->battery_info, attrno)) in power_supply_attr_is_visible()
422 attr->attr.name = power_supply_attrs[i].attr_name; in power_supply_init_attrs()
423 attr->show = power_supply_show_property; in power_supply_init_attrs()
424 attr->store = power_supply_store_property; in power_supply_init_attrs()
425 __power_supply_attrs[i] = &attr->attr; in power_supply_init_attrs()
438 dev_attr = &pwr_attr->dev_attr; in add_prop_uevent()
441 if (ret == -ENODEV || ret == -ENODATA) { in add_prop_uevent()
443 * When a battery is absent, we expect -ENODEV. Don't abort; in add_prop_uevent()
457 pwr_attr->prop_name, prop_buf); in add_prop_uevent()
470 if (!psy || !psy->desc) { in power_supply_uevent()
475 ret = add_uevent_var(env, "POWER_SUPPLY_NAME=%s", psy->desc->name); in power_supply_uevent()
481 * resources have been freed. Exit early to avoid use-after-free. in power_supply_uevent()
483 if (psy->removing) in power_supply_uevent()
488 return -ENOMEM; in power_supply_uevent()
494 for (j = 0; j < psy->desc->num_properties; j++) { in power_supply_uevent()
495 set_bit(psy->desc->properties[j], psy_drv_properties); in power_supply_uevent()
496 ret = add_prop_uevent(dev, env, psy->desc->properties[j], in power_supply_uevent()
505 if (!power_supply_battery_info_has_prop(psy->battery_info, in power_supply_uevent()
542 return -EINVAL; in power_supply_charge_behaviour_parse()