From a6a80b5c2b806d73bb01b1a3d4c16bf17d513808 Mon Sep 17 00:00:00 2001 From: Karthik Jayakumar Date: Thu, 27 Feb 2020 15:30:46 -0800 Subject: [PATCH] msm: camera: sensor: Update I2C read/write size Update I2C read and write capability to 10kb. CRs-Fixed: 2584631 Change-Id: Iffffb18ad79a5492df2ca0aa0f1411ae67cb92cc Signed-off-by: Karthik Jayakumar --- drivers/cam_sensor_module/cam_cci/cam_cci_dev.h | 4 ++-- drivers/cam_sensor_module/cam_sensor_io/cam_sensor_i2c.h | 4 ++-- drivers/cam_sensor_module/cam_sensor_io/cam_sensor_qup_i2c.c | 3 +-- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/cam_sensor_module/cam_cci/cam_cci_dev.h b/drivers/cam_sensor_module/cam_cci/cam_cci_dev.h index c8d424f9afaa..5ac6441df53a 100644 --- a/drivers/cam_sensor_module/cam_cci/cam_cci_dev.h +++ b/drivers/cam_sensor_module/cam_cci/cam_cci_dev.h @@ -58,8 +58,8 @@ /* Max bytes that can be read per CCI read transaction */ #define CCI_READ_MAX 256 #define CCI_I2C_READ_MAX_RETRIES 3 -#define CCI_I2C_MAX_READ 8192 -#define CCI_I2C_MAX_WRITE 8192 +#define CCI_I2C_MAX_READ 10240 +#define CCI_I2C_MAX_WRITE 10240 #define CCI_I2C_MAX_BYTE_COUNT 65535 #define CAMX_CCI_DEV_NAME "cam-cci-driver" diff --git a/drivers/cam_sensor_module/cam_sensor_io/cam_sensor_i2c.h b/drivers/cam_sensor_module/cam_sensor_io/cam_sensor_i2c.h index def8be55bc8b..e37314a46571 100644 --- a/drivers/cam_sensor_module/cam_sensor_io/cam_sensor_i2c.h +++ b/drivers/cam_sensor_module/cam_sensor_io/cam_sensor_i2c.h @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0-only */ /* - * Copyright (c) 2017-2019, The Linux Foundation. All rights reserved. + * Copyright (c) 2017-2020, The Linux Foundation. All rights reserved. */ #ifndef _CAM_SENSOR_I2C_H_ @@ -18,7 +18,7 @@ #define I2C_COMPARE_MATCH 0 #define I2C_COMPARE_MISMATCH 1 -#define I2C_REG_DATA_MAX (8*1024) +#define I2C_REG_DATA_MAX (10*1024) /** * @client: CCI client structure diff --git a/drivers/cam_sensor_module/cam_sensor_io/cam_sensor_qup_i2c.c b/drivers/cam_sensor_module/cam_sensor_io/cam_sensor_qup_i2c.c index a9fd0881aabf..38af4f74bedb 100644 --- a/drivers/cam_sensor_module/cam_sensor_io/cam_sensor_qup_i2c.c +++ b/drivers/cam_sensor_module/cam_sensor_io/cam_sensor_qup_i2c.c @@ -1,13 +1,12 @@ // SPDX-License-Identifier: GPL-2.0-only /* - * Copyright (c) 2017-2018, The Linux Foundation. All rights reserved. + * Copyright (c) 2017-2020, The Linux Foundation. All rights reserved. */ #include "cam_sensor_cmn_header.h" #include "cam_sensor_i2c.h" #include "cam_sensor_io.h" -#define I2C_REG_DATA_MAX (8*1024) #define I2C_REG_MAX_BUF_SIZE 8 static int32_t cam_qup_i2c_rxdata(