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 */
381 int vbat_uv; /* Battery voltage in microvolt */
382 int ri_uohm; /* Internal resistance in microohm */
386 * struct power_supply_maintenance_charge_table - setting for maintenace charging
396 * time in minutes. We will only use maintenance charging in this setting
398 * maintenance charge current and voltage pair in respective array and wait
407 * plugged into the charger) at charge_restart_voltage_uv. This happens in most
411 * the power used in standby mode. This will over time give a charge graph
419 * +-------------------------------------------------------------------> t
421 * Practically this means that the Li-ions are wandering back and forth in the
424 * reaching charge_term_current_ua to hold up the charge in the battery while
432 * +-------------------------------------------------------------------> t
443 * As an example, a Samsung EB425161LA Lithium-Ion battery is CC/CV charged
458 * the expected stand-by current. Also overvoltage protection will be applied
470 * struct power_supply_battery_info - information about batteries
472 * @energy_full_design_uwh: energy content when fully charged in microwatt
474 * @charge_full_design_uah: charge content when fully charged in microampere
477 * is at minimum voltage level in microvolts. If the voltage drops below this
480 * charged in microvolts. This is the "nominal voltage" i.e. the voltage
483 * charging the battery in microamperes. This is the charging phase when the
484 * battery is completely empty and we need to carefully trickle in some
486 * @precharge_current_ua: current to use in the precharge phase in microamperes,
488 * @precharge_voltage_max_uv: the maximum voltage allowed when precharging in
492 * @charge_term_current_ua: when the current in the CV (constant voltage)
493 * charging phase drops below this value in microamperes the charging will
498 * drops below this value in microvolts, the charging will be restarted
503 * in some cases.
504 * @constant_charge_current_max_ua: current in microamperes to use in the CC
509 * @constant_charge_voltage_max_uv: voltage in microvolts signifying the end of
514 * @maintenance_charge_size: the number of maintenance charging settings in
530 * at fabrication time, expressed in microohms. This resistance will vary
535 * battery at fabrication time while charging, expressed in microohms.
541 * temperature indices. This is an array of temperatures in degrees Celsius
547 * when the ambient temperature goes below this temperature in degrees
550 * when the ambient temperature goes above this temperature in degrees
553 * temperature goes below this temperature in degrees Celsius.
555 * temperature goes above this temperature in degrees Celsius.
557 * the internal temperature goes below this temperature in degrees Celsius.
560 * the internal temperature goes above this temperature in degrees Celsius.
562 * @ocv_table: for each entry in ocv_temp there is a corresponding entry in
563 * ocv_table and a size for each entry in ocv_table_size. These arrays
564 * determine the capacity in percent in relation to the voltage in microvolts
566 * @ocv_table_size: for each entry in ocv_temp this array is giving the size of
567 * each entry in the array of capacity arrays in ocv_table.
576 * @resist_table_size: the number of items in the resist_table.
578 * to internal resistance (Ri). The resistance is given in microohm for the
579 * corresponding voltage in microvolts. The internal resistance is used to
584 * @vbat2ri_discharging_size: the number of items in the vbat2ri_discharging
590 * @vbat2ri_charging_size: the number of items in the vbat2ri_charging
593 * in ohms for this battery, if an identification resistor is mounted
596 * @bti_resistance_tolerance: The tolerance in percent of the BTI resistance,
597 * for example 10 for +/- 10%, if the bti_resistance is set to 7000 and the
605 * Its field names must correspond to elements in enum power_supply_property.
606 * The default field value is -EINVAL or NULL for pointers.
615 * | --- overvoltage_limit_uv
628 * +------------------------------------------------------------------> time
645 * +-----------------------------------------------------------------> time
653 * an especially small current so that electrons just "trickle in",
656 * 2. Next a small initial pre-charge current (precharge_current_ua)
658 * reach precharge_voltage_max_uv. CAUTION: in some texts this is referred
659 * to as "trickle charging" but the use in the Linux kernel is different
665 * The chemical reaction in the battery will make the voltage go up as
672 * the voltage the same. A chemical reaction in the battery goes on
685 * go in for usage while the charger is still connected, mainly for
696 * capacity in the battery, usually as a percentage of charge. In practice
697 * many chargers uses a so-called fuel gauge or coloumb counter that measure
698 * how much charge goes into the battery and how much goes out (+/- leak
701 * and charged in a separate charger. Therefore many capacity algorithms use
702 * the open circuit voltage with a look-up table to determine the rough
704 * with an ideal voltage source (V) in series with an internal resistance (Ri)
707 * +-------> IBAT >----------------+
711 * o <---------- | |
713 * .---. | | |
715 * '---' | | |
717 * GND +-------------------------------+
724 * temperature and how much capacity is left in the battery due to the
727 * In many practical applications we cannot just disconnect the battery from
732 * OCV = VBAT - (IBAT * Ri)
736 * nonlinear and may need many datapoints but can be found in datasheets for
739 * temperature changes in the environment: this will also make the internal
746 * when it is cold. You can put in 1500mAh and only get 800mAh out before the
809 const char *property);
811 struct device *dev, const char *property);
814 power_supply_get_by_phandle(struct device_node *np, const char *property) in power_supply_get_by_phandle() argument
817 devm_power_supply_get_by_phandle(struct device *dev, const char *property) in devm_power_supply_get_by_phandle() argument
867 return ((info->vbat2ri_discharging != NULL) && in power_supply_supports_vbat2ri()
868 info->vbat2ri_discharging_size > 0); in power_supply_supports_vbat2ri()
874 return ((info->resist_table != NULL) && in power_supply_supports_temp2ri()
875 info->resist_table_size > 0); in power_supply_supports_temp2ri()
881 static inline int power_supply_is_system_supplied(void) { return -ENOSYS; } in power_supply_is_system_supplied()
996 return -EOPNOTSUPP; in power_supply_charge_behaviour_show()
1002 return -EOPNOTSUPP; in power_supply_charge_behaviour_parse()
1011 return -EOPNOTSUPP; in power_supply_charge_types_show()
1016 return -EOPNOTSUPP; in power_supply_charge_types_parse()