diff options
author | Sylwester Nawrocki <s.nawrocki@samsung.com> | 2014-02-24 11:44:50 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <m.chehab@samsung.com> | 2014-03-14 10:35:28 -0300 |
commit | fa91f1056f17c87bc0fa601f80d1b1a4487fd701 (patch) | |
tree | 5b11033aa1a1399a0952639465b70ec5168e4043 /drivers/media/platform/exynos4-is/media-dev.h | |
parent | d3f5e0c54f1bfa5f48e92ac45a279fa8cfdc55b7 (diff) | |
download | lwn-fa91f1056f17c87bc0fa601f80d1b1a4487fd701.tar.gz lwn-fa91f1056f17c87bc0fa601f80d1b1a4487fd701.zip |
[media] exynos4-is: Add support for asynchronous subdevices registration
Add support for registering external sensor subdevs using
v4l2-async API. The async API is used only for sensor subdevs
and only for booting from DT.
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'drivers/media/platform/exynos4-is/media-dev.h')
-rw-r--r-- | drivers/media/platform/exynos4-is/media-dev.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/drivers/media/platform/exynos4-is/media-dev.h b/drivers/media/platform/exynos4-is/media-dev.h index a88cee59fd2f..ee1e2519f728 100644 --- a/drivers/media/platform/exynos4-is/media-dev.h +++ b/drivers/media/platform/exynos4-is/media-dev.h @@ -32,8 +32,9 @@ #define PINCTRL_STATE_IDLE "idle" -#define FIMC_MAX_SENSORS 8 +#define FIMC_MAX_SENSORS 4 #define FIMC_MAX_CAMCLKS 2 +#define DEFAULT_SENSOR_CLK_FREQ 24000000U /* LCD/ISP Writeback clocks (PIXELASYNCMx) */ enum { @@ -79,6 +80,7 @@ struct fimc_camclk_info { /** * struct fimc_sensor_info - image data source subdev information * @pdata: sensor's atrributes passed as media device's platform data + * @asd: asynchronous subdev registration data structure * @subdev: image sensor v4l2 subdev * @host: fimc device the sensor is currently linked to * @@ -86,6 +88,7 @@ struct fimc_camclk_info { */ struct fimc_sensor_info { struct fimc_source_info pdata; + struct v4l2_async_subdev asd; struct v4l2_subdev *subdev; struct fimc_dev *host; }; @@ -145,6 +148,9 @@ struct fimc_md { int num_clocks; } clk_provider; + struct v4l2_async_notifier subdev_notifier; + struct v4l2_async_subdev *async_subdevs[FIMC_MAX_SENSORS]; + bool user_subdev_api; spinlock_t slock; struct list_head pipelines; @@ -162,6 +168,11 @@ static inline struct fimc_md *entity_to_fimc_mdev(struct media_entity *me) container_of(me->parent, struct fimc_md, media_dev); } +static inline struct fimc_md *notifier_to_fimc_md(struct v4l2_async_notifier *n) +{ + return container_of(n, struct fimc_md, subdev_notifier); +} + static inline void fimc_md_graph_lock(struct exynos_video_entity *ve) { mutex_lock(&ve->vdev.entity.parent->graph_mutex); |