msm: camera: cpas: Enable icp clk for qchannel handshake

For some chipsets, qchannel handshake needs icp clk to be
enabled. Add support to enable icp clk while qchannel
handshake by adding as optional clk in cpas node. Whether
to enable icp clk or not is controlled through workaround
list populated for each chipset.
Add mechanism to retry qchannel acceptance if the first
auto try has failed, by explicity writing 0x1 to qchannel
ctrl register. This will bring back qchannel to good state.

CRs-Fixed: 3131613
Change-Id: Ie39a9789b2eb1bf9c0f6adb26fe6d6e1823eff70
Signed-off-by: Pavan Kumar Chilamkurthi <quic_pchilamk@quicinc.com>
This commit is contained in:
Pavan Kumar Chilamkurthi
2022-02-15 22:56:35 -08:00
committed by Camera Software Integration
parent c885a64448
commit a32a315e54
9 changed files with 152 additions and 16 deletions

View File

@@ -1,6 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0-only */
/*
* Copyright (c) 2015-2021, The Linux Foundation. All rights reserved.
* Copyright (c) 2022, Qualcomm Innovation Center, Inc. All rights reserved.
*/
#ifndef _CAM_SOC_UTIL_H_
@@ -773,4 +774,16 @@ int cam_soc_util_print_clk_freq(struct cam_hw_soc_info *soc_info);
int cam_soc_util_select_pinctrl_state(
struct cam_hw_soc_info *soc_info, int idx, bool active);
/**
* cam_soc_util_print_clk_freq()
*
* @brief: This function checks whether regulators of this device are enabled at this
* time.
*
* @soc_info: Device soc struct to be populated
*
* @return: Number of regulators enabled
*/
int cam_soc_util_regulators_enabled(struct cam_hw_soc_info *soc_info);
#endif /* _CAM_SOC_UTIL_H_ */