162306a36Sopenharmony_ciWhat:		/sys/devices/.../state_synced
262306a36Sopenharmony_ciDate:		May 2020
362306a36Sopenharmony_ciContact:	Saravana Kannan <saravanak@google.com>
462306a36Sopenharmony_ciDescription:
562306a36Sopenharmony_ci		The /sys/devices/.../state_synced attribute is only present for
662306a36Sopenharmony_ci		devices whose bus types or driver provides the .sync_state()
762306a36Sopenharmony_ci		callback. The number read from it (0 or 1) reflects the value
862306a36Sopenharmony_ci		of the device's 'state_synced' field. A value of 0 means the
962306a36Sopenharmony_ci		.sync_state() callback hasn't been called yet. A value of 1
1062306a36Sopenharmony_ci		means the .sync_state() callback has been called.
1162306a36Sopenharmony_ci
1262306a36Sopenharmony_ci		Generally, if a device has sync_state() support and has some of
1362306a36Sopenharmony_ci		the resources it provides enabled at the time the kernel starts
1462306a36Sopenharmony_ci		(Eg: enabled by hardware reset or bootloader or anything that
1562306a36Sopenharmony_ci		run before the kernel starts), then it'll keep those resources
1662306a36Sopenharmony_ci		enabled and in a state that's compatible with the state they
1762306a36Sopenharmony_ci		were in at the start of the kernel. The device will stop doing
1862306a36Sopenharmony_ci		this only when the sync_state() callback has been called --
1962306a36Sopenharmony_ci		which happens only when all its consumer devices are registered
2062306a36Sopenharmony_ci		and have probed successfully. Resources that were left disabled
2162306a36Sopenharmony_ci		at the time the kernel starts are not affected or limited in
2262306a36Sopenharmony_ci		any way by sync_state() callbacks.
2362306a36Sopenharmony_ci
2462306a36Sopenharmony_ci		Writing "1" to this file will force a call to the device's
2562306a36Sopenharmony_ci		sync_state() function if it hasn't been called already. The
2662306a36Sopenharmony_ci		sync_state() call happens independent of the state of the
2762306a36Sopenharmony_ci		consumer devices.
2862306a36Sopenharmony_ci
2962306a36Sopenharmony_ci
30