diff options
author | Erik Lilliebjerg <elilliebjerg@nvidia.com> | 2012-03-26 08:45:01 -0700 |
---|---|---|
committer | Simone Willett <swillett@nvidia.com> | 2012-05-01 14:01:37 -0700 |
commit | 8909af307bebd394ab8517ad1dc45bbc925dd9ae (patch) | |
tree | d354b7c91c7248f0ec143900943eb7bfa0b20f84 /arch/arm/mach-tegra/board-cardhu-sensors.c | |
parent | 9695a7dd7229acec3f5bdd5fc8dfb6ad1dd5a63d (diff) |
arm: tegra: sh532u focuser board support
Enabling the sh532u driver feature to not register itself
if it does not identify the sh532u device during probe.
This is for the case where the platform does not populate
the device.
Bug 929133
Change-Id: Ic5ac7fa0ae4c05e4978fe7aebc3fc630ef1c2fd3
Signed-off-by: Erik Lilliebjerg <elilliebjerg@nvidia.com>
Reviewed-on: http://git-master/r/92340
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>
Diffstat (limited to 'arch/arm/mach-tegra/board-cardhu-sensors.c')
-rw-r--r-- | arch/arm/mach-tegra/board-cardhu-sensors.c | 30 |
1 files changed, 26 insertions, 4 deletions
diff --git a/arch/arm/mach-tegra/board-cardhu-sensors.c b/arch/arm/mach-tegra/board-cardhu-sensors.c index 0f7d2f95d54d..fe3188ec1cfd 100644 --- a/arch/arm/mach-tegra/board-cardhu-sensors.c +++ b/arch/arm/mach-tegra/board-cardhu-sensors.c @@ -471,34 +471,56 @@ static const struct i2c_board_info cardhu_i2c3_board_info[] = { }, }; + +static struct nvc_gpio_pdata sh532u_gpio_pdata[] = { + { SH532U_GPIO_RESET, TEGRA_GPIO_PBB0, false, 0, }, +}; + static struct sh532u_platform_data sh532u_left_pdata = { + .cfg = NVC_CFG_NODEV, .num = 1, .sync = 2, .dev_name = "focuser", - .gpio_reset = TEGRA_GPIO_PBB0, + .gpio_count = ARRAY_SIZE(sh532u_gpio_pdata), + .gpio = sh532u_gpio_pdata, }; static struct sh532u_platform_data sh532u_right_pdata = { + .cfg = NVC_CFG_NODEV, .num = 2, .sync = 1, .dev_name = "focuser", - .gpio_reset = TEGRA_GPIO_PBB0, + .gpio_count = ARRAY_SIZE(sh532u_gpio_pdata), + .gpio = sh532u_gpio_pdata, +}; + +static struct nvc_gpio_pdata pm269_sh532u_left_gpio_pdata[] = { + { SH532U_GPIO_RESET, CAM1_RST_L_GPIO, false, 0, }, }; static struct sh532u_platform_data pm269_sh532u_left_pdata = { + .cfg = NVC_CFG_NODEV, .num = 1, .sync = 2, .dev_name = "focuser", - .gpio_reset = CAM1_RST_L_GPIO, + .gpio_count = ARRAY_SIZE(pm269_sh532u_left_gpio_pdata), + .gpio = pm269_sh532u_left_gpio_pdata, +}; + +static struct nvc_gpio_pdata pm269_sh532u_right_gpio_pdata[] = { + { SH532U_GPIO_RESET, CAM2_RST_L_GPIO, false, 0, }, }; static struct sh532u_platform_data pm269_sh532u_right_pdata = { + .cfg = NVC_CFG_NODEV, .num = 2, .sync = 1, .dev_name = "focuser", - .gpio_reset = CAM2_RST_L_GPIO, + .gpio_count = ARRAY_SIZE(pm269_sh532u_right_gpio_pdata), + .gpio = pm269_sh532u_right_gpio_pdata, }; + static struct nvc_torch_pin_state cardhu_tps61050_pinstate = { .mask = 0x0008, /*VGP3*/ .values = 0x0008, |