aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-u300/i2c.c
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@stericsson.com>2009-08-13 16:42:01 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2009-08-15 10:36:29 -0400
commit6be2a0cacc1ed6899a53172e2e9b7a3587be0bea (patch)
tree2b68c9b5e06c8f7601f3145ea0c3eb34811c6dff /arch/arm/mach-u300/i2c.c
parentc7c8c78fdf6e9bd65d8ee879115dc2cd5d9fd0dc (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.c43
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 @@
1/*
2 * arch/arm/mach-u300/i2c.c
3 *
4 * Copyright (C) 2009 ST-Ericsson AB
5 * License terms: GNU General Public License (GPL) version 2
6 *
7 * Register board i2c devices
8 * Author: Linus Walleij <linus.walleij@stericsson.com>
9 */
10#include <linux/kernel.h>
11#include <linux/i2c.h>
12#include <mach/irqs.h>
13
14static struct i2c_board_info __initdata bus0_i2c_board_info[] = {
15 {
16 .type = "ab3100",
17 .addr = 0x48,
18 .irq = IRQ_U300_IRQ0_EXT,
19 },
20};
21
22static struct i2c_board_info __initdata bus1_i2c_board_info[] = {
23#ifdef CONFIG_MACH_U300_BS335
24 {
25 .type = "fwcam",
26 .addr = 0x10,
27 },
28 {
29 .type = "fwcam",
30 .addr = 0x5d,
31 },
32#else
33 { },
34#endif
35};
36
37void __init u300_i2c_register_board_devices(void)
38{
39 i2c_register_board_info(0, bus0_i2c_board_info,
40 ARRAY_SIZE(bus0_i2c_board_info));
41 i2c_register_board_info(1, bus1_i2c_board_info,
42 ARRAY_SIZE(bus1_i2c_board_info));
43}