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

Message ID 20200224151530.31713-12-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: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/i2c/busses/i2c-digicolor.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Baruch Siach Feb. 24, 2020, 6:25 p.m. UTC | #1
Hi Andy,

On Mon, Feb 24 2020, Andy Shevchenko wrote:
> Since we have generic definitions for bus frequencies, let's use them.
>
> Cc: Baruch Siach <baruch@tkos.co.il>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

Acked-by: Baruch Siach <baruch@tkos.co.il>

baruch

> ---
>  drivers/i2c/busses/i2c-digicolor.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/i2c/busses/i2c-digicolor.c b/drivers/i2c/busses/i2c-digicolor.c
> index 3adf72540db1..79bf187a90b1 100644
> --- a/drivers/i2c/busses/i2c-digicolor.c
> +++ b/drivers/i2c/busses/i2c-digicolor.c
> @@ -18,7 +18,6 @@
>  #include <linux/of.h>
>  #include <linux/platform_device.h>
>  
> -#define DEFAULT_FREQ		100000
>  #define TIMEOUT_MS		100
>  
>  #define II_CONTROL		0x0
> @@ -300,7 +299,7 @@ static int dc_i2c_probe(struct platform_device *pdev)
>  
>  	if (of_property_read_u32(pdev->dev.of_node, "clock-frequency",
>  				 &i2c->frequency))
> -		i2c->frequency = DEFAULT_FREQ;
> +		i2c->frequency = I2C_STANDARD_MODE_FREQ;
>  
>  	i2c->dev = &pdev->dev;
>  	platform_set_drvdata(pdev, i2c);

Patch
diff mbox series

diff --git a/drivers/i2c/busses/i2c-digicolor.c b/drivers/i2c/busses/i2c-digicolor.c
index 3adf72540db1..79bf187a90b1 100644
--- a/drivers/i2c/busses/i2c-digicolor.c
+++ b/drivers/i2c/busses/i2c-digicolor.c
@@ -18,7 +18,6 @@ 
 #include <linux/of.h>
 #include <linux/platform_device.h>
 
-#define DEFAULT_FREQ		100000
 #define TIMEOUT_MS		100
 
 #define II_CONTROL		0x0
@@ -300,7 +299,7 @@  static int dc_i2c_probe(struct platform_device *pdev)
 
 	if (of_property_read_u32(pdev->dev.of_node, "clock-frequency",
 				 &i2c->frequency))
-		i2c->frequency = DEFAULT_FREQ;
+		i2c->frequency = I2C_STANDARD_MODE_FREQ;
 
 	i2c->dev = &pdev->dev;
 	platform_set_drvdata(pdev, i2c);