* this power supply. Insteaduse power_supply_*() functions (for * example power_supply_get_property()). */ int (*get_property)(struct power_supply *psy,//用于获取psy属性的回调函数 enum power_supply_property psp, union power_supply_propval *val); int (*set_property)(struct power_supply...
psy子系统中power_supply_class对应着系统中供电设备类,是一个抽象化的集合,对应着/sys/class/power_supply/目录,供电设备都在该目录之下,比如battery设备就对应该目录下一个子目录battery,而battery设备的一个属性则对应battery的一个文件节点,也对应着一个kobject。 相关结构体 psy相关的定义在/include/linux/power...
power supply(以下简称psy)是Linux中从供电驱动抽象出来的子系统,是Linux电源管理的重要组成部分。psy是一个中间层,在kernel中是属于设备驱动的一部分,psy的作用主要是向用户空间汇总各类供电的状态信息。抽象出来的各类信息称为property,比如供电设备是否连接就对应着POWER_SUPPLY_PROP_ONLINE。在驱动层,主要是两大模块,...
< power_supply的名字 By: jixuan 2021年6月15日enumpower_supply_typetype;//!< 类型 By: jixuan 2021年6月15日enumpower_supply_property*properties;//!< 属性 By: jixuan 2021年6月15日size_tnum_properties;int(*get_property)(structpower_supply *psy,enumpower_supply_property psp,unionpower_supp...
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...
info->usb.get_property = pm860x_usb_get_prop; ret = power_supply_register(&pdev->dev, &info->usb);if(ret)gotoout; pm860x_init_charger(info);for(i =0; i < ARRAY_SIZE(info->irq); i++) { ret = request_threaded_irq(info->irq[i],NULL, ...
1: /* include/linux/power_supply.h */ 2: struct power_supply { 3: const char *name; 4: enum power_supply_type type; 5: enum power_supply_property *properties; 6: size_t num_properties; 7: 8: char **supplied_to; 9: size_t num_supplicants; ...
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_...
在下文中一共展示了power_supply_show_property函数的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。 示例1: power_supply_uevent ▲点赞 9▼ intpower_supply_uevent(struct device *dev, struct kobj_uevent_env *env){stru...
Edit Gets the device's power supply status. C# Copy public static PowerSupplyStatus PowerSupplyStatus { get; } Property Value PowerSupplyStatus The device's power supply status. Applies to ProductVersions WinRT Build 10240, Build 10586, Build 14383, Build 15063, Build 16299, Build 17134, ...