一般是由fg的芯片来判断,通过IIC读取,具体判断可参考: case POWER_SUPPLY_PROP_CAPACITY_LEVEL: if (battery->state & ACPI_BATTERY_STATE_CRITICAL) val->intval = POWER_SUPPLY_CAPACITY_LEVEL_CRITICAL; else if (test_bit(ACPI_BATTERY_ALARM_PRESENT, &battery->flags) && (battery->capacity_now <= batt...
POWER_SUPPLY_PROP_STATUS = 0, //该PSY的status,主要是充电状态,包括:unknown,charging,discharging,not charging full, POWER_SUPPLY_PROP_CHARGE_TYPE,//充电类型 POWER_SUPPLY_PROP_HEALTH, //健康状况,包括:good dead over voltage等 POWER_SUPPLY_PROP_PRESENT, //电量百分比 POWER_SUPPLY_PROP_ONLINE, //...
/* Run-time specific power supply configuration */structpower_supply_config{structdevice_node*of_node;structfwnode_handle*fwnode;/* Driver private data */void*drv_data;char**supplied_to;size_t num_supplicants;};/* Description of power supply */structpower_supply_desc{constchar*name;enumpower_...
power supply class将所有可能PSY属性,以枚举型变量(enum power_supply_property )的形式抽象出来,PSY driver可以根据设备的实际情况,从中选取一些。 enumpower_supply_property {/*Properties of type `int'*/POWER_SUPPLY_PROP_STATUS=0, POWER_SUPPLY_PROP_CHARGE_TYPE, POWER_SUPPLY_PROP_HEALTH, POWER_SUPPLY_...
power supply class将所有可能PSY属性,以枚举型变量形式抽象出来,PSY driver可以根据设备的实际情况,从中选取一些。 enumpower_supply_property{/* Properties of type `int' */POWER_SUPPLY_PROP_STATUS=0,//该PSY的status,主要是充电状态,包括:unknown,charging,discharging,not charging full,POWER_SUPPLY_PROP_CHA...
_PROP_CHARGE_CONTROL_LIMIT,POWER_SUPPLY_PROP_CHARGE_CONTROL_LIMIT_MAX,POWER_SUPPLY_PROP_ENERGY_FULL_DESIGN,POWER_SUPPLY_PROP_ENERGY_EMPTY_DESIGN,POWER_SUPPLY_PROP_ENERGY_FULL,POWER_SUPPLY_PROP_ENERGY_EMPTY,POWER_SUPPLY_PROP_ENERGY_NOW,POWER_SUPPLY_PROP_ENERGY_AVG,POWER_SUPPLY_PROP_CAPACITY,/* in...
17: union power_supply_propval *val); 18: int (*set_property)(struct power_supply *psy, 19: enum power_supply_property psp, 20: const union power_supply_propval *val); 21: int (*property_is_writeable)(struct power_supply *psy, ...
union power_supply_propval *val); int (*set_property)(struct power_supply *psy,//用于设置psy属性的回调函数 enum power_supply_property psp, const union power_supply_propval *val); /* * property_is_writeable() will be called during registration ...
Available add-ons Advanced Security Enterprise-grade security features GitHub Copilot Enterprise-grade AI features Premium Support Enterprise-grade 24/7 support Pricing Search or jump to... Search code, repositories, users, issues, pull requests... Provide feedback We read every piece of ...
Power electronic technologies have been employed to improve the load recovery level. Under fault conditions, power electronic devices can provide voltage support and effectively expand the scope of supply restoration. Studies have indicated the effectiveness of SOPs in regional power supply restoration. It...