Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 062a16b6 authored by Depeng Shao's avatar Depeng Shao
Browse files

msm: camera: sensor: Fix camera cci hw delay issue



Camera cci can't get the correct delay value, and
cci cycles_per_us is 0 which will configure wrong
value to register.
Assign the delay value to the correct element, and
don't reset src_clk_idx to 0 when receive CCI_RELEASE
cmd, it is got from dtsi and won't be assigned to
right value if reset it.

Change-Id: Ib3723f950131d215f974005cdd8dea721c47eae4
Signed-off-by: default avatarDepeng Shao <depengs@codeaurora.org>
parent 87085f2f
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
/* Copyright (c) 2017, The Linux Foundation. All rights reserved.
/* Copyright (c) 2017-2018, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -390,7 +390,6 @@ int cam_cci_soc_release(struct cci_device *cci_dev)

	cci_dev->cci_state = CCI_STATE_DISABLED;
	cci_dev->cycles_per_us = 0;
	soc_info->src_clk_idx = 0;

	cam_cpas_stop(cci_dev->cpas_handle);

+4 −4
Original line number Diff line number Diff line
/* Copyright (c) 2017, The Linux Foundation. All rights reserved.
/* Copyright (c) 2017-2018, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -147,7 +147,7 @@ int32_t cam_sensor_handle_poll(
		sizeof(uint32_t);
	(*byte_cnt) += sizeof(struct cam_cmd_conditional_wait);

	(*offset) += 1;
	*offset = 1;
	*list_ptr = &(i2c_list->list);

	return rc;
@@ -191,7 +191,7 @@ int32_t cam_sensor_handle_random_write(
		i2c_list->i2c_settings.
			reg_setting[cnt].data_mask = 0;
	}
	(*offset) += cnt;
	*offset = cnt;
	*list = &(i2c_list->list);

	return rc;
@@ -246,7 +246,7 @@ static int32_t cam_sensor_handle_continuous_write(
		i2c_list->i2c_settings.
			reg_setting[cnt].data_mask = 0;
	}
	(*offset) += cnt;
	*offset = cnt;
	*list = &(i2c_list->list);

	return rc;