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
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>
21 static struct i2c_pnx_data i2c0_data
= {
22 .name
= I2C_CHIP_NAME
"0",
23 .base
= PNX4008_I2C1_BASE
,
27 static struct i2c_pnx_data i2c1_data
= {
28 .name
= I2C_CHIP_NAME
"1",
29 .base
= PNX4008_I2C2_BASE
,
33 static struct i2c_pnx_data i2c2_data
= {
35 .base
= (PNX4008_USB_CONFIG_BASE
+ 0x300),
39 static struct platform_device i2c0_device
= {
43 .platform_data
= &i2c0_data
,
47 static struct platform_device i2c1_device
= {
51 .platform_data
= &i2c1_data
,
55 static struct platform_device i2c2_device
= {
59 .platform_data
= &i2c2_data
,
63 static struct platform_device
*devices
[] __initdata
= {
69 void __init
pnx4008_register_i2c_devices(void)
71 platform_add_devices(devices
, ARRAY_SIZE(devices
));