Lines Matching refs:freq
495 uint32_t pclk1, freq, clkc; in i2c_gd32_configure() local
508 freq = pclk1 / 1000000U; in i2c_gd32_configure()
509 if (freq > I2CCLK_MAX) { in i2c_gd32_configure()
511 I2CCLK_MAX, freq); in i2c_gd32_configure()
547 if (freq < I2CCLK_MIN) { in i2c_gd32_configure()
549 I2CCLK_MIN, freq); in i2c_gd32_configure()
554 I2C_CTL1(cfg->reg) |= freq; in i2c_gd32_configure()
557 if (freq == I2CCLK_MAX) { in i2c_gd32_configure()
560 I2C_RT(cfg->reg) = freq + 1U; in i2c_gd32_configure()
573 if (freq < I2CCLK_FM_MIN) { in i2c_gd32_configure()
575 I2CCLK_FM_MIN, freq); in i2c_gd32_configure()
581 I2C_RT(cfg->reg) = freq * 300U / 1000U + 1U; in i2c_gd32_configure()
604 if (freq < I2CCLK_FM_PLUS_MIN) { in i2c_gd32_configure()
606 I2CCLK_FM_PLUS_MIN, freq); in i2c_gd32_configure()
612 I2C_RT(cfg->reg) = freq * 120U / 1000U + 1U; in i2c_gd32_configure()