一般是由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_CHARGE_TYPE,//充电类型 POWER_SUPPLY_PROP_HEALTH, //健康状况,包括:good dead over voltage等 POWER_SUPPLY_PROP_PRESENT, //电量百分比 POWER_SUPPLY_PROP_ONLINE, //是否在线 POWER_SUPPLY_PROP_AUTHENTIC, POWER_SUPPLY_PROP_TECHNOLOGY, //采用的技术 POWER_SUPPLY_PROP_CYCLE_COUNT, POWE...
enumpower_supply_property{/* Properties of type `int' */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_PRE...
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...
power_supply_*() functions (for * example power_supply_get_property()). */int(*get_property)(structpower_supply*psy,enumpower_supply_property psp,unionpower_supply_propval*val);int(*set_property)(structpower_supply*psy,enumpower_supply_property psp,constunionpower_supply_propval*val);/* *...
_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...
20: const union power_supply_propval *val); 21: int (*property_is_writeable)(struct power_supply *psy, 22: enum power_supply_property psp); 23: void (*external_power_changed)(struct power_supply *psy); 24: void (*set_charged)(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 ...
constunionpower_supply_propval *val); int(*property_is_writeable)(structpower_supply *psy,//属性psp是否可写,影响是否mode |= S_IWUSR,可选 enumpower_supply_property psp); void(*external_power_changed)(structpower_supply *psy);//供电改变的回调函数,可选 ...
In venues wherepower supplyiserratic or installed capacity insufficient to run the laptops, a generator is recommended. daccess-ods.un.org daccess-ods.un.org 对于那些供电系统不稳定和/或电力不足以供与会者使用其便携式电 脑的会场,建议应配备发电机。