mfd: intel_quark_i2c_gpio: Replace I²C speeds with descriptive definitions
I²C header provides a descriptive definitions for standard bus speeds. Use them instead of plain numbers. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
This commit is contained in:
parent
2b77ea7a0a
commit
10d82ade4f
@ -16,6 +16,7 @@
|
|||||||
#include <linux/clkdev.h>
|
#include <linux/clkdev.h>
|
||||||
#include <linux/clk-provider.h>
|
#include <linux/clk-provider.h>
|
||||||
#include <linux/dmi.h>
|
#include <linux/dmi.h>
|
||||||
|
#include <linux/i2c.h>
|
||||||
#include <linux/platform_data/gpio-dwapb.h>
|
#include <linux/platform_data/gpio-dwapb.h>
|
||||||
#include <linux/platform_data/i2c-designware.h>
|
#include <linux/platform_data/i2c-designware.h>
|
||||||
|
|
||||||
@ -54,19 +55,19 @@ static const struct dmi_system_id dmi_platform_info[] = {
|
|||||||
.matches = {
|
.matches = {
|
||||||
DMI_EXACT_MATCH(DMI_BOARD_NAME, "Galileo"),
|
DMI_EXACT_MATCH(DMI_BOARD_NAME, "Galileo"),
|
||||||
},
|
},
|
||||||
.driver_data = (void *)100000,
|
.driver_data = (void *)I2C_MAX_STANDARD_MODE_FREQ,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.matches = {
|
.matches = {
|
||||||
DMI_EXACT_MATCH(DMI_BOARD_NAME, "GalileoGen2"),
|
DMI_EXACT_MATCH(DMI_BOARD_NAME, "GalileoGen2"),
|
||||||
},
|
},
|
||||||
.driver_data = (void *)400000,
|
.driver_data = (void *)I2C_MAX_FAST_MODE_FREQ,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.matches = {
|
.matches = {
|
||||||
DMI_EXACT_MATCH(DMI_BOARD_NAME, "SIMATIC IOT2000"),
|
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;
|
return -ENOMEM;
|
||||||
|
|
||||||
/* Normal mode by default */
|
/* 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);
|
dmi_id = dmi_first_match(dmi_platform_info);
|
||||||
if (dmi_id)
|
if (dmi_id)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user