Loading drivers/cam_sensor_module/cam_flash/cam_flash_core.c +20 −1 Original line number Diff line number Diff line // SPDX-License-Identifier: GPL-2.0-only /* * Copyright (c) 2017-2020, The Linux Foundation. All rights reserved. * Copyright (c) 2017-2021, The Linux Foundation. All rights reserved. */ #include <linux/module.h> Loading Loading @@ -403,6 +403,7 @@ int cam_flash_i2c_flush_request(struct cam_flash_ctrl *fctrl, int i = 0; uint32_t cancel_req_id_found = 0; struct i2c_settings_array *i2c_set = NULL; struct i2c_settings_list *i2c_list; if (!fctrl) { CAM_ERR(CAM_FLASH, "Device data is NULL"); Loading @@ -423,6 +424,20 @@ int cam_flash_i2c_flush_request(struct cam_flash_ctrl *fctrl, continue; if (i2c_set->is_settings_valid == 1) { /* If any flash_off request pending, * process it before deleting it */ list_for_each_entry(i2c_list, &(i2c_set->list_head), list) { rc = cam_sensor_util_i2c_apply_setting( &(fctrl->io_master_info), i2c_list); if (rc) { CAM_ERR(CAM_FLASH, "Failed to apply settings: %d", rc); } } rc = delete_request(i2c_set); if (rc < 0) CAM_ERR(CAM_FLASH, Loading Loading @@ -625,6 +640,7 @@ static int cam_flash_i2c_delete_req(struct cam_flash_ctrl *fctrl, { int i = 0, rc = 0; uint64_t top = 0, del_req_id = 0; int frame_offset = 0; if (req_id != 0) { for (i = 0; i < MAX_PER_FRAME_ARRAY; i++) { Loading Loading @@ -653,6 +669,9 @@ static int cam_flash_i2c_delete_req(struct cam_flash_ctrl *fctrl, CAM_DBG(CAM_FLASH, "top: %llu, del_req_id:%llu", top, del_req_id); } /* delete/invalidate the request */ frame_offset = del_req_id % MAX_PER_FRAME_ARRAY; fctrl->i2c_data.per_frame[frame_offset].is_settings_valid = false; cam_flash_i2c_flush_nrt(fctrl); Loading Loading
drivers/cam_sensor_module/cam_flash/cam_flash_core.c +20 −1 Original line number Diff line number Diff line // SPDX-License-Identifier: GPL-2.0-only /* * Copyright (c) 2017-2020, The Linux Foundation. All rights reserved. * Copyright (c) 2017-2021, The Linux Foundation. All rights reserved. */ #include <linux/module.h> Loading Loading @@ -403,6 +403,7 @@ int cam_flash_i2c_flush_request(struct cam_flash_ctrl *fctrl, int i = 0; uint32_t cancel_req_id_found = 0; struct i2c_settings_array *i2c_set = NULL; struct i2c_settings_list *i2c_list; if (!fctrl) { CAM_ERR(CAM_FLASH, "Device data is NULL"); Loading @@ -423,6 +424,20 @@ int cam_flash_i2c_flush_request(struct cam_flash_ctrl *fctrl, continue; if (i2c_set->is_settings_valid == 1) { /* If any flash_off request pending, * process it before deleting it */ list_for_each_entry(i2c_list, &(i2c_set->list_head), list) { rc = cam_sensor_util_i2c_apply_setting( &(fctrl->io_master_info), i2c_list); if (rc) { CAM_ERR(CAM_FLASH, "Failed to apply settings: %d", rc); } } rc = delete_request(i2c_set); if (rc < 0) CAM_ERR(CAM_FLASH, Loading Loading @@ -625,6 +640,7 @@ static int cam_flash_i2c_delete_req(struct cam_flash_ctrl *fctrl, { int i = 0, rc = 0; uint64_t top = 0, del_req_id = 0; int frame_offset = 0; if (req_id != 0) { for (i = 0; i < MAX_PER_FRAME_ARRAY; i++) { Loading Loading @@ -653,6 +669,9 @@ static int cam_flash_i2c_delete_req(struct cam_flash_ctrl *fctrl, CAM_DBG(CAM_FLASH, "top: %llu, del_req_id:%llu", top, del_req_id); } /* delete/invalidate the request */ frame_offset = del_req_id % MAX_PER_FRAME_ARRAY; fctrl->i2c_data.per_frame[frame_offset].is_settings_valid = false; cam_flash_i2c_flush_nrt(fctrl); Loading