/linux-6.3-rc2/drivers/power/supply/ |
A D | surface_battery.c | 166 return ssam_retry(ssam_bat_get_sta, bat->sdev, &bat->sta); in spwr_battery_load_sta() 178 status = ssam_retry(ssam_bat_get_bix, bat->sdev, &bat->bix); in spwr_battery_load_bix() 181 bat->bix.model[ARRAY_SIZE(bat->bix.model) - 1] = 0; in spwr_battery_load_bix() 182 bat->bix.serial[ARRAY_SIZE(bat->bix.serial) - 1] = 0; in spwr_battery_load_bix() 183 bat->bix.type[ARRAY_SIZE(bat->bix.type) - 1] = 0; in spwr_battery_load_bix() 184 bat->bix.oem_info[ARRAY_SIZE(bat->bix.oem_info) - 1] = 0; in spwr_battery_load_bix() 196 return ssam_retry(ssam_bat_get_bst, bat->sdev, &bat->bst); in spwr_battery_load_bst() 725 strncpy(bat->name, name, ARRAY_SIZE(bat->name) - 1); in spwr_battery_init() 737 bat->psy_desc.name = bat->name; in spwr_battery_init() 801 bat->psy = devm_power_supply_register(&bat->sdev->dev, &bat->psy_desc, &psy_cfg); in spwr_battery_register() [all …]
|
A D | da9052-battery.c | 281 *status = bat->status; in da9052_bat_check_status() 431 *health = bat->health; in da9052_bat_check_health() 588 struct da9052_battery *bat; in da9052_bat_probe() local 595 if (!bat) in da9052_bat_probe() 598 psy_cfg.drv_data = bat; in da9052_bat_probe() 615 da9052_bat_irq, bat); in da9052_bat_probe() 618 dev_err(bat->da9052->dev, in da9052_bat_probe() 626 if (IS_ERR(bat->psy)) { in da9052_bat_probe() 627 ret = PTR_ERR(bat->psy); in da9052_bat_probe() 636 da9052_free_irq(bat->da9052, da9052_bat_irq_bits[i], bat); in da9052_bat_probe() [all …]
|
A D | collie_battery.c | 58 if (!bat->gpio_bat || bat->adc_bat < 0) in collie_read_bat() 76 if (!bat->gpio_temp || bat->adc_temp < 0) in collie_read_temp() 100 if (bat->is_present && !bat->is_present(bat) in collie_bat_get_property() 116 if (bat->full_chrg == -1) in collie_bat_get_property() 131 val->intval = bat->is_present ? bat->is_present(bat) : 1; in collie_bat_get_property() 159 old = bat->status; in collie_bat_update() 161 if (bat->is_present && !bat->is_present(bat)) { in collie_bat_update() 164 bat->full_chrg = -1; in collie_bat_update() 173 bat->full_chrg == -1) in collie_bat_update() 174 bat->full_chrg = collie_read_bat(bat); in collie_bat_update() [all …]
|
A D | ingenic-battery.c | 126 struct ingenic_battery *bat; in ingenic_battery_probe() local 131 bat = devm_kzalloc(dev, sizeof(*bat), GFP_KERNEL); in ingenic_battery_probe() 132 if (!bat) in ingenic_battery_probe() 135 bat->dev = dev; in ingenic_battery_probe() 137 if (IS_ERR(bat->channel)) in ingenic_battery_probe() 138 return PTR_ERR(bat->channel); in ingenic_battery_probe() 140 desc = &bat->desc; in ingenic_battery_probe() 146 psy_cfg.drv_data = bat; in ingenic_battery_probe() 150 if (IS_ERR(bat->battery)) in ingenic_battery_probe() 154 ret = power_supply_get_battery_info(bat->battery, &bat->info); in ingenic_battery_probe() [all …]
|
A D | acer_a500_battery.c | 75 if (bat->capacity != capacity) { in a500_battery_update_capacity() 76 bat->capacity = capacity; in a500_battery_update_capacity() 85 if (bat->capacity < 100) { in a500_battery_get_status() 164 val->intval = bat->capacity; in a500_battery_get_property() 201 struct a500_battery *bat; in a500_battery_poll_work() local 226 struct a500_battery *bat; in a500_battery_probe() local 228 bat = devm_kzalloc(&pdev->dev, sizeof(*bat), GFP_KERNEL); in a500_battery_probe() 229 if (!bat) in a500_battery_probe() 235 psy_cfg.drv_data = bat; in a500_battery_probe() 238 if (!bat->regmap) in a500_battery_probe() [all …]
|
A D | twl4030_madc_battery.c | 83 calibration = bat->pdata->charging; in twl4030_madc_bat_voltscale() 85 calibration = bat->pdata->discharging; in twl4030_madc_bat_voltscale() 115 if (twl4030_madc_bat_voltscale(bat, in twl4030_madc_bat_get_property() 140 twl4030_madc_bat_get_voltage(bat)); in twl4030_madc_bat_get_property() 146 twl4030_madc_bat_get_voltage(bat)); in twl4030_madc_bat_get_property() 149 val->intval = bat->pdata->capacity; in twl4030_madc_bat_get_property() 156 twl4030_madc_bat_get_voltage(bat)); in twl4030_madc_bat_get_property() 257 power_supply_unregister(bat->psy); in twl4030_madc_battery_remove() 259 iio_channel_release(bat->channel_vbat); in twl4030_madc_battery_remove() 260 iio_channel_release(bat->channel_ichg); in twl4030_madc_battery_remove() [all …]
|
A D | apm_power.c | 37 struct power_supply *bat; member 49 bp->bat = dev_get_drvdata(dev); in __find_main_battery() 51 if (bp->bat->desc->use_for_apm) { in __find_main_battery() 53 bp->main = bp->bat; in __find_main_battery() 57 if (!PSY_PROP(bp->bat, CHARGE_FULL_DESIGN, &bp->full) || in __find_main_battery() 58 !PSY_PROP(bp->bat, CHARGE_FULL, &bp->full)) { in __find_main_battery() 60 bp->max_charge_bat = bp->bat; in __find_main_battery() 63 } else if (!PSY_PROP(bp->bat, ENERGY_FULL_DESIGN, &bp->full) || in __find_main_battery() 64 !PSY_PROP(bp->bat, ENERGY_FULL, &bp->full)) { in __find_main_battery() 66 bp->max_energy_bat = bp->bat; in __find_main_battery() [all …]
|
A D | pmu_battery.c | 17 struct power_supply *bat; member 176 pbat->bat = power_supply_register(&bat_pdev->dev, in pmu_bat_init() 179 if (IS_ERR(pbat->bat)) { in pmu_bat_init() 180 ret = PTR_ERR(pbat->bat); in pmu_bat_init() 193 power_supply_unregister(pbats[i]->bat); in pmu_bat_init() 211 power_supply_unregister(pbats[i]->bat); in pmu_bat_exit()
|
A D | rx51_battery.c | 18 struct power_supply *bat; member 230 di->bat = power_supply_register(di->dev, &di->bat_desc, &psy_cfg); in rx51_battery_probe() 231 if (IS_ERR(di->bat)) { in rx51_battery_probe() 232 ret = PTR_ERR(di->bat); in rx51_battery_probe() 253 power_supply_unregister(di->bat); in rx51_battery_remove()
|
A D | ds2760_battery.c | 111 struct power_supply *bat; member 390 if (power_supply_am_i_supplied(di->bat)) { in ds2760_battery_update_status() 423 power_supply_changed(di->bat); in ds2760_battery_update_status() 510 if (!power_supply_am_i_supplied(di->bat)) in ds2760_battery_set_charged_work() 656 power_supply_changed(di->bat); in ds2760_pm_notifier() 742 di->bat = power_supply_register(dev, &di->bat_desc, &psy_cfg); in w1_ds2760_add_slave() 743 if (IS_ERR(di->bat)) { in w1_ds2760_add_slave() 745 retval = PTR_ERR(di->bat); in w1_ds2760_add_slave() 765 power_supply_unregister(di->bat); in w1_ds2760_add_slave() 780 power_supply_unregister(di->bat); in w1_ds2760_remove_slave()
|
A D | max1721x_battery.c | 60 struct power_supply *bat; member 424 info->bat = devm_power_supply_register(&sl->dev, &info->bat_desc, in devm_w1_max1721x_add_device() 426 if (IS_ERR(info->bat)) { in devm_w1_max1721x_add_device() 428 return PTR_ERR(info->bat); in devm_w1_max1721x_add_device()
|
A D | axp288_fuel_gauge.c | 120 struct power_supply *bat; member 499 power_supply_changed(info->bat); in fuel_gauge_thread_handler() 510 power_supply_changed(info->bat); in fuel_gauge_external_power_changed() 770 info->bat = devm_power_supply_register(dev, &fuel_gauge_desc, &psy_cfg); in axp288_fuel_gauge_probe() 771 if (IS_ERR(info->bat)) { in axp288_fuel_gauge_probe() 772 ret = PTR_ERR(info->bat); in axp288_fuel_gauge_probe()
|
/linux-6.3-rc2/arch/powerpc/mm/book3s32/ |
A D | mmu.c | 84 struct ppc_bat *bat = BATS[b]; in find_free_bat() local 86 if (!(bat[1].batu & 3)) in find_free_bat() 121 struct ppc_bat *bat = BATS[index]; in setibat() local 131 bat[0].batu |= 1; /* Vp = 1 */ in setibat() 138 bat[0].batu = 0; in clearibat() 139 bat[0].batl = 0; in clearibat() 241 struct ppc_bat *bat = BATS[i]; in mmu_mark_rodata_ro() local 244 bat[1].batl = (bat[1].batl & ~BPP_RW) | BPP_RX; in mmu_mark_rodata_ro() 260 struct ppc_bat *bat; in setbat() local 270 bat = BATS[index]; in setbat() [all …]
|
/linux-6.3-rc2/arch/powerpc/kvm/ |
A D | book3s_32_mmu.c | 132 struct kvmppc_bat *bat; in kvmppc_mmu_book3s_32_xlate_bat() local 137 bat = &vcpu_book3s->dbat[i]; in kvmppc_mmu_book3s_32_xlate_bat() 139 bat = &vcpu_book3s->ibat[i]; in kvmppc_mmu_book3s_32_xlate_bat() 142 if (!bat->vp) in kvmppc_mmu_book3s_32_xlate_bat() 145 if (!bat->vs) in kvmppc_mmu_book3s_32_xlate_bat() 152 data ? 'd' : 'i', i, eaddr, bat->bepi, in kvmppc_mmu_book3s_32_xlate_bat() 153 bat->bepi_mask); in kvmppc_mmu_book3s_32_xlate_bat() 155 if ((eaddr & bat->bepi_mask) == bat->bepi) { in kvmppc_mmu_book3s_32_xlate_bat() 162 pte->raddr = bat->brpn | (eaddr & ~bat->bepi_mask); in kvmppc_mmu_book3s_32_xlate_bat() 163 pte->may_read = bat->pp; in kvmppc_mmu_book3s_32_xlate_bat() [all …]
|
A D | book3s_emulate.c | 639 bat->bepi_mask = (~bl << 17); in kvmppc_set_bat() 640 bat->bepi = val & 0xfffe0000; in kvmppc_set_bat() 641 bat->vs = (val & 2) ? 1 : 0; in kvmppc_set_bat() 642 bat->vp = (val & 1) ? 1 : 0; in kvmppc_set_bat() 643 bat->raw = (bat->raw & 0xffffffff00000000ULL) | val; in kvmppc_set_bat() 648 bat->pp = val & 3; in kvmppc_set_bat() 649 bat->raw = (bat->raw & 0x00000000ffffffffULL) | ((u64)val << 32); in kvmppc_set_bat() 656 struct kvmppc_bat *bat; in kvmppc_find_bat() local 675 return bat; in kvmppc_find_bat() 877 *spr_val = bat->raw >> 32; in kvmppc_core_emulate_mfspr_pr() [all …]
|
/linux-6.3-rc2/drivers/acpi/ |
A D | sbs.c | 55 struct power_supply *bat; member 536 if (IS_ERR(battery->bat)) { in acpi_battery_add() 537 result = PTR_ERR(battery->bat); in acpi_battery_add() 538 battery->bat = NULL; in acpi_battery_add() 557 if (battery->bat) { in acpi_battery_remove() 560 power_supply_unregister(battery->bat); in acpi_battery_remove() 597 struct acpi_battery *bat; in acpi_sbs_callback() local 611 bat = &sbs->battery[id]; in acpi_sbs_callback() 612 saved_battery_state = bat->present; in acpi_sbs_callback() 613 acpi_battery_read(bat); in acpi_sbs_callback() [all …]
|
A D | battery.c | 98 struct power_supply *bat; member 751 power_supply_changed(battery->bat); in battery_hook_register() 864 if (IS_ERR(battery->bat)) { in sysfs_add_battery() 867 battery->bat = NULL; in sysfs_add_battery() 877 if (!battery->bat) { in sysfs_remove_battery() 884 battery->bat = NULL; in sysfs_remove_battery() 999 if (!battery->bat) { in acpi_battery_update() 1021 if (!battery->bat) in acpi_battery_refresh() 1044 old = battery->bat; in acpi_battery_notify() 1061 if (old && battery->bat) in acpi_battery_notify() [all …]
|
/linux-6.3-rc2/Documentation/devicetree/bindings/power/supply/ |
A D | sc27xx-fg.yaml | 37 - const: bat-temp 68 bat: battery { 92 io-channel-names = "bat-temp", "charge-vol"; 95 monitored-battery = <&bat>;
|
A D | sc2731-charger.yaml | 36 bat: battery { 50 monitored-battery = <&bat>;
|
A D | qcom,pm8941-charger.yaml | 37 - const: bat-temp-ok 38 - const: bat-present 167 "bat-temp-ok", 168 "bat-present",
|
A D | bq27xxx.yaml | 81 bat: battery { 91 monitored-battery = <&bat>;
|
A D | bq24190.yaml | 72 bat: battery { 87 monitored-battery = <&bat>;
|
A D | bq2515x.yaml | 69 bat: battery { 83 monitored-battery = <&bat>;
|
/linux-6.3-rc2/drivers/net/wwan/t7xx/ |
A D | t7xx_hif_dpmaif_rx.c | 505 struct dpmaif_bat_request *bat; in t7xx_dpmaif_release_bat_entry() local 512 bat = rxq->bat_frag; in t7xx_dpmaif_release_bat_entry() 515 bat = rxq->bat_req; in t7xx_dpmaif_release_bat_entry() 519 if (rel_entry_num >= bat->bat_size_cnt) in t7xx_dpmaif_release_bat_entry() 522 old_rel_idx = bat->bat_release_rd_idx; in t7xx_dpmaif_release_bat_entry() 526 if (bat->bat_wr_idx == old_rel_idx) in t7xx_dpmaif_release_bat_entry() 535 new_rel_idx -= bat->bat_size_cnt; in t7xx_dpmaif_release_bat_entry() 544 if (index >= bat->bat_size_cnt) in t7xx_dpmaif_release_bat_entry() 545 index -= bat->bat_size_cnt; in t7xx_dpmaif_release_bat_entry() 547 clear_bit(index, bat->bat_bitmap); in t7xx_dpmaif_release_bat_entry() [all …]
|
/linux-6.3-rc2/arch/arm64/boot/dts/sprd/ |
A D | sc2731.dtsi | 23 monitored-battery = <&bat>; 101 bat-detect-gpio = <&pmic_eic 9 GPIO_ACTIVE_HIGH>; 103 io-channel-names = "bat-temp", "charge-vol"; 104 monitored-battery = <&bat>;
|