summaryrefslogtreecommitdiffstats
path: root/drivers/i2c/lpc32xx_i2c.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/i2c/lpc32xx_i2c.c')
-rw-r--r--drivers/i2c/lpc32xx_i2c.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/i2c/lpc32xx_i2c.c b/drivers/i2c/lpc32xx_i2c.c
index 78d26e48c3..98106fa988 100644
--- a/drivers/i2c/lpc32xx_i2c.c
+++ b/drivers/i2c/lpc32xx_i2c.c
@@ -72,7 +72,7 @@ static unsigned int lpc32xx_i2c_set_bus_speed(struct i2c_adapter *adap,
if (speed == 0)
return -EINVAL;
- half_period = (105000000 / speed) / 2;
+ half_period = (get_hclk_clk_rate() / speed) / 2;
if ((half_period > 255) || (half_period < 0))
return -EINVAL;
OpenPOWER on IntegriCloud