Lines Matching +full:ocv +full:- +full:capacity +full:- +full:table +full:- +full:0

1 /* SPDX-License-Identifier: GPL-2.0-only */
29 * For systems where the charger determines the maximum battery capacity
35 POWER_SUPPLY_STATUS_UNKNOWN = 0,
44 POWER_SUPPLY_CHARGE_TYPE_UNKNOWN = 0,
56 POWER_SUPPLY_HEALTH_UNKNOWN = 0,
74 POWER_SUPPLY_TECHNOLOGY_UNKNOWN = 0,
84 POWER_SUPPLY_CAPACITY_LEVEL_UNKNOWN = 0,
93 POWER_SUPPLY_SCOPE_UNKNOWN = 0,
100 POWER_SUPPLY_PROP_STATUS = 0,
180 POWER_SUPPLY_TYPE_UNKNOWN = 0,
196 POWER_SUPPLY_USB_TYPE_UNKNOWN = 0,
209 POWER_SUPPLY_CHARGE_BEHAVIOUR_AUTO = 0,
226 /* Run-time specific power supply configuration */
339 int ocv; /* microVolts */ member
340 int capacity; /* percent */ member
354 * struct power_supply_maintenance_charge_table - setting for maintenace charging
387 * +-------------------------------------------------------------------> t
389 * Practically this means that the Li-ions are wandering back and forth in the
400 * +-------------------------------------------------------------------> t
402 * Maintenance charging uses the voltages from this table: a table of settings
411 * As an example, a Samsung EB425161LA Lithium-Ion battery is CC/CV charged
426 * the expected stand-by current. Also overvoltage protection will be applied
438 * struct power_supply_battery_info - information about batteries
508 * @ocv_temp: array indicating the open circuit voltage (OCV) capacity
510 * indicating which capacity table to use for a certain temperature, since
511 * the capacity for reasons of chemistry will be different at different
512 * temperatures. Determining capacity is a multivariate problem and the
532 * determine the capacity in percent in relation to the voltage in microvolts
535 * each entry in the array of capacity arrays in ocv_table.
536 * @resist_table: this is a table that correlates a battery temperature to the
540 * circuit voltage (OCV) that is then used with the ocv_table to calculate
541 * the capacity of the battery. The resist_table must be ordered descending
545 * @vbat2ri_discharging: this is a table that correlates Battery voltage (VBAT)
548 * determine the open circuit voltage so that we can determine the capacity
550 * is discharging. The table must be ordered descending by voltage: highest
553 * table.
556 * internal resistance characteristics so a separate table is needed.*
557 * The table must be ordered descending by voltage: highest voltage first.
559 * table.
565 * for example 10 for +/- 10%, if the bti_resistance is set to 7000 and the
574 * The default field value is -EINVAL or NULL for pointers.
583 * | --- overvoltage_limit_uv
596 * +------------------------------------------------------------------> time
613 * +-----------------------------------------------------------------> time
624 * 2. Next a small initial pre-charge current (precharge_current_ua)
661 * DETERMINING BATTERY CAPACITY:
664 * capacity in the battery, usually as a percentage of charge. In practice
665 * many chargers uses a so-called fuel gauge or coloumb counter that measure
666 * how much charge goes into the battery and how much goes out (+/- leak
667 * consumption). This does not help if we do not know how much capacity the
669 * and charged in a separate charger. Therefore many capacity algorithms use
670 * the open circuit voltage with a look-up table to determine the rough
671 * capacity of the battery. The open circuit voltage can be conceptualized
675 * +-------> IBAT >----------------+
679 * o <---------- | |
681 * .---. | | |
682 * | V | | OCV | |
683 * '---' | | |
685 * GND +-------------------------------+
689 * VBAT = OCV and this assumption is sometimes made even under load, assuming
692 * temperature and how much capacity is left in the battery due to the
700 * OCV = VBAT - (IBAT * Ri)
705 * some batteries. This gives the compensated open circuit voltage (OCV) for
709 * VBAT to Ri takes both remaining capacity and temperature into consideration.
711 * Alternatively a manufacturer can specify how the capacity of the battery
716 * the purpose of the table resist_table: this will take a temperature and
800 extern int power_supply_ocv2cap_simple(struct power_supply_battery_ocv_table *table,
801 int table_len, int ocv);
806 int ocv, int temp);
808 power_supply_temp2resist_simple(struct power_supply_resistance_temp_table *table,
828 mt = power_supply_get_maintenance_charging_setting(info, 0); in power_supply_supports_maintenance_charging()
836 return ((info->vbat2ri_discharging != NULL) && in power_supply_supports_vbat2ri()
837 info->vbat2ri_discharging_size > 0); in power_supply_supports_vbat2ri()
843 return ((info->resist_table != NULL) && in power_supply_supports_temp2ri()
844 info->resist_table_size > 0); in power_supply_supports_temp2ri()
850 static inline int power_supply_is_system_supplied(void) { return -ENOSYS; } in power_supply_is_system_supplied()
864 { return 0; } in power_supply_set_property()
954 return 0; in power_supply_add_hwmon_sysfs()
975 return -EOPNOTSUPP; in power_supply_charge_behaviour_show()
981 return -EOPNOTSUPP; in power_supply_charge_behaviour_parse()