msm: camera: sensor: Return from component bind for i3c-i2c nodes
To achieve sync state, platform probe needs to happen for i3c-i2c nodes since platform devices are created for them due to topology. Return success in component bind for i3c-i2c based sensor nodes. CRs-Fixed: 3227008 Change-Id: I6604fac1ef605f7d3cef69954238ac62bee77dae Signed-off-by: Mukund Madhusudan Atre <quic_matre@quicinc.com>
Bu işleme şunda yer alıyor:

işlemeyi yapan:
Camera Software Integration

ebeveyn
c1d7ceaba0
işleme
2f85dbf423
@@ -346,10 +346,15 @@ static int cam_actuator_platform_component_bind(struct device *dev,
|
||||
{
|
||||
int32_t rc = 0;
|
||||
int32_t i = 0;
|
||||
bool i3c_i2c_target;
|
||||
struct cam_actuator_ctrl_t *a_ctrl = NULL;
|
||||
struct cam_actuator_soc_private *soc_private = NULL;
|
||||
struct platform_device *pdev = to_platform_device(dev);
|
||||
|
||||
i3c_i2c_target = of_property_read_bool(pdev->dev.of_node, "i3c-i2c-target");
|
||||
if (i3c_i2c_target)
|
||||
return 0;
|
||||
|
||||
/* Create actuator control structure */
|
||||
a_ctrl = devm_kzalloc(&pdev->dev,
|
||||
sizeof(struct cam_actuator_ctrl_t), GFP_KERNEL);
|
||||
@@ -444,8 +449,13 @@ static void cam_actuator_platform_component_unbind(struct device *dev,
|
||||
struct cam_actuator_ctrl_t *a_ctrl;
|
||||
struct cam_actuator_soc_private *soc_private;
|
||||
struct cam_sensor_power_ctrl_t *power_info;
|
||||
bool i3c_i2c_target;
|
||||
struct platform_device *pdev = to_platform_device(dev);
|
||||
|
||||
i3c_i2c_target = of_property_read_bool(pdev->dev.of_node, "i3c-i2c-target");
|
||||
if (i3c_i2c_target)
|
||||
return;
|
||||
|
||||
a_ctrl = platform_get_drvdata(pdev);
|
||||
if (!a_ctrl) {
|
||||
CAM_ERR(CAM_ACTUATOR, "Actuator device is NULL");
|
||||
|
@@ -499,10 +499,15 @@ static int cam_eeprom_component_bind(struct device *dev,
|
||||
struct device *master_dev, void *data)
|
||||
{
|
||||
int32_t rc = 0;
|
||||
bool i3c_i2c_target;
|
||||
struct cam_eeprom_ctrl_t *e_ctrl = NULL;
|
||||
struct cam_eeprom_soc_private *soc_private = NULL;
|
||||
struct platform_device *pdev = to_platform_device(dev);
|
||||
|
||||
i3c_i2c_target = of_property_read_bool(pdev->dev.of_node, "i3c-i2c-target");
|
||||
if (i3c_i2c_target)
|
||||
return 0;
|
||||
|
||||
e_ctrl = kzalloc(sizeof(struct cam_eeprom_ctrl_t), GFP_KERNEL);
|
||||
if (!e_ctrl)
|
||||
return -ENOMEM;
|
||||
@@ -576,10 +581,15 @@ static void cam_eeprom_component_unbind(struct device *dev,
|
||||
struct device *master_dev, void *data)
|
||||
{
|
||||
int i;
|
||||
bool i3c_i2c_target;
|
||||
struct cam_eeprom_ctrl_t *e_ctrl;
|
||||
struct cam_hw_soc_info *soc_info;
|
||||
struct platform_device *pdev = to_platform_device(dev);
|
||||
|
||||
i3c_i2c_target = of_property_read_bool(pdev->dev.of_node, "i3c-i2c-target");
|
||||
if (i3c_i2c_target)
|
||||
return;
|
||||
|
||||
e_ctrl = platform_get_drvdata(pdev);
|
||||
if (!e_ctrl) {
|
||||
CAM_ERR(CAM_EEPROM, "eeprom device is NULL");
|
||||
|
@@ -412,6 +412,7 @@ static int cam_flash_component_bind(struct device *dev,
|
||||
int32_t rc = 0, i = 0;
|
||||
struct cam_flash_ctrl *fctrl = NULL;
|
||||
struct device_node *of_parent = NULL;
|
||||
bool i3c_i2c_target;
|
||||
struct platform_device *pdev = to_platform_device(dev);
|
||||
|
||||
CAM_DBG(CAM_FLASH, "Binding flash component");
|
||||
@@ -420,6 +421,10 @@ static int cam_flash_component_bind(struct device *dev,
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
i3c_i2c_target = of_property_read_bool(pdev->dev.of_node, "i3c-i2c-target");
|
||||
if (i3c_i2c_target)
|
||||
return 0;
|
||||
|
||||
fctrl = kzalloc(sizeof(struct cam_flash_ctrl), GFP_KERNEL);
|
||||
if (!fctrl)
|
||||
return -ENOMEM;
|
||||
@@ -536,8 +541,13 @@ static void cam_flash_component_unbind(struct device *dev,
|
||||
struct device *master_dev, void *data)
|
||||
{
|
||||
struct cam_flash_ctrl *fctrl;
|
||||
bool i3c_i2c_target;
|
||||
struct platform_device *pdev = to_platform_device(dev);
|
||||
|
||||
i3c_i2c_target = of_property_read_bool(pdev->dev.of_node, "i3c-i2c-target");
|
||||
if (i3c_i2c_target)
|
||||
return;
|
||||
|
||||
fctrl = platform_get_drvdata(pdev);
|
||||
if (!fctrl) {
|
||||
CAM_ERR(CAM_FLASH, "Flash device is NULL");
|
||||
|
@@ -331,8 +331,13 @@ static int cam_ois_component_bind(struct device *dev,
|
||||
int32_t rc = 0;
|
||||
struct cam_ois_ctrl_t *o_ctrl = NULL;
|
||||
struct cam_ois_soc_private *soc_private = NULL;
|
||||
bool i3c_i2c_target;
|
||||
struct platform_device *pdev = to_platform_device(dev);
|
||||
|
||||
i3c_i2c_target = of_property_read_bool(pdev->dev.of_node, "i3c-i2c-target");
|
||||
if (i3c_i2c_target)
|
||||
return 0;
|
||||
|
||||
o_ctrl = kzalloc(sizeof(struct cam_ois_ctrl_t), GFP_KERNEL);
|
||||
if (!o_ctrl)
|
||||
return -ENOMEM;
|
||||
@@ -409,8 +414,13 @@ static void cam_ois_component_unbind(struct device *dev,
|
||||
struct cam_ois_soc_private *soc_private;
|
||||
struct cam_sensor_power_ctrl_t *power_info;
|
||||
struct cam_hw_soc_info *soc_info;
|
||||
bool i3c_i2c_target;
|
||||
struct platform_device *pdev = to_platform_device(dev);
|
||||
|
||||
i3c_i2c_target = of_property_read_bool(pdev->dev.of_node, "i3c-i2c-target");
|
||||
if (i3c_i2c_target)
|
||||
return;
|
||||
|
||||
o_ctrl = platform_get_drvdata(pdev);
|
||||
if (!o_ctrl) {
|
||||
CAM_ERR(CAM_OIS, "ois device is NULL");
|
||||
|
@@ -377,8 +377,13 @@ static int cam_sensor_component_bind(struct device *dev,
|
||||
int32_t rc = 0, i = 0;
|
||||
struct cam_sensor_ctrl_t *s_ctrl = NULL;
|
||||
struct cam_hw_soc_info *soc_info = NULL;
|
||||
bool i3c_i2c_target;
|
||||
struct platform_device *pdev = to_platform_device(dev);
|
||||
|
||||
i3c_i2c_target = of_property_read_bool(pdev->dev.of_node, "i3c-i2c-target");
|
||||
if (i3c_i2c_target)
|
||||
return 0;
|
||||
|
||||
/* Create sensor control structure */
|
||||
s_ctrl = devm_kzalloc(&pdev->dev,
|
||||
sizeof(struct cam_sensor_ctrl_t), GFP_KERNEL);
|
||||
@@ -479,8 +484,13 @@ static void cam_sensor_component_unbind(struct device *dev,
|
||||
int i;
|
||||
struct cam_sensor_ctrl_t *s_ctrl;
|
||||
struct cam_hw_soc_info *soc_info;
|
||||
bool i3c_i2c_target;
|
||||
struct platform_device *pdev = to_platform_device(dev);
|
||||
|
||||
i3c_i2c_target = of_property_read_bool(pdev->dev.of_node, "i3c-i2c-target");
|
||||
if (i3c_i2c_target)
|
||||
return;
|
||||
|
||||
s_ctrl = platform_get_drvdata(pdev);
|
||||
if (!s_ctrl) {
|
||||
CAM_ERR(CAM_SENSOR, "sensor device is NULL");
|
||||
|
Yeni konuda referans
Bir kullanıcı engelle