Lines Matching +full:battery +full:- +full:temperature

1 /* 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 */
349 int vbat_uv; /* Battery voltage in microvolt */
354 * struct power_supply_maintenance_charge_table - setting for maintenace charging
356 * the charge of the battery full as current is consumed after full charging.
371 * for the battery.
378 * charger: instead they will at all times dissipate the battery a little, like
387 * +-------------------------------------------------------------------> t
389 * Practically this means that the Li-ions are wandering back and forth in the
390 * battery and this causes degeneration of the battery anode and cathode.
391 * To prolong the life of the battery, maintenance charging is applied after
392 * reaching charge_term_current_ua to hold up the charge in the battery while
393 * consuming power, thus lowering the wear on the battery:
400 * +-------------------------------------------------------------------> t
411 * As an example, a Samsung EB425161LA Lithium-Ion battery is CC/CV charged
420 * appropriately. These need to be determined from battery discharge curves
426 * the expected stand-by current. Also overvoltage protection will be applied
438 * struct power_supply_battery_info - information about batteries
444 * @voltage_min_design_uv: minimum voltage across the poles when the battery
446 * level the battery will need precharging when using CC/CV charging.
447 * @voltage_max_design_uv: voltage across the poles when the battery is fully
449 * printed on the label of the battery.
451 * charging the battery in microamperes. This is the charging phase when the
452 * battery is completely empty and we need to carefully trickle in some
462 * terminate completely and not restart until the voltage over the battery
464 * @charge_restart_voltage_uv: when the battery has been fully charged by
475 * constant into the battery the voltage slowly ascends to
484 * @alert_low_temp_charge_current_ua: The charging current to use if the battery
485 * enters low alert temperature, i.e. if the internal temperature is between
491 * battery enters high alert temperature, i.e. if the internal temperature is
497 * @factory_internal_resistance_uohm: the internal resistance of the battery
499 * depending on the lifetime and charge of the battery, so this is just a
501 * when the battery is discharging.
503 * battery at fabrication time while charging, expressed in microohms.
504 * The charging process will affect the internal resistance of the battery
507 * battery, so this is just a nominal ballpark figure.
509 * temperature indices. This is an array of temperatures in degrees Celsius
510 * indicating which capacity table to use for a certain temperature, since
513 * temperature is the first variable we determine.
514 * @temp_ambient_alert_min: the battery will go outside of operating conditions
515 * when the ambient temperature goes below this temperature in degrees
517 * @temp_ambient_alert_max: the battery will go outside of operating conditions
518 * when the ambient temperature goes above this temperature in degrees
520 * @temp_alert_min: the battery should issue an alert if the internal
521 * temperature goes below this temperature in degrees Celsius.
522 * @temp_alert_max: the battery should issue an alert if the internal
523 * temperature goes above this temperature in degrees Celsius.
524 * @temp_min: the battery will go outside of operating conditions when
525 * the internal temperature goes below this temperature in degrees Celsius.
527 * @temp_max: the battery will go outside of operating conditions when
528 * the internal temperature goes above this temperature in degrees Celsius.
533 * at the indexed temperature.
536 * @resist_table: this is a table that correlates a battery temperature to the
537 * expected internal resistance at this temperature. The resistance is given
539 * resistance of the battery is usually necessary for calculating the open
541 * the capacity of the battery. The resist_table must be ordered descending
542 * by temperature: highest temperature with lowest resistance first, lowest
543 * temperature with highest resistance last.
545 * @vbat2ri_discharging: this is a table that correlates Battery voltage (VBAT)
549 * of the battery. These voltages to resistance tables apply when the battery
555 * when the battery is charging. Being under charge changes the battery's
560 * @bti_resistance_ohm: The Battery Type Indicator (BIT) nominal resistance
561 * in ohms for this battery, if an identification resistor is mounted
562 * between a third battery terminal and ground. This scheme is used by a lot
565 * for example 10 for +/- 10%, if the bti_resistance is set to 7000 and the
566 * tolerance is 10% we will detect a proper battery if the BTI resistance
569 * This is the recommended struct to manage static battery parameters,
574 * The default field value is -EINVAL or NULL for pointers.
582 * ^ Battery voltage
583 * | --- overvoltage_limit_uv
596 * +------------------------------------------------------------------> time
598 * ^ Current into the battery
613 * +-----------------------------------------------------------------> time
618 * With CC/CV charging commence over time like this for an empty battery:
620 * 1. When the battery is completely empty it may need to be charged with
624 * 2. Next a small initial pre-charge current (precharge_current_ua)
632 * constant_charge_current_max_ua of current to flow into the battery.
633 * The chemical reaction in the battery will make the voltage go up as
634 * charge goes into the battery. This current is applied until we reach
638 * means we allow current to go into the battery, but we keep the voltage
639 * fixed. This current will continue to charge the battery while keeping
640 * the voltage the same. A chemical reaction in the battery goes on
645 * After this the battery is fully charged, and if we do not support maintenance
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
668 * battery has to begin with, such as when it is first used or was taken out
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 * .---. | | |
683 * '---' | | |
685 * GND +-------------------------------+
692 * temperature and how much capacity is left in the battery due to the
695 * In many practical applications we cannot just disconnect the battery from
697 * current out from the battery), estimate the Ri and thus calculate the
700 * OCV = VBAT - (IBAT * Ri)
706 * the battery even under load. Using this method will also compensate for
707 * temperature changes in the environment: this will also make the internal
709 * VBAT to Ri takes both remaining capacity and temperature into consideration.
711 * Alternatively a manufacturer can specify how the capacity of the battery
712 * is dependent on the battery temperature which is the main factor affecting
716 * the purpose of the table resist_table: this will take a temperature and
717 * tell us how big percentage of Ri the specified temperature correlates to.
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()
975 return -EOPNOTSUPP; in power_supply_charge_behaviour_show()
981 return -EOPNOTSUPP; in power_supply_charge_behaviour_parse()