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