kernel: backport v5.8 i2c-pxa updates
[openwrt/staging/stintel.git] / target / linux / generic / backport-5.4 / 811-v5.8-i2c-pxa-move-DT-IDs-along-side-platform-IDs.patch
1 From: Russell King <rmk+kernel@armlinux.org.uk>
2 Bcc: linux@mail.armlinux.org.uk
3 Cc: linux-i2c@vger.kernel.org
4 Subject: [PATCH 09/17] i2c: pxa: move DT IDs along side platform IDs
5 MIME-Version: 1.0
6 Content-Disposition: inline
7 Content-Transfer-Encoding: 8bit
8 Content-Type: text/plain; charset="utf-8"
9
10 Move the ID tables into one place, near the device dependent data.
11
12 Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
13 ---
14 drivers/i2c/busses/i2c-pxa.c | 18 +++++++++---------
15 1 file changed, 9 insertions(+), 9 deletions(-)
16
17 diff --git a/drivers/i2c/busses/i2c-pxa.c b/drivers/i2c/busses/i2c-pxa.c
18 index 482768a9fdd2..760a29fb6af5 100644
19 --- a/drivers/i2c/busses/i2c-pxa.c
20 +++ b/drivers/i2c/busses/i2c-pxa.c
21 @@ -200,6 +200,15 @@ static struct pxa_reg_layout pxa_reg_layout[] = {
22 },
23 };
24
25 +static const struct of_device_id i2c_pxa_dt_ids[] = {
26 + { .compatible = "mrvl,pxa-i2c", .data = (void *)REGS_PXA2XX },
27 + { .compatible = "mrvl,pwri2c", .data = (void *)REGS_PXA3XX },
28 + { .compatible = "mrvl,mmp-twsi", .data = (void *)REGS_PXA910 },
29 + { .compatible = "marvell,armada-3700-i2c", .data = (void *)REGS_A3700 },
30 + {}
31 +};
32 +MODULE_DEVICE_TABLE(of, i2c_pxa_dt_ids);
33 +
34 static const struct platform_device_id i2c_pxa_id_table[] = {
35 { "pxa2xx-i2c", REGS_PXA2XX },
36 { "pxa3xx-pwri2c", REGS_PXA3XX },
37 @@ -1184,15 +1193,6 @@ static const struct i2c_algorithm i2c_pxa_pio_algorithm = {
38 .functionality = i2c_pxa_functionality,
39 };
40
41 -static const struct of_device_id i2c_pxa_dt_ids[] = {
42 - { .compatible = "mrvl,pxa-i2c", .data = (void *)REGS_PXA2XX },
43 - { .compatible = "mrvl,pwri2c", .data = (void *)REGS_PXA3XX },
44 - { .compatible = "mrvl,mmp-twsi", .data = (void *)REGS_PXA910 },
45 - { .compatible = "marvell,armada-3700-i2c", .data = (void *)REGS_A3700 },
46 - {}
47 -};
48 -MODULE_DEVICE_TABLE(of, i2c_pxa_dt_ids);
49 -
50 static int i2c_pxa_probe_dt(struct platform_device *pdev, struct pxa_i2c *i2c,
51 enum pxa_i2c_types *i2c_types)
52 {
53 --
54 2.20.1
55