msm: Fix gpio and device dependency on CONFIG_GPIO_SX150X

On 8960 i2c ioexpander should be added based on CONFIG_GPIO_SX150X.
On 8930 Camera gpio settings should be added based on CONFIG_GPIO_SX150X.

Change-Id: I645e2bd41da16c19aff90b04d587938ec8ed9068
Signed-off-by: Hanumant Singh <hanumant@codeaurora.org>
This commit is contained in:
Hanumant Singh 2013-01-03 15:13:52 -08:00 committed by Stephen Boyd
parent 33422eb812
commit c8c2eea063
2 changed files with 7 additions and 2 deletions

View file

@ -609,12 +609,13 @@ void __init msm8930_init_cam(void)
struct msm_camera_sensor_info *s_info;
s_info = &msm_camera_sensor_s5k3l1yx_data;
s_info->sensor_platform_info->mount_angle = 0;
#if defined(CONFIG_I2C) && (defined(CONFIG_GPIO_SX150X) || \
defined(CONFIG_GPIO_SX150X_MODULE))
msm_flash_src._fsrc.ext_driver_src.led_en =
GPIO_CAM_GP_LED_EN1;
msm_flash_src._fsrc.ext_driver_src.led_flash_en =
GPIO_CAM_GP_LED_EN2;
#if defined(CONFIG_I2C) && (defined(CONFIG_GPIO_SX150X) || \
defined(CONFIG_GPIO_SX150X_MODULE))
msm_flash_src._fsrc.ext_driver_src.expander_info =
cam_expander_info;
#endif

View file

@ -3137,12 +3137,14 @@ static struct i2c_board_info isl_charger_i2c_info[] __initdata = {
};
#endif /* CONFIG_ISL9519_CHARGER */
#if defined(CONFIG_GPIO_SX150X) || defined(CONFIG_GPIO_SX150X_MODULE)
static struct i2c_board_info liquid_io_expander_i2c_info[] __initdata = {
{
I2C_BOARD_INFO("sx1508q", 0x20),
.platform_data = &msm8960_sx150x_data[SX150X_LIQUID]
},
};
#endif
static struct i2c_registry msm8960_i2c_devices[] __initdata = {
#ifdef CONFIG_ISL9519_CHARGER
@ -3177,12 +3179,14 @@ static struct i2c_registry msm8960_i2c_devices[] __initdata = {
msm_isa1200_board_info,
ARRAY_SIZE(msm_isa1200_board_info),
},
#if defined(CONFIG_GPIO_SX150X) || defined(CONFIG_GPIO_SX150X_MODULE)
{
I2C_LIQUID,
MSM_8960_GSBI10_QUP_I2C_BUS_ID,
liquid_io_expander_i2c_info,
ARRAY_SIZE(liquid_io_expander_i2c_info),
},
#endif
};
#endif /* CONFIG_I2C */