diff options
author | Linus Walleij <linus.walleij@stericsson.com> | 2009-08-13 21:42:01 +0100 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2009-08-15 15:36:29 +0100 |
commit | 6be2a0cacc1ed6899a53172e2e9b7a3587be0bea (patch) | |
tree | 2b68c9b5e06c8f7601f3145ea0c3eb34811c6dff /arch/arm/mach-u300/i2c.c | |
parent | c7c8c78fdf6e9bd65d8ee879115dc2cd5d9fd0dc (diff) |
ARM: 5668/2: U300 I2C board setup
This sets up the U300 I2C subdevices so that the AB3100
analog baseband ASIC is properly detected and also the
camera devices in the U335 reference design get properly
registered.
Signed-off-by: Linus Walleij <linus.walleij@stericsson.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-u300/i2c.c')
-rw-r--r-- | arch/arm/mach-u300/i2c.c | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/arch/arm/mach-u300/i2c.c b/arch/arm/mach-u300/i2c.c new file mode 100644 index 000000000000..10be1f888b27 --- /dev/null +++ b/arch/arm/mach-u300/i2c.c @@ -0,0 +1,43 @@ +/* + * arch/arm/mach-u300/i2c.c + * + * Copyright (C) 2009 ST-Ericsson AB + * License terms: GNU General Public License (GPL) version 2 + * + * Register board i2c devices + * Author: Linus Walleij <linus.walleij@stericsson.com> + */ +#include <linux/kernel.h> +#include <linux/i2c.h> +#include <mach/irqs.h> + +static struct i2c_board_info __initdata bus0_i2c_board_info[] = { + { + .type = "ab3100", + .addr = 0x48, + .irq = IRQ_U300_IRQ0_EXT, + }, +}; + +static struct i2c_board_info __initdata bus1_i2c_board_info[] = { +#ifdef CONFIG_MACH_U300_BS335 + { + .type = "fwcam", + .addr = 0x10, + }, + { + .type = "fwcam", + .addr = 0x5d, + }, +#else + { }, +#endif +}; + +void __init u300_i2c_register_board_devices(void) +{ + i2c_register_board_info(0, bus0_i2c_board_info, + ARRAY_SIZE(bus0_i2c_board_info)); + i2c_register_board_info(1, bus1_i2c_board_info, + ARRAY_SIZE(bus1_i2c_board_info)); +} |