| /linux/drivers/power/supply/ |
| H A 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 …]
|
| H A D | collie_battery.c | 35 bool (*is_present)(struct collie_bat *bat); 54 static unsigned long collie_read_bat(struct collie_bat *bat) in collie_read_bat() argument 58 if (!bat->gpio_bat || bat->adc_bat < 0) in collie_read_bat() 61 gpiod_set_value(bat->gpio_bat, 1); in collie_read_bat() 64 value = ucb1x00_adc_read(ucb, bat->adc_bat, UCB_SYNC); in collie_read_bat() 66 gpiod_set_value(bat->gpio_bat, 0); in collie_read_bat() 68 value = value * 1000000 / bat->adc_bat_divider; in collie_read_bat() 73 static unsigned long collie_read_temp(struct collie_bat *bat) in collie_read_temp() argument 76 if (!bat->gpio_temp || bat->adc_temp < 0) in collie_read_temp() 80 gpiod_set_value(bat->gpio_temp, 1); in collie_read_temp() [all …]
|
| H A 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 …]
|
| H 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()
|
| H A D | ds2760_battery.c | 111 struct power_supply *bat; member 389 if (power_supply_am_i_supplied(di->bat)) { in ds2760_battery_update_status() 422 power_supply_changed(di->bat); in ds2760_battery_update_status() 611 power_supply_changed(di->bat); in ds2760_pm_notifier() 695 di->bat = devm_power_supply_register(dev, &di->bat_desc, &psy_cfg); in w1_ds2760_add_slave() 696 if (IS_ERR(di->bat)) { in w1_ds2760_add_slave() 698 retval = PTR_ERR(di->bat); in w1_ds2760_add_slave()
|
| /linux/arch/powerpc/kvm/ |
| H 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 …]
|
| H A D | book3s_emulate.c | 633 void kvmppc_set_bat(struct kvm_vcpu *vcpu, struct kvmppc_bat *bat, bool upper, in kvmppc_set_bat() argument 637 /* Upper BAT */ in kvmppc_set_bat() 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() 645 /* Lower BAT */ in kvmppc_set_bat() 646 bat->brpn = val & 0xfffe0000; in kvmppc_set_bat() 647 bat->wimg = (val >> 3) & 0xf; in kvmppc_set_bat() [all …]
|
| /linux/drivers/net/wwan/t7xx/ |
| H A D | t7xx_hif_dpmaif_rx.c | 110 dev_err(dpmaif_ctrl->dev, "RX BAT flow check fail\n"); in t7xx_dpmaif_update_bat_wr_idx() 151 * t7xx_dpmaif_rx_buf_alloc() - Allocate buffers for the BAT ring. 153 * @bat_req: Pointer to BAT request structure. 158 * Allocate skb and store the start address of the data buffer into the BAT ring. 176 /* Check BAT buffer space */ in t7xx_dpmaif_rx_buf_alloc() 305 * t7xx_dpmaif_rx_frag_alloc() - Allocates buffers for the Fragment BAT ring. 307 * @bat_req: Pointer to BAT request structure. 311 * Fragment BAT is used when the received packet does not fit in a normal BAT entry. 313 * into the Fragment BAT ring. 511 struct dpmaif_bat_request *bat; in t7xx_dpmaif_release_bat_entry() local [all …]
|
| /linux/net/batman-adv/ |
| H A D | multicast.c | 66 * @bat_priv: the bat priv with all the mesh interface information 151 * @bat_priv: the bat priv with all the mesh interface information 182 * @bat_priv: the bat priv with all the mesh interface information 213 * @bat_priv: the bat priv with all the mesh interface information 239 * @bat_priv: the bat priv with all the mesh interface information 268 * @bat_priv: the bat priv with all the mesh interface information 673 * @bat_priv: the bat priv with all the mesh interface information 705 * @bat_priv: the bat priv with all the mesh interface information 738 * @bat_priv: the bat priv with all the mesh interface information 790 * @bat_priv: the bat priv with all the mesh interface information [all …]
|
| H A D | tvlv.c | 62 * @bat_priv: the bat priv with all the mesh interface information 121 * @bat_priv: the bat priv with all the mesh interface information 155 * @bat_priv: the bat priv with all the mesh interface information 180 * @bat_priv: the bat priv with all the mesh interface information 204 * @bat_priv: the bat priv with all the mesh interface information 222 * @bat_priv: the bat priv with all the mesh interface information 300 * @bat_priv: the bat priv with all the mesh interface information 353 * @bat_priv: the bat priv with all the mesh interface information 424 * @bat_priv: the bat priv with all the mesh interface information 493 * @bat_priv: the bat priv with all the mesh interface information [all …]
|
| H A D | gateway_client.c | 74 * @bat_priv: the bat priv with all the mesh interface information 98 * @bat_priv: the bat priv with all the mesh interface information 147 * @bat_priv: the bat priv with all the mesh interface information 163 * @bat_priv: the bat priv with all the mesh interface information 195 * @bat_priv: the bat priv with all the mesh interface information 283 * @bat_priv: the bat priv with all the mesh interface information 317 * @bat_priv: the bat priv with all the mesh interface information 364 * @bat_priv: the bat priv with all the mesh interface information 394 * @bat_priv: the bat priv with all the mesh interface information 461 * @bat_priv: the bat priv with all the mesh interface information [all …]
|
| H A D | gateway_common.c | 23 * @bat_priv: the bat priv with all the mesh interface information 51 * @bat_priv: the bat priv with all the mesh interface information 92 * @bat_priv: the bat priv with all the mesh interface information 108 * @bat_priv: the bat priv with all the mesh interface information
|
| H A D | send.c | 262 * @bat_priv: the bat priv with all the mesh interface information 304 * @bat_priv: the bat priv with all the mesh interface information 374 * @bat_priv: the bat priv with all the mesh interface information 420 * @bat_priv: the bat priv with all the mesh interface information 551 * @lock: a key to the store to steal from (e.g. forw_{bat,bcast}_list_lock) 642 * @lock: a key to the store (e.g. forw_{bat,bcast}_list_lock) 643 * @head: the shelve to queue it on (e.g. forw_{bat,bcast}_list) 685 * @bat_priv: the bat priv with all the mesh interface information 704 * @bat_priv: the bat priv with all the mesh interface information 722 * @bat_priv: the bat priv with all the mesh interface information [all …]
|
| H A D | distributed-arp-table.c | 99 * @bat_priv: the bat priv with all the mesh interface information 148 * @bat_priv: the bat priv with all the mesh interface information 318 * @bat_priv: the bat priv with all the mesh interface information 360 * @bat_priv: the bat priv with all the mesh interface information 417 * @bat_priv: the bat priv with all the mesh interface information 552 * @bat_priv: the bat priv with all the mesh interface information 616 * @bat_priv: the bat priv with all the mesh interface information 660 * @bat_priv: the bat priv with all the mesh interface information 736 * @bat_priv: the bat priv with all the mesh interface information 769 * @bat_priv: the bat priv with all the mesh interface information [all …]
|
| H A D | bat_v.c | 169 * @bat_priv: The bat priv with all the mesh interface information 206 * @bat_priv: The bat priv with all the mesh interface information 255 * @bat_priv: The bat priv with all the mesh interface information 323 * @bat_priv: The bat priv with all the mesh interface information 375 * @bat_priv: The bat priv with all the mesh interface information 415 * @bat_priv: The bat priv with all the mesh interface information 503 * @bat_priv: the bat priv with all the mesh interface information 554 * @bat_priv: the bat priv with all the mesh interface information 591 * @bat_priv: the bat priv with all the mesh interface information 648 * @bat_priv: The bat priv with all the mesh interface information [all …]
|
| H A D | bridge_loop_avoidance.c | 212 * @bat_priv: the bat priv with all the mesh interface information 251 * @bat_priv: the bat priv with all the mesh interface information 335 * @bat_priv: the bat priv with all the mesh interface information 484 * @bat_priv: the bat priv with all the mesh interface information 557 * @bat_priv: the bat priv with all the mesh interface information 583 * @bat_priv: the bat priv with all the mesh interface information 660 * @bat_priv: the bat priv with all the mesh interface information 681 * @bat_priv: the bat priv with all the mesh interface information 791 * @bat_priv: the bat priv with all the mesh interface information 829 * @bat_priv: the bat priv with all the mesh interface information [all …]
|
| H A D | multicast_forw.c | 134 * @bat_priv: the bat priv with all the mesh interface information 177 * @bat_priv: the bat priv with all the mesh interface information 218 * @bat_priv: the bat priv with all the mesh interface information 265 * @bat_priv: the bat priv with all the mesh interface information 311 * @bat_priv: the bat priv with all the mesh interface information 478 * @bat_priv: the bat priv with all the mesh interface information 570 * @bat_priv: the bat priv with all the mesh interface information 637 * @bat_priv: the bat priv with all the mesh interface information 908 * @bat_priv: the bat priv with all the mesh interface information 1031 * @bat_priv: the bat priv with all the mesh interface information [all …]
|
| H A D | bat_v_ogm.c | 46 * @bat_priv: the bat priv with all the mesh interface information 97 * @bat_priv: the bat priv with all the mesh interface information 258 * @bat_priv: the bat priv with all the mesh interface information 451 * @bat_priv: the bat priv with all the mesh interface information 504 * @bat_priv: the bat priv with all the mesh interface information 591 * @bat_priv: the bat priv with all the mesh interface information 674 * @bat_priv: the bat priv with all the mesh interface information 769 * @bat_priv: the bat priv with all the mesh interface information 1032 * @bat_priv: the bat priv with all the mesh interface information 1067 * @bat_priv: the bat priv with all the mesh interface information
|
| /linux/drivers/acpi/ |
| H A D | sbs.c | 32 #define ACPI_BATTERY_DIR_NAME "BAT%i" 56 struct power_supply *bat; member 552 battery->bat = power_supply_register(&sbs->device->dev, in acpi_battery_add() 554 if (IS_ERR(battery->bat)) { in acpi_battery_add() 555 result = PTR_ERR(battery->bat); in acpi_battery_add() 556 battery->bat = NULL; in acpi_battery_add() 571 if (battery->bat) in acpi_battery_remove() 572 power_supply_unregister(battery->bat); in acpi_battery_remove() 608 struct acpi_battery *bat; in acpi_sbs_callback() local 622 bat = &sbs->battery[id]; in acpi_sbs_callback() [all …]
|
| H A D | battery.c | 96 struct power_supply *bat; member 714 if (!hook->remove_battery(battery->bat, hook)) in battery_hook_unregister_unlocked() 715 power_supply_changed(battery->bat); in battery_hook_unregister_unlocked() 750 if (hook->add_battery(battery->bat, hook)) { in battery_hook_register() 762 power_supply_changed(battery->bat); in battery_hook_register() 805 if (hook_node->add_battery(battery->bat, hook_node)) { in battery_hook_add_battery() 828 hook->remove_battery(battery->bat, hook); in battery_hook_remove_battery() 891 battery->bat = power_supply_register(&battery->device->dev, in sysfs_add_battery() 894 if (IS_ERR(battery->bat)) { in sysfs_add_battery() 895 int result = PTR_ERR(battery->bat); in sysfs_add_battery() [all …]
|
| /linux/arch/powerpc/include/asm/ |
| H A D | reg.h | 506 #define SPRN_DBAT0L 0x219 /* Data BAT 0 Lower Register */ 507 #define SPRN_DBAT0U 0x218 /* Data BAT 0 Upper Register */ 508 #define SPRN_DBAT1L 0x21B /* Data BAT 1 Lower Register */ 509 #define SPRN_DBAT1U 0x21A /* Data BAT 1 Upper Register */ 510 #define SPRN_DBAT2L 0x21D /* Data BAT 2 Lower Register */ 511 #define SPRN_DBAT2U 0x21C /* Data BAT 2 Upper Register */ 512 #define SPRN_DBAT3L 0x21F /* Data BAT 3 Lower Register */ 513 #define SPRN_DBAT3U 0x21E /* Data BAT 3 Upper Register */ 514 #define SPRN_DBAT4L 0x239 /* Data BAT 4 Lower Register */ 515 #define SPRN_DBAT4U 0x238 /* Data BAT 4 Upper Register */ [all …]
|
| /linux/drivers/pinctrl/mvebu/ |
| H A 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 …]
|
| /linux/Documentation/devicetree/bindings/power/supply/ |
| H A D | qcom,pm8941-charger.yaml | 37 - const: bat-temp-ok 38 - const: bat-present 167 "bat-temp-ok", 168 "bat-present",
|
| H A D | sc27xx-fg.yaml | 30 bat-detect-gpio: 45 - const: bat-temp
|
| H A D | qcom,pmi8998-charger.yaml | 27 - const: bat-ov 73 interrupt-names = "usb-plugin", "bat-ov", "wdog-bark", "usbin-icl-change";
|