arm: tegra: sh532u focuser board support
Erik Lilliebjerg [Mon, 26 Mar 2012 15:45:01 +0000 (08:45 -0700)]
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>

arch/arm/mach-tegra/board-cardhu-pm298-power-rails.c
arch/arm/mach-tegra/board-cardhu-pm299-power-rails.c
arch/arm/mach-tegra/board-cardhu-power.c
arch/arm/mach-tegra/board-cardhu-sensors.c
arch/arm/mach-tegra/board-ventana-power.c
arch/arm/mach-tegra/board-ventana-sensors.c

index afff346..0305ee7 100644 (file)
@@ -461,13 +461,13 @@ static struct regulator_consumer_supply fixed_reg_en_vdd_pnl1_supply[] = {
 /* CAM1_LDO_EN from AP GPIO KB_ROW6 R06*/
 static struct regulator_consumer_supply fixed_reg_cam1_ldo_en_supply[] = {
        REGULATOR_SUPPLY("vdd_2v8_cam1", NULL),
-       REGULATOR_SUPPLY("vdd", "6-0072"),
+       REGULATOR_SUPPLY("avdd", "6-0072"),
 };
 
 /* CAM2_LDO_EN from AP GPIO KB_ROW7 R07*/
 static struct regulator_consumer_supply fixed_reg_cam2_ldo_en_supply[] = {
        REGULATOR_SUPPLY("vdd_2v8_cam2", NULL),
-       REGULATOR_SUPPLY("vdd", "7-0072"),
+       REGULATOR_SUPPLY("avdd", "7-0072"),
 };
 
 /* CAM3_LDO_EN from AP GPIO KB_ROW8 S00*/
@@ -505,8 +505,8 @@ static struct regulator_consumer_supply fixed_reg_en_1v8_cam_supply[] = {
        REGULATOR_SUPPLY("vdd_1v8_cam1", NULL),
        REGULATOR_SUPPLY("vdd_1v8_cam2", NULL),
        REGULATOR_SUPPLY("vdd_1v8_cam3", NULL),
-       REGULATOR_SUPPLY("vdd_i2c", "6-0072"),
-       REGULATOR_SUPPLY("vdd_i2c", "7-0072"),
+       REGULATOR_SUPPLY("dvdd", "6-0072"),
+       REGULATOR_SUPPLY("dvdd", "7-0072"),
        REGULATOR_SUPPLY("vdd_i2c", "2-0033"),
 };
 
index cec7e06..0c55aa4 100644 (file)
@@ -449,13 +449,13 @@ static struct regulator_consumer_supply fixed_reg_en_vdd_pnl1_supply[] = {
 /* CAM1_LDO_EN from AP GPIO KB_ROW6 R06*/
 static struct regulator_consumer_supply fixed_reg_cam1_ldo_en_supply[] = {
        REGULATOR_SUPPLY("vdd_2v8_cam1", NULL),
-       REGULATOR_SUPPLY("vdd", "6-0072"),
+       REGULATOR_SUPPLY("avdd", "6-0072"),
 };
 
 /* CAM2_LDO_EN from AP GPIO KB_ROW7 R07*/
 static struct regulator_consumer_supply fixed_reg_cam2_ldo_en_supply[] = {
        REGULATOR_SUPPLY("vdd_2v8_cam2", NULL),
-       REGULATOR_SUPPLY("vdd", "7-0072"),
+       REGULATOR_SUPPLY("avdd", "7-0072"),
 };
 
 /* CAM3_LDO_EN from AP GPIO KB_ROW8 S00*/
@@ -493,8 +493,8 @@ static struct regulator_consumer_supply fixed_reg_en_1v8_cam_supply[] = {
        REGULATOR_SUPPLY("vdd_1v8_cam1", NULL),
        REGULATOR_SUPPLY("vdd_1v8_cam2", NULL),
        REGULATOR_SUPPLY("vdd_1v8_cam3", NULL),
-       REGULATOR_SUPPLY("vdd_i2c", "6-0072"),
-       REGULATOR_SUPPLY("vdd_i2c", "7-0072"),
+       REGULATOR_SUPPLY("dvdd", "6-0072"),
+       REGULATOR_SUPPLY("dvdd", "7-0072"),
        REGULATOR_SUPPLY("vdd_i2c", "2-0033"),
 };
 
index 237f4b8..1bc811e 100644 (file)
@@ -602,13 +602,13 @@ static struct regulator_consumer_supply fixed_reg_en_vdd_pnl1_supply[] = {
 /* CAM1_LDO_EN from AP GPIO KB_ROW6 R06*/
 static struct regulator_consumer_supply fixed_reg_cam1_ldo_en_supply[] = {
        REGULATOR_SUPPLY("vdd_2v8_cam1", NULL),
-       REGULATOR_SUPPLY("vdd", "6-0072"),
+       REGULATOR_SUPPLY("avdd", "6-0072"),
 };
 
 /* CAM2_LDO_EN from AP GPIO KB_ROW7 R07*/
 static struct regulator_consumer_supply fixed_reg_cam2_ldo_en_supply[] = {
        REGULATOR_SUPPLY("vdd_2v8_cam2", NULL),
-       REGULATOR_SUPPLY("vdd", "7-0072"),
+       REGULATOR_SUPPLY("avdd", "7-0072"),
 };
 
 /* CAM3_LDO_EN from AP GPIO KB_ROW8 S00*/
@@ -646,8 +646,8 @@ static struct regulator_consumer_supply fixed_reg_en_1v8_cam_supply[] = {
        REGULATOR_SUPPLY("vdd_1v8_cam1", NULL),
        REGULATOR_SUPPLY("vdd_1v8_cam2", NULL),
        REGULATOR_SUPPLY("vdd_1v8_cam3", NULL),
-       REGULATOR_SUPPLY("vdd_i2c", "6-0072"),
-       REGULATOR_SUPPLY("vdd_i2c", "7-0072"),
+       REGULATOR_SUPPLY("dvdd", "6-0072"),
+       REGULATOR_SUPPLY("dvdd", "7-0072"),
        REGULATOR_SUPPLY("vdd_i2c", "2-0033"),
 };
 
index 0f7d2f9..fe3188e 100644 (file)
@@ -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,
index e36a4e7..2acfdfe 100644 (file)
@@ -92,8 +92,8 @@ static struct regulator_consumer_supply tps658621_ldo6_supply[] = {
        REGULATOR_SUPPLY("vcsi", "tegra_camera"),
        REGULATOR_SUPPLY("vdd_dmic", "tegra-snd-wm8903.0"),
        REGULATOR_SUPPLY("vdd_i2c", "3-0030"),
-       REGULATOR_SUPPLY("vdd_i2c", "6-0072"),
-       REGULATOR_SUPPLY("vdd_i2c", "7-0072"),
+       REGULATOR_SUPPLY("dvdd", "6-0072"),
+       REGULATOR_SUPPLY("dvdd", "7-0072"),
 };
 static struct regulator_consumer_supply tps658621_ldo7_supply[] = {
        REGULATOR_SUPPLY("vdd_ldo7", NULL),
index 81184d5..574bdb2 100644 (file)
@@ -143,20 +143,32 @@ struct ov2710_platform_data ventana_ov2710_data = {
 };
 
 
+static struct nvc_gpio_pdata sh532u_left_gpio_pdata[] = {
+       { SH532U_GPIO_RESET, CAM2_RST_L_GPIO, false, 0, },
+       { SH532U_GPIO_GP1, CAM2_LDO_SHUTDN_L_GPIO, false, true, },
+};
+
 static struct sh532u_platform_data sh532u_left_pdata = {
+       .cfg            = NVC_CFG_NODEV,
        .num            = 1,
        .sync           = 2,
        .dev_name       = "focuser",
-       .gpio_reset     = CAM2_RST_L_GPIO,
-       .gpio_en        = CAM2_LDO_SHUTDN_L_GPIO,
+       .gpio_count     = ARRAY_SIZE(sh532u_left_gpio_pdata),
+       .gpio           = sh532u_left_gpio_pdata,
+};
+
+static struct nvc_gpio_pdata sh532u_right_gpio_pdata[] = {
+       { SH532U_GPIO_RESET, CAM1_RST_L_GPIO, false, 0, },
+       { SH532U_GPIO_GP1, CAM1_LDO_SHUTDN_L_GPIO, false, true, },
 };
 
 static struct sh532u_platform_data sh532u_right_pdata = {
+       .cfg            = NVC_CFG_NODEV,
        .num            = 2,
        .sync           = 1,
        .dev_name       = "focuser",
-       .gpio_reset     = CAM1_RST_L_GPIO,
-       .gpio_en        = CAM1_LDO_SHUTDN_L_GPIO,
+       .gpio_count     = ARRAY_SIZE(sh532u_right_gpio_pdata),
+       .gpio           = sh532u_right_gpio_pdata,
 };