| /kernel/linux/linux-5.10/drivers/acpi/ |
| D | sbs.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * sbs.c - ACPI Smart Battery System Driver ($Revision: 2.0 $) 6 * Copyright (c) 2005-2007 Vladimir Lebedev <vladimir.p.lebedev@intel.com> 31 #define ACPI_BATTERY_DIR_NAME "BAT%i" 55 struct power_supply *bat; member 79 u8 present:1; member 105 while (log--) in battery_scale() 112 return battery_scale((battery->spec & 0x0f00) >> 8); in acpi_battery_vscale() 117 return battery_scale((battery->spec & 0xf000) >> 12); in acpi_battery_ipscale() 122 return (battery->mode & 0x8000); in acpi_battery_mode() [all …]
|
| D | battery.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * battery.c - ACPI Battery Driver (Revision: 2.0) 6 * Copyright (C) 2004-2007 Vladimir Lebedev <vladimir.p.lebedev@intel.com> 80 "INT33F4", /* X-Powers AXP288 PMIC */ 92 Pre-2010 and 2012 models appear to always report in mWh and 94 and x230). Also, in mid-2012 Lenovo issued a BIOS update for 96 post-1.29 BIOS), but as of Nov. 2012, no such update is 108 struct power_supply *bat; member 146 return battery->device->status.battery_present; in acpi_battery_present() 151 if (!strcasecmp("NiCd", battery->type)) in acpi_battery_technology() [all …]
|
| /kernel/linux/linux-6.6/drivers/acpi/ |
| D | sbs.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * sbs.c - ACPI Smart Battery System Driver ($Revision: 2.0 $) 6 * Copyright (c) 2005-2007 Vladimir Lebedev <vladimir.p.lebedev@intel.com> 31 #define ACPI_BATTERY_DIR_NAME "BAT%i" 55 struct power_supply *bat; member 79 u8 present:1; member 104 while (log--) in battery_scale() 111 return battery_scale((battery->spec & 0x0f00) >> 8); in acpi_battery_vscale() 116 return battery_scale((battery->spec & 0xf000) >> 12); in acpi_battery_ipscale() 121 return (battery->mode & 0x8000); in acpi_battery_mode() [all …]
|
| D | battery.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * battery.c - ACPI Battery Driver (Revision: 2.0) 6 * Copyright (C) 2004-2007 Vladimir Lebedev <vladimir.p.lebedev@intel.com> 81 * Pre-2010 and 2012 models appear to always report in mWh and 83 * and x230). Also, in mid-2012 Lenovo issued a BIOS update for 85 * post-1.29 BIOS), but as of Nov. 2012, no such update is 98 struct power_supply *bat; member 136 return battery->device->status.battery_present; in acpi_battery_present() 141 if (!strcasecmp("NiCd", battery->type)) in acpi_battery_technology() 143 if (!strcasecmp("NiMH", battery->type)) in acpi_battery_technology() [all …]
|
| /kernel/linux/linux-6.6/drivers/power/supply/ |
| D | surface_battery.c | 1 // SPDX-License-Identifier: GPL-2.0+ 3 * Battery driver for 7th-generation Microsoft Surface devices via Surface 6 * Copyright (C) 2019-2021 Maximilian Luz <luzmaximilian@gmail.com> 22 /* -- SAM interface. -------------------------------------------------------- */ 112 /* -- Device structures. ---------------------------------------------------- */ 140 /* -- Module parameters. ---------------------------------------------------- */ 147 /* -- State management. ----------------------------------------------------- */ 155 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() [all …]
|
| D | twl4030_madc_battery.c | 1 // SPDX-License-Identifier: GPL-2.0-only 57 return (madc_read(bt->channel_ichg) > 0) ? 1 : 0; in twl4030_madc_bat_get_charging_status() 62 return madc_read(bt->channel_vbat); in twl4030_madc_bat_get_voltage() 67 return madc_read(bt->channel_ichg) * 1000; in twl4030_madc_bat_get_current() 72 return madc_read(bt->channel_temp) * 10; in twl4030_madc_bat_get_temp() 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() 93 /* interval found - interpolate within range */ in twl4030_madc_bat_voltscale() [all …]
|
| D | collie_battery.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Battery and Power Management code for the Sharp SL-5x00 21 #include <asm/mach-types.h> 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() [all …]
|
| D | ds2760_battery.c | 5 * 2004-2007 Matt Reimer 111 struct power_supply *bat; member 127 mutex_lock(&sl->master->bus_mutex); in w1_ds2760_io() 134 count = DS2760_DATA_SIZE - addr; in w1_ds2760_io() 138 w1_write_8(sl->master, W1_DS2760_READ_DATA); in w1_ds2760_io() 139 w1_write_8(sl->master, addr); in w1_ds2760_io() 140 count = w1_read_block(sl->master, buf, count); in w1_ds2760_io() 142 w1_write_8(sl->master, W1_DS2760_WRITE_DATA); in w1_ds2760_io() 143 w1_write_8(sl->master, addr); in w1_ds2760_io() 144 w1_write_block(sl->master, buf, count); in w1_ds2760_io() [all …]
|
| D | max1721x_battery.c | 2 * 1-Wire implementation for Maxim Semiconductor 32 #define MAX1721X_REG_NRSENSE 0x1CF /* RSense in 10^-5 Ohm */ 60 struct power_supply *bat; member 108 * RSense stored in 10^-5 Ohm, so measurement voltage must be 109 * in 10^-11 Volts for get current in uA. 110 * 16 bit current reg fullscale +/-51.2mV is 102400 uV. 140 * present or unaccessible via W1. in max1721x_battery_get_property() 142 val->intval = in max1721x_battery_get_property() 143 regmap_read(info->regmap, MAX172XX_REG_STATUS, in max1721x_battery_get_property() 147 ret = regmap_read(info->regmap, MAX172XX_REG_REPSOC, ®); in max1721x_battery_get_property() [all …]
|
| /kernel/linux/linux-5.10/net/batman-adv/ |
| D | multicast.c | 1 // SPDX-License-Identifier: GPL-2.0 2 /* Copyright (C) 2014-2020 B.A.T.M.A.N. contributors: 55 #include "hard-interface.h" 60 #include "soft-interface.h" 61 #include "translation-table.h" 67 * batadv_mcast_start_timer() - schedule the multicast periodic worker 68 * @bat_priv: the bat priv with all the soft interface information 72 queue_delayed_work(batadv_event_workqueue, &bat_priv->mcast.work, in batadv_mcast_start_timer() 77 * batadv_mcast_get_bridge() - get the bridge on top of the softif if it exists 93 } while (upper && !(upper->priv_flags & IFF_EBRIDGE)); in batadv_mcast_get_bridge() [all …]
|
| /kernel/linux/linux-6.6/net/batman-adv/ |
| D | multicast.c | 1 // SPDX-License-Identifier: GPL-2.0 54 #include "hard-interface.h" 59 #include "soft-interface.h" 60 #include "translation-table.h" 66 * batadv_mcast_start_timer() - schedule the multicast periodic worker 67 * @bat_priv: the bat priv with all the soft interface information 71 queue_delayed_work(batadv_event_workqueue, &bat_priv->mcast.work, in batadv_mcast_start_timer() 76 * batadv_mcast_get_bridge() - get the bridge on top of the softif if it exists 101 * batadv_mcast_mla_rtr_flags_softif_get_ipv4() - get mcast router flags from 109 * Return: BATADV_NO_FLAGS if present, BATADV_MCAST_WANT_NO_RTR4 otherwise. [all …]
|
| D | distributed-arp-table.c | 1 // SPDX-License-Identifier: GPL-2.0 7 #include "distributed-arp-table.h" 43 #include "hard-interface.h" 49 #include "soft-interface.h" 50 #include "translation-table.h" 93 #define BATADV_DHCP_YIADDR_LEN sizeof(((struct batadv_dhcp_packet *)0)->yiaddr) 94 #define BATADV_DHCP_CHADDR_LEN sizeof(((struct batadv_dhcp_packet *)0)->chaddr) 99 * batadv_dat_start_timer() - initialise the DAT periodic worker 100 * @bat_priv: the bat priv with all the soft interface information 104 queue_delayed_work(batadv_event_workqueue, &bat_priv->dat.work, in batadv_dat_start_timer() [all …]
|
| D | translation-table.c | 1 // SPDX-License-Identifier: GPL-2.0 7 #include "translation-table.h" 46 #include "hard-interface.h" 51 #include "soft-interface.h" 78 * batadv_compare_tt() - check if two TT entries are the same 93 return (tt1->vid == tt2->vid) && batadv_compare_eth(data1, data2); in batadv_compare_tt() 97 * batadv_choose_tt() - return the index of the tt entry in the hash table 110 hash = jhash(&tt->addr, ETH_ALEN, hash); in batadv_choose_tt() 111 hash = jhash(&tt->vid, sizeof(tt->vid), hash); in batadv_choose_tt() 117 * batadv_tt_hash_find() - look for a client in the given hash table [all …]
|
| /kernel/linux/linux-5.10/Documentation/devicetree/bindings/power/supply/ |
| D | qcom_smbb.txt | 1 Qualcomm Switch-Mode Battery Charger and Boost 4 - compatible: 8 - "qcom,pm8941-charger" 10 - reg: 12 Value type: <prop-encoded-array> 15 - interrupts: 17 Value type: <prop-encoded-array> 21 - charge done 22 - charge fast mode 23 - charge trickle mode [all …]
|
| /kernel/linux/linux-5.10/drivers/power/supply/ |
| D | twl4030_madc_battery.c | 1 // SPDX-License-Identifier: GPL-2.0-only 57 return (madc_read(bt->channel_ichg) > 0) ? 1 : 0; in twl4030_madc_bat_get_charging_status() 62 return madc_read(bt->channel_vbat); in twl4030_madc_bat_get_voltage() 67 return madc_read(bt->channel_ichg) * 1000; in twl4030_madc_bat_get_current() 72 return madc_read(bt->channel_temp) * 10; in twl4030_madc_bat_get_temp() 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() 93 /* interval found - interpolate within range */ in twl4030_madc_bat_voltscale() [all …]
|
| D | collie_battery.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Battery and Power Management code for the Sharp SL-5x00 19 #include <asm/mach-types.h> 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() [all …]
|
| D | tosa_battery.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Battery and Power Management code for the Sharp SL-6000x 17 #include <asm/mach-types.h> 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() [all …]
|
| D | ds2760_battery.c | 5 * 2004-2007 Matt Reimer 111 struct power_supply *bat; member 127 mutex_lock(&sl->master->bus_mutex); in w1_ds2760_io() 134 count = DS2760_DATA_SIZE - addr; in w1_ds2760_io() 138 w1_write_8(sl->master, W1_DS2760_READ_DATA); in w1_ds2760_io() 139 w1_write_8(sl->master, addr); in w1_ds2760_io() 140 count = w1_read_block(sl->master, buf, count); in w1_ds2760_io() 142 w1_write_8(sl->master, W1_DS2760_WRITE_DATA); in w1_ds2760_io() 143 w1_write_8(sl->master, addr); in w1_ds2760_io() 144 w1_write_block(sl->master, buf, count); in w1_ds2760_io() [all …]
|
| D | max1721x_battery.c | 2 * 1-Wire implementation for Maxim Semiconductor 32 #define MAX1721X_REG_NRSENSE 0x1CF /* RSense in 10^-5 Ohm */ 60 struct power_supply *bat; member 108 * RSense stored in 10^-5 Ohm, so mesaurment voltage must be 109 * in 10^-11 Volts for get current in uA. 110 * 16 bit current reg fullscale +/-51.2mV is 102400 uV. 140 * present or unaccesable via W1. in max1721x_battery_get_property() 142 val->intval = in max1721x_battery_get_property() 143 regmap_read(info->regmap, MAX172XX_REG_STATUS, in max1721x_battery_get_property() 147 ret = regmap_read(info->regmap, MAX172XX_REG_REPSOC, ®); in max1721x_battery_get_property() [all …]
|
| /kernel/linux/linux-6.6/Documentation/devicetree/bindings/power/supply/ |
| D | qcom,pm8941-charger.yaml | 1 # SPDX-License-Identifier: GPL-2.0 3 --- 4 $id: http://devicetree.org/schemas/power/supply/qcom,pm8941-charger.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 7 title: Qualcomm Switch-Mode Battery Charger and Boost 10 - Sebastian Reichel <sre@kernel.org> 15 - qcom,pm8226-charger 16 - qcom,pm8941-charger 23 - description: charge done 24 - description: charge fast mode [all …]
|
| /kernel/linux/linux-5.10/arch/powerpc/kvm/ |
| D | book3s_emulate.c | 1 // SPDX-License-Identifier: GPL-2.0-only 17 #include <asm/asm-prototypes.h> 64 /* Book3S_32 defines mfsrin(v) - but that messes up our abstract 77 if (vcpu->arch.papr_enabled && (level > PRIV_SUPER)) in spr_allowed() 90 memcpy(&vcpu->arch.gpr_tm[0], &vcpu->arch.regs.gpr[0], in kvmppc_copyto_vcpu_tm() 91 sizeof(vcpu->arch.gpr_tm)); in kvmppc_copyto_vcpu_tm() 92 memcpy(&vcpu->arch.fp_tm, &vcpu->arch.fp, in kvmppc_copyto_vcpu_tm() 94 memcpy(&vcpu->arch.vr_tm, &vcpu->arch.vr, in kvmppc_copyto_vcpu_tm() 96 vcpu->arch.ppr_tm = vcpu->arch.ppr; in kvmppc_copyto_vcpu_tm() 97 vcpu->arch.dscr_tm = vcpu->arch.dscr; in kvmppc_copyto_vcpu_tm() [all …]
|
| /kernel/linux/linux-6.6/arch/powerpc/kvm/ |
| D | book3s_emulate.c | 1 // SPDX-License-Identifier: GPL-2.0-only 17 #include <asm/asm-prototypes.h> 73 if (vcpu->arch.papr_enabled && (level > PRIV_SUPER)) in spr_allowed() 86 memcpy(&vcpu->arch.gpr_tm[0], &vcpu->arch.regs.gpr[0], in kvmppc_copyto_vcpu_tm() 87 sizeof(vcpu->arch.gpr_tm)); in kvmppc_copyto_vcpu_tm() 88 memcpy(&vcpu->arch.fp_tm, &vcpu->arch.fp, in kvmppc_copyto_vcpu_tm() 90 memcpy(&vcpu->arch.vr_tm, &vcpu->arch.vr, in kvmppc_copyto_vcpu_tm() 92 vcpu->arch.ppr_tm = vcpu->arch.ppr; in kvmppc_copyto_vcpu_tm() 93 vcpu->arch.dscr_tm = vcpu->arch.dscr; in kvmppc_copyto_vcpu_tm() 94 vcpu->arch.amr_tm = vcpu->arch.amr; in kvmppc_copyto_vcpu_tm() [all …]
|
| /kernel/linux/linux-6.6/arch/arm/boot/dts/qcom/ |
| D | pm8226.dtsi | 1 // SPDX-License-Identifier: BSD-3-Clause 2 #include <dt-bindings/iio/qcom,spmi-vadc.h> 3 #include <dt-bindings/input/linux-event-codes.h> 4 #include <dt-bindings/interrupt-controller/irq.h> 5 #include <dt-bindings/spmi/spmi.h> 8 thermal-zones { 9 pm8226-thermal { 10 polling-delay-passive = <100>; 11 polling-delay = <0>; 12 thermal-sensors = <&pm8226_temp>; [all …]
|
| D | pm8941.dtsi | 1 // SPDX-License-Identifier: GPL-2.0 2 #include <dt-bindings/iio/qcom,spmi-vadc.h> 3 #include <dt-bindings/interrupt-controller/irq.h> 4 #include <dt-bindings/spmi/spmi.h> 8 thermal-zones { 9 pm8941-thermal { 10 polling-delay-passive = <100>; 11 polling-delay = <0>; 12 thermal-sensors = <&pm8941_temp>; 40 compatible = "qcom,pm8941", "qcom,spmi-pmic"; [all …]
|
| /kernel/linux/linux-5.10/arch/arm/boot/dts/ |
| D | qcom-pm8941.dtsi | 1 // SPDX-License-Identifier: GPL-2.0 2 #include <dt-bindings/iio/qcom,spmi-vadc.h> 3 #include <dt-bindings/interrupt-controller/irq.h> 4 #include <dt-bindings/spmi/spmi.h> 9 compatible = "qcom,pm8941", "qcom,spmi-pmic"; 11 #address-cells = <1>; 12 #size-cells = <0>; 15 compatible = "qcom,pm8941-rtc"; 18 reg-names = "rtc", "alarm"; 23 compatible = "qcom,pm8941-pwrkey"; [all …]
|