diff options
Diffstat (limited to 'arch/arm/mach-pnx4008/i2c.c')
-rw-r--r-- | arch/arm/mach-pnx4008/i2c.c | 86 |
1 files changed, 0 insertions, 86 deletions
diff --git a/arch/arm/mach-pnx4008/i2c.c b/arch/arm/mach-pnx4008/i2c.c deleted file mode 100644 index 550cfc2a1f2e..000000000000 --- a/arch/arm/mach-pnx4008/i2c.c +++ /dev/null | |||
@@ -1,86 +0,0 @@ | |||
1 | /* | ||
2 | * I2C initialization for PNX4008. | ||
3 | * | ||
4 | * Author: Vitaly Wool <vitalywool@gmail.com> | ||
5 | * | ||
6 | * 2005-2006 (c) MontaVista Software, Inc. This file is licensed under | ||
7 | * the terms of the GNU General Public License version 2. This program | ||
8 | * is licensed "as is" without any warranty of any kind, whether express | ||
9 | * or implied. | ||
10 | */ | ||
11 | |||
12 | #include <linux/clk.h> | ||
13 | #include <linux/i2c.h> | ||
14 | #include <linux/i2c-pnx.h> | ||
15 | #include <linux/platform_device.h> | ||
16 | #include <linux/err.h> | ||
17 | #include <mach/platform.h> | ||
18 | #include <mach/irqs.h> | ||
19 | |||
20 | static struct resource i2c0_resources[] = { | ||
21 | { | ||
22 | .start = PNX4008_I2C1_BASE, | ||
23 | .end = PNX4008_I2C1_BASE + SZ_4K - 1, | ||
24 | .flags = IORESOURCE_MEM, | ||
25 | }, { | ||
26 | .start = I2C_1_INT, | ||
27 | .end = I2C_1_INT, | ||
28 | .flags = IORESOURCE_IRQ, | ||
29 | }, | ||
30 | }; | ||
31 | |||
32 | static struct resource i2c1_resources[] = { | ||
33 | { | ||
34 | .start = PNX4008_I2C2_BASE, | ||
35 | .end = PNX4008_I2C2_BASE + SZ_4K - 1, | ||
36 | .flags = IORESOURCE_MEM, | ||
37 | }, { | ||
38 | .start = I2C_2_INT, | ||
39 | .end = I2C_2_INT, | ||
40 | .flags = IORESOURCE_IRQ, | ||
41 | }, | ||
42 | }; | ||
43 | |||
44 | static struct resource i2c2_resources[] = { | ||
45 | { | ||
46 | .start = PNX4008_USB_CONFIG_BASE + 0x300, | ||
47 | .end = PNX4008_USB_CONFIG_BASE + 0x300 + SZ_4K - 1, | ||
48 | .flags = IORESOURCE_MEM, | ||
49 | }, { | ||
50 | .start = USB_I2C_INT, | ||
51 | .end = USB_I2C_INT, | ||
52 | .flags = IORESOURCE_IRQ, | ||
53 | }, | ||
54 | }; | ||
55 | |||
56 | static struct platform_device i2c0_device = { | ||
57 | .name = "pnx-i2c.0", | ||
58 | .id = 0, | ||
59 | .resource = i2c0_resources, | ||
60 | .num_resources = ARRAY_SIZE(i2c0_resources), | ||
61 | }; | ||
62 | |||
63 | static struct platform_device i2c1_device = { | ||
64 | .name = "pnx-i2c.1", | ||
65 | .id = 1, | ||
66 | .resource = i2c1_resources, | ||
67 | .num_resources = ARRAY_SIZE(i2c1_resources), | ||
68 | }; | ||
69 | |||
70 | static struct platform_device i2c2_device = { | ||
71 | .name = "pnx-i2c.2", | ||
72 | .id = 2, | ||
73 | .resource = i2c2_resources, | ||
74 | .num_resources = ARRAY_SIZE(i2c2_resources), | ||
75 | }; | ||
76 | |||
77 | static struct platform_device *devices[] __initdata = { | ||
78 | &i2c0_device, | ||
79 | &i2c1_device, | ||
80 | &i2c2_device, | ||
81 | }; | ||
82 | |||
83 | void __init pnx4008_register_i2c_devices(void) | ||
84 | { | ||
85 | platform_add_devices(devices, ARRAY_SIZE(devices)); | ||
86 | } | ||