Home
last modified time | relevance | path

Searched refs:battery (Results 1 – 25 of 256) sorted by relevance

1234567891011

/Linux-v5.4/drivers/acpi/
Dbattery.c148 static inline int acpi_battery_present(struct acpi_battery *battery) in acpi_battery_present() argument
150 return battery->device->status.battery_present; in acpi_battery_present()
153 static int acpi_battery_technology(struct acpi_battery *battery) in acpi_battery_technology() argument
155 if (!strcasecmp("NiCd", battery->type)) in acpi_battery_technology()
157 if (!strcasecmp("NiMH", battery->type)) in acpi_battery_technology()
159 if (!strcasecmp("LION", battery->type)) in acpi_battery_technology()
161 if (!strncasecmp("LI-ION", battery->type, 6)) in acpi_battery_technology()
163 if (!strcasecmp("LiP", battery->type)) in acpi_battery_technology()
168 static int acpi_battery_get_state(struct acpi_battery *battery);
170 static int acpi_battery_is_charged(struct acpi_battery *battery) in acpi_battery_is_charged() argument
[all …]
Dsbs.c93 struct acpi_battery battery[MAX_SBS_BAT]; member
103 static int acpi_battery_get_state(struct acpi_battery *battery);
113 static inline int acpi_battery_vscale(struct acpi_battery *battery) in acpi_battery_vscale() argument
115 return battery_scale((battery->spec & 0x0f00) >> 8); in acpi_battery_vscale()
118 static inline int acpi_battery_ipscale(struct acpi_battery *battery) in acpi_battery_ipscale() argument
120 return battery_scale((battery->spec & 0xf000) >> 12); in acpi_battery_ipscale()
123 static inline int acpi_battery_mode(struct acpi_battery *battery) in acpi_battery_mode() argument
125 return (battery->mode & 0x8000); in acpi_battery_mode()
128 static inline int acpi_battery_scale(struct acpi_battery *battery) in acpi_battery_scale() argument
130 return (acpi_battery_mode(battery) ? 10 : 1) * in acpi_battery_scale()
[all …]
/Linux-v5.4/drivers/power/supply/
Drt5033_battery.c17 struct rt5033_battery *battery = i2c_get_clientdata(client); in rt5033_battery_get_capacity() local
20 regmap_read(battery->regmap, RT5033_FUEL_REG_SOC_H, &msb); in rt5033_battery_get_capacity()
27 struct rt5033_battery *battery = i2c_get_clientdata(client); in rt5033_battery_get_present() local
30 regmap_read(battery->regmap, RT5033_FUEL_REG_CONFIG_L, &val); in rt5033_battery_get_present()
38 struct rt5033_battery *battery = i2c_get_clientdata(client); in rt5033_battery_get_watt_prop() local
60 regmap_read(battery->regmap, regh, &msb); in rt5033_battery_get_watt_prop()
61 regmap_read(battery->regmap, regl, &lsb); in rt5033_battery_get_watt_prop()
72 struct rt5033_battery *battery = power_supply_get_drvdata(psy); in rt5033_battery_get_property() local
78 val->intval = rt5033_battery_get_watt_prop(battery->client, in rt5033_battery_get_property()
82 val->intval = rt5033_battery_get_present(battery->client); in rt5033_battery_get_property()
[all …]
DKconfig45 battery class devices.
48 tristate "Generic battery support using IIO"
51 Say Y here to enable support for the generic battery driver
55 tristate "MAX8925 battery charger support"
58 Say Y here to enable support for the battery charger in the Maxim
62 tristate "WM831X backup battery charger support"
65 Say Y here to enable support for the backup battery charger
88 tristate "Marvell 88PM860x battery driver"
91 Say Y here to enable battery monitor for Marvell 88PM860x chip.
94 tristate "ADP5061 battery charger driver"
[all …]
/Linux-v5.4/Documentation/devicetree/bindings/power/supply/
Dingenic,battery.txt1 * Ingenic JZ47xx battery bindings
5 - compatible: Must be "ingenic,jz4740-battery".
8 - monitored-battery: phandle to a "simple-battery" compatible node.
10 The "monitored-battery" property must be a phandle to a node using the format
11 described in battery.txt, with the following properties being required:
13 - voltage-min-design-microvolt: Drained battery voltage.
14 - voltage-max-design-microvolt: Fully charged battery voltage.
20 simple_battery: battery {
21 compatible = "simple-battery";
27 compatible = "ingenic,jz4740-battery";
[all …]
Dbattery.txt3 The devicetree battery node provides static battery characteristics.
5 on a fuel gauge chip. The battery node should be used where there is
8 Upstream dts files should not include battery nodes, unless the battery
11 behavior should a replacement that changes the battery type occur
15 - compatible: Must be "simple-battery"
18 - voltage-min-design-microvolt: drained battery voltage
19 - voltage-max-design-microvolt: fully charged battery voltage
20 - energy-full-design-microwatt-hours: battery design energy
21 - charge-full-design-microamp-hours: battery design capacity
26 - factory-internal-resistance-micro-ohms: battery factory internal resistance
[all …]
Dcharger-manager.txt9 - cm-fuel-gauge : name of battery fuel gauge
19 - cm-name : charger manager's name (default : "battery")
22 - cm-battery-stat : battery status (enum data_source)
23 - cm-fullbatt-* : data for full battery checking
25 - cm-battery-* : threshold battery temperature for charging
26 -cold : critical cold temperature of battery for charging
28 -hot : critical hot temperature of battery for charging
37 cm-name = "battery";
46 cm-battery-stat = <3>;
55 cm-battery-cold = <50>;
[all …]
Daxp20x_battery.txt1 AXP20x and AXP22x battery power supply
5 "x-powers,axp209-battery-power-supply"
6 "x-powers,axp221-battery-power-supply"
7 "x-powers,axp813-battery-power-supply"
11 The supported devices can read the battery voltage, charge and discharge
12 currents of the battery by reading ADC channels from the ADC.
17 battery_power_supply: battery-power-supply {
18 compatible = "x-powers,axp209-battery-power-supply";
Drx51-battery.txt1 Binding for Nokia N900 battery
3 The Nokia N900 battery status can be read via the TWL4030's A/D converter.
7 * "nokia,n900-battery"
12 * "bsi" - The ADC channel for battery size identification
13 * "vbat" - The ADC channel to measure the battery voltage
17 battery: n900-battery {
18 compatible = "nokia,n900-battery";
Dbq24190.txt13 - monitored-battery: phandle of battery characteristics devicetree node
14 The charger uses the following battery properties:
16 phase (typically 20% of battery capacity).
18 battery voltage is above recharge threshold, and the current is below
19 this setting (typically 10% of battery capacity).
20 See also Documentation/devicetree/bindings/power/supply/battery.txt
21 - ti,system-minimum-microvolt: when power is connected and the battery is below
37 bat: battery {
38 compatible = "simple-battery";
48 monitored-battery = <&bat>;
Dsc2731_charger.txt1 Spreadtrum SC2731 PMIC battery charger binding
9 - monitored-battery: phandle of battery characteristics devicetree node.
10 The charger uses the following battery properties:
13 See Documentation/devicetree/bindings/power/supply/battery.txt
17 bat: battery {
18 compatible = "simple-battery";
38 monitored-battery = <&bat>;
Dsc27xx-fg.txt11 - battery-detect-gpios: GPIO for battery detection.
16 - monitored-battery: Phandle of battery characteristics devicetree node.
17 See Documentation/devicetree/bindings/power/supply/battery.txt
21 bat: battery {
22 compatible = "simple-battery";
49 battery-detect-gpios = <&pmic_eic 9 GPIO_ACTIVE_HIGH>;
54 monitored-battery = <&bat>;
Dsbs,sbs-manager.txt16 four smart battery devices at address 0xb. The driver actually implements this
36 battery@b {
37 compatible = "ti,bq2060", "sbs,sbs-battery";
39 sbs,battery-detect-gpios = <&batman 1 1>;
48 battery@b {
49 compatible = "ti,bq2060", "sbs,sbs-battery";
51 sbs,battery-detect-gpios = <&batman 2 1>;
60 battery@b {
61 compatible = "ti,bq2060", "sbs,sbs-battery";
63 sbs,battery-detect-gpios = <&batman 3 1>;
Dlego_ev3_battery.txt4 LEGO MINDSTORMS EV3 has some built-in capability for monitoring the battery.
5 It uses 6 AA batteries or a special Li-ion rechargeable battery pack that is
6 detected by a key switch in the battery compartment.
9 - compatible: Must be "lego,ev3-battery"
12 - rechargeable-gpios: phandle to the rechargeable battery indication gpio
16 battery {
17 compatible = "lego,ev3-battery";
Dsbs_sbs-battery.txt1 SBS sbs-battery
5 - compatible: "<vendor>,<part-number>", "sbs,sbs-battery" as fallback. The
16 - sbs,battery-detect-gpios : The gpio which signals battery detection and
21 battery@b {
22 compatible = "ti,bq20z75", "sbs,sbs-battery";
26 sbs,battery-detect-gpios = <&gpio-controller 122 1>;
Dbq27xxx.txt35 - monitored-battery: phandle of battery characteristics node
36 The fuel gauge uses the following battery properties:
41 See Documentation/devicetree/bindings/power/supply/battery.txt
45 bat: battery {
46 compatible = "simple-battery";
55 monitored-battery = <&bat>;
Dmax17042_battery.txt14 - maxim,cold-temp : Temperature threshold to report battery
16 - maxim,over-heat-temp : Temperature threshold to report battery
18 - maxim,dead-volt : Voltage threshold to report battery
20 - maxim,over-volt : Voltage threshold to report battery
25 battery-charger@36 {
/Linux-v5.4/Documentation/devicetree/bindings/power/supply/ab8500/
Dfg.txt10 main-charger, usb-combo-charger and battery-temperature-monitoring.
16 - battery = Shall be battery specific information
20 battery = <&ab8500_battery>;
27 'battery technology type' used.
31 A boolean value indicating thermistor interface to battery
34 'btemp' and 'batctrl' are the pins interfaced for battery temperature
36 coefficient) resister is interfaced external to battery whereas
37 'batctrl' pin is used when NTC resister is internal to battery.
43 indicates: NTC resister is internal to battery, 'batctrl' is used
47 NTC resister is external to battery and 'btemp' signal is used
[all …]
Dbtemp.txt7 - battery = Shall be battery specific information
12 battery = <&ab8500_battery>;
15 For information on battery specific node, Ref:
/Linux-v5.4/Documentation/devicetree/bindings/rtc/
Drtc-palmas.txt10 - ti,backup-battery-chargeable: The Palmas series device like TPS65913 or
11 TPS80036 supports the backup battery for powering the RTC when main
12 battery is removed or in very low power state. The backup battery
14 battery is chargeable or not. If charging battery then driver can
16 - ti,backup-battery-charge-high-current: Enable high current charging in
17 backup battery. Device supports the < 100uA and > 100uA charging.
19 charge battery to lower current i.e. < 100uA.
28 ti,backup-battery-chargeable;
29 ti,backup-battery-charge-high-current;
/Linux-v5.4/Documentation/hwmon/
Dda9052.rst27 Channel 1 ICH - internal battery charger current measurement
28 Channel 2 TBAT - output from the battery NTC
29 Channel 3 VBAT - measurement of the battery voltage
36 Channel 9 VBBAT - measurement of the backup battery voltage
39 By using sysfs attributes we can measure the system voltage VDDOUT, the battery
40 charging current ICH, battery temperature TBAT, battery junction temperature
41 TJUNC, battery voltage VBAT and the back up battery voltage VBBAT.
48 The battery voltage is calculated as:
52 The backup battery voltage is calculated as:
63 Temperatures are sampled by a 10 bit ADC. Junction and battery temperatures
[all …]
/Linux-v5.4/Documentation/power/
Dcharger-manager.rst7 Charger Manager provides in-kernel battery charger management that
9 and where each battery may have multiple chargers attached and the userland
14 represents an independent battery with chargers. If there are multiple
27 different information about the battery status. This framework
32 While the battery is being charged and the system is in suspend-to-RAM,
33 we may need to monitor the battery health by looking at the ambient or
34 battery temperature. We can accomplish this by waking up the system
36 monitoring the battery health and tasks, and user processes that are
41 only affects the charging time, but the lifespan of the battery.
50 * Support for premature full-battery event handling
[all …]
Dpower_supply_class.rst7 Power supply class used to represent battery, UPS, AC or DC power supply
25 typically expected feedback of battery charging/fully charged status and
64 | of battery, this class distinguish these terms. Don't mix them!** |
85 `BATTERY_STATUS_*` values, as defined in battery.h.
94 indicates the power supply (battery or charger) connected
98 represents health of the battery, values corresponds to
99 POWER_SUPPLY_HEALTH_*, defined in battery.h.
102 open circuit voltage of the battery.
106 Maximal/minimal means values of voltages when battery considered
108 between voltage and battery capacity, but some dumb
[all …]
/Linux-v5.4/drivers/block/
Dumem.c130 } battery[2]; member
654 if (card->battery[0].good && card->battery[1].good) in set_fault_to_battery_status()
656 else if (card->battery[0].warned || card->battery[1].warned) in set_fault_to_battery_status()
658 else if (!card->battery[0].good && !card->battery[1].good) in set_fault_to_battery_status()
666 static int check_battery(struct cardinfo *card, int battery, int status) in check_battery() argument
668 if (status != card->battery[battery].good) { in check_battery()
669 card->battery[battery].good = !card->battery[battery].good; in check_battery()
670 card->battery[battery].last_change = jiffies; in check_battery()
672 if (card->battery[battery].good) { in check_battery()
674 "Battery %d now good\n", battery + 1); in check_battery()
[all …]
/Linux-v5.4/arch/sh/boards/mach-hp6xx/
Dhp6xx_apm.c32 int battery, backup, charging, percentage; in hp6x0_apm_get_power_status() local
35 battery = adc_single(ADC_CHANNEL_BATTERY); in hp6x0_apm_get_power_status()
39 percentage = 100 * (battery - HP680_BATTERY_MIN) / in hp6x0_apm_get_power_status()
49 info->time = (2 * battery); in hp6x0_apm_get_power_status()
51 info->ac_line_status = (battery > HP680_BATTERY_AC_ON) ? in hp6x0_apm_get_power_status()

1234567891011