Re: [PATCH v1 09/40] i2c: bcm-kona: Use generic definitions for bus frequencies

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 2020-02-24 7:14 a.m., Andy Shevchenko wrote:
Since we have generic definitions for bus frequencies, let's use them.

Cc: Florian Fainelli <f.fainelli@xxxxxxxxx>
Cc: Ray Jui <rjui@xxxxxxxxxxxx>
Cc: Scott Branden <sbranden@xxxxxxxxxxxx>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
Acked-by: Scott Branden <scott.branden@xxxxxxxxxxxx>
---
  drivers/i2c/busses/i2c-bcm-kona.c | 8 ++++----
  1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/i2c/busses/i2c-bcm-kona.c b/drivers/i2c/busses/i2c-bcm-kona.c
index 4e489a9d16fb..2858639767da 100644
--- a/drivers/i2c/busses/i2c-bcm-kona.c
+++ b/drivers/i2c/busses/i2c-bcm-kona.c
@@ -722,16 +722,16 @@ static int bcm_kona_i2c_assign_bus_speed(struct bcm_kona_i2c_dev *dev)
  	}
switch (bus_speed) {
-	case 100000:
+	case I2C_STANDARD_MODE_FREQ:
  		dev->std_cfg = &std_cfg_table[BCM_SPD_100K];
  		break;
-	case 400000:
+	case I2C_FAST_MODE_FREQ:
  		dev->std_cfg = &std_cfg_table[BCM_SPD_400K];
  		break;
-	case 1000000:
+	case I2C_FAST_MODE_PLUS_FREQ:
  		dev->std_cfg = &std_cfg_table[BCM_SPD_1MHZ];
  		break;
-	case 3400000:
+	case I2C_HIGH_SPEED_MODE_FREQ:
  		/* Send mastercode at 100k */
  		dev->std_cfg = &std_cfg_table[BCM_SPD_100K];
  		dev->hs_cfg = &hs_cfg_table[BCM_SPD_3P4MHZ];




[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux