|
@@ -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");
|