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 ec5acbd..39c0d50 100644 (file)
@@ -463,13 +463,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*/
@@ -507,8 +507,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 2b5f237..3be66db 100644 (file)
@@ -451,13 +451,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*/
@@ -495,8 +495,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 4d97a5f..e09f94c 100644 (file)
@@ -604,13 +604,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*/
@@ -648,8 +648,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 64c8fb9..45b214d 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 876ba61..73802d4 100644 (file)
@@ -93,8 +93,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 2cf9617..3916aa9 100644 (file)
@@ -144,20 +144,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,
 };