Bootloaders often leave some system resources enabled such as clocks, regulators, interconnects etc. We want to keep these resources enabled until all their consumers are probed. These resources are often shared, so we must wait for all the consumers to come up, before deciding whether to turn them off or change the configuration. This patchset is trying to solve the above problem just for the on-chip interconnects. The problem is solved by allowing the providers to implement the get_bw() function which should return the current average/peak bandwidth. These are used as floor values, that are enforced during boot while the requests from all consumers are being collected. Then the sync_state() callback is used to signal that all consumers have been probed, meaning that the floor bandwidth is not needed anymore and the framework is ready to re-aggregate and process all requests. If get_bw() is not implemented, the framework will use INT_MAX as default bandwidth value. v3: * Go back to introducing the get_bw() function as in v1. (Saravana) * If querying the current bandwidth is not supported, max out the bandwidth. (Saravana) * Use icc_sync_state also for sc7180. v2: https://lore.kernel.org/r/20200722110139.24778-1-georgi.djakov@xxxxxxxxxx/ * Support initial values for both average and peak bandwidth (Mike) * Skip aggregating/setting for nodes that don't specify initial bw (Mike) * Drop patch 2/4: Add get_bw() callback (Mike) * Squash patches 3 and 4. v1: https://lore.kernel.org/lkml/20200709110705.30359-1-georgi.djakov@xxxxxxxxxx/ Georgi Djakov (3): interconnect: Add get_bw() callback interconnect: Add sync state support interconnect: qcom: Use icc_sync_state drivers/interconnect/core.c | 67 +++++++++++++++++++++++++++ drivers/interconnect/qcom/osm-l3.c | 1 + drivers/interconnect/qcom/sc7180.c | 1 + drivers/interconnect/qcom/sdm845.c | 1 + include/linux/interconnect-provider.h | 7 +++ 5 files changed, 77 insertions(+)