/drivers/power/supply/ |
D | max8903_charger.c | 24 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 …]
|
D | cros_usbpd-charger.c | 33 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 …]
|
D | generic-adc-battery.c | 48 struct power_supply_desc psy_desc; member 244 struct power_supply_desc *psy_desc; in gab_probe() local 260 psy_desc = &adc_bat->psy_desc; in gab_probe() 261 psy_desc->name = pdata->battery_info.name; in gab_probe() 266 psy_desc->type = POWER_SUPPLY_TYPE_BATTERY; in gab_probe() 267 psy_desc->get_property = gab_get_property; in gab_probe() 268 psy_desc->external_power_changed = gab_ext_power_changed; in gab_probe() 322 psy_desc->properties = properties; in gab_probe() 323 psy_desc->num_properties = index; in gab_probe() 325 adc_bat->psy = power_supply_register(&pdev->dev, psy_desc, &psy_cfg); in gab_probe() [all …]
|
D | max14656_charger_detector.c | 83 struct power_supply_desc psy_desc; member 150 chip->psy_desc.type = chg_type_props[chg_type].type; in max14656_irq_worker() 152 chip->psy_desc.type = POWER_SUPPLY_TYPE_UNKNOWN; in max14656_irq_worker() 156 chip->psy_desc.type = POWER_SUPPLY_TYPE_UNKNOWN; in max14656_irq_worker() 273 chip->psy_desc.name = MAX14656_NAME; in max14656_probe() 274 chip->psy_desc.type = POWER_SUPPLY_TYPE_UNKNOWN; in max14656_probe() 275 chip->psy_desc.properties = max14656_battery_props; in max14656_probe() 276 chip->psy_desc.num_properties = ARRAY_SIZE(max14656_battery_props); in max14656_probe() 277 chip->psy_desc.get_property = max14656_get_property; in max14656_probe() 285 &chip->psy_desc, &psy_cfg); in max14656_probe()
|
D | isp1704_charger.c | 48 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 …]
|
D | da9030_battery.c | 90 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()
|
D | cpcap-battery.c | 844 struct power_supply_desc *psy_desc; in cpcap_battery_probe() local 899 psy_desc = devm_kzalloc(ddata->dev, sizeof(*psy_desc), GFP_KERNEL); in cpcap_battery_probe() 900 if (!psy_desc) in cpcap_battery_probe() 903 psy_desc->name = "battery"; in cpcap_battery_probe() 904 psy_desc->type = POWER_SUPPLY_TYPE_BATTERY; in cpcap_battery_probe() 905 psy_desc->properties = cpcap_battery_props; in cpcap_battery_probe() 906 psy_desc->num_properties = ARRAY_SIZE(cpcap_battery_props); in cpcap_battery_probe() 907 psy_desc->get_property = cpcap_battery_get_property; in cpcap_battery_probe() 908 psy_desc->set_property = cpcap_battery_set_property; in cpcap_battery_probe() 909 psy_desc->property_is_writeable = cpcap_battery_property_is_writeable; in cpcap_battery_probe() [all …]
|
D | sbs-manager.c | 320 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()
|
D | da9052-battery.c | 559 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()
|
D | bq27xxx_battery.c | 2029 struct power_supply_desc *psy_desc; local 2043 psy_desc = devm_kzalloc(di->dev, sizeof(*psy_desc), GFP_KERNEL); 2044 if (!psy_desc) 2047 psy_desc->name = di->name; 2048 psy_desc->type = POWER_SUPPLY_TYPE_BATTERY; 2049 psy_desc->properties = bq27xxx_chip_data[di->chip].props; 2050 psy_desc->num_properties = bq27xxx_chip_data[di->chip].props_size; 2051 psy_desc->get_property = bq27xxx_battery_get_property; 2052 psy_desc->external_power_changed = bq27xxx_external_power_changed; 2054 di->bat = power_supply_register_no_ws(di->dev, psy_desc, &psy_cfg);
|
/drivers/usb/typec/ucsi/ |
D | psy.c | 222 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()
|
D | ucsi.h | 356 struct power_supply_desc psy_desc; member
|
/drivers/hid/ |
D | hid-input.c | 440 struct power_supply_desc *psy_desc; in hidinput_setup_battery() local 457 psy_desc = kzalloc(sizeof(*psy_desc), GFP_KERNEL); in hidinput_setup_battery() 458 if (!psy_desc) in hidinput_setup_battery() 461 psy_desc->name = kasprintf(GFP_KERNEL, "hid-%s-battery", in hidinput_setup_battery() 464 if (!psy_desc->name) { in hidinput_setup_battery() 469 psy_desc->type = POWER_SUPPLY_TYPE_BATTERY; in hidinput_setup_battery() 470 psy_desc->properties = hidinput_battery_props; in hidinput_setup_battery() 471 psy_desc->num_properties = ARRAY_SIZE(hidinput_battery_props); in hidinput_setup_battery() 472 psy_desc->use_for_apm = 0; in hidinput_setup_battery() 473 psy_desc->get_property = hidinput_get_battery_property; in hidinput_setup_battery() [all …]
|
/drivers/staging/nvec/ |
D | nvec_power.c | 375 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/ |
D | tcpm.c | 424 struct power_supply_desc psy_desc; member 6436 port->psy_desc.name = psy_name; in devm_tcpm_psy_register() 6437 port->psy_desc.type = POWER_SUPPLY_TYPE_USB, in devm_tcpm_psy_register() 6438 port->psy_desc.usb_types = tcpm_psy_usb_types; in devm_tcpm_psy_register() 6439 port->psy_desc.num_usb_types = ARRAY_SIZE(tcpm_psy_usb_types); in devm_tcpm_psy_register() 6440 port->psy_desc.properties = tcpm_psy_props, in devm_tcpm_psy_register() 6441 port->psy_desc.num_properties = ARRAY_SIZE(tcpm_psy_props), in devm_tcpm_psy_register() 6442 port->psy_desc.get_property = tcpm_psy_get_prop, in devm_tcpm_psy_register() 6443 port->psy_desc.set_property = tcpm_psy_set_prop, in devm_tcpm_psy_register() 6444 port->psy_desc.property_is_writeable = tcpm_psy_prop_writeable, in devm_tcpm_psy_register() [all …]
|