From 40fe27c290c0820320e450bb332c7c914d243a11 Mon Sep 17 00:00:00 2001 From: Dohyun Kim Date: Fri, 15 Feb 2019 16:14:03 +0900 Subject: [PATCH] [9610] fimc-is2: set init low state for mclk of 5e9 Change-Id: Ia44ae8a9bf70afe1fddff940628c7f6250b894ad Signed-off-by: Dohyun Kim --- .../modules/fimc-is-device-module-5e9.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/drivers/media/platform/exynos/fimc-is2/sensor/module_framework/modules/fimc-is-device-module-5e9.c b/drivers/media/platform/exynos/fimc-is2/sensor/module_framework/modules/fimc-is-device-module-5e9.c index 732afc6c8b66..7696ee6f958b 100644 --- a/drivers/media/platform/exynos/fimc-is2/sensor/module_framework/modules/fimc-is-device-module-5e9.c +++ b/drivers/media/platform/exynos/fimc-is2/sensor/module_framework/modules/fimc-is-device-module-5e9.c @@ -83,6 +83,7 @@ static int sensor_module_5e9_power_setpin_0(struct device *dev, int gpio_none = 0; int gpio_avdd_en = 0; int gpio_iovdd_en = 0; + int gpio_mclk = 0; struct fimc_is_core *core; FIMC_BUG(!dev); @@ -129,6 +130,18 @@ static int sensor_module_5e9_power_setpin_0(struct device *dev, return -EINVAL; } + gpio_mclk = of_get_named_gpio(dnode, "gpio_mclk", 0); + if (gpio_is_valid(gpio_mclk)) { + if (gpio_request_one(gpio_mclk, GPIOF_OUT_INIT_LOW, "CAM_MCLK_OUTPUT_LOW")) { + dev_err(dev, "%s: failed to gpio request mclk\n", __func__); + return -ENODEV; + } + gpio_free(gpio_mclk); + } else { + dev_err(dev, "%s: failed to get mclk\n", __func__); + return -EINVAL; + } + SET_PIN_INIT(pdata, SENSOR_SCENARIO_NORMAL, GPIO_SCENARIO_ON); SET_PIN_INIT(pdata, SENSOR_SCENARIO_NORMAL, GPIO_SCENARIO_OFF); SET_PIN_INIT(pdata, SENSOR_SCENARIO_FACTORY, GPIO_SCENARIO_ON); -- 2.20.1