msm: camera: sensor: enable the compilation for flash
This change enables the compilation for flash even though there is no pmic flash support, since the i2c flash still needs the flash framework. CRs-Fixed: 3095773 Change-Id: I220a38dce1cbc829e446a65c61b7b7eb6b3a1c5b Signed-off-by: Depeng Shao <quic_depengs@quicinc.com>
This commit is contained in:

committed by
Gerrit - the friendly Code Review server

parent
927b715d57
commit
425e0a8142
9
Kbuild
9
Kbuild
@@ -233,14 +233,7 @@ camera-$(CONFIG_SPECTRA_SENSOR) += \
|
||||
drivers/cam_sensor_module/cam_sensor_io/cam_sensor_qup_i2c.o \
|
||||
drivers/cam_sensor_module/cam_sensor_io/cam_sensor_spi.o \
|
||||
drivers/cam_sensor_module/cam_sensor_utils/cam_sensor_util.o \
|
||||
drivers/cam_sensor_module/cam_res_mgr/cam_res_mgr.o
|
||||
|
||||
camera-$(CONFIG_LEDS_QPNP_FLASH_V2) += \
|
||||
drivers/cam_sensor_module/cam_flash/cam_flash_dev.o \
|
||||
drivers/cam_sensor_module/cam_flash/cam_flash_core.o \
|
||||
drivers/cam_sensor_module/cam_flash/cam_flash_soc.o
|
||||
|
||||
camera-$(CONFIG_LEDS_QTI_FLASH) += \
|
||||
drivers/cam_sensor_module/cam_res_mgr/cam_res_mgr.o \
|
||||
drivers/cam_sensor_module/cam_flash/cam_flash_dev.o \
|
||||
drivers/cam_sensor_module/cam_flash/cam_flash_core.o \
|
||||
drivers/cam_sensor_module/cam_flash/cam_flash_soc.o
|
||||
|
@@ -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:
|
||||
|
@@ -24,11 +24,7 @@
|
||||
#include "cam_eeprom_dev.h"
|
||||
#include "cam_ois_dev.h"
|
||||
#include "cam_tpg_dev.h"
|
||||
|
||||
#if IS_REACHABLE(CONFIG_LEDS_QPNP_FLASH_V2) || \
|
||||
IS_REACHABLE(CONFIG_LEDS_QTI_FLASH)
|
||||
#include "cam_flash_dev.h"
|
||||
#endif
|
||||
|
||||
#include "a5_core.h"
|
||||
#include "lx7_dev.h"
|
||||
@@ -116,11 +112,8 @@ static const struct camera_submodule_component camera_sensor[] = {
|
||||
{&cam_sensor_driver_init, &cam_sensor_driver_exit},
|
||||
{&cam_eeprom_driver_init, &cam_eeprom_driver_exit},
|
||||
{&cam_ois_driver_init, &cam_ois_driver_exit},
|
||||
#if IS_REACHABLE(CONFIG_LEDS_QPNP_FLASH_V2) || \
|
||||
IS_REACHABLE(CONFIG_LEDS_QTI_FLASH)
|
||||
{&cam_flash_init_module, &cam_flash_exit_module},
|
||||
#endif
|
||||
#endif
|
||||
};
|
||||
|
||||
static const struct camera_submodule_component camera_icp[] = {
|
||||
|
Reference in New Issue
Block a user