Home
last modified time | relevance | path

Searched refs:psy_desc (Results 1 – 13 of 13) sorted by relevance

/drivers/power/supply/
Dmax8903_charger.c24 struct power_supply_desc psy_desc; member
97 old_type = data->psy_desc.type; in max8903_dcin()
100 data->psy_desc.type = POWER_SUPPLY_TYPE_MAINS; in max8903_dcin()
102 data->psy_desc.type = POWER_SUPPLY_TYPE_USB; in max8903_dcin()
104 data->psy_desc.type = POWER_SUPPLY_TYPE_BATTERY; in max8903_dcin()
106 if (old_type != data->psy_desc.type) in max8903_dcin()
136 old_type = data->psy_desc.type; in max8903_usbin()
139 data->psy_desc.type = POWER_SUPPLY_TYPE_MAINS; in max8903_usbin()
141 data->psy_desc.type = POWER_SUPPLY_TYPE_USB; in max8903_usbin()
143 data->psy_desc.type = POWER_SUPPLY_TYPE_BATTERY; in max8903_usbin()
[all …]
Dgeneric-adc-battery.c48 struct power_supply_desc psy_desc; member
241 struct power_supply_desc *psy_desc; in gab_probe() local
256 psy_desc = &adc_bat->psy_desc; in gab_probe()
257 psy_desc->name = pdata->battery_info.name; in gab_probe()
262 psy_desc->type = POWER_SUPPLY_TYPE_BATTERY; in gab_probe()
263 psy_desc->get_property = gab_get_property; in gab_probe()
264 psy_desc->external_power_changed = gab_ext_power_changed; in gab_probe()
271 psy_desc->properties = kcalloc(ARRAY_SIZE(gab_props) + in gab_probe()
273 sizeof(*psy_desc->properties), in gab_probe()
275 if (!psy_desc->properties) { in gab_probe()
[all …]
Dcros_usbpd-charger.c33 struct power_supply_desc psy_desc; member
290 port->psy_desc.type = POWER_SUPPLY_TYPE_MAINS; in cros_usbpd_charger_get_power_info()
292 port->psy_desc.type = POWER_SUPPLY_TYPE_USB; in cros_usbpd_charger_get_power_info()
559 struct power_supply_desc *psy_desc; in cros_usbpd_charger_probe() local
640 psy_desc = &port->psy_desc; in cros_usbpd_charger_probe()
641 psy_desc->get_property = cros_usbpd_charger_get_prop; in cros_usbpd_charger_probe()
642 psy_desc->set_property = cros_usbpd_charger_set_prop; in cros_usbpd_charger_probe()
643 psy_desc->property_is_writeable = in cros_usbpd_charger_probe()
645 psy_desc->external_power_changed = in cros_usbpd_charger_probe()
651 psy_desc->type = POWER_SUPPLY_TYPE_MAINS; in cros_usbpd_charger_probe()
[all …]
Dmax14656_charger_detector.c83 struct power_supply_desc psy_desc; member
151 chip->psy_desc.type = chg_type_props[chg_type].type; in max14656_irq_worker()
153 chip->psy_desc.type = POWER_SUPPLY_TYPE_UNKNOWN; in max14656_irq_worker()
157 chip->psy_desc.type = POWER_SUPPLY_TYPE_UNKNOWN; in max14656_irq_worker()
274 chip->psy_desc.name = MAX14656_NAME; in max14656_probe()
275 chip->psy_desc.type = POWER_SUPPLY_TYPE_UNKNOWN; in max14656_probe()
276 chip->psy_desc.properties = max14656_battery_props; in max14656_probe()
277 chip->psy_desc.num_properties = ARRAY_SIZE(max14656_battery_props); in max14656_probe()
278 chip->psy_desc.get_property = max14656_get_property; in max14656_probe()
286 &chip->psy_desc, &psy_cfg); in max14656_probe()
Disp1704_charger.c48 struct power_supply_desc psy_desc; member
241 isp->psy_desc.type = POWER_SUPPLY_TYPE_USB_DCP; in isp1704_charger_work()
244 isp->psy_desc.type = POWER_SUPPLY_TYPE_USB; in isp1704_charger_work()
253 if (isp->psy_desc.type != POWER_SUPPLY_TYPE_USB_DCP) { in isp1704_charger_work()
262 isp->psy_desc.type = POWER_SUPPLY_TYPE_USB_CDP; in isp1704_charger_work()
269 isp->psy_desc.type = POWER_SUPPLY_TYPE_USB; in isp1704_charger_work()
420 isp->psy_desc.name = "isp1704"; in isp1704_charger_probe()
421 isp->psy_desc.type = POWER_SUPPLY_TYPE_USB; in isp1704_charger_probe()
422 isp->psy_desc.properties = power_props; in isp1704_charger_probe()
423 isp->psy_desc.num_properties = ARRAY_SIZE(power_props); in isp1704_charger_probe()
[all …]
Dda9030_battery.c90 struct power_supply_desc psy_desc; member
447 struct power_supply_desc *psy_desc = &charger->psy_desc; in da9030_battery_setup_psy() local
450 psy_desc->name = info->name; in da9030_battery_setup_psy()
451 psy_desc->use_for_apm = info->use_for_apm; in da9030_battery_setup_psy()
452 psy_desc->type = POWER_SUPPLY_TYPE_BATTERY; in da9030_battery_setup_psy()
453 psy_desc->get_property = da9030_battery_get_property; in da9030_battery_setup_psy()
455 psy_desc->properties = da9030_battery_props; in da9030_battery_setup_psy()
456 psy_desc->num_properties = ARRAY_SIZE(da9030_battery_props); in da9030_battery_setup_psy()
543 charger->psy = power_supply_register(&pdev->dev, &charger->psy_desc, in da9030_battery_probe()
Dsbs-manager.c320 struct power_supply_desc *psy_desc; in sbsm_probe() local
366 psy_desc = devm_kmemdup(dev, &sbsm_default_psy_desc, in sbsm_probe()
369 if (!psy_desc) { in sbsm_probe()
374 psy_desc->name = devm_kasprintf(dev, GFP_KERNEL, "sbsm-%s", in sbsm_probe()
376 if (!psy_desc->name) { in sbsm_probe()
386 data->psy = devm_power_supply_register(dev, psy_desc, &psy_cfg); in sbsm_probe()
390 psy_desc->name); in sbsm_probe()
Dcpcap-battery.c713 struct power_supply_desc *psy_desc; in cpcap_battery_probe() local
761 psy_desc = devm_kzalloc(ddata->dev, sizeof(*psy_desc), GFP_KERNEL); in cpcap_battery_probe()
762 if (!psy_desc) in cpcap_battery_probe()
765 psy_desc->name = "battery", in cpcap_battery_probe()
766 psy_desc->type = POWER_SUPPLY_TYPE_BATTERY, in cpcap_battery_probe()
767 psy_desc->properties = cpcap_battery_props, in cpcap_battery_probe()
768 psy_desc->num_properties = ARRAY_SIZE(cpcap_battery_props), in cpcap_battery_probe()
769 psy_desc->get_property = cpcap_battery_get_property, in cpcap_battery_probe()
774 ddata->psy = devm_power_supply_register(ddata->dev, psy_desc, in cpcap_battery_probe()
Dda9052-battery.c559 static struct power_supply_desc psy_desc = { variable
608 psy_desc.use_for_apm = pdata->use_for_apm; in da9052_bat_probe()
610 psy_desc.use_for_apm = 1; in da9052_bat_probe()
625 bat->psy = power_supply_register(&pdev->dev, &psy_desc, &psy_cfg); in da9052_bat_probe()
Dbq27xxx_battery.c1861 struct power_supply_desc *psy_desc; local
1875 psy_desc = devm_kzalloc(di->dev, sizeof(*psy_desc), GFP_KERNEL);
1876 if (!psy_desc)
1879 psy_desc->name = di->name;
1880 psy_desc->type = POWER_SUPPLY_TYPE_BATTERY;
1881 psy_desc->properties = bq27xxx_chip_data[di->chip].props;
1882 psy_desc->num_properties = bq27xxx_chip_data[di->chip].props_size;
1883 psy_desc->get_property = bq27xxx_battery_get_property;
1884 psy_desc->external_power_changed = bq27xxx_external_power_changed;
1886 di->bat = power_supply_register_no_ws(di->dev, psy_desc, &psy_cfg);
/drivers/hid/
Dhid-input.c433 struct power_supply_desc *psy_desc; in hidinput_setup_battery() local
450 psy_desc = kzalloc(sizeof(*psy_desc), GFP_KERNEL); in hidinput_setup_battery()
451 if (!psy_desc) in hidinput_setup_battery()
454 psy_desc->name = kasprintf(GFP_KERNEL, "hid-%s-battery", in hidinput_setup_battery()
457 if (!psy_desc->name) { in hidinput_setup_battery()
462 psy_desc->type = POWER_SUPPLY_TYPE_BATTERY; in hidinput_setup_battery()
463 psy_desc->properties = hidinput_battery_props; in hidinput_setup_battery()
464 psy_desc->num_properties = ARRAY_SIZE(hidinput_battery_props); in hidinput_setup_battery()
465 psy_desc->use_for_apm = 0; in hidinput_setup_battery()
466 psy_desc->get_property = hidinput_get_battery_property; in hidinput_setup_battery()
[all …]
/drivers/staging/nvec/
Dnvec_power.c375 const struct power_supply_desc *psy_desc; in nvec_power_probe() local
390 psy_desc = &nvec_psy_desc; in nvec_power_probe()
401 psy_desc = &nvec_bat_psy_desc; in nvec_power_probe()
414 *psy = power_supply_register(&pdev->dev, psy_desc, &psy_cfg); in nvec_power_probe()
/drivers/usb/typec/tcpm/
Dtcpm.c294 struct power_supply_desc psy_desc; member
4683 port->psy_desc.name = psy_name; in devm_tcpm_psy_register()
4684 port->psy_desc.type = POWER_SUPPLY_TYPE_USB, in devm_tcpm_psy_register()
4685 port->psy_desc.usb_types = tcpm_psy_usb_types; in devm_tcpm_psy_register()
4686 port->psy_desc.num_usb_types = ARRAY_SIZE(tcpm_psy_usb_types); in devm_tcpm_psy_register()
4687 port->psy_desc.properties = tcpm_psy_props, in devm_tcpm_psy_register()
4688 port->psy_desc.num_properties = ARRAY_SIZE(tcpm_psy_props), in devm_tcpm_psy_register()
4689 port->psy_desc.get_property = tcpm_psy_get_prop, in devm_tcpm_psy_register()
4690 port->psy_desc.set_property = tcpm_psy_set_prop, in devm_tcpm_psy_register()
4691 port->psy_desc.property_is_writeable = tcpm_psy_prop_writeable, in devm_tcpm_psy_register()
[all …]