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

Commit 2bb8164b authored by Jigarkumar Zala's avatar Jigarkumar Zala Committed by Gerrit - the friendly Code Review server
Browse files

msm: camera: update i2c read api for camera sensor io block



Update i2c read wrapper api for camera sensor io block, and update
respective change to accommodate api change.

CRs-Fixed: 2056624
Change-Id: If463dbc37e70595a90de10a06b7d1779edd0dbf6
Signed-off-by: default avatarJigarkumar Zala <jzala@codeaurora.org>
parent 7529b53b
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -531,7 +531,8 @@ int cam_sensor_match_id(struct cam_sensor_ctrl_t *s_ctrl)
	rc = camera_io_dev_read(
		&(s_ctrl->io_master_info),
		slave_info->sensor_id_reg_addr,
		&chipid, CAMERA_SENSOR_I2C_TYPE_WORD);
		&chipid, CAMERA_SENSOR_I2C_TYPE_WORD,
		CAMERA_SENSOR_I2C_TYPE_WORD);

	CDBG("%s:%d read id: 0x%x expected id 0x%x:\n",
			__func__, __LINE__, chipid, slave_info->sensor_id);
+2 −1
Original line number Diff line number Diff line
@@ -38,6 +38,7 @@ int32_t camera_io_dev_poll(struct camera_io_master *io_master_info,

int32_t camera_io_dev_read(struct camera_io_master *io_master_info,
	uint32_t addr, uint32_t *data,
	enum camera_sensor_i2c_type addr_type,
	enum camera_sensor_i2c_type data_type)
{
	if (!io_master_info) {
@@ -47,7 +48,7 @@ int32_t camera_io_dev_read(struct camera_io_master *io_master_info,

	if (io_master_info->master_type == CCI_MASTER) {
		return cam_cci_i2c_read(io_master_info->cci_client,
			addr, data, data_type, data_type);
			addr, data, addr_type, data_type);
	} else {
		pr_err("%s:%d Invalid Comm. Master:%d\n", __func__,
			__LINE__, io_master_info->master_type);
+2 −0
Original line number Diff line number Diff line
@@ -38,12 +38,14 @@ struct camera_io_master {
 * @io_master_info: I2C/SPI master information
 * @addr: I2C address
 * @data: I2C data
 * @addr_type: I2C addr type
 * @data_type: I2C data type
 *
 * This API abstracts read functionality based on master type
 */
int32_t camera_io_dev_read(struct camera_io_master *io_master_info,
	uint32_t addr, uint32_t *data,
	enum camera_sensor_i2c_type addr_type,
	enum camera_sensor_i2c_type data_type);

/**