• J
    power_supply: add SCOPE attribute to power supplies · 25a0bc2d
    Jeremy Fitzhardinge 提交于
    This adds a "scope" attribute to a power_supply, which indicates how
    much of the system it powers.  It appears in sysfs as "scope" or in
    the uevent file as POWER_SUPPLY_SCOPE=.  There are presently three
    possible values:
    	Unknown - unknown power topology
    	System - the power supply powers the whole system
    	Device - it powers a specific device, or tree of devices
    
    A power supply which doesn't have a "scope" attribute should be assumed to
    have "System" scope.
    
    In general, usermode should assume that loss of all System-scoped power
    supplies will power off the whole system, but any single one is sufficient
    to power the system.
    Signed-off-by: NJeremy Fitzhardinge <jeremy@goop.org>
    Cc: Richard Hughes <richard@hughsie.com>
    25a0bc2d
power_supply_sysfs.c 8.1 KB