|
@@ -10,13 +10,15 @@
|
|
#include "cam_tfe_csid_dev.h"
|
|
#include "cam_tfe_csid_dev.h"
|
|
#include "cam_tfe_csid_hw_intf.h"
|
|
#include "cam_tfe_csid_hw_intf.h"
|
|
#include "cam_debug_util.h"
|
|
#include "cam_debug_util.h"
|
|
|
|
+#include "camera_main.h"
|
|
|
|
|
|
static struct cam_hw_intf *cam_tfe_csid_hw_list[CAM_TFE_CSID_HW_NUM_MAX] = {
|
|
static struct cam_hw_intf *cam_tfe_csid_hw_list[CAM_TFE_CSID_HW_NUM_MAX] = {
|
|
0, 0, 0};
|
|
0, 0, 0};
|
|
|
|
|
|
static char csid_dev_name[8];
|
|
static char csid_dev_name[8];
|
|
|
|
|
|
-int cam_tfe_csid_probe(struct platform_device *pdev)
|
|
|
|
|
|
+static int cam_tfe_csid_component_bind(struct device *dev,
|
|
|
|
+ struct device *master_dev, void *data)
|
|
{
|
|
{
|
|
|
|
|
|
struct cam_hw_intf *csid_hw_intf;
|
|
struct cam_hw_intf *csid_hw_intf;
|
|
@@ -26,6 +28,7 @@ int cam_tfe_csid_probe(struct platform_device *pdev)
|
|
struct cam_tfe_csid_hw_info *csid_hw_data = NULL;
|
|
struct cam_tfe_csid_hw_info *csid_hw_data = NULL;
|
|
uint32_t csid_dev_idx;
|
|
uint32_t csid_dev_idx;
|
|
int rc = 0;
|
|
int rc = 0;
|
|
|
|
+ struct platform_device *pdev = to_platform_device(dev);
|
|
|
|
|
|
CAM_DBG(CAM_ISP, "probe called");
|
|
CAM_DBG(CAM_ISP, "probe called");
|
|
|
|
|
|
@@ -101,11 +104,13 @@ err:
|
|
return rc;
|
|
return rc;
|
|
}
|
|
}
|
|
|
|
|
|
-int cam_tfe_csid_remove(struct platform_device *pdev)
|
|
|
|
|
|
+void cam_tfe_csid_component_unbind(struct device *dev,
|
|
|
|
+ struct device *master_dev, void *data)
|
|
{
|
|
{
|
|
struct cam_tfe_csid_hw *csid_dev = NULL;
|
|
struct cam_tfe_csid_hw *csid_dev = NULL;
|
|
struct cam_hw_intf *csid_hw_intf;
|
|
struct cam_hw_intf *csid_hw_intf;
|
|
struct cam_hw_info *csid_hw_info;
|
|
struct cam_hw_info *csid_hw_info;
|
|
|
|
+ struct platform_device *pdev = to_platform_device(dev);
|
|
|
|
|
|
csid_dev = (struct cam_tfe_csid_hw *)platform_get_drvdata(pdev);
|
|
csid_dev = (struct cam_tfe_csid_hw *)platform_get_drvdata(pdev);
|
|
csid_hw_intf = csid_dev->hw_intf;
|
|
csid_hw_intf = csid_dev->hw_intf;
|
|
@@ -120,6 +125,27 @@ int cam_tfe_csid_remove(struct platform_device *pdev)
|
|
kfree(csid_dev);
|
|
kfree(csid_dev);
|
|
kfree(csid_hw_info);
|
|
kfree(csid_hw_info);
|
|
kfree(csid_hw_intf);
|
|
kfree(csid_hw_intf);
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+const static struct component_ops cam_tfe_csid_component_ops = {
|
|
|
|
+ .bind = cam_tfe_csid_component_bind,
|
|
|
|
+ .unbind = cam_tfe_csid_component_unbind,
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+int cam_tfe_csid_probe(struct platform_device *pdev)
|
|
|
|
+{
|
|
|
|
+ int rc = 0;
|
|
|
|
+
|
|
|
|
+ rc = component_add(&pdev->dev, &cam_tfe_csid_component_ops);
|
|
|
|
+ if (rc)
|
|
|
|
+ CAM_ERR(CAM_ISP, "failed to add component rc: %d", rc);
|
|
|
|
+
|
|
|
|
+ return rc;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+int cam_tfe_csid_remove(struct platform_device *pdev)
|
|
|
|
+{
|
|
|
|
+ component_del(&pdev->dev, &cam_tfe_csid_component_ops);
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
|