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

1 /* SPDX-License-Identifier: GPL-2.0-only */
31 * For systems where the charger determines the maximum battery capacity
37 POWER_SUPPLY_STATUS_UNKNOWN = 0,
46 POWER_SUPPLY_CHARGE_TYPE_UNKNOWN = 0,
58 POWER_SUPPLY_HEALTH_UNKNOWN = 0,
77 POWER_SUPPLY_TECHNOLOGY_UNKNOWN = 0,
87 POWER_SUPPLY_CAPACITY_LEVEL_UNKNOWN = 0,
96 POWER_SUPPLY_SCOPE_UNKNOWN = 0,
103 POWER_SUPPLY_PROP_STATUS = 0,
184 POWER_SUPPLY_TYPE_UNKNOWN = 0,
200 POWER_SUPPLY_USB_TYPE_UNKNOWN = 0,
213 POWER_SUPPLY_CHARGE_BEHAVIOUR_AUTO = 0,
230 /* Run-time specific power supply configuration */
373 int ocv; /* microVolts */ member
374 int capacity; /* percent */ member
388 * struct power_supply_maintenance_charge_table - setting for maintenace charging
421 * +-------------------------------------------------------------------> t
423 * Practically this means that the Li-ions are wandering back and forth in the
434 * +-------------------------------------------------------------------> t
436 * Maintenance charging uses the voltages from this table: a table of settings
445 * As an example, a Samsung EB425161LA Lithium-Ion battery is CC/CV charged
460 * the expected stand-by current. Also overvoltage protection will be applied
472 * struct power_supply_battery_info - information about batteries
542 * @ocv_temp: array indicating the open circuit voltage (OCV) capacity
544 * indicating which capacity table to use for a certain temperature, since
545 * the capacity for reasons of chemistry will be different at different
546 * temperatures. Determining capacity is a multivariate problem and the
566 * determine the capacity in percent in relation to the voltage in microvolts
569 * each entry in the array of capacity arrays in ocv_table.
570 * @resist_table: this is a table that correlates a battery temperature to the
574 * circuit voltage (OCV) that is then used with the ocv_table to calculate
575 * the capacity of the battery. The resist_table must be ordered descending
579 * @vbat2ri_discharging: this is a table that correlates Battery voltage (VBAT)
582 * determine the open circuit voltage so that we can determine the capacity
584 * is discharging. The table must be ordered descending by voltage: highest
587 * table.
590 * internal resistance characteristics so a separate table is needed.*
591 * The table must be ordered descending by voltage: highest voltage first.
593 * table.
599 * for example 10 for +/- 10%, if the bti_resistance is set to 7000 and the
608 * The default field value is -EINVAL or NULL for pointers.
617 * | --- overvoltage_limit_uv
630 * +------------------------------------------------------------------> time
647 * +-----------------------------------------------------------------> time
658 * 2. Next a small initial pre-charge current (precharge_current_ua)
695 * DETERMINING BATTERY CAPACITY:
698 * capacity in the battery, usually as a percentage of charge. In practice
699 * many chargers uses a so-called fuel gauge or coloumb counter that measure
700 * how much charge goes into the battery and how much goes out (+/- leak
701 * consumption). This does not help if we do not know how much capacity the
703 * and charged in a separate charger. Therefore many capacity algorithms use
704 * the open circuit voltage with a look-up table to determine the rough
705 * capacity of the battery. The open circuit voltage can be conceptualized
709 * +-------> IBAT >----------------+
713 * o <---------- | |
715 * .---. | | |
716 * | V | | OCV | |
717 * '---' | | |
719 * GND +-------------------------------+
723 * VBAT = OCV and this assumption is sometimes made even under load, assuming
726 * temperature and how much capacity is left in the battery due to the
734 * OCV = VBAT - (IBAT * Ri)
739 * some batteries. This gives the compensated open circuit voltage (OCV) for
743 * VBAT to Ri takes both remaining capacity and temperature into consideration.
745 * Alternatively a manufacturer can specify how the capacity of the battery
750 * the purpose of the table resist_table: this will take a temperature and
834 extern int power_supply_ocv2cap_simple(const struct power_supply_battery_ocv_table *table,
835 int table_len, int ocv);
840 int ocv, int temp);
842 power_supply_temp2resist_simple(const struct power_supply_resistance_temp_table *table,
862 mt = power_supply_get_maintenance_charging_setting(info, 0); in power_supply_supports_maintenance_charging()
870 return ((info->vbat2ri_discharging != NULL) && in power_supply_supports_vbat2ri()
871 info->vbat2ri_discharging_size > 0); in power_supply_supports_vbat2ri()
877 return ((info->resist_table != NULL) && in power_supply_supports_temp2ri()
878 info->resist_table_size > 0); in power_supply_supports_temp2ri()
884 static inline int power_supply_is_system_supplied(void) { return -ENOSYS; } in power_supply_is_system_supplied()
898 { return 0; } in power_supply_set_property()
999 return -EOPNOTSUPP; in power_supply_charge_behaviour_show()
1005 return -EOPNOTSUPP; in power_supply_charge_behaviour_parse()
1014 return -EOPNOTSUPP; in power_supply_charge_types_show()
1019 return -EOPNOTSUPP; in power_supply_charge_types_parse()