diff options
author | Austin Christ <austinwc@codeaurora.org> | 2018-05-10 19:13:55 +0300 |
---|---|---|
committer | Wolfram Sang <wsa@the-dreams.de> | 2018-05-29 20:52:14 +0300 |
commit | 109b8c42b7e28ddf843488f01f243a9c9eba032b (patch) | |
tree | e4fc42bcc999c57a6248dcf1adbcc2b039095d4c /drivers/i2c | |
parent | 902a91a02bdf027e9466ac29d0cdce7b8687fff3 (diff) | |
download | linux-109b8c42b7e28ddf843488f01f243a9c9eba032b.tar.xz |
i2c: qup: Add support for Fast Mode Plus
Previously the QUP driver limited operation mode to I2C Fast Mode. Add
Fast Mode Plus functionality by raising SCL limit from 400kHz to 1MHz.
Signed-off-by: Austin Christ <austinwc@codeaurora.org>
Reviewed-by: Sricharan R <sricharan@codeaurora.org>
Reviewed-by: Andy Gross <andy.gross@linaro.org>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Diffstat (limited to 'drivers/i2c')
-rw-r--r-- | drivers/i2c/busses/i2c-qup.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/drivers/i2c/busses/i2c-qup.c b/drivers/i2c/busses/i2c-qup.c index c024f85e73d1..ce5f215cd7e8 100644 --- a/drivers/i2c/busses/i2c-qup.c +++ b/drivers/i2c/busses/i2c-qup.c @@ -136,8 +136,13 @@ */ #define TOUT_MIN 2 +/* I2C Frequency Modes */ +#define I2C_STANDARD_FREQ 100000 +#define I2C_FAST_MODE_FREQ 400000 +#define I2C_FAST_MODE_PLUS_FREQ 1000000 + /* Default values. Use these if FW query fails */ -#define DEFAULT_CLK_FREQ 100000 +#define DEFAULT_CLK_FREQ I2C_STANDARD_FREQ #define DEFAULT_SRC_CLK 20000000 /* @@ -1745,8 +1750,8 @@ static int qup_i2c_probe(struct platform_device *pdev) } nodma: - /* We support frequencies up to FAST Mode (400KHz) */ - if (!clk_freq || clk_freq > 400000) { + /* We support frequencies up to FAST Mode Plus (1MHz) */ + if (!clk_freq || clk_freq > I2C_FAST_MODE_PLUS_FREQ) { dev_err(qup->dev, "clock frequency not supported %d\n", clk_freq); return -EINVAL; |