/openbmc/linux/drivers/acpi/ |
H A D | battery.c | 134 static inline int acpi_battery_present(struct acpi_battery *battery) in acpi_battery_present() argument 136 return battery->device->status.battery_present; in acpi_battery_present() 139 static int acpi_battery_technology(struct acpi_battery *battery) in acpi_battery_technology() argument 141 if (!strcasecmp("NiCd", battery->type)) in acpi_battery_technology() 143 if (!strcasecmp("NiMH", battery->type)) in acpi_battery_technology() 145 if (!strcasecmp("LION", battery->type)) in acpi_battery_technology() 147 if (!strncasecmp("LI-ION", battery->type, 6)) in acpi_battery_technology() 149 if (!strcasecmp("LiP", battery->type)) in acpi_battery_technology() 154 static int acpi_battery_get_state(struct acpi_battery *battery); 156 static int acpi_battery_is_charged(struct acpi_battery *battery) in acpi_battery_is_charged() argument [all …]
|
H A D | sbs.c | 89 struct acpi_battery battery[MAX_SBS_BAT]; member 99 static int acpi_battery_get_state(struct acpi_battery *battery); 109 static inline int acpi_battery_vscale(struct acpi_battery *battery) in acpi_battery_vscale() argument 111 return battery_scale((battery->spec & 0x0f00) >> 8); in acpi_battery_vscale() 114 static inline int acpi_battery_ipscale(struct acpi_battery *battery) in acpi_battery_ipscale() argument 116 return battery_scale((battery->spec & 0xf000) >> 12); in acpi_battery_ipscale() 119 static inline int acpi_battery_mode(struct acpi_battery *battery) in acpi_battery_mode() argument 121 return (battery->mode & 0x8000); in acpi_battery_mode() 124 static inline int acpi_battery_scale(struct acpi_battery *battery) in acpi_battery_scale() argument 126 return (acpi_battery_mode(battery) ? 10 : 1) * in acpi_battery_scale() [all …]
|
/openbmc/linux/drivers/power/supply/ |
H A D | rt5033_battery.c | 24 struct rt5033_battery *battery = i2c_get_clientdata(client); in rt5033_battery_get_status() local 28 ret = power_supply_get_property_from_supplier(battery->psy, in rt5033_battery_get_status() 39 struct rt5033_battery *battery = i2c_get_clientdata(client); in rt5033_battery_get_capacity() local 42 regmap_read(battery->regmap, RT5033_FUEL_REG_SOC_H, &msb); in rt5033_battery_get_capacity() 49 struct rt5033_battery *battery = i2c_get_clientdata(client); in rt5033_battery_get_present() local 52 regmap_read(battery->regmap, RT5033_FUEL_REG_CONFIG_L, &val); in rt5033_battery_get_present() 60 struct rt5033_battery *battery = i2c_get_clientdata(client); in rt5033_battery_get_watt_prop() local 82 regmap_read(battery->regmap, regh, &msb); in rt5033_battery_get_watt_prop() 83 regmap_read(battery->regmap, regl, &lsb); in rt5033_battery_get_watt_prop() 94 struct rt5033_battery *battery = power_supply_get_drvdata(psy); in rt5033_battery_get_property() local [all …]
|
H A D | Kconfig | 36 battery class devices. 39 tristate "Generic battery support using IIO" 42 Say Y here to enable support for the generic battery driver 51 which include a battery charger and a boost converter. 54 tristate "MAX8925 battery charger support" 57 Say Y here to enable support for the battery charger in the Maxim 61 tristate "WM831X backup battery charger support" 64 Say Y here to enable support for the backup battery charger 87 tristate "Marvell 88PM860x battery driver" 90 Say Y here to enable battery monitor for Marvell 88PM860x chip. [all …]
|
H A D | ds2782_battery.c | 56 struct power_supply *battery; member 285 power_supply_changed(info->battery); in ds278x_bat_update() 306 static void ds278x_power_supply_init(struct power_supply_desc *battery) in ds278x_power_supply_init() argument 308 battery->type = POWER_SUPPLY_TYPE_BATTERY; in ds278x_power_supply_init() 309 battery->properties = ds278x_battery_props; in ds278x_power_supply_init() 310 battery->num_properties = ARRAY_SIZE(ds278x_battery_props); in ds278x_power_supply_init() 311 battery->get_property = ds278x_battery_get_property; in ds278x_power_supply_init() 312 battery->external_power_changed = NULL; in ds278x_power_supply_init() 320 power_supply_unregister(info->battery); in ds278x_battery_remove() 425 info->battery = power_supply_register(&client->dev, in ds278x_battery_probe() [all …]
|
/openbmc/linux/Documentation/devicetree/bindings/rtc/ |
H A D | rtc-palmas.txt | 10 - 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;
|
/openbmc/linux/Documentation/devicetree/bindings/power/supply/ |
H A D | stericsson,ab8500-battery.txt | 2 information about the battery connected to the PMIC. 8 A boolean value indicating thermistor interface to battery 11 'btemp' and 'batctrl' are the pins interfaced for battery temperature 13 coefficient) resister is interfaced external to battery whereas 14 'batctrl' pin is used when NTC resister is internal to battery. 20 indicates: NTC resister is internal to battery, 'batctrl' is used 24 NTC resister is external to battery and 'btemp' signal is used 27 battery-type: 28 This shall be the battery manufacturing technology type, 33 stericsson,battery-type = "LIPO";
|
/openbmc/linux/Documentation/hwmon/ |
H A D | da9052.rst | 27 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 …]
|
/openbmc/linux/Documentation/power/ |
H A D | charger-manager.rst | 7 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 …]
|
H A D | power_supply_class.rst | 7 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 …]
|
/openbmc/linux/drivers/hid/ |
H A D | hid-logitech-hidpp.c | 204 struct hidpp_battery battery; member 527 usb_set_wireless_status(intf, hidpp->battery.online ? in hidpp_update_usb_wireless_status() 737 hidpp->battery.level = in hidpp10_query_battery_status() 740 hidpp->battery.status = status; in hidpp10_query_battery_status() 742 hidpp->battery.online = status == POWER_SUPPLY_STATUS_DISCHARGING || in hidpp10_query_battery_status() 789 hidpp->battery.capacity = response.rap.params[0]; in hidpp10_query_battery_mileage() 791 hidpp->battery.status = status; in hidpp10_query_battery_mileage() 793 hidpp->battery.online = status == POWER_SUPPLY_STATUS_DISCHARGING || in hidpp10_query_battery_mileage() 810 capacity = hidpp->battery.capacity; in hidpp10_battery_event() 816 level = hidpp->battery.level; in hidpp10_battery_event() [all …]
|
/openbmc/linux/arch/arm64/boot/dts/qcom/ |
H A D | sdm845-oneplus-fajita.dts | 17 battery: battery { label 18 compatible = "simple-battery"; 37 monitored-battery = <&battery>; 51 monitored-battery = <&battery>;
|
H A D | sdm845-oneplus-enchilada.dts | 17 battery: battery { label 18 compatible = "simple-battery"; 33 monitored-battery = <&battery>; 55 monitored-battery = <&battery>;
|
/openbmc/linux/Documentation/wmi/devices/ |
H A D | dell-wmi-ddv.rst | 11 retrieving various system data like battery temperature, ePPID, diagostic data 80 with the first 8 bit being used to specify the battery when using battery-related 92 The data format of many battery-related methods seems to be based on the 93 `Smart Battery Data Specification`, so unknown battery-related methods are 99 Returns the design capacity of the battery in mAh as an u16. 104 Returns the full charge capacity of the battery in mAh as an u16. 109 Returns the manufacture name of the battery as an ASCII string. 114 Returns the manufacture date of the battery as an u16. 127 Returns the serial number of the battery as an u16. 132 Returns the chemistry of the battery as an ASCII string. [all …]
|
/openbmc/u-boot/arch/arm/dts/ |
H A D | cros-ec-sbs.dtsi | 3 * Smart battery dts fragment for devices that use cros-ec-sbs 9 battery: sbs-battery@b { label 10 compatible = "sbs,sbs-battery";
|
/openbmc/linux/arch/sh/boards/mach-hp6xx/ |
H A D | hp6xx_apm.c | 32 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()
|
/openbmc/linux/Documentation/ABI/testing/ |
H A D | sysfs-class-power | 47 Reports an average IBAT current reading for the battery, over 70 Reports the maximum IBAT current allowed into the battery. 87 battery. This value is not averaged/smoothed. 110 Reports the current TBAT battery temperature reading. 177 Reports the maximum allowed TBAT battery temperature for 194 Reports the minimum allowed TBAT battery temperature for 212 battery, during charging. 229 battery, during discharging. 246 battery. This value is not averaged/smoothed. 267 Fine grain representation of battery capacity. [all …]
|
H A D | sysfs-class-power-ltc4162l | 23 means that the battery is discharging. 53 To save battery current, the measurement system is disabled if 54 the battery is the only source of power. This affects all 57 seconds, even when running on battery (as reported by the online 59 when the system runs on battery). 69 The charger will normally drain the battery while inactive,
|
/openbmc/u-boot/drivers/power/battery/ |
H A D | bat_trats.c | 14 static struct battery battery_trats; 19 struct battery *battery = p_bat->bat; in power_battery_charge() local 27 battery->state_of_chrg < 100; k++) { in power_battery_charge() 34 debug(" %d [V]", battery->voltage_uV); in power_battery_charge()
|
/openbmc/u-boot/doc/ |
H A D | README.power-framework | 38 The problem emerges when we have a device (battery) which conceptually shall be 40 to start charging the battery, use PMIC to reduce board's overall power 42 energy on the battery from FG. 55 e.g. ./drivers/power/battery/trats/bat_trats.c 64 Everything is a power device described by struct pmic. Even battery is 81 1. When hierarchy is not needed (no complex battery charge): 90 2. Complex battery charging. 92 To charge a battery, information from several "abstract" power devices is 95 -- *fg_battery_check - check if battery is not above its limits 97 battery state(voltage and current capacity) [all …]
|
/openbmc/linux/arch/arm64/boot/dts/rockchip/ |
H A D | rk3326-odroid-go2.dts | 40 battery: battery { label 41 compatible = "simple-battery"; 67 monitored-battery = <&battery>;
|
H A D | rk3566-anbernic-rg353vs.dts | 20 battery: battery { label 21 compatible = "simple-battery"; 82 monitored-battery = <&battery>;
|
/openbmc/linux/arch/arm/boot/dts/st/ |
H A D | ste-ab8505.dtsi | 13 <&gpadc 0x08>, /* Main battery voltage */ 16 <&gpadc 0x0c>, /* Backup battery voltage */ 115 monitored-battery = <&battery>; 132 monitored-battery = <&battery>; 169 monitored-battery = <&battery>; 179 monitored-battery = <&battery>;
|
H A D | ste-ab8500.dtsi | 14 <&gpadc 0x08>, /* Main battery voltage */ 18 <&gpadc 0x0c>, /* Backup battery voltage */ 143 monitored-battery = <&battery>; 160 monitored-battery = <&battery>; 197 monitored-battery = <&battery>; 211 monitored-battery = <&battery>;
|
/openbmc/linux/drivers/usb/misc/ |
H A D | apple-mfi-fastcharge.c | 46 struct power_supply *battery; member 193 mfi->battery = power_supply_register(&udev->dev, in mfi_fc_probe() 196 if (IS_ERR(mfi->battery)) { in mfi_fc_probe() 198 err = PTR_ERR(mfi->battery); in mfi_fc_probe() 214 if (mfi->battery) in mfi_fc_disconnect() 215 power_supply_unregister(mfi->battery); in mfi_fc_disconnect()
|