[v1,26/40] i2c: riic: Use generic definitions for bus frequencies
diff mbox series

Message ID 20200224151530.31713-26-andriy.shevchenko@linux.intel.com
State Superseded
Headers show
Series
  • [v1,01/40] i2c: qup: Move bus frequency definitions to i2c.h
Related show

Commit Message

Andy Shevchenko Feb. 24, 2020, 3:15 p.m. UTC
Since we have generic definitions for bus frequencies, let's use them.

Cc: Chris Brandt <chris.brandt@renesas.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/i2c/busses/i2c-riic.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Chris Brandt Feb. 24, 2020, 4:48 p.m. UTC | #1
On Mon, Feb 24, 2020 1, Andy Shevchenko wrote:
> Subject: [PATCH v1 26/40] i2c: riic: Use generic definitions for bus
> frequencies
> 
> Since we have generic definitions for bus frequencies, let's use them.
> 
> Cc: Chris Brandt <chris.brandt@renesas.com>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
>  drivers/i2c/busses/i2c-riic.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)

Reviewed-by: Chris Brandt <chris.brandt@renesas.com>

Patch
diff mbox series

diff --git a/drivers/i2c/busses/i2c-riic.c b/drivers/i2c/busses/i2c-riic.c
index 800414886f6b..051649e2afe5 100644
--- a/drivers/i2c/busses/i2c-riic.c
+++ b/drivers/i2c/busses/i2c-riic.c
@@ -287,10 +287,10 @@  static int riic_init_hw(struct riic_dev *riic, struct i2c_timings *t)
 
 	pm_runtime_get_sync(riic->adapter.dev.parent);
 
-	if (t->bus_freq_hz > 400000) {
+	if (t->bus_freq_hz > I2C_FAST_MODE_FREQ) {
 		dev_err(&riic->adapter.dev,
-			"unsupported bus speed (%dHz). 400000 max\n",
-			t->bus_freq_hz);
+			"unsupported bus speed (%dHz). %d max\n",
+			t->bus_freq_hz, I2C_FAST_MODE_FREQ);
 		ret = -EINVAL;
 		goto out;
 	}