-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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>
- Loading branch information
Linus Walleij
authored and
Russell King
committed
Aug 15, 2009
1 parent
c7c8c78
commit 6be2a0c
Showing
4 changed files
with
73 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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)); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/* | ||
* arch/arm/mach-u300/i2c.h | ||
* | ||
* 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> | ||
*/ | ||
|
||
#ifndef MACH_U300_I2C_H | ||
#define MACH_U300_I2C_H | ||
|
||
#ifdef CONFIG_I2C_STU300 | ||
void __init u300_i2c_register_board_devices(void); | ||
#else | ||
/* Compile out this stuff if no I2C adapter is available */ | ||
static inline void __init u300_i2c_register_board_devices(void) | ||
{ | ||
} | ||
#endif | ||
|
||
#endif |