xref: /OK3568_Linux_fs/kernel/Documentation/ABI/testing/sysfs-devices-online (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593SmuzhiyunWhat:		/sys/devices/.../online
2*4882a593SmuzhiyunDate:		April 2013
3*4882a593SmuzhiyunContact:	Rafael J. Wysocki <rafael.j.wysocki@intel.com>
4*4882a593SmuzhiyunDescription:
5*4882a593Smuzhiyun		The /sys/devices/.../online attribute is only present for
6*4882a593Smuzhiyun		devices whose bus types provide .online() and .offline()
7*4882a593Smuzhiyun		callbacks.  The number read from it (0 or 1) reflects the value
8*4882a593Smuzhiyun		of the device's 'offline' field.  If that number is 1 and '0'
9*4882a593Smuzhiyun		(or 'n', or 'N') is written to this file, the device bus type's
10*4882a593Smuzhiyun		.offline() callback is executed for the device and (if
11*4882a593Smuzhiyun		successful) its 'offline' field is updated accordingly.  In
12*4882a593Smuzhiyun		turn, if that number is 0 and '1' (or 'y', or 'Y') is written to
13*4882a593Smuzhiyun		this file, the device bus type's .online() callback is executed
14*4882a593Smuzhiyun		for the device and (if successful) its 'offline' field is
15*4882a593Smuzhiyun		updated as appropriate.
16*4882a593Smuzhiyun
17*4882a593Smuzhiyun		After a successful execution of the bus type's .offline()
18*4882a593Smuzhiyun		callback the device cannot be used for any purpose until either
19*4882a593Smuzhiyun		it is removed (i.e. device_del() is called for it), or its bus
20*4882a593Smuzhiyun		type's .online() is exeucted successfully.
21