From: Dohyun Kim Date: Fri, 15 Feb 2019 07:14:03 +0000 (+0900) Subject: [9610] fimc-is2: set init low state for mclk of 5e9 X-Git-Tag: MMI-QSAS30.62-33-3~814 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=2f6c82721e4ff4914dd655615c7a3b480e98789b;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git [9610] fimc-is2: set init low state for mclk of 5e9 Change-Id: Ia44ae8a9bf70afe1fddff940628c7f6250b894ad Signed-off-by: Dohyun Kim --- 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);