Merge "msm: camera: sensor: enable the compilation for flash" into camera-kernel.lnx.6.0
This commit is contained in:

committed by
Gerrit - the friendly Code Review server

commit
d123d73bc2
@@ -1645,13 +1645,18 @@ int cam_flash_pmic_pkt_parser(struct cam_flash_ctrl *fctrl, void *arg)
|
||||
}
|
||||
flash_query_info =
|
||||
(struct cam_flash_query_curr *)cmd_buf;
|
||||
|
||||
#if __or(IS_REACHABLE(CONFIG_LEDS_QPNP_FLASH_V2), \
|
||||
IS_REACHABLE(CONFIG_LEDS_QTI_FLASH))
|
||||
rc = cam_flash_led_prepare(fctrl->switch_trigger,
|
||||
QUERY_MAX_AVAIL_CURRENT, &query_curr_ma,
|
||||
soc_private->is_wled_flash);
|
||||
|
||||
CAM_DBG(CAM_FLASH, "query_curr_ma = %d",
|
||||
query_curr_ma);
|
||||
#else
|
||||
rc = -EOPNOTSUPP;
|
||||
#endif
|
||||
|
||||
if (rc) {
|
||||
CAM_ERR(CAM_FLASH,
|
||||
"Query current failed with rc=%d", rc);
|
||||
|
@@ -59,6 +59,8 @@ void cam_flash_put_source_node_data(struct cam_flash_ctrl *fctrl)
|
||||
}
|
||||
}
|
||||
|
||||
#if __or(IS_REACHABLE(CONFIG_LEDS_QPNP_FLASH_V2), \
|
||||
IS_REACHABLE(CONFIG_LEDS_QTI_FLASH))
|
||||
static int32_t cam_get_source_node_info(
|
||||
struct device_node *of_node,
|
||||
struct cam_flash_ctrl *fctrl,
|
||||
@@ -267,6 +269,7 @@ static int32_t cam_get_source_node_info(
|
||||
|
||||
return rc;
|
||||
}
|
||||
#endif
|
||||
|
||||
int cam_flash_get_dt_data(struct cam_flash_ctrl *fctrl,
|
||||
struct cam_hw_soc_info *soc_info)
|
||||
@@ -300,12 +303,15 @@ int cam_flash_get_dt_data(struct cam_flash_ctrl *fctrl,
|
||||
goto free_soc_private;
|
||||
}
|
||||
|
||||
#if __or(IS_ENABLED(CONFIG_LEDS_QPNP_FLASH_V2), \
|
||||
IS_ENABLED(CONFIG_LEDS_QTI_FLASH))
|
||||
rc = cam_get_source_node_info(of_node, fctrl, soc_info->soc_private);
|
||||
if (rc) {
|
||||
CAM_ERR(CAM_FLASH,
|
||||
"cam_flash_get_pmic_source_info failed rc %d", rc);
|
||||
goto free_soc_private;
|
||||
}
|
||||
#endif
|
||||
return rc;
|
||||
|
||||
free_soc_private:
|
||||
|
Reference in New Issue
Block a user