Home
last modified time | relevance | path

Searched full:bat (Results 1 – 25 of 93) sorted by relevance

1234

/linux/drivers/power/supply/
H A Dsurface_battery.c155 static bool spwr_battery_present(struct spwr_battery_device *bat) in spwr_battery_present() argument
157 lockdep_assert_held(&bat->lock); in spwr_battery_present()
159 return le32_to_cpu(bat->sta) & SAM_BATTERY_STA_PRESENT; in spwr_battery_present()
162 static int spwr_battery_load_sta(struct spwr_battery_device *bat) in spwr_battery_load_sta() argument
164 lockdep_assert_held(&bat->lock); in spwr_battery_load_sta()
166 return ssam_retry(ssam_bat_get_sta, bat->sdev, &bat->sta); in spwr_battery_load_sta()
169 static int spwr_battery_load_bix(struct spwr_battery_device *bat) in spwr_battery_load_bix() argument
173 lockdep_assert_held(&bat->lock); in spwr_battery_load_bix()
175 if (!spwr_battery_present(bat)) in spwr_battery_load_bix()
178 status = ssam_retry(ssam_bat_get_bix, bat->sdev, &bat->bix); in spwr_battery_load_bix()
[all …]
H A Dpm8916_bms_vm.c61 struct pm8916_bms_vm_battery *bat = power_supply_get_drvdata(psy); in pm8916_bms_vm_battery_get_property() local
62 struct power_supply_battery_info *info = bat->info; in pm8916_bms_vm_battery_get_property()
78 if (bat->vbat_now < info->voltage_min_design_uv) in pm8916_bms_vm_battery_get_property()
80 else if (bat->vbat_now > info->voltage_max_design_uv) in pm8916_bms_vm_battery_get_property()
87 val->intval = bat->vbat_now; in pm8916_bms_vm_battery_get_property()
95 if (ktime_get_seconds() - bat->last_ocv_time > 180) in pm8916_bms_vm_battery_get_property()
98 val->intval = bat->last_ocv; in pm8916_bms_vm_battery_get_property()
115 struct pm8916_bms_vm_battery *bat = data; in pm8916_bms_vm_fifo_update_done_irq() local
119 ret = regmap_bulk_read(bat->regmap, bat->reg + PM8916_BMS_VM_BMS_FIFO_REG_0_LSB, in pm8916_bms_vm_fifo_update_done_irq()
132 bat->vbat_now = vbat_data[PM8916_BMS_VM_FIFO_COUNT - 1] * 300; in pm8916_bms_vm_fifo_update_done_irq()
[all …]
H A Dda9052-battery.c185 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 Dcollie_battery.c35 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 Dbd71828-power.c139 struct power_supply *bat; member
693 power_supply_changed(pwr->bat); \
705 power_supply_changed(pwr->bat); \
750 BD_ISR_BAT(bat_dead, "bd71815-bat-dead", false)
751 BD_ISR_BAT(bat_short_res, "bd71815-bat-short-res", true)
752 BD_ISR_BAT(bat_short, "bd71815-bat-short-det", false)
753 BD_ISR_BAT(bat_low_res, "bd71815-bat-low-res", true)
754 BD_ISR_BAT(bat_low, "bd71815-bat-low-det", true)
755 BD_ISR_BAT(bat_ov_res, "bd71815-bat-over-res", true)
757 BD_ISR_BAT(bat_ov, "bd71815-bat-over-det", false)
[all …]
H A Dpmu_battery.c17 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()
/linux/arch/powerpc/kvm/
H A Dbook3s_32_mmu.c132 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 Dbook3s_emulate.c633 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 Dt7xx_hif_dpmaif_rx.c110 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/drivers/mfd/
H A Drohm-bd71828.c86 DEFINE_RES_IRQ_NAMED(BD71815_INT_BAT_TEMP_NORMAL, "bd71815-bat-temp-normal"),
87 DEFINE_RES_IRQ_NAMED(BD71815_INT_BAT_TEMP_ERANGE, "bd71815-bat-temp-erange"),
88 DEFINE_RES_IRQ_NAMED(BD71815_INT_BAT_REMOVED, "bd71815-bat-rmv"),
89 DEFINE_RES_IRQ_NAMED(BD71815_INT_BAT_DETECTED, "bd71815-bat-det"),
92 DEFINE_RES_IRQ_NAMED(BD71815_INT_BAT_DEAD, "bd71815-bat-dead"),
93 DEFINE_RES_IRQ_NAMED(BD71815_INT_BAT_SHORTC_RES, "bd71815-bat-short-res"),
94 DEFINE_RES_IRQ_NAMED(BD71815_INT_BAT_SHORTC_DET, "bd71815-bat-short-det"),
95 DEFINE_RES_IRQ_NAMED(BD71815_INT_BAT_LOW_VOLT_RES, "bd71815-bat-low-res"),
96 DEFINE_RES_IRQ_NAMED(BD71815_INT_BAT_LOW_VOLT_DET, "bd71815-bat-low-det"),
97 DEFINE_RES_IRQ_NAMED(BD71815_INT_BAT_OVER_VOLT_RES, "bd71815-bat
[all...]
/linux/net/batman-adv/
H A Dmulticast.c66 * @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
676 * @bat_priv: the bat priv with all the mesh interface information
708 * @bat_priv: the bat priv with all the mesh interface information
741 * @bat_priv: the bat priv with all the mesh interface information
793 * @bat_priv: the bat pri
[all...]
H A Dtranslation-table.c189 * @bat_priv: the bat priv with all the mesh interface information
214 * @bat_priv: the bat priv with all the mesh interface information
271 * @bat_priv: the bat priv with all the mesh interface information
313 * @bat_priv: the bat priv with all the mesh interface information
328 * @bat_priv: the bat priv with all the mesh interface information in batadv_tt_local_size_dec()
351 * @bat_priv: the bat priv with all the mesh interface information in batadv_tt_global_size_mod()
360 * @bat_priv: the bat priv with all the mesh interface information in batadv_tt_global_size_mod()
386 * @bat_priv: the bat priv with all the mesh interface information
445 * @bat_priv: the bat priv with all the mesh interface information in batadv_tt_local_event()
471 * @bat_priv: the bat pri in batadv_tt_local_event()
[all...]
H A Dtvlv.c66 * @bat_priv: the bat priv with all the mesh interface information
126 * @bat_priv: the bat priv with all the mesh interface information
161 * @bat_priv: the bat priv with all the mesh interface information
186 * @bat_priv: the bat priv with all the mesh interface information
210 * @bat_priv: the bat priv with all the mesh interface information
228 * @bat_priv: the bat priv with all the mesh interface information
323 * @bat_priv: the bat priv with all the mesh interface information
381 * @bat_priv: the bat priv with all the mesh interface information
528 * @bat_priv: the bat priv with all the mesh interface information
604 * @bat_priv: the bat priv with all the mesh interface information
[all …]
H A Dgateway_common.c23 * @bat_priv: the bat priv with all the mesh interface information
52 * @bat_priv: the bat priv with all the mesh interface information
94 * @bat_priv: the bat priv with all the mesh interface information
110 * @bat_priv: the bat priv with all the mesh interface information
H A Dgateway_client.c75 * @bat_priv: the bat priv with all the mesh interface information
99 * @bat_priv: the bat priv with all the mesh interface information
130 * @bat_priv: the bat priv with all the mesh interface information
156 * @bat_priv: the bat priv with all the mesh interface information
172 * @bat_priv: the bat priv with all the mesh interface information
204 * @bat_priv: the bat priv with all the mesh interface information
292 * @bat_priv: the bat priv with all the mesh interface information
326 * @bat_priv: the bat priv with all the mesh interface information
373 * @bat_priv: the bat priv with all the mesh interface information
404 * @bat_priv: the bat priv with all the mesh interface information
[all …]
H A Dsend.c262 * @bat_priv: the bat priv with all the mesh interface information
304 * @bat_priv: the bat priv with all the mesh interface information
378 * @bat_priv: the bat priv with all the mesh interface information
425 * @bat_priv: the bat priv with all the mesh interface information
556 * @lock: a key to the store to steal from (e.g. forw_{bat,bcast}_list_lock)
647 * @lock: a key to the store (e.g. forw_{bat,bcast}_list_lock)
648 * @head: the shelve to queue it on (e.g. forw_{bat,bcast}_list)
690 * @bat_priv: the bat priv with all the mesh interface information
709 * @bat_priv: the bat priv with all the mesh interface information
727 * @bat_priv: the bat priv with all the mesh interface information
[all …]
H A Ddistributed-arp-table.c166 * @bat_priv: the bat priv with all the mesh interface information
215 * @bat_priv: the bat priv with all the mesh interface information
392 * @bat_priv: the bat priv with all the mesh interface information
439 * @bat_priv: the bat priv with all the mesh interface information
497 * @bat_priv: the bat priv with all the mesh interface information
633 * @bat_priv: the bat priv with all the mesh interface information
698 * @bat_priv: the bat priv with all the mesh interface information
743 * @bat_priv: the bat priv with all the mesh interface information
822 * @bat_priv: the bat priv with all the mesh interface information
855 * @bat_priv: the bat pri
[all...]
H A Dbat_v.c200 * @bat_priv: The bat priv with all the mesh interface information
237 * @bat_priv: The bat priv with all the mesh interface information
286 * @bat_priv: The bat priv with all the mesh interface information
354 * @bat_priv: The bat priv with all the mesh interface information
406 * @bat_priv: The bat priv with all the mesh interface information
446 * @bat_priv: The bat priv with all the mesh interface information
557 * @bat_priv: the bat priv with all the mesh interface information
608 * @bat_priv: the bat priv with all the mesh interface information
647 * @bat_priv: the bat priv with all the mesh interface information
707 * @bat_priv: The bat pri
[all...]
H A Dbridge_loop_avoidance.c213 * @bat_priv: the bat priv with all the mesh interface information
252 * @bat_priv: the bat priv with all the mesh interface information
332 * @bat_priv: the bat priv with all the mesh interface information
478 * @bat_priv: the bat priv with all the mesh interface information
555 * @bat_priv: the bat priv with all the mesh interface information
581 * @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
807 * @bat_priv: the bat priv with all the mesh interface information
846 * @bat_priv: the bat pri
[all...]
H A Dmulticast_forw.c134 * @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
262 * @bat_priv: the bat priv with all the mesh interface information
308 * @bat_priv: the bat priv with all the mesh interface information
477 * @bat_priv: the bat priv with all the mesh interface information
569 * @bat_priv: the bat priv with all the mesh interface information
636 * @bat_priv: the bat priv with all the mesh interface information
907 * @bat_priv: the bat priv with all the mesh interface information
1030 * @bat_priv: the bat priv with all the mesh interface information
[all …]
H A Dlog.h71 * @bat_priv: the bat priv with all the mesh interface information
97 * @bat_priv: the bat priv with all the mesh interface information
106 * @bat_priv: the bat priv with all the mesh interface information
/linux/drivers/acpi/
H A Dsbs.c30 #define ACPI_BATTERY_DIR_NAME "BAT%i"
54 struct power_supply *bat; member
550 battery->bat = power_supply_register(&sbs->device->dev, in acpi_battery_add()
552 if (IS_ERR(battery->bat)) { in acpi_battery_add()
553 result = PTR_ERR(battery->bat); in acpi_battery_add()
554 battery->bat = NULL; in acpi_battery_add()
569 if (battery->bat) in acpi_battery_remove()
570 power_supply_unregister(battery->bat); in acpi_battery_remove()
606 struct acpi_battery *bat; in acpi_sbs_callback() local
620 bat in acpi_sbs_callback()
[all...]
H A Dbattery.c101 struct power_supply *bat; member
833 if (!hook->remove_battery(battery->bat, hook)) in devm_battery_hook_register()
834 power_supply_changed(battery->bat); in devm_battery_hook_register()
869 if (hook->add_battery(battery->bat, hook)) { in battery_hook_add_battery()
881 power_supply_changed(battery->bat); in battery_hook_remove_battery()
924 if (hook_node->add_battery(battery->bat, hook_node)) { in sysfs_add_battery()
947 hook->remove_battery(battery->bat, hook); in sysfs_add_battery()
1046 battery->bat = power_supply_register(&battery->device->dev, in acpi_battery_quirks()
1049 if (IS_ERR(battery->bat)) { in acpi_battery_quirks()
1050 int result = PTR_ERR(battery->bat); in acpi_battery_quirks()
[all...]
/linux/drivers/pinctrl/mvebu/
H A Dpinctrl-dove.c382 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 Dqcom,pm8941-charger.yaml37 - const: bat-temp-ok
38 - const: bat-present
167 "bat-temp-ok",
168 "bat-present",

1234