arch: arm: ardbeg: as3648 flash support
Amit Arora [Sun, 30 Jun 2013 22:04:51 +0000 (15:04 -0700)]
Adds support for as3648 flash on ardbeg.

Bug 1256445

Change-Id: I110683dc40e05f269d190fbcb9d56913d757391a
Signed-off-by: Amit Arora <amita@nvidia.com>
Reviewed-on: http://git-master/r/243737
Reviewed-by: Charlie Huang <chahuang@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
Reviewed-by: Chien-Yu Chen <chichen@nvidia.com>

arch/arm/mach-tegra/board-ardbeg-sensors.c
arch/arm/mach-tegra/board-ardbeg.h

index d3e8dfe..404093f 100644 (file)
@@ -25,6 +25,7 @@
 #include <media/ar0261.h>
 #include <media/imx135.h>
 #include <media/dw9718.h>
+#include <media/as364x.h>
 
 #include "board.h"
 #include "board-common.h"
@@ -382,6 +383,24 @@ static struct dw9718_platform_data ardbeg_dw9718_data = {
        .detect = ardbeg_dw9718_detect,
 };
 
+static struct as364x_platform_data ardbeg_as3648_data = {
+       .config         = {
+               .led_mask       = 3,
+               .max_total_current_mA = 1000,
+               .max_peak_current_mA = 600,
+               .vin_low_v_run_mV = 3070,
+               .strobe_type = 1,
+               },
+       .pinstate       = {
+               .mask   = 1 << (CAM_FLASH_STROBE - TEGRA_GPIO_PBB0),
+               .values = 1 << (CAM_FLASH_STROBE - TEGRA_GPIO_PBB0)
+               },
+       .dev_name       = "torch",
+       .type           = AS3648,
+       .gpio_strobe    = CAM_FLASH_STROBE,
+};
+
+
 static struct i2c_board_info ardbeg_i2c_board_info_e1823[] = {
        {
                I2C_BOARD_INFO("imx135", 0x10),
@@ -395,6 +414,10 @@ static struct i2c_board_info ardbeg_i2c_board_info_e1823[] = {
                I2C_BOARD_INFO("dw9718", 0x0c),
                .platform_data = &ardbeg_dw9718_data,
        },
+       {
+               I2C_BOARD_INFO("as3648", 0x30),
+               .platform_data = &ardbeg_as3648_data,
+       },
 };
 
 
index 04bc4e8..539bdb6 100644 (file)
@@ -68,6 +68,7 @@ int ardbeg_pmon_init(void);
 #define AS3722_IRQ_BASE         TEGRA_NR_IRQS
 
 #define CAM_RSTN TEGRA_GPIO_PBB3
+#define CAM_FLASH_STROBE TEGRA_GPIO_PBB4
 #define CAM2_PWDN TEGRA_GPIO_PBB6
 #define CAM1_PWDN TEGRA_GPIO_PBB5
 #define CAM_AF_PWDN TEGRA_GPIO_PBB7