GUI: Fix Tomato RAF theme for all builds. Compilation typo.
[tomato.git] / release / src-rt-6.x.4708 / linux / linux-2.6.36 / arch / arm / mach-pnx4008 / i2c.c
blob8103f9644e2d0af099ccadb0b80b29440574119c
1 /*
2 * I2C initialization for PNX4008.
4 * Author: Vitaly Wool <vitalywool@gmail.com>
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.
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 #include <mach/i2c.h>
21 static struct i2c_pnx_data i2c0_data = {
22 .name = I2C_CHIP_NAME "0",
23 .base = PNX4008_I2C1_BASE,
24 .irq = I2C_1_INT,
27 static struct i2c_pnx_data i2c1_data = {
28 .name = I2C_CHIP_NAME "1",
29 .base = PNX4008_I2C2_BASE,
30 .irq = I2C_2_INT,
33 static struct i2c_pnx_data i2c2_data = {
34 .name = "USB-I2C",
35 .base = (PNX4008_USB_CONFIG_BASE + 0x300),
36 .irq = USB_I2C_INT,
39 static struct platform_device i2c0_device = {
40 .name = "pnx-i2c",
41 .id = 0,
42 .dev = {
43 .platform_data = &i2c0_data,
47 static struct platform_device i2c1_device = {
48 .name = "pnx-i2c",
49 .id = 1,
50 .dev = {
51 .platform_data = &i2c1_data,
55 static struct platform_device i2c2_device = {
56 .name = "pnx-i2c",
57 .id = 2,
58 .dev = {
59 .platform_data = &i2c2_data,
63 static struct platform_device *devices[] __initdata = {
64 &i2c0_device,
65 &i2c1_device,
66 &i2c2_device,
69 void __init pnx4008_register_i2c_devices(void)
71 platform_add_devices(devices, ARRAY_SIZE(devices));