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

1 /* SPDX-License-Identifier: GPL-2.0-only */
22 * All voltages, currents, charges, energies, time and temperatures in uV,
24 * stated. It's driver's job to convert its raw values to units in which
31 * space. Unused/unknown fields will not appear in sysfs.
135 POWER_SUPPLY_PROP_CHARGE_CONTROL_START_THRESHOLD, /* in percents! */
136 POWER_SUPPLY_PROP_CHARGE_CONTROL_END_THRESHOLD, /* in percents! */
147 POWER_SUPPLY_PROP_CAPACITY, /* in percents! */
148 POWER_SUPPLY_PROP_CAPACITY_ALERT_MIN, /* in percents! */
149 POWER_SUPPLY_PROP_CAPACITY_ALERT_MAX, /* in percents! */
150 POWER_SUPPLY_PROP_CAPACITY_ERROR_MARGIN, /* in percents! */
184 POWER_SUPPLY_TYPE_USB, /* Standard Downstream Port */
197 POWER_SUPPLY_USB_TYPE_SDP, /* Standard Downstream Port */
226 /* Run-time specific power supply configuration */
354 int vbat_uv; /* Battery voltage in microvolt */
355 int ri_uohm; /* Internal resistance in microohm */
359 * struct power_supply_maintenance_charge_table - setting for maintenace charging
369 * time in minutes. We will only use maintenance charging in this setting
371 * maintenance charge current and voltage pair in respective array and wait
380 * plugged into the charger) at charge_restart_voltage_uv. This happens in most
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
397 * reaching charge_term_current_ua to hold up the charge in the battery while
405 * +-------------------------------------------------------------------> t
416 * As an example, a Samsung EB425161LA Lithium-Ion battery is CC/CV charged
431 * the expected stand-by current. Also overvoltage protection will be applied
443 * struct power_supply_battery_info - information about batteries
445 * @energy_full_design_uwh: energy content when fully charged in microwatt
447 * @charge_full_design_uah: charge content when fully charged in microampere
450 * is at minimum voltage level in microvolts. If the voltage drops below this
453 * charged in microvolts. This is the "nominal voltage" i.e. the voltage
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
459 * @precharge_current_ua: current to use in the precharge phase in microamperes,
461 * @precharge_voltage_max_uv: the maximum voltage allowed when precharging in
465 * @charge_term_current_ua: when the current in the CV (constant voltage)
466 * charging phase drops below this value in microamperes the charging will
471 * drops below this value in microvolts, the charging will be restarted
476 * in some cases.
477 * @constant_charge_current_max_ua: current in microamperes to use in the CC
482 * @constant_charge_voltage_max_uv: voltage in microvolts signifying the end of
487 * @maintenance_charge_size: the number of maintenance charging settings in
503 * at fabrication time, expressed in microohms. This resistance will vary
508 * battery at fabrication time while charging, expressed in microohms.
514 * temperature indices. This is an array of temperatures in degrees Celsius
520 * when the ambient temperature goes below this temperature in degrees
523 * when the ambient temperature goes above this temperature in degrees
526 * temperature goes below this temperature in degrees Celsius.
528 * temperature goes above this temperature in degrees Celsius.
530 * the internal temperature goes below this temperature in degrees Celsius.
533 * the internal temperature goes above this temperature in degrees Celsius.
535 * @ocv_table: for each entry in ocv_temp there is a corresponding entry in
536 * ocv_table and a size for each entry in ocv_table_size. These arrays
537 * determine the capacity in percent in relation to the voltage in microvolts
539 * @ocv_table_size: for each entry in ocv_temp this array is giving the size of
540 * each entry in the array of capacity arrays in ocv_table.
549 * @resist_table_size: the number of items in the resist_table.
551 * to internal resistance (Ri). The resistance is given in microohm for the
552 * corresponding voltage in microvolts. The internal resistance is used to
557 * @vbat2ri_discharging_size: the number of items in the vbat2ri_discharging
563 * @vbat2ri_charging_size: the number of items in the vbat2ri_charging
566 * in ohms for this battery, if an identification resistor is mounted
569 * @bti_resistance_tolerance: The tolerance in percent of the BTI resistance,
570 * for example 10 for +/- 10%, if the bti_resistance is set to 7000 and the
578 * Its field names must correspond to elements in enum power_supply_property.
579 * The default field value is -EINVAL or NULL for pointers.
588 * | --- overvoltage_limit_uv
601 * +------------------------------------------------------------------> time
618 * +-----------------------------------------------------------------> time
626 * an especially small current so that electrons just "trickle in",
629 * 2. Next a small initial pre-charge current (precharge_current_ua)
631 * reach precharge_voltage_max_uv. CAUTION: in some texts this is referred
632 * to as "trickle charging" but the use in the Linux kernel is different
638 * The chemical reaction in the battery will make the voltage go up as
645 * the voltage the same. A chemical reaction in the battery goes on
658 * go in for usage while the charger is still connected, mainly for
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
674 * and charged in a separate charger. Therefore many capacity algorithms use
675 * the open circuit voltage with a look-up table to determine the rough
677 * with an ideal voltage source (V) in series with an internal resistance (Ri)
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
705 * OCV = VBAT - (IBAT * Ri)
709 * nonlinear and may need many datapoints but can be found in datasheets for
712 * temperature changes in the environment: this will also make the internal
719 * when it is cold. You can put in 1500mAh and only get 800mAh out before the
783 const char *property);
785 struct device *dev, const char *property);
788 power_supply_get_by_phandle(struct device_node *np, const char *property) in power_supply_get_by_phandle() argument
791 devm_power_supply_get_by_phandle(struct device *dev, const char *property) in devm_power_supply_get_by_phandle() argument
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()