/Linux-v5.10/drivers/power/supply/ |
D | s3c_adc_battery.c | 76 struct s3c_adc_bat *bat = power_supply_get_drvdata(psy); in s3c_adc_backup_bat_get_property() local 78 if (!bat) { in s3c_adc_backup_bat_get_property() 83 if (bat->volt_value < 0 || in s3c_adc_backup_bat_get_property() 84 jiffies_to_msecs(jiffies - bat->timestamp) > in s3c_adc_backup_bat_get_property() 86 bat->volt_value = gather_samples(bat->client, in s3c_adc_backup_bat_get_property() 87 bat->pdata->backup_volt_samples, in s3c_adc_backup_bat_get_property() 88 bat->pdata->backup_volt_channel); in s3c_adc_backup_bat_get_property() 89 bat->volt_value *= bat->pdata->backup_volt_mult; in s3c_adc_backup_bat_get_property() 90 bat->timestamp = jiffies; in s3c_adc_backup_bat_get_property() 95 val->intval = bat->volt_value; in s3c_adc_backup_bat_get_property() [all …]
|
D | tosa_battery.c | 30 bool (*is_present)(struct tosa_bat *bat); 50 static unsigned long tosa_read_bat(struct tosa_bat *bat) in tosa_read_bat() argument 54 if (bat->gpio_bat < 0 || bat->adc_bat < 0) in tosa_read_bat() 58 gpio_set_value(bat->gpio_bat, 1); in tosa_read_bat() 60 value = wm97xx_read_aux_adc(dev_get_drvdata(bat->psy->dev.parent), in tosa_read_bat() 61 bat->adc_bat); in tosa_read_bat() 62 gpio_set_value(bat->gpio_bat, 0); in tosa_read_bat() 65 value = value * 1000000 / bat->adc_bat_divider; in tosa_read_bat() 70 static unsigned long tosa_read_temp(struct tosa_bat *bat) in tosa_read_temp() argument 74 if (bat->gpio_temp < 0 || bat->adc_temp < 0) in tosa_read_temp() [all …]
|
D | collie_battery.c | 33 bool (*is_present)(struct collie_bat *bat); 52 static unsigned long collie_read_bat(struct collie_bat *bat) in collie_read_bat() argument 56 if (bat->gpio_bat < 0 || bat->adc_bat < 0) in collie_read_bat() 59 gpio_set_value(bat->gpio_bat, 1); in collie_read_bat() 62 value = ucb1x00_adc_read(ucb, bat->adc_bat, UCB_SYNC); in collie_read_bat() 64 gpio_set_value(bat->gpio_bat, 0); in collie_read_bat() 66 value = value * 1000000 / bat->adc_bat_divider; in collie_read_bat() 71 static unsigned long collie_read_temp(struct collie_bat *bat) in collie_read_temp() argument 74 if (bat->gpio_temp < 0 || bat->adc_temp < 0) in collie_read_temp() 78 gpio_set_value(bat->gpio_temp, 1); in collie_read_temp() [all …]
|
D | da9052-battery.c | 185 static int da9052_read_chgend_current(struct da9052_battery *bat, in da9052_read_chgend_current() argument 190 if (bat->status == POWER_SUPPLY_STATUS_DISCHARGING) in da9052_read_chgend_current() 193 ret = da9052_reg_read(bat->da9052, DA9052_ICHG_END_REG); in da9052_read_chgend_current() 202 static int da9052_read_chg_current(struct da9052_battery *bat, int *current_mA) in da9052_read_chg_current() argument 206 if (bat->status == POWER_SUPPLY_STATUS_DISCHARGING) in da9052_read_chg_current() 209 ret = da9052_reg_read(bat->da9052, DA9052_ICHG_AV_REG); in da9052_read_chg_current() 218 static int da9052_bat_check_status(struct da9052_battery *bat, int *status) in da9052_bat_check_status() argument 233 ret = da9052_group_read(bat->da9052, DA9052_STATUS_A_REG, 2, v); in da9052_bat_check_status() 249 bat->charger_type = DA9052_CHARGER; in da9052_bat_check_status() 255 ret = da9052_read_chg_current(bat, &chg_current); in da9052_bat_check_status() [all …]
|
D | ingenic-battery.c | 28 struct ingenic_battery *bat = power_supply_get_drvdata(psy); in ingenic_battery_get_property() local 29 struct power_supply_battery_info *info = &bat->info; in ingenic_battery_get_property() 34 ret = iio_read_channel_processed(bat->channel, &val->intval); in ingenic_battery_get_property() 44 ret = iio_read_channel_processed(bat->channel, &val->intval); in ingenic_battery_get_property() 61 static int ingenic_battery_set_scale(struct ingenic_battery *bat) in ingenic_battery_set_scale() argument 67 ret = iio_read_max_channel_raw(bat->channel, &max_raw); in ingenic_battery_set_scale() 69 dev_err(bat->dev, "Unable to read max raw channel value\n"); in ingenic_battery_set_scale() 73 ret = iio_read_avail_channel_attribute(bat->channel, &scale_raw, in ingenic_battery_set_scale() 77 dev_err(bat->dev, "Unable to read channel avail scale\n"); in ingenic_battery_set_scale() 83 max_mV = bat->info.voltage_max_design_uv / 1000; in ingenic_battery_set_scale() [all …]
|
D | twl4030_madc_battery.c | 75 static int twl4030_madc_bat_voltscale(struct twl4030_madc_battery *bat, in twl4030_madc_bat_voltscale() argument 82 if (twl4030_madc_bat_get_charging_status(bat)) in twl4030_madc_bat_voltscale() 83 calibration = bat->pdata->charging; in twl4030_madc_bat_voltscale() 85 calibration = bat->pdata->discharging; in twl4030_madc_bat_voltscale() 111 struct twl4030_madc_battery *bat = power_supply_get_drvdata(psy); in twl4030_madc_bat_get_property() local 115 if (twl4030_madc_bat_voltscale(bat, in twl4030_madc_bat_get_property() 116 twl4030_madc_bat_get_voltage(bat)) > 95) in twl4030_madc_bat_get_property() 119 if (twl4030_madc_bat_get_charging_status(bat)) in twl4030_madc_bat_get_property() 126 val->intval = twl4030_madc_bat_get_voltage(bat) * 1000; in twl4030_madc_bat_get_property() 132 val->intval = twl4030_madc_bat_get_current(bat); in twl4030_madc_bat_get_property() [all …]
|
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 …]
|
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()
|
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()
|
/Linux-v5.10/arch/powerpc/mm/book3s32/ |
D | mmu.c | 50 * Return PA for this VA if it is mapped by a BAT, or 0 81 struct ppc_bat *bat = BATS[b]; in find_free_bat() local 83 if (!(bat[1].batu & 3)) in find_free_bat() 118 struct ppc_bat *bat = BATS[index]; in setibat() local 125 bat[0].batu = virt | (bl << 2) | 2; /* Vs=1, Vp=0 */ in setibat() 126 bat[0].batl = BAT_PHYS_ADDR(phys) | wimgxpp; in setibat() 128 bat[0].batu |= 1; /* Vp = 1 */ in setibat() 133 struct ppc_bat *bat = BATS[index]; in clearibat() local 135 bat[0].batu = 0; in clearibat() 136 bat[0].batl = 0; in clearibat() [all …]
|
/Linux-v5.10/arch/powerpc/kvm/ |
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 …]
|
D | book3s_emulate.c | 637 void kvmppc_set_bat(struct kvm_vcpu *vcpu, struct kvmppc_bat *bat, bool upper, in kvmppc_set_bat() argument 641 /* Upper BAT */ in kvmppc_set_bat() 643 bat->bepi_mask = (~bl << 17); in kvmppc_set_bat() 644 bat->bepi = val & 0xfffe0000; in kvmppc_set_bat() 645 bat->vs = (val & 2) ? 1 : 0; in kvmppc_set_bat() 646 bat->vp = (val & 1) ? 1 : 0; in kvmppc_set_bat() 647 bat->raw = (bat->raw & 0xffffffff00000000ULL) | val; in kvmppc_set_bat() 649 /* Lower BAT */ in kvmppc_set_bat() 650 bat->brpn = val & 0xfffe0000; in kvmppc_set_bat() 651 bat->wimg = (val >> 3) & 0xf; in kvmppc_set_bat() [all …]
|
/Linux-v5.10/drivers/acpi/ |
D | sbs.c | 31 #define ACPI_BATTERY_DIR_NAME "BAT%i" 55 struct power_supply *bat; member 534 battery->bat = power_supply_register(&sbs->device->dev, in acpi_battery_add() 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() 542 result = device_create_file(&battery->bat->dev, &alarm_attr); in acpi_battery_add() 557 if (battery->bat) { in acpi_battery_remove() 559 device_remove_file(&battery->bat->dev, &alarm_attr); in acpi_battery_remove() 560 power_supply_unregister(battery->bat); in acpi_battery_remove() [all …]
|
D | battery.c | 103 struct power_supply *bat; member 695 hook->remove_battery(battery->bat); in __battery_hook_unregister() 723 if (hook->add_battery(battery->bat)) { in battery_hook_register() 761 if (hook_node->add_battery(battery->bat)) { in battery_hook_add_battery() 784 hook->remove_battery(battery->bat); in battery_hook_remove_battery() 843 battery->bat = power_supply_register_no_ws(&battery->device->dev, in sysfs_add_battery() 846 if (IS_ERR(battery->bat)) { in sysfs_add_battery() 847 int result = PTR_ERR(battery->bat); in sysfs_add_battery() 849 battery->bat = NULL; in sysfs_add_battery() 853 return device_create_file(&battery->bat->dev, &alarm_attr); in sysfs_add_battery() [all …]
|
/Linux-v5.10/drivers/mfd/ |
D | rohm-bd70528.c | 26 DEFINE_RES_IRQ_NAMED(BD70528_INT_BAT_OV_RES, "bd70528-bat-ov-res"), 27 DEFINE_RES_IRQ_NAMED(BD70528_INT_BAT_OV_DET, "bd70528-bat-ov-det"), 28 DEFINE_RES_IRQ_NAMED(BD70528_INT_DBAT_DET, "bd70528-bat-dead"), 29 DEFINE_RES_IRQ_NAMED(BD70528_INT_BATTSD_COLD_RES, "bd70528-bat-warmed"), 30 DEFINE_RES_IRQ_NAMED(BD70528_INT_BATTSD_COLD_DET, "bd70528-bat-cold"), 31 DEFINE_RES_IRQ_NAMED(BD70528_INT_BATTSD_HOT_RES, "bd70528-bat-cooled"), 32 DEFINE_RES_IRQ_NAMED(BD70528_INT_BATTSD_HOT_DET, "bd70528-bat-hot"), 34 DEFINE_RES_IRQ_NAMED(BD70528_INT_BAT_RMV, "bd70528-bat-removed"), 35 DEFINE_RES_IRQ_NAMED(BD70528_INT_BAT_DET, "bd70528-bat-detected"),
|
/Linux-v5.10/net/batman-adv/ |
D | multicast.c | 68 * @bat_priv: the bat priv with all the soft interface information 154 * @bat_priv: the bat priv with all the soft interface information 185 * @bat_priv: the bat priv with all the soft interface information 247 * @bat_priv: the bat priv with all the soft interface information 273 * @bat_priv: the bat priv with all the soft interface information 678 * @bat_priv: the bat priv with all the soft interface information 710 * @bat_priv: the bat priv with all the soft interface information 743 * @bat_priv: the bat priv with all the soft interface information 795 * @bat_priv: the bat priv with all the soft interface information 833 * @bat_priv: the bat priv with all the soft interface information [all …]
|
D | tvlv.c | 59 * @bat_priv: the bat priv with all the soft interface information 115 * @bat_priv: the bat priv with all the soft interface information 149 * @bat_priv: the bat priv with all the soft interface information 174 * @bat_priv: the bat priv with all the soft interface information 198 * @bat_priv: the bat priv with all the soft interface information 216 * @bat_priv: the bat priv with all the soft interface information 294 * @bat_priv: the bat priv with all the soft interface information 347 * @bat_priv: the bat priv with all the soft interface information 401 * @bat_priv: the bat priv with all the soft interface information 468 * @bat_priv: the bat priv with all the soft interface information [all …]
|
D | network-coding.c | 75 * @bat_priv: the bat priv with all the soft interface information 86 * @bat_priv: the bat priv with all the soft interface information 119 * @bat_priv: the bat priv with all the soft interface information 138 * @bat_priv: the bat priv with all the soft interface information 179 * @bat_priv: the bat priv with all the soft interface information 269 * @bat_priv: the bat priv with all the soft interface information 285 * @bat_priv: the bat priv with all the soft interface information 306 * @bat_priv: the bat priv with all the soft interface information 327 * @bat_priv: the bat priv with all the soft interface information 365 * @bat_priv: the bat priv with all the soft interface information [all …]
|
D | gateway_client.c | 85 * @bat_priv: the bat priv with all the soft interface information 109 * @bat_priv: the bat priv with all the soft interface information 160 * @bat_priv: the bat priv with all the soft interface information 176 * @bat_priv: the bat priv with all the soft interface information 208 * @bat_priv: the bat priv with all the soft interface information 300 * @bat_priv: the bat priv with all the soft interface information 335 * @bat_priv: the bat priv with all the soft interface information 382 * @bat_priv: the bat priv with all the soft interface information 412 * @bat_priv: the bat priv with all the soft interface information 481 * @bat_priv: the bat priv with all the soft interface information [all …]
|
D | bat_v.c | 176 * @bat_priv: the bat priv with all the soft interface information 257 * @bat_priv: The bat priv with all the soft interface information 294 * @bat_priv: The bat priv with all the soft interface information 343 * @bat_priv: the bat priv with all the soft interface information 414 * @bat_priv: The bat priv with all the soft interface information 480 * @bat_priv: The bat priv with all the soft interface information 533 * @bat_priv: The bat priv with all the soft interface information 573 * @bat_priv: The bat priv with all the soft interface information 661 * @bat_priv: the bat priv with all the soft interface information 740 * @bat_priv: the bat priv with all the soft interface information [all …]
|
D | distributed-arp-table.c | 101 * @bat_priv: the bat priv with all the soft interface information 148 * @bat_priv: the bat priv with all the soft interface information 318 * @bat_priv: the bat priv with all the soft interface information 360 * @bat_priv: the bat priv with all the soft interface information 418 * @bat_priv: the bat priv with all the soft interface information 553 * @bat_priv: the bat priv with all the soft interface information 618 * @bat_priv: the bat priv with all the soft interface information 663 * @bat_priv: the bat priv with all the soft interface information 740 * @bat_priv: the bat priv with all the soft interface information 773 * @bat_priv: the bat priv with all the soft interface information [all …]
|
/Linux-v5.10/Documentation/devicetree/bindings/power/supply/ |
D | sc27xx-fg.txt | 13 - io-channel-names: Should be "bat-temp" or "charge-vol". 23 bat: battery { 53 io-channel-names = "bat-temp", "charge-vol"; 56 monitored-battery = <&bat>;
|
D | qcom_smbb.txt | 37 "bat-temp-ok", 38 "bat-present", 139 "bat-temp-ok", 140 "bat-present",
|
/Linux-v5.10/arch/powerpc/include/asm/ |
D | reg.h | 504 #define SPRN_DBAT0L 0x219 /* Data BAT 0 Lower Register */ 505 #define SPRN_DBAT0U 0x218 /* Data BAT 0 Upper Register */ 506 #define SPRN_DBAT1L 0x21B /* Data BAT 1 Lower Register */ 507 #define SPRN_DBAT1U 0x21A /* Data BAT 1 Upper Register */ 508 #define SPRN_DBAT2L 0x21D /* Data BAT 2 Lower Register */ 509 #define SPRN_DBAT2U 0x21C /* Data BAT 2 Upper Register */ 510 #define SPRN_DBAT3L 0x21F /* Data BAT 3 Lower Register */ 511 #define SPRN_DBAT3U 0x21E /* Data BAT 3 Upper Register */ 512 #define SPRN_DBAT4L 0x239 /* Data BAT 4 Lower Register */ 513 #define SPRN_DBAT4U 0x238 /* Data BAT 4 Upper Register */ [all …]
|
/Linux-v5.10/drivers/pinctrl/mvebu/ |
D | pinctrl-dove.c | 382 MPP_FUNCTION(CONFIG_PMU | 0xa, "bat-fault", NULL), 399 MPP_FUNCTION(CONFIG_PMU | 0xa, "bat-fault", NULL), 417 MPP_FUNCTION(CONFIG_PMU | 0xa, "bat-fault", NULL), 436 MPP_FUNCTION(CONFIG_PMU | 0xa, "bat-fault", NULL), 453 MPP_FUNCTION(CONFIG_PMU | 0xa, "bat-fault", NULL), 470 MPP_FUNCTION(CONFIG_PMU | 0xa, "bat-fault", NULL), 487 MPP_FUNCTION(CONFIG_PMU | 0xa, "bat-fault", NULL), 504 MPP_FUNCTION(CONFIG_PMU | 0xa, "bat-fault", NULL), 519 MPP_FUNCTION(CONFIG_PMU | 0xa, "bat-fault", NULL), 534 MPP_FUNCTION(CONFIG_PMU | 0xa, "bat-fault", NULL), [all …]
|