Lines Matching +full:charging +full:- +full:algorithm
1 /* SPDX-License-Identifier: GPL-2.0-only */
42 /* What algorithm is the charger using? */
185 POWER_SUPPLY_TYPE_USB_DCP, /* Dedicated Charging Port */
186 POWER_SUPPLY_TYPE_USB_CDP, /* Charging Downstream Port */
191 POWER_SUPPLY_TYPE_APPLE_BRICK_ID, /* Apple Charging Method */
198 POWER_SUPPLY_USB_TYPE_DCP, /* Dedicated Charging Port */
199 POWER_SUPPLY_USB_TYPE_CDP, /* Charging Downstream Port */
205 POWER_SUPPLY_USB_TYPE_APPLE_BRICK_ID, /* Apple Charging Method */
226 /* Run-time specific power supply configuration */
354 * struct power_supply_maintenance_charge_table - setting for maintenace charging
355 * @charge_current_max_ua: maintenance charging current that is used to keep
356 * the charge of the battery full as current is consumed after full charging.
358 * reach this voltage the maintenance charging current is turned off. It is
360 * @charge_voltage_max_uv: maintenance charging voltage that is usually a bit
363 * @safety_timer_minutes: maintenance charging safety timer, with an expiry
364 * time in minutes. We will only use maintenance charging in this setting
368 * charging setting, disable charging until we reach
369 * charge_restart_voltage_uv and restart ordinary CC/CV charging from there.
373 * Ordinary CC/CV charging will stop charging when the charge current goes
387 * +-------------------------------------------------------------------> t
389 * Practically this means that the Li-ions are wandering back and forth in the
391 * To prolong the life of the battery, maintenance charging is applied after
400 * +-------------------------------------------------------------------> t
402 * Maintenance charging uses the voltages from this table: a table of settings
404 * CC/CV charging. The maintenance charging will for safety reasons not go on
406 * settings, then disable charging completely after we reach the last one,
407 * and after that we do not restart charging until we reach
409 * ordinary CC/CV charging from there.
411 * As an example, a Samsung EB425161LA Lithium-Ion battery is CC/CV charged
417 * For most mobile electronics this type of maintenance charging is enough for
419 * charging cycles are complete, if the current and voltage has been chosen
424 * charging, ordinary CC/CV charging is restarted. This can happen if the
425 * device is e.g. actively used during charging, so more current is drawn than
426 * the expected stand-by current. Also overvoltage protection will be applied
438 * struct power_supply_battery_info - information about batteries
446 * level the battery will need precharging when using CC/CV charging.
451 * charging the battery in microamperes. This is the charging phase when the
458 * CC (constant current) charging phase defined by constant_charge_current_ua
461 * charging phase drops below this value in microamperes the charging will
463 * poles reach charge_restart_voltage_uv unless we use maintenance charging.
465 * CC/CV charging and charging has been disabled, and the voltage subsequently
466 * drops below this value in microvolts, the charging will be restarted
467 * (typically using CV charging).
469 * voltage_max_design_uv and we reach this voltage level, all charging must
473 * (constant current) charging phase. The charging rate is limited
474 * by this current. This is the main charging phase and as the current is
478 * the CC (constant current) charging phase and the beginning of the CV
479 * (constant voltage) charging phase.
480 * @maintenance_charge: an array of maintenance charging settings to be used
481 * after the main CC/CV charging phase is complete.
482 * @maintenance_charge_size: the number of maintenance charging settings in
484 * @alert_low_temp_charge_current_ua: The charging current to use if the battery
486 * temp_alert_min and temp_min. No matter the charging phase, this
489 * but for the charging voltage.
490 * @alert_high_temp_charge_current_ua: The charging current to use if the
492 * between temp_alert_max and temp_max. No matter the charging phase, this
494 * the charging current as an evasive manouver.
496 * alert_high_temp_charge_current_ua, but for the charging voltage.
503 * battery at fabrication time while charging, expressed in microohms.
504 * The charging process will affect the internal resistance of the battery
555 * when the battery is charging. Being under charge changes the battery's
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.
576 * CC/CV CHARGING:
578 * The charging parameters here assume a CC/CV charging scheme. This method
583 * | --- overvoltage_limit_uv
595 * |. (trickle charging)
596 * +------------------------------------------------------------------> time
613 * +-----------------------------------------------------------------> time
618 * With CC/CV charging commence over time like this for an empty battery:
624 * 2. Next a small initial pre-charge current (precharge_current_ua)
627 * to as "trickle charging" but the use in the Linux kernel is different
630 * 3. Then the main charging current is applied, which is called the constant
646 * charging, the charging will not restart until power dissipation makes the
648 * we restart charging at the appropriate phase, usually this will be inside
651 * If we support maintenance charging the voltage is however kept high after
657 * All charging MUST terminate if the overvoltage_limit_uv is ever reached.
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
670 * the open circuit voltage with a look-up table to determine the rough
675 * +-------> IBAT >----------------+
679 * o <---------- | |
681 * .---. | | |
683 * '---' | | |
685 * GND +-------------------------------+
700 * OCV = VBAT - (IBAT * Ri)
811 int vbat_uv, bool 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()
975 return -EOPNOTSUPP; in power_supply_charge_behaviour_show()
981 return -EOPNOTSUPP; in power_supply_charge_behaviour_parse()