aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-u300/i2c.c
diff options
context:
space:
mode:
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}