Commit e3b2e2c1 authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'i2c-for-6.4-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux

Pull i2c fixes from Wolfram Sang:
 "Nothing fancy. Two driver and one DT binding fix"

* tag 'i2c-for-6.4-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
  i2c: imx-lpi2c: fix type char overflow issue when calculating the clock cycle
  i2c: qup: Add missing unwind goto in qup_i2c_probe()
  dt-bindings: i2c: opencores: Add missing type for "regstep"
parents 547cc9be e69b9bc1
...@@ -60,6 +60,7 @@ properties: ...@@ -60,6 +60,7 @@ properties:
default: 0 default: 0
regstep: regstep:
$ref: /schemas/types.yaml#/definitions/uint32
description: | description: |
deprecated, use reg-shift above deprecated, use reg-shift above
deprecated: true deprecated: true
......
...@@ -201,8 +201,8 @@ static void lpi2c_imx_stop(struct lpi2c_imx_struct *lpi2c_imx) ...@@ -201,8 +201,8 @@ static void lpi2c_imx_stop(struct lpi2c_imx_struct *lpi2c_imx)
/* CLKLO = I2C_CLK_RATIO * CLKHI, SETHOLD = CLKHI, DATAVD = CLKHI/2 */ /* CLKLO = I2C_CLK_RATIO * CLKHI, SETHOLD = CLKHI, DATAVD = CLKHI/2 */
static int lpi2c_imx_config(struct lpi2c_imx_struct *lpi2c_imx) static int lpi2c_imx_config(struct lpi2c_imx_struct *lpi2c_imx)
{ {
u8 prescale, filt, sethold, clkhi, clklo, datavd; u8 prescale, filt, sethold, datavd;
unsigned int clk_rate, clk_cycle; unsigned int clk_rate, clk_cycle, clkhi, clklo;
enum lpi2c_imx_pincfg pincfg; enum lpi2c_imx_pincfg pincfg;
unsigned int temp; unsigned int temp;
......
...@@ -1752,16 +1752,21 @@ static int qup_i2c_probe(struct platform_device *pdev) ...@@ -1752,16 +1752,21 @@ static int qup_i2c_probe(struct platform_device *pdev)
if (!clk_freq || clk_freq > I2C_MAX_FAST_MODE_PLUS_FREQ) { if (!clk_freq || clk_freq > I2C_MAX_FAST_MODE_PLUS_FREQ) {
dev_err(qup->dev, "clock frequency not supported %d\n", dev_err(qup->dev, "clock frequency not supported %d\n",
clk_freq); clk_freq);
return -EINVAL; ret = -EINVAL;
goto fail_dma;
} }
qup->base = devm_platform_ioremap_resource(pdev, 0); qup->base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(qup->base)) if (IS_ERR(qup->base)) {
return PTR_ERR(qup->base); ret = PTR_ERR(qup->base);
goto fail_dma;
}
qup->irq = platform_get_irq(pdev, 0); qup->irq = platform_get_irq(pdev, 0);
if (qup->irq < 0) if (qup->irq < 0) {
return qup->irq; ret = qup->irq;
goto fail_dma;
}
if (has_acpi_companion(qup->dev)) { if (has_acpi_companion(qup->dev)) {
ret = device_property_read_u32(qup->dev, ret = device_property_read_u32(qup->dev,
...@@ -1775,13 +1780,15 @@ static int qup_i2c_probe(struct platform_device *pdev) ...@@ -1775,13 +1780,15 @@ static int qup_i2c_probe(struct platform_device *pdev)
qup->clk = devm_clk_get(qup->dev, "core"); qup->clk = devm_clk_get(qup->dev, "core");
if (IS_ERR(qup->clk)) { if (IS_ERR(qup->clk)) {
dev_err(qup->dev, "Could not get core clock\n"); dev_err(qup->dev, "Could not get core clock\n");
return PTR_ERR(qup->clk); ret = PTR_ERR(qup->clk);
goto fail_dma;
} }
qup->pclk = devm_clk_get(qup->dev, "iface"); qup->pclk = devm_clk_get(qup->dev, "iface");
if (IS_ERR(qup->pclk)) { if (IS_ERR(qup->pclk)) {
dev_err(qup->dev, "Could not get iface clock\n"); dev_err(qup->dev, "Could not get iface clock\n");
return PTR_ERR(qup->pclk); ret = PTR_ERR(qup->pclk);
goto fail_dma;
} }
qup_i2c_enable_clocks(qup); qup_i2c_enable_clocks(qup);
src_clk_freq = clk_get_rate(qup->clk); src_clk_freq = clk_get_rate(qup->clk);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment