Эх сурвалжийг харах

msm: camera: sensor: Handle init for settings command config

This change is to call the tpg_hw_configure_init_settings_v3
function which is responsible for enabling clock and
resetting tpg clock in case of settings command config.

CRs-Fixed: 3406224
Change-Id: I17edb716074a121e12d04735166b3a0209a19359
Signed-off-by: Shivi Mangal <[email protected]>
Shivi Mangal 2 жил өмнө
parent
commit
fd62485780

+ 10 - 5
drivers/cam_sensor_module/cam_tpg/tpg_hw/tpg_hw.c

@@ -773,12 +773,17 @@ int tpg_hw_config(
 	switch (config_cmd) {
 	case TPG_HW_CMD_INIT_CONFIG:
 		//validate_stream_list(hw);
-		if (hw->stream_version == 1) {
-			tpg_hw_configure_init_settings(hw,
-				(struct tpg_hw_initsettings *)config_args);
-		} else if (hw->stream_version == 3) {
+		if (hw->settings_config.active_count != 0) {
 			tpg_hw_configure_init_settings_v3(hw,
-				(struct tpg_hw_initsettings_v3 *)config_args);
+					(struct tpg_hw_initsettings_v3 *)config_args);
+		} else {
+			if (hw->stream_version == 1) {
+				tpg_hw_configure_init_settings(hw,
+					(struct tpg_hw_initsettings *)config_args);
+			} else if (hw->stream_version == 3) {
+				tpg_hw_configure_init_settings_v3(hw,
+					(struct tpg_hw_initsettings_v3 *)config_args);
+			}
 		}
 		break;
 	default: