mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 19:30:30 +09:00
camera: rockchip: camsys driver v0.0x21.8
Change-Id: Ib0fed5df3edfe4dae042999e71c50d67a490f88e Signed-off-by: dalong.zhang <dalon.zhang@rock-chips.com>
This commit is contained in:
@@ -1647,6 +1647,7 @@ static int camsys_platform_remove(struct platform_device *pdev)
|
||||
|
||||
static const struct of_device_id cif_of_match[] = {
|
||||
{ .compatible = "rockchip,isp" },
|
||||
{ /* sentinel */ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, cif_of_match);
|
||||
|
||||
|
||||
@@ -144,8 +144,10 @@
|
||||
1) support drm iommu.
|
||||
*v0.0x21.7:
|
||||
* 1) remove memset function wrong called code.
|
||||
*v0.0x21.8:
|
||||
* 1) flash module exist risk, fix up it.
|
||||
*/
|
||||
#define CAMSYS_DRIVER_VERSION KERNEL_VERSION(0, 0x21, 7)
|
||||
#define CAMSYS_DRIVER_VERSION KERNEL_VERSION(0, 0x21, 8)
|
||||
|
||||
#define CAMSYS_PLATFORM_DRV_NAME "RockChip-CamSys"
|
||||
#define CAMSYS_PLATFORM_MARVIN_NAME "Platform_MarvinDev"
|
||||
|
||||
17
drivers/media/video/rk_camsys/ext_flashled_drv/leds-rt8547.c
Executable file → Normal file
17
drivers/media/video/rk_camsys/ext_flashled_drv/leds-rt8547.c
Executable file → Normal file
@@ -36,6 +36,7 @@ struct rt8547_chip {
|
||||
spinlock_t io_lock;
|
||||
unsigned char suspend:1;
|
||||
int in_use_mode;
|
||||
struct platform_device rt_fled_pdev;
|
||||
#ifdef CONFIG_DEBUG_FS
|
||||
struct flashlight_device *fled_dev;
|
||||
unsigned char reg_addr;
|
||||
@@ -776,10 +777,9 @@ static void rt8547_reg_init(struct rt8547_chip *chip)
|
||||
rt8547_reg_initval[RT8547_FLED_REG3 - 1]);
|
||||
}
|
||||
|
||||
static struct platform_device rt_fled_pdev = {
|
||||
.name = "rt-flash-led",
|
||||
.id = -1,
|
||||
};
|
||||
static void rt8547_release(struct device *dev)
|
||||
{
|
||||
}
|
||||
|
||||
static int rt8547_led_probe(struct platform_device *pdev)
|
||||
{
|
||||
@@ -818,8 +818,11 @@ static int rt8547_led_probe(struct platform_device *pdev)
|
||||
|
||||
chip->base.hal = &rt8547_fled_hal;
|
||||
chip->base.init_props = &rt8547_fled_props;
|
||||
rt_fled_pdev.dev.parent = &pdev->dev;
|
||||
ret = platform_device_register(&rt_fled_pdev);
|
||||
chip->rt_fled_pdev.dev.parent = &pdev->dev;
|
||||
chip->rt_fled_pdev.dev.release = rt8547_release;
|
||||
chip->rt_fled_pdev.name = "rt-flash-led";
|
||||
chip->rt_fled_pdev.id = -1;
|
||||
ret = platform_device_register(&chip->rt_fled_pdev);
|
||||
if (ret < 0) {
|
||||
dev_err(&pdev->dev, "register rtfled fail\n");
|
||||
goto err_io;
|
||||
@@ -844,7 +847,7 @@ static int rt8547_led_remove(struct platform_device *pdev)
|
||||
#ifdef CONFIG_DEBUG_FS
|
||||
rt8547_remove_debugfs();
|
||||
#endif /* #ifdef CONFIG_DEBUG_FS */
|
||||
platform_device_unregister(&rt_fled_pdev);
|
||||
platform_device_unregister(&chip->rt_fled_pdev);
|
||||
rt8547_io_deinit(chip->pdata);
|
||||
return 0;
|
||||
}
|
||||
|
||||
9
drivers/media/video/rk_camsys/ext_flashled_drv/rk_ext_fshled_ctl.c
Executable file → Normal file
9
drivers/media/video/rk_camsys/ext_flashled_drv/rk_ext_fshled_ctl.c
Executable file → Normal file
@@ -42,6 +42,11 @@ int camsys_deinit_ext_fsh_module()
|
||||
INIT_LIST_HEAD(&g_ext_fsh_devs.dev_list);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void camsys_ext_fsh_release(struct device *dev)
|
||||
{
|
||||
}
|
||||
|
||||
void* camsys_register_ext_fsh_dev(camsys_flash_info_t *fsh_info)
|
||||
{
|
||||
ext_fsh_info_t* new_dev = NULL;
|
||||
@@ -53,7 +58,7 @@ void* camsys_register_ext_fsh_dev(camsys_flash_info_t *fsh_info)
|
||||
goto fail0;
|
||||
}
|
||||
|
||||
new_rt_dev = kzalloc(sizeof(ext_fsh_info_t),GFP_KERNEL);
|
||||
new_rt_dev = kzalloc(sizeof(*new_rt_dev), GFP_KERNEL);
|
||||
if(!new_rt_dev){
|
||||
camsys_err("register new ext flash dev erro !");
|
||||
goto fail1;
|
||||
@@ -61,6 +66,7 @@ void* camsys_register_ext_fsh_dev(camsys_flash_info_t *fsh_info)
|
||||
|
||||
new_dev->pdev.id = -1;
|
||||
new_dev->pdev.name = fsh_info->fl_drv_name;
|
||||
new_dev->pdev.dev.release = camsys_ext_fsh_release;
|
||||
new_dev->pdev.dev.platform_data = (void*)new_rt_dev;
|
||||
new_dev->dev_model = "rt-flash-led";
|
||||
|
||||
@@ -107,6 +113,7 @@ int camsys_deregister_ext_fsh_dev(void* dev)
|
||||
/* free after unregister device ?*/
|
||||
kfree(cur_fsh_info->pdev.dev.platform_data);
|
||||
kfree(cur_fsh_info);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user