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 */
343 int ocv; /* microVolts */ member
344 int capacity; /* percent */ member
358 * struct power_supply_maintenance_charge_table - setting for maintenace charging
391 * +-------------------------------------------------------------------> t
393 * Practically this means that the Li-ions are wandering back and forth in the
404 * +-------------------------------------------------------------------> t
406 * Maintenance charging uses the voltages from this table: a table of settings
415 * As an example, a Samsung EB425161LA Lithium-Ion battery is CC/CV charged
430 * the expected stand-by current. Also overvoltage protection will be applied
442 * struct power_supply_battery_info - information about batteries
512 * @ocv_temp: array indicating the open circuit voltage (OCV) capacity
514 * indicating which capacity table to use for a certain temperature, since
515 * the capacity for reasons of chemistry will be different at different
516 * temperatures. Determining capacity is a multivariate problem and the
536 * determine the capacity in percent in relation to the voltage in microvolts
539 * each entry in the array of capacity arrays in ocv_table.
540 * @resist_table: this is a table that correlates a battery temperature to the
544 * circuit voltage (OCV) that is then used with the ocv_table to calculate
545 * the capacity of the battery. The resist_table must be ordered descending
549 * @vbat2ri_discharging: this is a table that correlates Battery voltage (VBAT)
552 * determine the open circuit voltage so that we can determine the capacity
554 * is discharging. The table must be ordered descending by voltage: highest
557 * table.
560 * internal resistance characteristics so a separate table is needed.*
561 * The table must be ordered descending by voltage: highest voltage first.
563 * table.
569 * for example 10 for +/- 10%, if the bti_resistance is set to 7000 and the
578 * The default field value is -EINVAL or NULL for pointers.
587 * | --- overvoltage_limit_uv
600 * +------------------------------------------------------------------> time
617 * +-----------------------------------------------------------------> time
628 * 2. Next a small initial pre-charge current (precharge_current_ua)
665 * DETERMINING BATTERY CAPACITY:
668 * capacity in the battery, usually as a percentage of charge. In practice
669 * many chargers uses a so-called fuel gauge or coloumb counter that measure
670 * how much charge goes into the battery and how much goes out (+/- leak
671 * consumption). This does not help if we do not know how much capacity the
673 * and charged in a separate charger. Therefore many capacity algorithms use
674 * the open circuit voltage with a look-up table to determine the rough
675 * capacity of the battery. The open circuit voltage can be conceptualized
679 * +-------> IBAT >----------------+
683 * o <---------- | |
685 * .---. | | |
686 * | V | | OCV | |
687 * '---' | | |
689 * GND +-------------------------------+
693 * VBAT = OCV and this assumption is sometimes made even under load, assuming
696 * temperature and how much capacity is left in the battery due to the
704 * OCV = VBAT - (IBAT * Ri)
709 * some batteries. This gives the compensated open circuit voltage (OCV) for
713 * VBAT to Ri takes both remaining capacity and temperature into consideration.
715 * Alternatively a manufacturer can specify how the capacity of the battery
720 * the purpose of the table resist_table: this will take a temperature and
798 extern int power_supply_ocv2cap_simple(struct power_supply_battery_ocv_table *table,
799 int table_len, int ocv);
804 int ocv, int temp);
806 power_supply_temp2resist_simple(struct power_supply_resistance_temp_table *table,
826 mt = power_supply_get_maintenance_charging_setting(info, 0); in power_supply_supports_maintenance_charging()
834 return ((info->vbat2ri_discharging != NULL) && in power_supply_supports_vbat2ri()
835 info->vbat2ri_discharging_size > 0); in power_supply_supports_vbat2ri()
841 return ((info->resist_table != NULL) && in power_supply_supports_temp2ri()
842 info->resist_table_size > 0); in power_supply_supports_temp2ri()
848 static inline int power_supply_is_system_supplied(void) { return -ENOSYS; } in power_supply_is_system_supplied()
862 { return 0; } in power_supply_set_property()
953 return 0; in power_supply_add_hwmon_sysfs()
974 return -EOPNOTSUPP; in power_supply_charge_behaviour_show()
980 return -EOPNOTSUPP; in power_supply_charge_behaviour_parse()