Home
last modified time | relevance | path

Searched +full:ocv +full:- +full:capacity (Results 1 – 20 of 20) sorted by relevance

/linux/drivers/power/supply/
H A Dsamsung-sdi-battery.c1 // SPDX-License-Identifier: GPL-2.0
14 #include "samsung-sdi-battery.h"
428 * so this represents the capacity ratio at different temperatures.
441 { .temp = -10, .resistance = 100 },
442 { .temp = -20, .resistance = 100 },
446 * Capacity tables for different Open Circuit Voltages (OCV).
447 * These must be sorted by falling OCV value.
451 { .ocv = 4330000, .capacity = 100},
452 { .ocv = 4320000, .capacity = 99},
453 { .ocv = 4283000, .capacity = 95},
[all …]
H A Dab8500_bmdata.c1 // SPDX-License-Identifier: GPL-2.0
6 #include "ab8500-bm.h"
20 { .ocv = 4186000, .capacity = 100},
21 { .ocv = 4163000, .capacity = 99},
22 { .ocv = 4114000, .capacity = 95},
23 { .ocv = 4068000, .capacity = 90},
24 { .ocv = 3990000, .capacity = 80},
25 { .ocv = 3926000, .capacity = 70},
26 { .ocv = 3898000, .capacity = 65},
27 { .ocv = 3866000, .capacity = 60},
[all …]
H A Dsc27xx_fuel_gauge.c1 // SPDX-License-Identifier: GPL-2.0
10 #include <linux/nvmem-consumer.h>
82 * @total_cap: the total capacity of the battery in mAh
83 * @init_cap: the initial capacity of the battery in mAh
84 * @alarm_cap: the alarm capacity
89 * @table_len: the capacity table length
94 * @cap_table: capacity table with corresponding ocv
124 static int sc27xx_fgu_cap_to_clbcnt(struct sc27xx_fgu_data *data, int capacity);
139 return DIV_S64_ROUND_CLOSEST(adc * 1000, data->cur_1000ma_adc); in sc27xx_fgu_adc_to_current()
144 return DIV_S64_ROUND_CLOSEST(adc * 1000, data->vol_1000mv_adc); in sc27xx_fgu_adc_to_voltage()
[all …]
H A Dug3105_battery.c1 // SPDX-License-Identifier: GPL-2.0+
5 * Note the uG3105 is not a full-featured autonomous fuel-gauge. Instead it is
7 * its coulomb-counter before it can wrap (must be read every 400 seconds!).
9 * Since Linux does not monitor coulomb-counter changes while the device
17 * to when the battery was empty is set. If so we now know the capacity,
18 * not the design, but actual capacity, of the battery
20 * the actual capacity of the battery over reboots
21 * 5. When we know the actual capacity at probe time, add energy_now and
22 * energy_full attributes. Guess boot + resume energy_now value based on ocv
25 * readings, esp. in the 30-70% range and allow userspace to estimate time
[all …]
H A Dpower_supply_core.c1 // SPDX-License-Identifier: GPL-2.0-only
25 #include <linux/fixp-arith.h>
27 #include "samsung-sdi-battery.h"
48 if (!supply->supplied_from && !supplier->supplied_to) in __power_supply_is_supplied_by()
52 if (supply->supplied_from) { in __power_supply_is_supplied_by()
53 if (!supplier->desc->name) in __power_supply_is_supplied_by()
55 for (i = 0; i < supply->num_supplies; i++) in __power_supply_is_supplied_by()
56 if (!strcmp(supplier->desc->name, supply->supplied_from[i])) in __power_supply_is_supplied_by()
59 if (!supply->desc->name) in __power_supply_is_supplied_by()
61 for (i = 0; i < supplier->num_supplicants; i++) in __power_supply_is_supplied_by()
[all …]
H A D88pm860x_battery.c1 // SPDX-License-Identifier: GPL-2.0-only
68 /* OCV -- Open Circuit Voltage */
83 * corresponding resistor value -- Ohm / C degeree.
85 #define TBAT_NEG_25D 127773 /* -25 */
86 #define TBAT_NEG_10D 54564 /* -10 */
151 * register 1 bit[7:0] -- bit[11:4] of measured value of voltage
152 * register 0 bit[3:0] -- bit[3:0] of measured value of voltage
160 ret = pm860x_bulk_read(info->i2c, offset, 2, buf); in measure_12bit_voltage()
188 * bit[11:10] -- bit[7:6] of LDO9(0x18) in measure_vbatt()
189 * bit[9:8] -- bit[7:6] of LDO8(0x17) in measure_vbatt()
[all …]
H A Drk817_charger.c1 // SPDX-License-Identifier: GPL-2.0+
12 #include <linux/devm-helpers.h>
68 * soc - state of charge - like the BSP this is stored as a percentage,
78 * Capacity of battery when fully charged, equal or less than design
79 * capacity depending upon wear. BSP kernel saves to nvram in mAh,
118 #define CHARGE_TO_ADC(capacity, res_div) \ argument
119 (capacity * res_div * 3600 / 172 * 1000)
143 return -EINVAL; in rk817_chg_cur_to_reg()
166 return -EINVAL; in rk817_chg_cur_from_reg()
177 regmap_bulk_read(charger->rk808->regmap, RK817_GAS_GAUGE_VCALIB0_H, in rk817_bat_calib_vol()
[all …]
H A Daxp288_fuel_gauge.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * axp288_fuel_gauge.c - Xpower AXP288 PMIC Fuel Gauge Driver
5 * Copyright (C) 2020-2021 Andrejus Basovas <xxx@yyy.tld>
6 * Copyright (C) 2016-2021 Hans de Goede <hdegoede@redhat.com>
136 int ocv; member
162 ret = regmap_read(info->regmap, reg, &val); in fuel_gauge_reg_readb()
164 dev_err(info->dev, "Error reading reg 0x%02x err: %d\n", reg, ret); in fuel_gauge_reg_readb()
175 ret = regmap_write(info->regmap, reg, (unsigned int)val); in fuel_gauge_reg_writeb()
178 dev_err(info->dev, "Error writing reg 0x%02x err: %d\n", reg, ret); in fuel_gauge_reg_writeb()
188 ret = regmap_bulk_read(info->regmap, reg, buf, 2); in fuel_gauge_read_15bit_word()
[all …]
/linux/Documentation/devicetree/bindings/power/supply/
H A Dbattery.yaml1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
3 ---
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
10 - Sebastian Reichel <sre@kernel.org>
14 In smart batteries, these are typically stored in non-volatile memory
16 no appropriate non-volatile memory, or it is unprogrammed/incorrect.
27 Batteries must be referenced by chargers and/or fuel-gauges using a phandle.
28 The phandle's property should be named "monitored-battery".
32 const: simple-battery
34 device-chemistry:
[all …]
/linux/include/linux/
H A Dpower_supply.h1 /* SPDX-License-Identifier: GPL-2.0-only */
29 * For systems where the charger determines the maximum battery capacity
226 /* Run-time specific power supply configuration */
341 int ocv; /* microVolts */ member
342 int capacity; /* percent */ member
356 * struct power_supply_maintenance_charge_table - setting for maintenace charging
389 * +-------------------------------------------------------------------> t
391 * Practically this means that the Li-ions are wandering back and forth in the
402 * +-------------------------------------------------------------------> t
413 * As an example, a Samsung EB425161LA Lithium-Ion battery is CC/CV charged
[all …]
/linux/arch/arm64/boot/dts/rockchip/
H A Drk3326-odroid-go2.dts1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
8 /dts-v1/;
9 #include "rk3326-odroid-go.dtsi"
12 model = "ODROID-GO Advance";
13 compatible = "hardkernel,rk3326-odroid-go2", "rockchip,rk3326";
15 analog_sticks: adc-joystick {
16 compatible = "adc-joystick";
17 io-channels = <&saradc 1>,
19 poll-interval = <60>;
20 #address-cells = <1>;
[all …]
H A Drk3326-odroid-go2-v11.dts1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
8 /dts-v1/;
9 #include "rk3326-odroid-go.dtsi"
12 model = "ODROID-GO Advance Black Edition";
13 compatible = "hardkernel,rk3326-odroid-go2-v11", "rockchip,rk3326";
19 analog_sticks: adc-joystick {
20 compatible = "adc-joystick";
21 io-channels = <&saradc 1>,
23 poll-interval = <60>;
24 #address-cells = <1>;
[all …]
H A Drk3326-odroid-go3.dts1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
8 /dts-v1/;
9 #include "rk3326-odroid-go.dtsi"
12 model = "ODROID-GO Super";
13 compatible = "hardkernel,rk3326-odroid-go3", "rockchip,rk3326";
15 joystick_mux_controller: mux-controller {
16 compatible = "gpio-mux";
18 #mux-control-cells = <0>;
20 mux-gpios = <&gpio3 RK_PB3 GPIO_ACTIVE_LOW>,
24 joystick_mux: adc-mux {
[all …]
H A Drk3566-powkiddy-rk2023.dtsi1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
3 /dts-v1/;
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/linux-event-codes.h>
7 #include <dt-bindings/leds/common.h>
8 #include <dt-bindings/pinctrl/rockchip.h>
9 #include <dt-bindings/soc/rockchip,vop2.h>
13 chassis-type = "handset";
21 adc-joystick {
22 compatible = "adc-joystick";
[all …]
/linux/arch/arm64/boot/dts/sprd/
H A Dsp9860g-1h10.dts1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
8 /dts-v1/;
16 compatible = "sprd,sp9860g-1h10", "sprd,sc9860";
33 stdout-path = "serial1:115200n8";
36 gpio-keys {
37 compatible = "gpio-keys";
39 key-volumedown {
43 debounce-interval = <2>;
44 wakeup-source;
47 key-volumeup {
[all …]
/linux/arch/arm64/boot/dts/qcom/
H A Dmsm8916-wingtech-wt865x8.dtsi1 // SPDX-License-Identifier: GPL-2.0-only
3 #include "msm8916-pm8916.dtsi"
4 #include "msm8916-modem-qdsp6.dtsi"
6 #include <dt-bindings/gpio/gpio.h>
7 #include <dt-bindings/pinctrl/qcom,pmic-mpp.h>
17 stdout-path = "serial0";
20 headphones_switch: audio-switch {
21 compatible = "simple-audio-amplifier";
23 pinctrl-0 = <&headphones_switch_default>;
24 pinctrl-names = "default";
[all …]
H A Dmsm8916-lg-m216.dts1 // SPDX-License-Identifier: GPL-2.0-only
3 /dts-v1/;
5 #include "msm8916-pm8916.dtsi"
6 #include "msm8916-modem-qdsp6.dtsi"
8 #include <dt-bindings/gpio/gpio.h>
13 chassis-type = "handset";
22 stdout-path = "serial0";
26 compatible = "simple-battery";
27 voltage-min-design-microvolt = <3300000>;
28 voltage-max-design-microvolt = <4350000>;
[all …]
H A Dmsm8916-gplus-fl8005a.dts1 // SPDX-License-Identifier: GPL-2.0-only
3 /dts-v1/;
5 #include "msm8916-pm8916.dtsi"
6 #include "msm8916-modem-qdsp6.dtsi"
8 #include <dt-bindings/gpio/gpio.h>
9 #include <dt-bindings/input/input.h>
10 #include <dt-bindings/leds/common.h>
15 chassis-type = "tablet";
24 stdout-path = "serial0";
28 compatible = "simple-battery";
[all …]
H A Dmsm8916-longcheer-l8150.dts1 // SPDX-License-Identifier: GPL-2.0-only
3 /dts-v1/;
5 #include "msm8916-pm8916.dtsi"
6 #include "msm8916-modem-qdsp6.dtsi"
8 #include <dt-bindings/gpio/gpio.h>
9 #include <dt-bindings/input/input.h>
10 #include <dt-bindings/interrupt-controller/irq.h>
11 #include <dt-bindings/leds/common.h>
16 chassis-type = "handset";
25 stdout-path = "serial0";
[all …]
/linux/Documentation/devicetree/bindings/mfd/
H A Drockchip,rk817.yaml1 # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
3 ---
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
10 - Chris Zhong <zyw@rock-chips.com>
11 - Zhang Qing <zhangqing@rock-chips.com>
21 - rockchip,rk809
22 - rockchip,rk817
30 '#clock-cells':
32 See <dt-bindings/clock/rockchip,rk808.h> for clock IDs.
39 clock-names:
[all …]