From 10d82ade4fa7dd032b60fc6ba76cd587b276608e Mon Sep 17 00:00:00 2001 From: Andy Shevchenko Date: Tue, 2 Mar 2021 15:56:19 +0200 Subject: mfd: intel_quark_i2c_gpio: Replace I²C speeds with descriptive definitions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I²C header provides a descriptive definitions for standard bus speeds. Use them instead of plain numbers. Signed-off-by: Andy Shevchenko Signed-off-by: Lee Jones --- drivers/mfd/intel_quark_i2c_gpio.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'drivers/mfd') diff --git a/drivers/mfd/intel_quark_i2c_gpio.c b/drivers/mfd/intel_quark_i2c_gpio.c index 532c852a2732..f7e1634e43b3 100644 --- a/drivers/mfd/intel_quark_i2c_gpio.c +++ b/drivers/mfd/intel_quark_i2c_gpio.c @@ -16,6 +16,7 @@ #include #include #include +#include #include #include @@ -54,19 +55,19 @@ static const struct dmi_system_id dmi_platform_info[] = { .matches = { DMI_EXACT_MATCH(DMI_BOARD_NAME, "Galileo"), }, - .driver_data = (void *)100000, + .driver_data = (void *)I2C_MAX_STANDARD_MODE_FREQ, }, { .matches = { DMI_EXACT_MATCH(DMI_BOARD_NAME, "GalileoGen2"), }, - .driver_data = (void *)400000, + .driver_data = (void *)I2C_MAX_FAST_MODE_FREQ, }, { .matches = { DMI_EXACT_MATCH(DMI_BOARD_NAME, "SIMATIC IOT2000"), }, - .driver_data = (void *)400000, + .driver_data = (void *)I2C_MAX_FAST_MODE_FREQ, }, {} }; @@ -174,7 +175,7 @@ static int intel_quark_i2c_setup(struct pci_dev *pdev, struct mfd_cell *cell) return -ENOMEM; /* Normal mode by default */ - pdata->i2c_scl_freq = 100000; + pdata->i2c_scl_freq = I2C_MAX_STANDARD_MODE_FREQ; dmi_id = dmi_first_match(dmi_platform_info); if (dmi_id) -- cgit v1.2.3