Make sync_state()/handoff work for the common clk framework
summary
Problem: clock_disable_unused runs at lateinit but actually races with deferred probe, so hardware-enabled clocks get turned off unpredictably. Attempts include Sana/Abel proposals to use sync_state()/handoff (enable-on-register or deferred sync) and Mike’s 2013 software-refcount flag; all fail on edge cases like cross-controller parent–child clocks, incorrect hardware reads, unintended hardware writes, and long unbounded hold times. Proposed path is a combined approach: record hardware state at register, add a handoff flag to avoid re-enabling hardware, and expose a configurable timeout for sync_state so boots and power savings both work.
AI-written summary · about
