Home
last modified time | relevance | path

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

123456789

/Linux-v4.19/drivers/acpi/
Dbattery.c161 static inline int acpi_battery_present(struct acpi_battery *battery) in acpi_battery_present() argument
163 return battery->device->status.battery_present; in acpi_battery_present()
166 static int acpi_battery_technology(struct acpi_battery *battery) in acpi_battery_technology() argument
168 if (!strcasecmp("NiCd", battery->type)) in acpi_battery_technology()
170 if (!strcasecmp("NiMH", battery->type)) in acpi_battery_technology()
172 if (!strcasecmp("LION", battery->type)) in acpi_battery_technology()
174 if (!strncasecmp("LI-ION", battery->type, 6)) in acpi_battery_technology()
176 if (!strcasecmp("LiP", battery->type)) in acpi_battery_technology()
181 static int acpi_battery_get_state(struct acpi_battery *battery);
183 static int acpi_battery_is_charged(struct acpi_battery *battery) in acpi_battery_is_charged() argument
[all …]
Dsbs.c106 struct acpi_battery battery[MAX_SBS_BAT]; member
116 static int acpi_battery_get_state(struct acpi_battery *battery);
126 static inline int acpi_battery_vscale(struct acpi_battery *battery) in acpi_battery_vscale() argument
128 return battery_scale((battery->spec & 0x0f00) >> 8); in acpi_battery_vscale()
131 static inline int acpi_battery_ipscale(struct acpi_battery *battery) in acpi_battery_ipscale() argument
133 return battery_scale((battery->spec & 0xf000) >> 12); in acpi_battery_ipscale()
136 static inline int acpi_battery_mode(struct acpi_battery *battery) in acpi_battery_mode() argument
138 return (battery->mode & 0x8000); in acpi_battery_mode()
141 static inline int acpi_battery_scale(struct acpi_battery *battery) in acpi_battery_scale() argument
143 return (acpi_battery_mode(battery) ? 10 : 1) * in acpi_battery_scale()
[all …]
/Linux-v4.19/drivers/power/supply/
Drt5033_battery.c20 struct rt5033_battery *battery = i2c_get_clientdata(client); in rt5033_battery_get_capacity() local
23 regmap_read(battery->regmap, RT5033_FUEL_REG_SOC_H, &msb); in rt5033_battery_get_capacity()
30 struct rt5033_battery *battery = i2c_get_clientdata(client); in rt5033_battery_get_present() local
33 regmap_read(battery->regmap, RT5033_FUEL_REG_CONFIG_L, &val); in rt5033_battery_get_present()
41 struct rt5033_battery *battery = i2c_get_clientdata(client); in rt5033_battery_get_watt_prop() local
63 regmap_read(battery->regmap, regh, &msb); in rt5033_battery_get_watt_prop()
64 regmap_read(battery->regmap, regl, &lsb); in rt5033_battery_get_watt_prop()
75 struct rt5033_battery *battery = power_supply_get_drvdata(psy); in rt5033_battery_get_property() local
81 val->intval = rt5033_battery_get_watt_prop(battery->client, in rt5033_battery_get_property()
85 val->intval = rt5033_battery_get_present(battery->client); in rt5033_battery_get_property()
[all …]
DKconfig30 battery class devices.
33 tristate "Generic battery support using IIO"
36 Say Y here to enable support for the generic battery driver
40 tristate "MAX8925 battery charger support"
43 Say Y here to enable support for the battery charger in the Maxim
47 tristate "WM831X backup battery charger support"
50 Say Y here to enable support for the backup battery charger
73 tristate "Marvell 88PM860x battery driver"
76 Say Y here to enable battery monitor for Marvell 88PM860x chip.
79 tristate "ADP5061 battery charger driver"
[all …]
Djz4740-battery.c49 struct power_supply *battery; member
63 struct jz_battery *battery = devid; in jz_battery_irq_handler() local
65 complete(&battery->read_completion); in jz_battery_irq_handler()
69 static long jz_battery_read_voltage(struct jz_battery *battery) in jz_battery_read_voltage() argument
75 mutex_lock(&battery->lock); in jz_battery_read_voltage()
77 reinit_completion(&battery->read_completion); in jz_battery_read_voltage()
79 enable_irq(battery->irq); in jz_battery_read_voltage()
80 battery->cell->enable(battery->pdev); in jz_battery_read_voltage()
82 t = wait_for_completion_interruptible_timeout(&battery->read_completion, in jz_battery_read_voltage()
86 val = readw(battery->base) & 0xfff; in jz_battery_read_voltage()
[all …]
/Linux-v4.19/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 …]
Dchargalg.txt7 - battery = Shall be battery specific information
12 battery = <&ab8500_battery>;
15 For information on battery specific node, Ref:
Dbtemp.txt7 - battery = Shall be battery specific information
12 battery = <&ab8500_battery>;
15 For information on battery specific node, Ref:
/Linux-v4.19/Documentation/devicetree/bindings/power/supply/
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 - energy-full-design-microwatt-hours: battery design energy
20 - charge-full-design-microamp-hours: battery design capacity
32 "monitored-battery".
36 bat: battery {
[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";
Dbq24190.txt11 - monitored-battery: phandle of battery characteristics devicetree node
12 The charger uses the following battery properties:
14 phase (typically 20% of battery capacity).
16 battery voltage is above recharge threshold, and the current is below
17 this setting (typically 10% of battery capacity).
18 See also Documentation/devicetree/bindings/power/supply/battery.txt
19 - ti,system-minimum-microvolt: when power is connected and the battery is below
29 bat: battery {
30 compatible = "simple-battery";
40 monitored-battery = <&bat>;
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";
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-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>;
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.txt34 - monitored-battery: phandle of battery characteristics node
35 The fuel gauge uses the following battery properties:
40 See Documentation/devicetree/bindings/power/supply/battery.txt
44 bat: battery {
45 compatible = "simple-battery";
54 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-v4.19/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-v4.19/Documentation/hwmon/
Dda905219 Channel 1: ICH - internal battery charger current measurement
20 Channel 2: TBAT - output from the battery NTC
21 Channel 3: VBAT - measurement of the battery voltage
28 Channel 9: VBBAT - measurement of the backup battery voltage
30 By using sysfs attributes we can measure the system voltage VDDOUT, the battery
31 charging current ICH, battery temperature TBAT, battery junction temperature
32 TJUNC, battery voltage VBAT and the back up battery voltage VBBAT.
39 The battery voltage is calculated as:
42 The backup battery voltage is calculated as:
51 Temperatures are sampled by a 10 bit ADC. Junction and battery temperatures
[all …]
/Linux-v4.19/Documentation/power/
Dcharger-manager.txt4 Charger Manager provides in-kernel battery charger management that
6 and where each battery may have multiple chargers attached and the userland
11 represents an independent battery with chargers. If there are multiple
24 different information about the battery status. This framework
29 While the battery is being charged and the system is in suspend-to-RAM,
30 we may need to monitor the battery health by looking at the ambient or
31 battery temperature. We can accomplish this by waking up the system
33 monitoring the battery health and tasks, and user processes that are
38 only affects the charging time, but the lifespan of the battery.
47 * Support for premature full-battery event handling
[all …]
Dpower_supply_class.txt6 Power supply class used to represent battery, UPS, AC or DC power supply
24 typically expected feedback of battery charging/fully charged status and
62 ~ of battery, this class distinguish these terms. Don't mix them! ~
77 BATTERY_STATUS_* values, as defined in battery.h.
84 AUTHENTIC - indicates the power supply (battery or charger) connected
87 HEALTH - represents health of the battery, values corresponds to
88 POWER_SUPPLY_HEALTH_*, defined in battery.h.
90 VOLTAGE_OCV - open circuit voltage of the battery.
94 when battery considered "full"/"empty" at normal conditions. Yes, there is
95 no direct relation between voltage and battery capacity, but some dumb
[all …]
/Linux-v4.19/drivers/block/
Dumem.c133 } battery[2]; member
657 if (card->battery[0].good && card->battery[1].good) in set_fault_to_battery_status()
659 else if (card->battery[0].warned || card->battery[1].warned) in set_fault_to_battery_status()
661 else if (!card->battery[0].good && !card->battery[1].good) in set_fault_to_battery_status()
669 static int check_battery(struct cardinfo *card, int battery, int status) in check_battery() argument
671 if (status != card->battery[battery].good) { in check_battery()
672 card->battery[battery].good = !card->battery[battery].good; in check_battery()
673 card->battery[battery].last_change = jiffies; in check_battery()
675 if (card->battery[battery].good) { in check_battery()
677 "Battery %d now good\n", battery + 1); in check_battery()
[all …]
/Linux-v4.19/Documentation/ABI/testing/
Dsysfs-class-power45 Fine grain representation of battery capacity.
53 Maximum battery capacity trip-wire value where the supply will
55 battery discharging scenario where user-space needs to know the
56 battery has dropped to an upper level so it can take
57 appropriate action (e.g. warning user that battery level is
67 Minimum battery capacity trip-wire value where the supply will
69 battery discharging scenario where user-space needs to know the
70 battery has dropped to a lower level so it can take
71 appropriate action (e.g. warning user that battery level is
81 Coarse representation of battery capacity.
[all …]
/Linux-v4.19/arch/sh/boards/mach-hp6xx/
Dhp6xx_apm.c34 int battery, backup, charging, percentage; in hp6x0_apm_get_power_status() local
37 battery = adc_single(ADC_CHANNEL_BATTERY); in hp6x0_apm_get_power_status()
41 percentage = 100 * (battery - HP680_BATTERY_MIN) / in hp6x0_apm_get_power_status()
51 info->time = (2 * battery); in hp6x0_apm_get_power_status()
53 info->ac_line_status = (battery > HP680_BATTERY_AC_ON) ? in hp6x0_apm_get_power_status()

123456789