• Home
  • Raw
  • Download

Lines Matching +full:battery +full:- +full:power

1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * Universal power supply monitor class
29 * For systems where the charger determines the maximum battery capacity
189 POWER_SUPPLY_TYPE_USB_PD, /* Power Delivery Port */
202 POWER_SUPPLY_USB_TYPE_PD, /* Power Delivery Port */
204 POWER_SUPPLY_USB_TYPE_PD_PPS, /* PD Programmable Power Supply */
226 /* Run-time specific power supply configuration */
241 /* Description of power supply */
251 * Functions for drivers implementing power supply class.
253 * this power supply. Instead use power_supply_*() functions (for
264 * of power supply. If this happens during device probe then it must
273 * Set if thermal zone should not be created for this power supply.
325 * This is recommended structure to specify static power supply parameters.
326 * Generic one, parametrizable for different power supplies. Power supply
354 int vbat_uv; /* Battery voltage in microvolt */
359 * struct power_supply_maintenance_charge_table - setting for maintenace charging
361 * the charge of the battery full as current is consumed after full charging.
376 * for the battery.
381 * consumer products because the power usage while connected to a charger is
382 * not zero, and devices are not manufactured to draw power directly from the
383 * charger: instead they will at all times dissipate the battery a little, like
384 * the power used in standby mode. This will over time give a charge graph
392 * +-------------------------------------------------------------------> t
394 * Practically this means that the Li-ions are wandering back and forth in the
395 * battery and this causes degeneration of the battery anode and cathode.
396 * To prolong the life of the battery, maintenance charging is applied after
397 * reaching charge_term_current_ua to hold up the charge in the battery while
398 * consuming power, thus lowering the wear on the battery:
405 * +-------------------------------------------------------------------> t
416 * As an example, a Samsung EB425161LA Lithium-Ion battery is CC/CV charged
425 * appropriately. These need to be determined from battery discharge curves
431 * the expected stand-by current. Also overvoltage protection will be applied
443 * struct power_supply_battery_info - information about batteries
449 * @voltage_min_design_uv: minimum voltage across the poles when the battery
451 * level the battery will need precharging when using CC/CV charging.
452 * @voltage_max_design_uv: voltage across the poles when the battery is fully
454 * printed on the label of the battery.
456 * charging the battery in microamperes. This is the charging phase when the
457 * battery is completely empty and we need to carefully trickle in some
467 * terminate completely and not restart until the voltage over the battery
469 * @charge_restart_voltage_uv: when the battery has been fully charged by
480 * constant into the battery the voltage slowly ascends to
489 * @alert_low_temp_charge_current_ua: The charging current to use if the battery
496 * battery enters high alert temperature, i.e. if the internal temperature is
502 * @factory_internal_resistance_uohm: the internal resistance of the battery
504 * depending on the lifetime and charge of the battery, so this is just a
506 * when the battery is discharging.
508 * battery at fabrication time while charging, expressed in microohms.
509 * The charging process will affect the internal resistance of the battery
512 * battery, so this is just a nominal ballpark figure.
519 * @temp_ambient_alert_min: the battery will go outside of operating conditions
522 * @temp_ambient_alert_max: the battery will go outside of operating conditions
525 * @temp_alert_min: the battery should issue an alert if the internal
527 * @temp_alert_max: the battery should issue an alert if the internal
529 * @temp_min: the battery will go outside of operating conditions when
532 * @temp_max: the battery will go outside of operating conditions when
541 * @resist_table: this is a table that correlates a battery temperature to the
544 * resistance of the battery is usually necessary for calculating the open
546 * the capacity of the battery. The resist_table must be ordered descending
550 * @vbat2ri_discharging: this is a table that correlates Battery voltage (VBAT)
554 * of the battery. These voltages to resistance tables apply when the battery
560 * when the battery is charging. Being under charge changes the battery's
565 * @bti_resistance_ohm: The Battery Type Indicator (BIT) nominal resistance
566 * in ohms for this battery, if an identification resistor is mounted
567 * between a third battery terminal and ground. This scheme is used by a lot
570 * for example 10 for +/- 10%, if the bti_resistance is set to 7000 and the
571 * tolerance is 10% we will detect a proper battery if the BTI resistance
574 * This is the recommended struct to manage static battery parameters,
579 * The default field value is -EINVAL or NULL for pointers.
587 * ^ Battery voltage
588 * | --- overvoltage_limit_uv
601 * +------------------------------------------------------------------> time
603 * ^ Current into the battery
618 * +-----------------------------------------------------------------> time
623 * With CC/CV charging commence over time like this for an empty battery:
625 * 1. When the battery is completely empty it may need to be charged with
629 * 2. Next a small initial pre-charge current (precharge_current_ua)
637 * constant_charge_current_max_ua of current to flow into the battery.
638 * The chemical reaction in the battery will make the voltage go up as
639 * charge goes into the battery. This current is applied until we reach
643 * means we allow current to go into the battery, but we keep the voltage
644 * fixed. This current will continue to charge the battery while keeping
645 * the voltage the same. A chemical reaction in the battery goes on
650 * After this the battery is fully charged, and if we do not support maintenance
651 * charging, the charging will not restart until power dissipation makes the
659 * dissipation for the power consuming entity while connected to the
666 * DETERMINING BATTERY CAPACITY:
669 * capacity in the battery, usually as a percentage of charge. In practice
670 * many chargers uses a so-called fuel gauge or coloumb counter that measure
671 * how much charge goes into the battery and how much goes out (+/- leak
673 * battery has to begin with, such as when it is first used or was taken out
675 * the open circuit voltage with a look-up table to determine the rough
676 * capacity of the battery. The open circuit voltage can be conceptualized
680 * +-------> IBAT >----------------+
684 * o <---------- | |
686 * .---. | | |
688 * '---' | | |
690 * GND +-------------------------------+
697 * temperature and how much capacity is left in the battery due to the
700 * In many practical applications we cannot just disconnect the battery from
702 * current out from the battery), estimate the Ri and thus calculate the
705 * OCV = VBAT - (IBAT * Ri)
711 * the battery even under load. Using this method will also compensate for
716 * Alternatively a manufacturer can specify how the capacity of the battery
717 * is dependent on the battery temperature which is the main factor affecting
726 * The power supply class itself doesn't use this struct as of now.
842 return ((info->vbat2ri_discharging != NULL) && in power_supply_supports_vbat2ri()
843 info->vbat2ri_discharging_size > 0); in power_supply_supports_vbat2ri()
849 return ((info->resist_table != NULL) && in power_supply_supports_temp2ri()
850 info->resist_table_size > 0); in power_supply_supports_temp2ri()
856 static inline int power_supply_is_system_supplied(void) { return -ENOSYS; } in power_supply_is_system_supplied()
982 return -EOPNOTSUPP; in power_supply_charge_behaviour_show()
988 return -EOPNOTSUPP; in power_supply_charge_behaviour_parse()