Merge branch 'fix/fix_i2c_modem_clock_ref_count_mismatch_v6.0' into 'release/v6.0'

feat(esp_hw_support): add reference count control & clock enable checking for modem clock devices (v6.0)

See merge request espressif/esp-idf!45533
This commit is contained in:
Jiang Jiang Jian
2026-02-01 11:54:27 +08:00
33 changed files with 1096 additions and 21 deletions
@@ -27,6 +27,7 @@ extern "C" {
// For bootloader, the strategy is to keep the analog i2c master clock always enabled if ANA_I2C_MST_CLK_HAS_ROOT_GATING (in bootloader_hardware_init())
#define ANALOG_CLOCK_ENABLE()
#define ANALOG_CLOCK_DISABLE()
#define ANALOG_CLOCK_IS_ENABLED()
#else // !BOOTLOADER_BUILD
@@ -57,9 +58,11 @@ static inline __attribute__((always_inline)) void ANA_I2C_SRC_CLOCK_ENABLE(bool
ANA_I2C_SRC_CLOCK_ENABLE(false); \
}
#define ANALOG_CLOCK_IS_ENABLED() regi2c_ctrl_ll_master_is_clock_enabled()
#else
#define ANALOG_CLOCK_ENABLE()
#define ANALOG_CLOCK_DISABLE()
#define ANALOG_CLOCK_IS_ENABLED()
#endif
#endif // BOOTLOADER_BUILD