mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-06 13:16:22 +00:00
Merge branch 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux
Pull i2c fixes from Wolfram Sang: "I2C has one buildfix, one ABBA deadlock fix, and three simple 'add ID' patches" * 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: i2c: exynos5: Fix possible ABBA deadlock by keeping I2C clock prepared i2c: cpm: Fix build break due to incompatible pointer types i2c: ismt: Add Intel DNV PCI ID i2c: xlp9xx: add support for Broadcom Vulcan i2c: rk3x: add support for rk3228
This commit is contained in:
commit
3118e5f966
@ -6,8 +6,8 @@ RK3xxx SoCs.
|
||||
Required properties :
|
||||
|
||||
- reg : Offset and length of the register set for the device
|
||||
- compatible : should be "rockchip,rk3066-i2c", "rockchip,rk3188-i2c" or
|
||||
"rockchip,rk3288-i2c".
|
||||
- compatible : should be "rockchip,rk3066-i2c", "rockchip,rk3188-i2c",
|
||||
"rockchip,rk3228-i2c" or "rockchip,rk3288-i2c".
|
||||
- interrupts : interrupt number
|
||||
- clocks : parent clock
|
||||
|
||||
|
@ -975,10 +975,10 @@ config I2C_XLR
|
||||
|
||||
config I2C_XLP9XX
|
||||
tristate "XLP9XX I2C support"
|
||||
depends on CPU_XLP || COMPILE_TEST
|
||||
depends on CPU_XLP || ARCH_VULCAN || COMPILE_TEST
|
||||
help
|
||||
This driver enables support for the on-chip I2C interface of
|
||||
the Broadcom XLP9xx/XLP5xx MIPS processors.
|
||||
the Broadcom XLP9xx/XLP5xx MIPS and Vulcan ARM64 processors.
|
||||
|
||||
This driver can also be built as a module. If so, the module will
|
||||
be called i2c-xlp9xx.
|
||||
|
@ -116,8 +116,8 @@ struct cpm_i2c {
|
||||
cbd_t __iomem *rbase;
|
||||
u_char *txbuf[CPM_MAXBD];
|
||||
u_char *rxbuf[CPM_MAXBD];
|
||||
u32 txdma[CPM_MAXBD];
|
||||
u32 rxdma[CPM_MAXBD];
|
||||
dma_addr_t txdma[CPM_MAXBD];
|
||||
dma_addr_t rxdma[CPM_MAXBD];
|
||||
};
|
||||
|
||||
static irqreturn_t cpm_i2c_interrupt(int irq, void *dev_id)
|
||||
|
@ -671,7 +671,9 @@ static int exynos5_i2c_xfer(struct i2c_adapter *adap,
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
clk_prepare_enable(i2c->clk);
|
||||
ret = clk_enable(i2c->clk);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
for (i = 0; i < num; i++, msgs++) {
|
||||
stop = (i == num - 1);
|
||||
@ -695,7 +697,7 @@ static int exynos5_i2c_xfer(struct i2c_adapter *adap,
|
||||
}
|
||||
|
||||
out:
|
||||
clk_disable_unprepare(i2c->clk);
|
||||
clk_disable(i2c->clk);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -747,7 +749,9 @@ static int exynos5_i2c_probe(struct platform_device *pdev)
|
||||
return -ENOENT;
|
||||
}
|
||||
|
||||
clk_prepare_enable(i2c->clk);
|
||||
ret = clk_prepare_enable(i2c->clk);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||
i2c->regs = devm_ioremap_resource(&pdev->dev, mem);
|
||||
@ -799,6 +803,10 @@ static int exynos5_i2c_probe(struct platform_device *pdev)
|
||||
|
||||
platform_set_drvdata(pdev, i2c);
|
||||
|
||||
clk_disable(i2c->clk);
|
||||
|
||||
return 0;
|
||||
|
||||
err_clk:
|
||||
clk_disable_unprepare(i2c->clk);
|
||||
return ret;
|
||||
@ -810,6 +818,8 @@ static int exynos5_i2c_remove(struct platform_device *pdev)
|
||||
|
||||
i2c_del_adapter(&i2c->adap);
|
||||
|
||||
clk_unprepare(i2c->clk);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -821,6 +831,8 @@ static int exynos5_i2c_suspend_noirq(struct device *dev)
|
||||
|
||||
i2c->suspended = 1;
|
||||
|
||||
clk_unprepare(i2c->clk);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -830,7 +842,9 @@ static int exynos5_i2c_resume_noirq(struct device *dev)
|
||||
struct exynos5_i2c *i2c = platform_get_drvdata(pdev);
|
||||
int ret = 0;
|
||||
|
||||
clk_prepare_enable(i2c->clk);
|
||||
ret = clk_prepare_enable(i2c->clk);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
ret = exynos5_hsi2c_clock_setup(i2c);
|
||||
if (ret) {
|
||||
@ -839,7 +853,7 @@ static int exynos5_i2c_resume_noirq(struct device *dev)
|
||||
}
|
||||
|
||||
exynos5_i2c_init(i2c);
|
||||
clk_disable_unprepare(i2c->clk);
|
||||
clk_disable(i2c->clk);
|
||||
i2c->suspended = 0;
|
||||
|
||||
return 0;
|
||||
|
@ -75,6 +75,7 @@
|
||||
/* PCI DIDs for the Intel SMBus Message Transport (SMT) Devices */
|
||||
#define PCI_DEVICE_ID_INTEL_S1200_SMT0 0x0c59
|
||||
#define PCI_DEVICE_ID_INTEL_S1200_SMT1 0x0c5a
|
||||
#define PCI_DEVICE_ID_INTEL_DNV_SMT 0x19ac
|
||||
#define PCI_DEVICE_ID_INTEL_AVOTON_SMT 0x1f15
|
||||
|
||||
#define ISMT_DESC_ENTRIES 2 /* number of descriptor entries */
|
||||
@ -180,6 +181,7 @@ struct ismt_priv {
|
||||
static const struct pci_device_id ismt_ids[] = {
|
||||
{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_S1200_SMT0) },
|
||||
{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_S1200_SMT1) },
|
||||
{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_DNV_SMT) },
|
||||
{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_AVOTON_SMT) },
|
||||
{ 0, }
|
||||
};
|
||||
|
@ -855,6 +855,7 @@ static struct rk3x_i2c_soc_data soc_data[3] = {
|
||||
static const struct of_device_id rk3x_i2c_match[] = {
|
||||
{ .compatible = "rockchip,rk3066-i2c", .data = (void *)&soc_data[0] },
|
||||
{ .compatible = "rockchip,rk3188-i2c", .data = (void *)&soc_data[1] },
|
||||
{ .compatible = "rockchip,rk3228-i2c", .data = (void *)&soc_data[2] },
|
||||
{ .compatible = "rockchip,rk3288-i2c", .data = (void *)&soc_data[2] },
|
||||
{},
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user