/* * Samsung Exynos5 SoC series FIMC-IS driver * * exynos5 fimc-is video functions * * Copyright (c) 2011 Samsung Electronics Co., Ltd * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "is-core.h" #include "is-cmd.h" #include "is-err.h" #include "is-video.h" #include "is-dvfs.h" int is_i0s_video_probe(void *data) { int ret = 0; struct is_core *core; struct is_video *video; FIMC_BUG(!data); core = (struct is_core *)data; video = &core->video_i0s; video->resourcemgr = &core->resourcemgr; if (!core->pdev) { probe_err("pdev is NULL"); ret = -EINVAL; goto p_err; } video->group_id = GROUP_ID_ISP0; video->group_ofs = offsetof(struct is_device_ischain, group_isp); video->subdev_id = ENTRY_ISP; video->subdev_ofs = offsetof(struct is_group, leader); video->buf_rdycount = VIDEO_IXS_READY_BUFFERS; ret = is_video_probe(video, IS_VIDEO_IXS_NAME(0), IS_VIDEO_I0S_NUM, VFL_DIR_M2M, &core->resourcemgr.mem, &core->v4l2_dev, NULL, NULL, NULL); if (ret) dev_err(&core->pdev->dev, "%s is fail(%d)\n", __func__, ret); p_err: return ret; } int is_i1s_video_probe(void *data) { int ret = 0; struct is_core *core; struct is_video *video; FIMC_BUG(!data); core = (struct is_core *)data; video = &core->video_i1s; video->resourcemgr = &core->resourcemgr; if (!core->pdev) { probe_err("pdev is NULL"); ret = -EINVAL; goto p_err; } video->group_id = GROUP_ID_ISP1; video->group_ofs = offsetof(struct is_device_ischain, group_isp); video->subdev_id = ENTRY_ISP; video->subdev_ofs = offsetof(struct is_group, leader); video->buf_rdycount = VIDEO_IXS_READY_BUFFERS; ret = is_video_probe(video, IS_VIDEO_IXS_NAME(1), IS_VIDEO_I1S_NUM, VFL_DIR_M2M, &core->resourcemgr.mem, &core->v4l2_dev, NULL, NULL, NULL); if (ret) dev_err(&core->pdev->dev, "%s is fail(%d)\n", __func__, ret); p_err: return ret; }