Home
last modified time | relevance | path

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

/drivers/power/supply/
Dmax8903_charger.c21 struct power_supply_desc psy_desc; member
126 old_type = data->psy_desc.type; in max8903_dcin()
129 data->psy_desc.type = POWER_SUPPLY_TYPE_MAINS; in max8903_dcin()
131 data->psy_desc.type = POWER_SUPPLY_TYPE_USB; in max8903_dcin()
133 data->psy_desc.type = POWER_SUPPLY_TYPE_BATTERY; in max8903_dcin()
135 if (old_type != data->psy_desc.type) in max8903_dcin()
183 old_type = data->psy_desc.type; in max8903_usbin()
186 data->psy_desc.type = POWER_SUPPLY_TYPE_MAINS; in max8903_usbin()
188 data->psy_desc.type = POWER_SUPPLY_TYPE_USB; in max8903_usbin()
190 data->psy_desc.type = POWER_SUPPLY_TYPE_BATTERY; in max8903_usbin()
[all …]
Dcros_usbpd-charger.c33 struct power_supply_desc psy_desc; member
284 port->psy_desc.type = POWER_SUPPLY_TYPE_MAINS; in cros_usbpd_charger_get_power_info()
286 port->psy_desc.type = POWER_SUPPLY_TYPE_USB; in cros_usbpd_charger_get_power_info()
542 struct power_supply_desc *psy_desc; in cros_usbpd_charger_probe() local
623 psy_desc = &port->psy_desc; in cros_usbpd_charger_probe()
624 psy_desc->get_property = cros_usbpd_charger_get_prop; in cros_usbpd_charger_probe()
625 psy_desc->set_property = cros_usbpd_charger_set_prop; in cros_usbpd_charger_probe()
626 psy_desc->property_is_writeable = in cros_usbpd_charger_probe()
628 psy_desc->external_power_changed = in cros_usbpd_charger_probe()
634 psy_desc->type = POWER_SUPPLY_TYPE_MAINS; in cros_usbpd_charger_probe()
[all …]
Dgeneric-adc-battery.c48 struct power_supply_desc psy_desc; member
241 struct power_supply_desc *psy_desc; in gab_probe() local
257 psy_desc = &adc_bat->psy_desc; in gab_probe()
258 psy_desc->name = pdata->battery_info.name; in gab_probe()
263 psy_desc->type = POWER_SUPPLY_TYPE_BATTERY; in gab_probe()
264 psy_desc->get_property = gab_get_property; in gab_probe()
265 psy_desc->external_power_changed = gab_ext_power_changed; in gab_probe()
319 psy_desc->properties = properties; in gab_probe()
320 psy_desc->num_properties = index; in gab_probe()
322 adc_bat->psy = power_supply_register(&pdev->dev, psy_desc, &psy_cfg); in gab_probe()
[all …]
Dmax14656_charger_detector.c81 struct power_supply_desc psy_desc; member
148 chip->psy_desc.type = chg_type_props[chg_type].type; in max14656_irq_worker()
150 chip->psy_desc.type = POWER_SUPPLY_TYPE_UNKNOWN; in max14656_irq_worker()
154 chip->psy_desc.type = POWER_SUPPLY_TYPE_UNKNOWN; in max14656_irq_worker()
271 chip->psy_desc.name = MAX14656_NAME; in max14656_probe()
272 chip->psy_desc.type = POWER_SUPPLY_TYPE_UNKNOWN; in max14656_probe()
273 chip->psy_desc.properties = max14656_battery_props; in max14656_probe()
274 chip->psy_desc.num_properties = ARRAY_SIZE(max14656_battery_props); in max14656_probe()
275 chip->psy_desc.get_property = max14656_get_property; in max14656_probe()
283 &chip->psy_desc, &psy_cfg); in max14656_probe()
Dcros_peripheral_charger.c29 struct power_supply_desc psy_desc; member
290 struct power_supply_desc *psy_desc; in cros_pchg_probe() local
344 psy_desc = &port->psy_desc; in cros_pchg_probe()
345 psy_desc->name = port->name; in cros_pchg_probe()
346 psy_desc->type = POWER_SUPPLY_TYPE_BATTERY; in cros_pchg_probe()
347 psy_desc->get_property = cros_pchg_get_prop; in cros_pchg_probe()
348 psy_desc->external_power_changed = NULL; in cros_pchg_probe()
349 psy_desc->properties = cros_pchg_props; in cros_pchg_probe()
350 psy_desc->num_properties = ARRAY_SIZE(cros_pchg_props); in cros_pchg_probe()
353 psy = devm_power_supply_register(dev, psy_desc, &psy_cfg); in cros_pchg_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 …]
Dsurface_charger.c55 struct power_supply_desc psy_desc; member
190 ac->psy_desc.name = ac->name; in spwr_ac_init()
191 ac->psy_desc.type = POWER_SUPPLY_TYPE_MAINS; in spwr_ac_init()
192 ac->psy_desc.properties = spwr_ac_props; in spwr_ac_init()
193 ac->psy_desc.num_properties = ARRAY_SIZE(spwr_ac_props); in spwr_ac_init()
194 ac->psy_desc.get_property = spwr_ac_get_property; in spwr_ac_init()
215 ac->psy = devm_power_supply_register(&ac->sdev->dev, &ac->psy_desc, &psy_cfg); in spwr_ac_register()
Dsbs-manager.c324 struct power_supply_desc *psy_desc; in sbsm_probe() local
369 psy_desc = devm_kmemdup(dev, &sbsm_default_psy_desc, sizeof(*psy_desc), GFP_KERNEL); in sbsm_probe()
370 if (!psy_desc) in sbsm_probe()
373 psy_desc->name = devm_kasprintf(dev, GFP_KERNEL, "sbsm-%s", dev_name(&client->dev)); in sbsm_probe()
374 if (!psy_desc->name) in sbsm_probe()
383 data->psy = devm_power_supply_register(dev, psy_desc, &psy_cfg); in sbsm_probe()
386 "failed to register power supply %s\n", psy_desc->name); in sbsm_probe()
Dda9030_battery.c90 struct power_supply_desc psy_desc; member
437 struct power_supply_desc *psy_desc = &charger->psy_desc; in da9030_battery_setup_psy() local
440 psy_desc->name = info->name; in da9030_battery_setup_psy()
441 psy_desc->use_for_apm = info->use_for_apm; in da9030_battery_setup_psy()
442 psy_desc->type = POWER_SUPPLY_TYPE_BATTERY; in da9030_battery_setup_psy()
443 psy_desc->get_property = da9030_battery_get_property; in da9030_battery_setup_psy()
445 psy_desc->properties = da9030_battery_props; in da9030_battery_setup_psy()
446 psy_desc->num_properties = ARRAY_SIZE(da9030_battery_props); in da9030_battery_setup_psy()
533 charger->psy = power_supply_register(&pdev->dev, &charger->psy_desc, in da9030_battery_probe()
Dsurface_battery.c124 struct power_supply_desc psy_desc; member
737 bat->psy_desc.name = bat->name; in spwr_battery_init()
738 bat->psy_desc.type = POWER_SUPPLY_TYPE_BATTERY; in spwr_battery_init()
739 bat->psy_desc.get_property = spwr_battery_get_property; in spwr_battery_init()
779 bat->psy_desc.external_power_changed = spwr_external_power_changed; in spwr_battery_register()
783 bat->psy_desc.properties = spwr_battery_props_eng; in spwr_battery_register()
784 bat->psy_desc.num_properties = ARRAY_SIZE(spwr_battery_props_eng); in spwr_battery_register()
788 bat->psy_desc.properties = spwr_battery_props_chg; in spwr_battery_register()
789 bat->psy_desc.num_properties = ARRAY_SIZE(spwr_battery_props_chg); in spwr_battery_register()
801 bat->psy = devm_power_supply_register(&bat->sdev->dev, &bat->psy_desc, &psy_cfg); in spwr_battery_register()
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.c2106 struct power_supply_desc *psy_desc; local
2120 psy_desc = devm_kzalloc(di->dev, sizeof(*psy_desc), GFP_KERNEL);
2121 if (!psy_desc)
2124 psy_desc->name = di->name;
2125 psy_desc->type = POWER_SUPPLY_TYPE_BATTERY;
2126 psy_desc->properties = bq27xxx_chip_data[di->chip].props;
2127 psy_desc->num_properties = bq27xxx_chip_data[di->chip].props_size;
2128 psy_desc->get_property = bq27xxx_battery_get_property;
2129 psy_desc->external_power_changed = bq27xxx_external_power_changed;
2131 di->bat = power_supply_register_no_ws(di->dev, psy_desc, &psy_cfg);
Dmt6360_charger.c131 struct power_supply_desc psy_desc; member
818 memcpy(&mci->psy_desc, &mt6360_charger_desc, sizeof(mci->psy_desc)); in mt6360_charger_probe()
819 mci->psy_desc.name = dev_name(&pdev->dev); in mt6360_charger_probe()
823 &mci->psy_desc, &charger_cfg); in mt6360_charger_probe()
/drivers/usb/typec/ucsi/
Dpsy.c222 con->psy_desc.name = psy_name; in ucsi_register_port_psy()
223 con->psy_desc.type = POWER_SUPPLY_TYPE_USB; in ucsi_register_port_psy()
224 con->psy_desc.usb_types = ucsi_psy_usb_types; in ucsi_register_port_psy()
225 con->psy_desc.num_usb_types = ARRAY_SIZE(ucsi_psy_usb_types); in ucsi_register_port_psy()
226 con->psy_desc.properties = ucsi_psy_props; in ucsi_register_port_psy()
227 con->psy_desc.num_properties = ARRAY_SIZE(ucsi_psy_props); in ucsi_register_port_psy()
228 con->psy_desc.get_property = ucsi_psy_get_prop; in ucsi_register_port_psy()
230 con->psy = power_supply_register(dev, &con->psy_desc, &psy_cfg); in ucsi_register_port_psy()
Ducsi.h333 struct power_supply_desc psy_desc; member
/drivers/usb/typec/tipd/
Dcore.c92 struct power_supply_desc psy_desc; member
569 tps->psy_desc.name = psy_name; in devm_tps6598_psy_register()
570 tps->psy_desc.type = POWER_SUPPLY_TYPE_USB; in devm_tps6598_psy_register()
571 tps->psy_desc.usb_types = tps6598x_psy_usb_types; in devm_tps6598_psy_register()
572 tps->psy_desc.num_usb_types = ARRAY_SIZE(tps6598x_psy_usb_types); in devm_tps6598_psy_register()
573 tps->psy_desc.properties = tps6598x_psy_props; in devm_tps6598_psy_register()
574 tps->psy_desc.num_properties = ARRAY_SIZE(tps6598x_psy_props); in devm_tps6598_psy_register()
575 tps->psy_desc.get_property = tps6598x_psy_get_prop; in devm_tps6598_psy_register()
579 tps->psy = devm_power_supply_register(tps->dev, &tps->psy_desc, in devm_tps6598_psy_register()
/drivers/hid/
Dhid-input.c450 struct power_supply_desc *psy_desc; in hidinput_setup_battery() local
467 psy_desc = kzalloc(sizeof(*psy_desc), GFP_KERNEL); in hidinput_setup_battery()
468 if (!psy_desc) in hidinput_setup_battery()
471 psy_desc->name = kasprintf(GFP_KERNEL, "hid-%s-battery", in hidinput_setup_battery()
474 if (!psy_desc->name) { in hidinput_setup_battery()
479 psy_desc->type = POWER_SUPPLY_TYPE_BATTERY; in hidinput_setup_battery()
480 psy_desc->properties = hidinput_battery_props; in hidinput_setup_battery()
481 psy_desc->num_properties = ARRAY_SIZE(hidinput_battery_props); in hidinput_setup_battery()
482 psy_desc->use_for_apm = 0; in hidinput_setup_battery()
483 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.c429 struct power_supply_desc psy_desc; member
6430 port->psy_desc.name = psy_name; in devm_tcpm_psy_register()
6431 port->psy_desc.type = POWER_SUPPLY_TYPE_USB; in devm_tcpm_psy_register()
6432 port->psy_desc.usb_types = tcpm_psy_usb_types; in devm_tcpm_psy_register()
6433 port->psy_desc.num_usb_types = ARRAY_SIZE(tcpm_psy_usb_types); in devm_tcpm_psy_register()
6434 port->psy_desc.properties = tcpm_psy_props; in devm_tcpm_psy_register()
6435 port->psy_desc.num_properties = ARRAY_SIZE(tcpm_psy_props); in devm_tcpm_psy_register()
6436 port->psy_desc.get_property = tcpm_psy_get_prop; in devm_tcpm_psy_register()
6437 port->psy_desc.set_property = tcpm_psy_set_prop; in devm_tcpm_psy_register()
6438 port->psy_desc.property_is_writeable = tcpm_psy_prop_writeable; in devm_tcpm_psy_register()
[all …]