30 lines · plain
1What: /sys/devices/.../state_synced2Date: May 20203Contact: Saravana Kannan <saravanak@google.com>4Description:5 The /sys/devices/.../state_synced attribute is only present for6 devices whose bus types or driver provides the .sync_state()7 callback. The number read from it (0 or 1) reflects the value8 of the device's 'state_synced' field. A value of 0 means the9 .sync_state() callback hasn't been called yet. A value of 110 means the .sync_state() callback has been called.11 12 Generally, if a device has sync_state() support and has some of13 the resources it provides enabled at the time the kernel starts14 (Eg: enabled by hardware reset or bootloader or anything that15 run before the kernel starts), then it'll keep those resources16 enabled and in a state that's compatible with the state they17 were in at the start of the kernel. The device will stop doing18 this only when the sync_state() callback has been called --19 which happens only when all its consumer devices are registered20 and have probed successfully. Resources that were left disabled21 at the time the kernel starts are not affected or limited in22 any way by sync_state() callbacks.23 24 Writing "1" to this file will force a call to the device's25 sync_state() function if it hasn't been called already. The26 sync_state() call happens independent of the state of the27 consumer devices.28 29 30