Home
last modified time | relevance | path

Searched refs:bus_freq_hz (Results 1 – 12 of 12) sorted by relevance

/drivers/i2c/busses/
Di2c-designware-common.c201 if (t->bus_freq_hz == supported_speeds[i]) in i2c_dw_validate_speed()
207 t->bus_freq_hz); in i2c_dw_validate_speed()
273 switch (t->bus_freq_hz) { in i2c_dw_acpi_configure()
326 if (acpi_speed && t->bus_freq_hz) in i2c_dw_adjust_bus_speed()
327 t->bus_freq_hz = min(t->bus_freq_hz, acpi_speed); in i2c_dw_adjust_bus_speed()
328 else if (acpi_speed || t->bus_freq_hz) in i2c_dw_adjust_bus_speed()
329 t->bus_freq_hz = max(t->bus_freq_hz, acpi_speed); in i2c_dw_adjust_bus_speed()
331 t->bus_freq_hz = I2C_MAX_FAST_MODE_FREQ; in i2c_dw_adjust_bus_speed()
Di2c-rk3x.c585 if (WARN_ON(t->bus_freq_hz > I2C_MAX_FAST_MODE_FREQ)) in rk3x_i2c_v0_calc_timings()
586 t->bus_freq_hz = I2C_MAX_FAST_MODE_FREQ; in rk3x_i2c_v0_calc_timings()
589 if (WARN_ON(t->bus_freq_hz < 1000)) in rk3x_i2c_v0_calc_timings()
590 t->bus_freq_hz = 1000; in rk3x_i2c_v0_calc_timings()
604 spec = rk3x_i2c_get_spec(t->bus_freq_hz); in rk3x_i2c_v0_calc_timings()
627 scl_rate_khz = t->bus_freq_hz / 1000; in rk3x_i2c_v0_calc_timings()
764 if (WARN_ON(t->bus_freq_hz > I2C_MAX_FAST_MODE_PLUS_FREQ)) in rk3x_i2c_v1_calc_timings()
765 t->bus_freq_hz = I2C_MAX_FAST_MODE_PLUS_FREQ; in rk3x_i2c_v1_calc_timings()
768 if (WARN_ON(t->bus_freq_hz < 1000)) in rk3x_i2c_v1_calc_timings()
769 t->bus_freq_hz = 1000; in rk3x_i2c_v1_calc_timings()
[all …]
Di2c-riic.c297 if (t->bus_freq_hz > I2C_MAX_FAST_MODE_FREQ) { in riic_init_hw()
300 t->bus_freq_hz, I2C_MAX_FAST_MODE_FREQ); in riic_init_hw()
322 total_ticks = DIV_ROUND_UP(rate, t->bus_freq_hz); in riic_init_hw()
339 (unsigned long)t->bus_freq_hz); in riic_init_hw()
473 i2c_t.bus_freq_hz); in riic_i2c_probe()
Di2c-hisi.c385 total_cnt = DIV_ROUND_UP_ULL(ctlr->clk_rate_khz * HZ_PER_KHZ, ctlr->t.bus_freq_hz); in hisi_i2c_set_scl()
410 switch (ctlr->t.bus_freq_hz) { in hisi_i2c_configure_bus()
424 ctlr->t.bus_freq_hz = I2C_MAX_STANDARD_MODE_FREQ; in hisi_i2c_configure_bus()
501 i2c_freq_mode_string(ctlr->t.bus_freq_hz), hw_version); in hisi_i2c_probe()
Di2c-designware-pcidrv.c106 dev->timings.bus_freq_hz = I2C_MAX_STANDARD_MODE_FREQ; in mfld_setup()
146 dev->timings.bus_freq_hz = I2C_MAX_STANDARD_MODE_FREQ; in navi_amd_setup()
276 dev->timings.bus_freq_hz = I2C_MAX_FAST_MODE_FREQ; in i2c_dw_pci_probe()
Di2c-npcm7xx.c1786 static int npcm_i2c_init_clk(struct npcm_i2c *bus, u32 bus_freq_hz) in npcm_i2c_init_clk() argument
1798 bus_freq_khz = bus_freq_hz / 1000; in npcm_i2c_init_clk()
1799 bus->bus_freq = bus_freq_hz; in npcm_i2c_init_clk()
1802 if (bus_freq_hz <= I2C_MAX_STANDARD_MODE_FREQ) { in npcm_i2c_init_clk()
1817 else if (bus_freq_hz <= I2C_MAX_FAST_MODE_FREQ) { in npcm_i2c_init_clk()
1841 else if (bus_freq_hz <= I2C_MAX_FAST_MODE_PLUS_FREQ) { in npcm_i2c_init_clk()
1870 if (bus_freq_hz >= I2C_MAX_FAST_MODE_FREQ) { in npcm_i2c_init_clk()
1889 if (bus_freq_hz >= I2C_MAX_FAST_MODE_FREQ) { in npcm_i2c_init_clk()
1910 u32 bus_freq_hz) in npcm_i2c_init_module() argument
1917 bus_freq_hz < I2C_FREQ_MIN_HZ || bus_freq_hz > I2C_FREQ_MAX_HZ) in npcm_i2c_init_module()
[all …]
Di2c-designware-master.c85 if (t->bus_freq_hz == I2C_MAX_FAST_MODE_PLUS_FREQ) { in i2c_dw_set_timings_master()
136 t->bus_freq_hz = I2C_MAX_FAST_MODE_FREQ; in i2c_dw_set_timings_master()
163 dev_dbg(dev->dev, "Bus speed: %s\n", i2c_freq_mode_string(t->bus_freq_hz)); in i2c_dw_set_timings_master()
825 switch (t->bus_freq_hz) { in i2c_dw_configure_master()
Di2c-rcar.c246 .bus_freq_hz = I2C_MAX_STANDARD_MODE_FREQ, in rcar_i2c_clock_calculate()
317 if (scl <= t.bus_freq_hz) in rcar_i2c_clock_calculate()
325 scl, t.bus_freq_hz, rate, round, cdf, scgd); in rcar_i2c_clock_calculate()
Di2c-stm32f7.c650 t->bus_freq_hz = I2C_MAX_STANDARD_MODE_FREQ; in stm32f7_i2c_setup_timing()
656 if (t->bus_freq_hz > I2C_MAX_FAST_MODE_PLUS_FREQ) { in stm32f7_i2c_setup_timing()
658 t->bus_freq_hz, I2C_MAX_FAST_MODE_PLUS_FREQ); in stm32f7_i2c_setup_timing()
662 setup->speed_freq = t->bus_freq_hz; in stm32f7_i2c_setup_timing()
Di2c-meson.c472 meson_i2c_set_clk_div(i2c, timings.bus_freq_hz); in meson_i2c_probe()
Di2c-at91-master.c78 2 * t->bus_freq_hz) - offset); in at91_calc_twi_clock()
/drivers/i2c/
Di2c-core-base.c80 const char *i2c_freq_mode_string(u32 bus_freq_hz) in i2c_freq_mode_string() argument
82 switch (bus_freq_hz) { in i2c_freq_mode_string()
1800 i2c_parse_timing(dev, "clock-frequency", &t->bus_freq_hz, in i2c_parse_fw_timings()
1803 d = t->bus_freq_hz <= I2C_MAX_STANDARD_MODE_FREQ ? 1000 : in i2c_parse_fw_timings()
1804 t->bus_freq_hz <= I2C_MAX_FAST_MODE_FREQ ? 300 : 120; in i2c_parse_fw_timings()
1807 d = t->bus_freq_hz <= I2C_MAX_FAST_MODE_FREQ ? 300 : 120; in i2c_parse_fw_timings()