From: wangdw10 Date: Tue, 29 Jan 2019 07:02:22 +0000 (+0800) Subject: [COMMON] fimc-is2: troika: add setfile_5e9_troika.bin for troika X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=ce40c24a9aec6df8d316c129d5ceb010cf1a3c10;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [COMMON] fimc-is2: troika: add setfile_5e9_troika.bin for troika Change-Id: I01ca39281f5d5e78f854b395f562797cfe7142bc Signed-off-by: wangdw10 --- 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 4255057f639d..732afc6c8b66 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 @@ -330,6 +330,7 @@ static int __init sensor_module_5e9_probe(struct platform_device *pdev) struct device *dev; struct pinctrl_state *s; int power_seq_idx = 0; + int setfile_idx = 0; FIMC_BUG(!fimc_is_dev); @@ -359,6 +360,17 @@ static int __init sensor_module_5e9_probe(struct platform_device *pdev) fimc_is_module_parse_dt(dev, sensor_module_5e9_power_setpin[power_seq_idx]); + if (of_property_read_bool(dev->of_node, "setfile_idx")) { + ret = of_property_read_u32(dev->of_node, "setfile_idx", &setfile_idx); + if (ret) { + warn("setfile_idx read is fail(%d)", ret); + setfile_idx = 0; + } + } else { + setfile_idx = 0; + } + probe_info("%s setfile_idx(%d)\n", __func__, setfile_idx); + pdata = dev_get_platdata(dev); device = &core->sensor[pdata->id]; @@ -391,7 +403,10 @@ static int __init sensor_module_5e9_probe(struct platform_device *pdev) module->bitwidth = 10; module->sensor_maker = "SLSI"; module->sensor_name = "S5K5E9"; - module->setfile_name = "setfile_5e9.bin"; + if (setfile_idx) + module->setfile_name = "setfile_5e9_troika.bin"; + else + module->setfile_name = "setfile_5e9.bin"; module->cfgs = ARRAY_SIZE(config_module_5e9); module->cfg = config_module_5e9; module->ops = NULL;