Linus Walleij | 6be2a0c | 2009-08-13 21:42:01 +0100 | [diff] [blame] | 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 | |
| 14 | static 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 | |
| 22 | static 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 | |
| 37 | void __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 | } |