Lines Matching +full:property +full:- +full:in +full:- +full:standard +full:- +full:units +full:- +full:microvolt

1 /* SPDX-License-Identifier: GPL-2.0-only */
24 * All voltages, currents, charges, energies, time and temperatures in uV,
26 * stated. It's driver's job to convert its raw values to units in which
33 * space. Unused/unknown fields will not appear in sysfs.
139 POWER_SUPPLY_PROP_CHARGE_CONTROL_START_THRESHOLD, /* in percents! */
140 POWER_SUPPLY_PROP_CHARGE_CONTROL_END_THRESHOLD, /* in percents! */
151 POWER_SUPPLY_PROP_CAPACITY, /* in percents! */
152 POWER_SUPPLY_PROP_CAPACITY_ALERT_MIN, /* in percents! */
153 POWER_SUPPLY_PROP_CAPACITY_ALERT_MAX, /* in percents! */
154 POWER_SUPPLY_PROP_CAPACITY_ERROR_MARGIN, /* in percents! */
188 POWER_SUPPLY_TYPE_USB, /* Standard Downstream Port */
201 POWER_SUPPLY_USB_TYPE_SDP, /* Standard Downstream Port */
230 /* Run-time specific power supply configuration */
383 int vbat_uv; /* Battery voltage in microvolt */
384 int ri_uohm; /* Internal resistance in microohm */
388 * struct power_supply_maintenance_charge_table - setting for maintenace charging
398 * time in minutes. We will only use maintenance charging in this setting
400 * maintenance charge current and voltage pair in respective array and wait
409 * plugged into the charger) at charge_restart_voltage_uv. This happens in most
413 * the power used in standby mode. This will over time give a charge graph
421 * +-------------------------------------------------------------------> t
423 * Practically this means that the Li-ions are wandering back and forth in the
426 * reaching charge_term_current_ua to hold up the charge in the battery while
434 * +-------------------------------------------------------------------> t
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
474 * @energy_full_design_uwh: energy content when fully charged in microwatt
476 * @charge_full_design_uah: charge content when fully charged in microampere
479 * is at minimum voltage level in microvolts. If the voltage drops below this
482 * charged in microvolts. This is the "nominal voltage" i.e. the voltage
485 * charging the battery in microamperes. This is the charging phase when the
486 * battery is completely empty and we need to carefully trickle in some
488 * @precharge_current_ua: current to use in the precharge phase in microamperes,
490 * @precharge_voltage_max_uv: the maximum voltage allowed when precharging in
494 * @charge_term_current_ua: when the current in the CV (constant voltage)
495 * charging phase drops below this value in microamperes the charging will
500 * drops below this value in microvolts, the charging will be restarted
505 * in some cases.
506 * @constant_charge_current_max_ua: current in microamperes to use in the CC
511 * @constant_charge_voltage_max_uv: voltage in microvolts signifying the end of
516 * @maintenance_charge_size: the number of maintenance charging settings in
532 * at fabrication time, expressed in microohms. This resistance will vary
537 * battery at fabrication time while charging, expressed in microohms.
543 * temperature indices. This is an array of temperatures in degrees Celsius
549 * when the ambient temperature goes below this temperature in degrees
552 * when the ambient temperature goes above this temperature in degrees
555 * temperature goes below this temperature in degrees Celsius.
557 * temperature goes above this temperature in degrees Celsius.
559 * the internal temperature goes below this temperature in degrees Celsius.
562 * the internal temperature goes above this temperature in degrees Celsius.
564 * @ocv_table: for each entry in ocv_temp there is a corresponding entry in
565 * ocv_table and a size for each entry in ocv_table_size. These arrays
566 * determine the capacity in percent in relation to the voltage in microvolts
568 * @ocv_table_size: for each entry in ocv_temp this array is giving the size of
569 * each entry in the array of capacity arrays in ocv_table.
578 * @resist_table_size: the number of items in the resist_table.
580 * to internal resistance (Ri). The resistance is given in microohm for the
581 * corresponding voltage in microvolts. The internal resistance is used to
586 * @vbat2ri_discharging_size: the number of items in the vbat2ri_discharging
592 * @vbat2ri_charging_size: the number of items in the vbat2ri_charging
595 * in ohms for this battery, if an identification resistor is mounted
598 * @bti_resistance_tolerance: The tolerance in percent of the BTI resistance,
599 * for example 10 for +/- 10%, if the bti_resistance is set to 7000 and the
607 * Its field names must correspond to elements in enum power_supply_property.
608 * The default field value is -EINVAL or NULL for pointers.
617 * | --- overvoltage_limit_uv
630 * +------------------------------------------------------------------> time
647 * +-----------------------------------------------------------------> time
655 * an especially small current so that electrons just "trickle in",
658 * 2. Next a small initial pre-charge current (precharge_current_ua)
660 * reach precharge_voltage_max_uv. CAUTION: in some texts this is referred
661 * to as "trickle charging" but the use in the Linux kernel is different
667 * The chemical reaction in the battery will make the voltage go up as
674 * the voltage the same. A chemical reaction in the battery goes on
687 * go in for usage while the charger is still connected, mainly for
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
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
706 * with an ideal voltage source (V) in series with an internal resistance (Ri)
709 * +-------> IBAT >----------------+
713 * o <---------- | |
715 * .---. | | |
717 * '---' | | |
719 * GND +-------------------------------+
726 * temperature and how much capacity is left in the battery due to the
729 * In many practical applications we cannot just disconnect the battery from
734 * OCV = VBAT - (IBAT * Ri)
738 * nonlinear and may need many datapoints but can be found in datasheets for
741 * temperature changes in the environment: this will also make the internal
748 * when it is cold. You can put in 1500mAh and only get 800mAh out before the
811 const char *property);
813 struct device *dev, const char *property);
816 power_supply_get_by_phandle(struct device_node *np, const char *property) in power_supply_get_by_phandle() argument
819 devm_power_supply_get_by_phandle(struct device *dev, const char *property) in devm_power_supply_get_by_phandle() argument
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()
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()