diff options
author | Daniel Hillenbrand <codeworkx@cyanogenmod.org> | 2013-05-25 10:53:54 +0200 |
---|---|---|
committer | Daniel Hillenbrand <codeworkx@cyanogenmod.org> | 2013-05-25 10:53:54 +0200 |
commit | 05f0203060035bd2cb8c8f98b8b466b934b1c45b (patch) | |
tree | 051a8c9d1a431b27fb5d4fecaf5417487857a400 /arch/arm/mach-exynos/mach-u1.c | |
parent | ab6dfccd8d126b50059d39d031cfa1ddc8f32b84 (diff) | |
download | kernel_samsung_smdk4412-05f0203060035bd2cb8c8f98b8b466b934b1c45b.zip kernel_samsung_smdk4412-05f0203060035bd2cb8c8f98b8b466b934b1c45b.tar.gz kernel_samsung_smdk4412-05f0203060035bd2cb8c8f98b8b466b934b1c45b.tar.bz2 |
u1: import from CyanogenMod/android_kernel_samsung_smdk4210
Change-Id: I9629a4060538c9c4c6a43a86a56826cd7123d1b5
Diffstat (limited to 'arch/arm/mach-exynos/mach-u1.c')
-rw-r--r-- | arch/arm/mach-exynos/mach-u1.c | 92 |
1 files changed, 87 insertions, 5 deletions
diff --git a/arch/arm/mach-exynos/mach-u1.c b/arch/arm/mach-exynos/mach-u1.c index 7e1ef2f..5aea5a3 100644 --- a/arch/arm/mach-exynos/mach-u1.c +++ b/arch/arm/mach-exynos/mach-u1.c @@ -280,6 +280,22 @@ static struct s3c2410_uartcfg smdkc210_uartcfgs[] __initdata = { */ #ifdef CONFIG_VIDEO_M5MO + +struct class *camera_class; + +static int __init camera_class_init(void) +{ + camera_class = class_create(THIS_MODULE, "camera"); + if (IS_ERR(camera_class)) { + pr_err("Failed to create class(camera)!\n"); + return PTR_ERR(camera_class); + } + + return 0; +} + +subsys_initcall(camera_class_init); + #define CAM_CHECK_ERR_RET(x, msg) \ if (unlikely((x) < 0)) { \ printk(KERN_ERR "\nfail to %s: err = %d\n", msg, x); \ @@ -305,7 +321,7 @@ static int m5mo_power_on(void) struct regulator *regulator; int ret = 0; - printk(KERN_DEBUG "%s: in\n", __func__); + printk(KERN_DEBUG "%s: in. hw=0x%X\n", __func__, system_rev); ret = gpio_request(GPIO_CAM_VGA_nSTBY, "GPL2"); if (ret) { @@ -1154,6 +1170,9 @@ static struct s5k5bafx_platform_data s5k5bafx_plat = { .pixelformat = V4L2_PIX_FMT_UYVY, .freq = 24000000, .is_mipi = 1, + .streamoff_delay = S5K5BAFX_STREAMOFF_DELAY, + .init_streamoff = true, + .dbg_level = CAMDBG_LEVEL_DEFAULT, }; static struct i2c_board_info s5k5bafx_i2c_info = { @@ -3331,7 +3350,63 @@ static struct max8997_motor_data max8997_motor = { #endif #endif -#ifdef CONFIG_MACH_U1_KOR_LGT +#if defined(CONFIG_TARGET_LOCALE_NA) +#define USB_PATH_AP 0 +#define USB_PATH_CP 1 +#define USB_PATH_ALL 2 +extern int u1_get_usb_hub_path(void); +static int max8997_muic_set_safeout(int path) +{ + struct regulator *regulator; + int hub_usb_path = u1_get_usb_hub_path(); + + if (hub_usb_path == USB_PATH_CP) { + regulator = regulator_get(NULL, "safeout1"); + if (IS_ERR(regulator)) + return -ENODEV; + if (regulator_is_enabled(regulator)) + regulator_force_disable(regulator); + regulator_put(regulator); + + regulator = regulator_get(NULL, "safeout2"); + if (IS_ERR(regulator)) + return -ENODEV; + if (!regulator_is_enabled(regulator)) + regulator_enable(regulator); + regulator_put(regulator); + } else if (hub_usb_path == USB_PATH_AP) { + regulator = regulator_get(NULL, "safeout1"); + if (IS_ERR(regulator)) + return -ENODEV; + if (!regulator_is_enabled(regulator)) + regulator_enable(regulator); + regulator_put(regulator); + + regulator = regulator_get(NULL, "safeout2"); + if (IS_ERR(regulator)) + return -ENODEV; + if (regulator_is_enabled(regulator)) + regulator_force_disable(regulator); + regulator_put(regulator); + } else if (hub_usb_path == USB_PATH_ALL) { + regulator = regulator_get(NULL, "safeout1"); + if (IS_ERR(regulator)) + return -ENODEV; + if (!regulator_is_enabled(regulator)) + regulator_enable(regulator); + regulator_put(regulator); + + regulator = regulator_get(NULL, "safeout2"); + if (IS_ERR(regulator)) + return -ENODEV; + if (!regulator_is_enabled(regulator)) + regulator_enable(regulator); + regulator_put(regulator); + } + + return 0; +} +#elif defined(CONFIG_MACH_U1_KOR_LGT) static int max8997_muic_set_safeout(int path) { static int safeout2_enabled; @@ -5020,9 +5095,9 @@ struct gpio_keys_button u1_buttons[] = { .isr_hook = sec_debug_check_crash_key, .debounce_interval = 10, }, /* power key */ -#if !defined(CONFIG_MACH_U1_NA_SPR) && !defined(CONFIG_MACH_U1_NA_USCC) +#if !defined(CONFIG_MACH_U1_NA_SPR) && !defined(CONFIG_MACH_U1_NA_USCC) && !defined(CONFIG_TARGET_LOCALE_NAATT_TEMP) { - .code = KEY_HOMEPAGE, + .code = KEY_HOME, .gpio = GPIO_OK_KEY, .active_low = 1, .type = EV_KEY, @@ -5375,6 +5450,7 @@ static const u8 *mxt224_config[] = { #define MXT224E_BLEN_BATT 32 #define MXT224E_T48_BLEN_BATT 0 #define MXT224E_BLEN_CHRG 0 +#define MXT224E_T48_BLEN_CHRG 0 #define MXT224E_MOVFILTER_BATT 14 #define MXT224E_MOVFILTER_CHRG 46 #define MXT224E_ACTVSYNCSPERX_NORMAL 29 @@ -6639,6 +6715,7 @@ static struct i2c_board_info i2c_devs16[] __initdata = { #ifdef CONFIG_S3C_DEV_I2C17_EMUL +#ifdef CONFIG_USBHUB_USB3803 /* I2C17_EMUL */ static struct i2c_gpio_platform_data i2c17_platdata = { .sda_pin = GPIO_USB_I2C_SDA, @@ -6651,7 +6728,7 @@ struct platform_device s3c_device_i2c17 = { .dev.platform_data = &i2c17_platdata, }; - +#endif #endif /* CONFIG_S3C_DEV_I2C17_EMUL */ #ifdef CONFIG_USBHUB_USB3803 @@ -7099,6 +7176,7 @@ static struct platform_device *smdkc210_devices[] __initdata = { #ifdef CONFIG_BATTERY_SAMSUNG &samsung_device_battery, #endif + #ifdef CONFIG_FB_S5P &s3c_device_fb, #endif @@ -7156,10 +7234,12 @@ static struct platform_device *smdkc210_devices[] __initdata = { #if defined(CONFIG_SMB136_CHARGER_Q1) || defined(CONFIG_SMB328_CHARGER) &s3c_device_i2c19, /* SMB136, SMB328 */ #endif +#if defined(CONFIG_USBHUB_USB3803) #if defined(CONFIG_S3C_DEV_I2C17_EMUL) &s3c_device_i2c17, /* USB HUB */ #endif #endif +#endif /* consumer driver should resume after resuming i2c drivers */ &u1_regulator_consumer, @@ -7818,10 +7898,12 @@ static void __init smdkc210_machine_init(void) ARRAY_SIZE(i2c_devs19_emul)); #endif #ifdef CONFIG_S3C_DEV_I2C17_EMUL +#ifdef CONFIG_USBHUB_USB3803 i2c_register_board_info(17, i2c_devs17_emul, ARRAY_SIZE(i2c_devs17_emul)); #endif #endif +#endif /* 400 kHz for initialization of MMC Card */ |