2 * S5P/EXYNOS4 SoC series camera host interface media device driver
4 * Copyright (C) 2011 Samsung Electronics Co., Ltd.
5 * Contact: Sylwester Nawrocki, <s.nawrocki@samsung.com>
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published
9 * by the Free Software Foundation, either version 2 of the License,
10 * or (at your option) any later version.
13 #include <linux/bug.h>
14 #include <linux/device.h>
15 #include <linux/errno.h>
16 #include <linux/i2c.h>
17 #include <linux/kernel.h>
18 #include <linux/list.h>
19 #include <linux/module.h>
20 #include <linux/platform_device.h>
21 #include <linux/pm_runtime.h>
22 #include <linux/types.h>
23 #include <linux/slab.h>
24 #include <media/v4l2-ctrls.h>
25 #include <media/media-device.h>
27 #include "fimc-core.h"
28 #include "fimc-mdevice.h"
29 #include "mipi-csis.h"
31 static int __fimc_md_set_camclk(struct fimc_md *fmd,
32 struct fimc_sensor_info *s_info,
35 * fimc_pipeline_prepare - update pipeline information with subdevice pointers
36 * @fimc: fimc device terminating the pipeline
38 * Caller holds the graph mutex.
40 void fimc_pipeline_prepare(struct fimc_dev *fimc, struct media_entity *me)
42 struct media_entity_graph graph;
43 struct v4l2_subdev *sd;
45 media_entity_graph_walk_start(&graph, me);
47 while ((me = media_entity_graph_walk_next(&graph))) {
48 if (media_entity_type(me) != MEDIA_ENT_T_V4L2_SUBDEV)
50 sd = media_entity_to_v4l2_subdev(me);
52 if (sd->grp_id == SENSOR_GROUP_ID)
53 fimc->pipeline.sensor = sd;
54 else if (sd->grp_id == CSIS_GROUP_ID)
55 fimc->pipeline.csis = sd;
60 * __subdev_set_power - change power state of a single subdev
61 * @sd: subdevice to change power state for
62 * @on: 1 to enable power or 0 to disable
64 * Return result of s_power subdev operation or -ENXIO if sd argument
65 * is NULL. Return 0 if the subdevice does not implement s_power.
67 static int __subdev_set_power(struct v4l2_subdev *sd, int on)
75 use_count = &sd->entity.use_count;
76 if (on && (*use_count)++ > 0)
78 else if (!on && (*use_count == 0 || --(*use_count) > 0))
80 ret = v4l2_subdev_call(sd, core, s_power, on);
82 return ret != -ENOIOCTLCMD ? ret : 0;
86 * fimc_pipeline_s_power - change power state of all pipeline subdevs
87 * @fimc: fimc device terminating the pipeline
88 * @state: 1 to enable power or 0 for power down
90 * Need to be called with the graph mutex held.
92 int fimc_pipeline_s_power(struct fimc_dev *fimc, int state)
96 if (fimc->pipeline.sensor == NULL)
100 ret = __subdev_set_power(fimc->pipeline.csis, 1);
101 if (ret && ret != -ENXIO)
103 return __subdev_set_power(fimc->pipeline.sensor, 1);
106 ret = __subdev_set_power(fimc->pipeline.sensor, 0);
109 ret = __subdev_set_power(fimc->pipeline.csis, 0);
111 return ret == -ENXIO ? 0 : ret;
115 * __fimc_pipeline_initialize - update the pipeline information, enable power
116 * of all pipeline subdevs and the sensor clock
117 * @me: media entity to start graph walk with
118 * @prep: true to acquire sensor (and csis) subdevs
120 * This function must be called with the graph mutex held.
122 static int __fimc_pipeline_initialize(struct fimc_dev *fimc,
123 struct media_entity *me, bool prep)
128 fimc_pipeline_prepare(fimc, me);
129 if (fimc->pipeline.sensor == NULL)
131 ret = fimc_md_set_camclk(fimc->pipeline.sensor, true);
134 return fimc_pipeline_s_power(fimc, 1);
137 int fimc_pipeline_initialize(struct fimc_dev *fimc, struct media_entity *me,
142 mutex_lock(&me->parent->graph_mutex);
143 ret = __fimc_pipeline_initialize(fimc, me, prep);
144 mutex_unlock(&me->parent->graph_mutex);
150 * __fimc_pipeline_shutdown - disable the sensor clock and pipeline power
151 * @fimc: fimc device terminating the pipeline
153 * Disable power of all subdevs in the pipeline and turn off the external
155 * Called with the graph mutex held.
157 int __fimc_pipeline_shutdown(struct fimc_dev *fimc)
161 if (fimc->pipeline.sensor) {
162 ret = fimc_pipeline_s_power(fimc, 0);
163 fimc_md_set_camclk(fimc->pipeline.sensor, false);
165 return ret == -ENXIO ? 0 : ret;
168 int fimc_pipeline_shutdown(struct fimc_dev *fimc)
170 struct media_entity *me = &fimc->vid_cap.vfd->entity;
173 mutex_lock(&me->parent->graph_mutex);
174 ret = __fimc_pipeline_shutdown(fimc);
175 mutex_unlock(&me->parent->graph_mutex);
181 * fimc_pipeline_s_stream - invoke s_stream on pipeline subdevs
182 * @fimc: fimc device terminating the pipeline
183 * @on: passed as the s_stream call argument
185 int fimc_pipeline_s_stream(struct fimc_dev *fimc, int on)
187 struct fimc_pipeline *p = &fimc->pipeline;
190 if (p->sensor == NULL)
193 if ((on && p->csis) || !on)
194 ret = v4l2_subdev_call(on ? p->csis : p->sensor,
195 video, s_stream, on);
196 if (ret < 0 && ret != -ENOIOCTLCMD)
198 if ((!on && p->csis) || on)
199 ret = v4l2_subdev_call(on ? p->sensor : p->csis,
200 video, s_stream, on);
201 return ret == -ENOIOCTLCMD ? 0 : ret;
205 * Sensor subdevice helper functions
207 static struct v4l2_subdev *fimc_md_register_sensor(struct fimc_md *fmd,
208 struct fimc_sensor_info *s_info)
210 struct i2c_adapter *adapter;
211 struct v4l2_subdev *sd = NULL;
216 adapter = i2c_get_adapter(s_info->pdata->i2c_bus_num);
219 sd = v4l2_i2c_new_subdev_board(&fmd->v4l2_dev, adapter,
220 s_info->pdata->board_info, NULL);
221 if (IS_ERR_OR_NULL(sd)) {
222 i2c_put_adapter(adapter);
223 v4l2_err(&fmd->v4l2_dev, "Failed to acquire subdev\n");
226 v4l2_set_subdev_hostdata(sd, s_info);
227 sd->grp_id = SENSOR_GROUP_ID;
229 v4l2_info(&fmd->v4l2_dev, "Registered sensor subdevice %s\n",
230 s_info->pdata->board_info->type);
234 static void fimc_md_unregister_sensor(struct v4l2_subdev *sd)
236 struct i2c_client *client = v4l2_get_subdevdata(sd);
237 struct i2c_adapter *adapter;
241 v4l2_device_unregister_subdev(sd);
242 adapter = client->adapter;
243 i2c_unregister_device(client);
245 i2c_put_adapter(adapter);
248 static int fimc_md_register_sensor_entities(struct fimc_md *fmd)
250 struct s5p_platform_fimc *pdata = fmd->pdev->dev.platform_data;
251 struct fimc_dev *fd = NULL;
252 int num_clients, ret, i;
255 * Runtime resume one of the FIMC entities to make sure
256 * the sclk_cam clocks are not globally disabled.
258 for (i = 0; !fd && i < ARRAY_SIZE(fmd->fimc); i++)
263 ret = pm_runtime_get_sync(&fd->pdev->dev);
267 WARN_ON(pdata->num_clients > ARRAY_SIZE(fmd->sensor));
268 num_clients = min_t(u32, pdata->num_clients, ARRAY_SIZE(fmd->sensor));
270 fmd->num_sensors = num_clients;
271 for (i = 0; i < num_clients; i++) {
272 fmd->sensor[i].pdata = &pdata->isp_info[i];
273 ret = __fimc_md_set_camclk(fmd, &fmd->sensor[i], true);
276 fmd->sensor[i].subdev =
277 fimc_md_register_sensor(fmd, &fmd->sensor[i]);
278 ret = __fimc_md_set_camclk(fmd, &fmd->sensor[i], false);
282 pm_runtime_put(&fd->pdev->dev);
287 * MIPI CSIS and FIMC platform devices registration.
289 static int fimc_register_callback(struct device *dev, void *p)
291 struct fimc_dev *fimc = dev_get_drvdata(dev);
292 struct fimc_md *fmd = p;
295 if (!fimc || !fimc->pdev)
297 if (fimc->pdev->id < 0 || fimc->pdev->id >= FIMC_MAX_DEVS)
300 fmd->fimc[fimc->pdev->id] = fimc;
301 ret = fimc_register_m2m_device(fimc, &fmd->v4l2_dev);
304 ret = fimc_register_capture_device(fimc, &fmd->v4l2_dev);
306 fimc->vid_cap.user_subdev_api = fmd->user_subdev_api;
310 static int csis_register_callback(struct device *dev, void *p)
312 struct v4l2_subdev *sd = dev_get_drvdata(dev);
313 struct platform_device *pdev;
314 struct fimc_md *fmd = p;
319 pdev = v4l2_get_subdevdata(sd);
320 if (!pdev || pdev->id < 0 || pdev->id >= CSIS_MAX_ENTITIES)
322 v4l2_info(sd, "csis%d sd: %s\n", pdev->id, sd->name);
324 id = pdev->id < 0 ? 0 : pdev->id;
325 fmd->csis[id].sd = sd;
326 sd->grp_id = CSIS_GROUP_ID;
327 ret = v4l2_device_register_subdev(&fmd->v4l2_dev, sd);
329 v4l2_err(&fmd->v4l2_dev,
330 "Failed to register CSIS subdevice: %d\n", ret);
335 * fimc_md_register_platform_entities - register FIMC and CSIS media entities
337 static int fimc_md_register_platform_entities(struct fimc_md *fmd)
339 struct device_driver *driver;
342 driver = driver_find(FIMC_MODULE_NAME, &platform_bus_type);
345 ret = driver_for_each_device(driver, NULL, fmd,
346 fimc_register_callback);
350 driver = driver_find(CSIS_DRIVER_NAME, &platform_bus_type);
352 ret = driver_for_each_device(driver, NULL, fmd,
353 csis_register_callback);
357 static void fimc_md_unregister_entities(struct fimc_md *fmd)
361 for (i = 0; i < FIMC_MAX_DEVS; i++) {
362 if (fmd->fimc[i] == NULL)
364 fimc_unregister_m2m_device(fmd->fimc[i]);
365 fimc_unregister_capture_device(fmd->fimc[i]);
368 for (i = 0; i < CSIS_MAX_ENTITIES; i++) {
369 if (fmd->csis[i].sd == NULL)
371 v4l2_device_unregister_subdev(fmd->csis[i].sd);
372 fmd->csis[i].sd = NULL;
374 for (i = 0; i < fmd->num_sensors; i++) {
375 if (fmd->sensor[i].subdev == NULL)
377 fimc_md_unregister_sensor(fmd->sensor[i].subdev);
378 fmd->sensor[i].subdev = NULL;
382 static int fimc_md_register_video_nodes(struct fimc_md *fmd)
384 struct video_device *vdev;
387 for (i = 0; i < FIMC_MAX_DEVS && !ret; i++) {
391 vdev = fmd->fimc[i]->m2m.vfd;
393 ret = video_register_device(vdev, VFL_TYPE_GRABBER, -1);
396 v4l2_info(&fmd->v4l2_dev, "Registered %s as /dev/%s\n",
397 vdev->name, video_device_node_name(vdev));
400 vdev = fmd->fimc[i]->vid_cap.vfd;
403 ret = video_register_device(vdev, VFL_TYPE_GRABBER, -1);
404 v4l2_info(&fmd->v4l2_dev, "Registered %s as /dev/%s\n",
405 vdev->name, video_device_node_name(vdev));
412 * __fimc_md_create_fimc_links - create links to all FIMC entities
413 * @fmd: fimc media device
414 * @source: the source entity to create links to all fimc entities from
415 * @sensor: sensor subdev linked to FIMC[fimc_id] entity, may be null
416 * @pad: the source entity pad index
417 * @fimc_id: index of the fimc device for which link should be enabled
419 static int __fimc_md_create_fimc_links(struct fimc_md *fmd,
420 struct media_entity *source,
421 struct v4l2_subdev *sensor,
422 int pad, int fimc_id)
424 struct fimc_sensor_info *s_info;
425 struct media_entity *sink;
429 for (i = 0; i < FIMC_MAX_DEVS; i++) {
433 * Some FIMC variants are not fitted with camera capture
434 * interface. Skip creating a link from sensor for those.
436 if (sensor->grp_id == SENSOR_GROUP_ID &&
437 !fmd->fimc[i]->variant->has_cam_if)
440 flags = (i == fimc_id) ? MEDIA_LNK_FL_ENABLED : 0;
441 sink = &fmd->fimc[i]->vid_cap.subdev->entity;
442 ret = media_entity_create_link(source, pad, sink,
443 FIMC_SD_PAD_SINK, flags);
447 /* Notify FIMC capture subdev entity */
448 ret = media_entity_call(sink, link_setup, &sink->pads[0],
449 &source->pads[pad], flags);
453 v4l2_info(&fmd->v4l2_dev, "created link [%s] %c> [%s]",
454 source->name, flags ? '=' : '-', sink->name);
458 s_info = v4l2_get_subdev_hostdata(sensor);
459 if (!WARN_ON(s_info == NULL)) {
460 unsigned long irq_flags;
461 spin_lock_irqsave(&fmd->slock, irq_flags);
462 s_info->host = fmd->fimc[i];
463 spin_unlock_irqrestore(&fmd->slock, irq_flags);
470 * fimc_md_create_links - create default links between registered entities
472 * Parallel interface sensor entities are connected directly to FIMC capture
473 * entities. The sensors using MIPI CSIS bus are connected through immutable
474 * link with CSI receiver entity specified by mux_id. Any registered CSIS
475 * entity has a link to each registered FIMC capture entity. Enabled links
476 * are created by default between each subsequent registered sensor and
477 * subsequent FIMC capture entity. The number of default active links is
478 * determined by the number of available sensors or FIMC entities,
481 static int fimc_md_create_links(struct fimc_md *fmd)
483 struct v4l2_subdev *sensor, *csis;
484 struct s5p_fimc_isp_info *pdata;
485 struct fimc_sensor_info *s_info;
486 struct media_entity *source, *sink;
487 int i, pad, fimc_id = 0;
491 for (i = 0; i < fmd->num_sensors; i++) {
492 if (fmd->sensor[i].subdev == NULL)
495 sensor = fmd->sensor[i].subdev;
496 s_info = v4l2_get_subdev_hostdata(sensor);
497 if (!s_info || !s_info->pdata)
501 pdata = s_info->pdata;
503 switch (pdata->bus_type) {
505 if (WARN(pdata->mux_id >= CSIS_MAX_ENTITIES,
506 "Wrong CSI channel id: %d\n", pdata->mux_id))
509 csis = fmd->csis[pdata->mux_id].sd;
510 if (WARN(csis == NULL,
511 "MIPI-CSI interface specified "
512 "but s5p-csis module is not loaded!\n"))
515 ret = media_entity_create_link(&sensor->entity, 0,
516 &csis->entity, CSIS_PAD_SINK,
517 MEDIA_LNK_FL_IMMUTABLE |
518 MEDIA_LNK_FL_ENABLED);
522 v4l2_info(&fmd->v4l2_dev, "created link [%s] => [%s]",
523 sensor->entity.name, csis->entity.name);
525 source = &csis->entity;
526 pad = CSIS_PAD_SOURCE;
529 case FIMC_ITU_601...FIMC_ITU_656:
530 source = &sensor->entity;
535 v4l2_err(&fmd->v4l2_dev, "Wrong bus_type: %x\n",
542 ret = __fimc_md_create_fimc_links(fmd, source, sensor, pad,
545 /* Create immutable links between each FIMC's subdev and video node */
546 flags = MEDIA_LNK_FL_IMMUTABLE | MEDIA_LNK_FL_ENABLED;
547 for (i = 0; i < FIMC_MAX_DEVS; i++) {
550 source = &fmd->fimc[i]->vid_cap.subdev->entity;
551 sink = &fmd->fimc[i]->vid_cap.vfd->entity;
552 ret = media_entity_create_link(source, FIMC_SD_PAD_SOURCE,
562 * The peripheral sensor clock management.
564 static int fimc_md_get_clocks(struct fimc_md *fmd)
570 for (i = 0; i < FIMC_MAX_CAMCLKS; i++) {
571 snprintf(clk_name, sizeof(clk_name), "sclk_cam%u", i);
572 clock = clk_get(NULL, clk_name);
573 if (IS_ERR_OR_NULL(clock)) {
574 v4l2_err(&fmd->v4l2_dev, "Failed to get clock: %s",
578 fmd->camclk[i].clock = clock;
583 static void fimc_md_put_clocks(struct fimc_md *fmd)
585 int i = FIMC_MAX_CAMCLKS;
588 if (IS_ERR_OR_NULL(fmd->camclk[i].clock))
590 clk_put(fmd->camclk[i].clock);
591 fmd->camclk[i].clock = NULL;
595 static int __fimc_md_set_camclk(struct fimc_md *fmd,
596 struct fimc_sensor_info *s_info,
599 struct s5p_fimc_isp_info *pdata = s_info->pdata;
600 struct fimc_camclk_info *camclk;
603 if (WARN_ON(pdata->clk_id >= FIMC_MAX_CAMCLKS) || fmd == NULL)
606 if (s_info->clk_on == on)
608 camclk = &fmd->camclk[pdata->clk_id];
610 dbg("camclk %d, f: %lu, clk: %p, on: %d",
611 pdata->clk_id, pdata->clk_frequency, camclk, on);
614 if (camclk->use_count > 0 &&
615 camclk->frequency != pdata->clk_frequency)
618 if (camclk->use_count++ == 0) {
619 clk_set_rate(camclk->clock, pdata->clk_frequency);
620 camclk->frequency = pdata->clk_frequency;
621 ret = clk_enable(camclk->clock);
624 dbg("Enabled camclk %d: f: %lu", pdata->clk_id,
625 clk_get_rate(camclk->clock));
630 if (WARN_ON(camclk->use_count == 0))
633 if (--camclk->use_count == 0) {
634 clk_disable(camclk->clock);
636 dbg("Disabled camclk %d", pdata->clk_id);
642 * fimc_md_set_camclk - peripheral sensor clock setup
643 * @sd: sensor subdev to configure sclk_cam clock for
644 * @on: 1 to enable or 0 to disable the clock
646 * There are 2 separate clock outputs available in the SoC for external
647 * image processors. These clocks are shared between all registered FIMC
648 * devices to which sensors can be attached, either directly or through
649 * the MIPI CSI receiver. The clock is allowed here to be used by
650 * multiple sensors concurrently if they use same frequency.
651 * The per sensor subdev clk_on attribute helps to synchronize accesses
652 * to the sclk_cam clocks from the video and media device nodes.
653 * This function should only be called when the graph mutex is held.
655 int fimc_md_set_camclk(struct v4l2_subdev *sd, bool on)
657 struct fimc_sensor_info *s_info = v4l2_get_subdev_hostdata(sd);
658 struct fimc_md *fmd = entity_to_fimc_mdev(&sd->entity);
660 return __fimc_md_set_camclk(fmd, s_info, on);
663 static int fimc_md_link_notify(struct media_pad *source,
664 struct media_pad *sink, u32 flags)
666 struct v4l2_subdev *sd;
667 struct fimc_dev *fimc;
670 if (media_entity_type(sink->entity) != MEDIA_ENT_T_V4L2_SUBDEV)
673 sd = media_entity_to_v4l2_subdev(sink->entity);
674 fimc = v4l2_get_subdevdata(sd);
676 if (!(flags & MEDIA_LNK_FL_ENABLED)) {
677 ret = __fimc_pipeline_shutdown(fimc);
678 fimc->pipeline.sensor = NULL;
679 fimc->pipeline.csis = NULL;
681 mutex_lock(&fimc->lock);
682 fimc_ctrls_delete(fimc->vid_cap.ctx);
683 mutex_unlock(&fimc->lock);
687 * Link activation. Enable power of pipeline elements only if the
688 * pipeline is already in use, i.e. its video node is opened.
689 * Recreate the controls destroyed during the link deactivation.
691 mutex_lock(&fimc->lock);
692 if (fimc->vid_cap.refcnt > 0) {
693 ret = __fimc_pipeline_initialize(fimc, source->entity, true);
695 ret = fimc_capture_ctrls_create(fimc);
697 mutex_unlock(&fimc->lock);
699 return ret ? -EPIPE : ret;
702 static ssize_t fimc_md_sysfs_show(struct device *dev,
703 struct device_attribute *attr, char *buf)
705 struct platform_device *pdev = to_platform_device(dev);
706 struct fimc_md *fmd = platform_get_drvdata(pdev);
708 if (fmd->user_subdev_api)
709 return strlcpy(buf, "Sub-device API (sub-dev)\n", PAGE_SIZE);
711 return strlcpy(buf, "V4L2 video node only API (vid-dev)\n", PAGE_SIZE);
714 static ssize_t fimc_md_sysfs_store(struct device *dev,
715 struct device_attribute *attr,
716 const char *buf, size_t count)
718 struct platform_device *pdev = to_platform_device(dev);
719 struct fimc_md *fmd = platform_get_drvdata(pdev);
723 if (!strcmp(buf, "vid-dev\n"))
725 else if (!strcmp(buf, "sub-dev\n"))
730 fmd->user_subdev_api = subdev_api;
731 for (i = 0; i < FIMC_MAX_DEVS; i++)
733 fmd->fimc[i]->vid_cap.user_subdev_api = subdev_api;
737 * This device attribute is to select video pipeline configuration method.
738 * There are following valid values:
739 * vid-dev - for V4L2 video node API only, subdevice will be configured
740 * by the host driver.
741 * sub-dev - for media controller API, subdevs must be configured in user
742 * space before starting streaming.
744 static DEVICE_ATTR(subdev_conf_mode, S_IWUSR | S_IRUGO,
745 fimc_md_sysfs_show, fimc_md_sysfs_store);
747 static int __devinit fimc_md_probe(struct platform_device *pdev)
749 struct v4l2_device *v4l2_dev;
753 fmd = devm_kzalloc(&pdev->dev, sizeof(*fmd), GFP_KERNEL);
757 spin_lock_init(&fmd->slock);
760 strlcpy(fmd->media_dev.model, "SAMSUNG S5P FIMC",
761 sizeof(fmd->media_dev.model));
762 fmd->media_dev.link_notify = fimc_md_link_notify;
763 fmd->media_dev.dev = &pdev->dev;
765 v4l2_dev = &fmd->v4l2_dev;
766 v4l2_dev->mdev = &fmd->media_dev;
767 v4l2_dev->notify = fimc_sensor_notify;
768 snprintf(v4l2_dev->name, sizeof(v4l2_dev->name), "%s",
769 dev_name(&pdev->dev));
771 ret = v4l2_device_register(&pdev->dev, &fmd->v4l2_dev);
773 v4l2_err(v4l2_dev, "Failed to register v4l2_device: %d\n", ret);
776 ret = media_device_register(&fmd->media_dev);
778 v4l2_err(v4l2_dev, "Failed to register media device: %d\n", ret);
781 ret = fimc_md_get_clocks(fmd);
785 fmd->user_subdev_api = false;
786 ret = fimc_md_register_platform_entities(fmd);
790 if (pdev->dev.platform_data) {
791 ret = fimc_md_register_sensor_entities(fmd);
795 ret = fimc_md_create_links(fmd);
798 ret = v4l2_device_register_subdev_nodes(&fmd->v4l2_dev);
801 ret = fimc_md_register_video_nodes(fmd);
805 ret = device_create_file(&pdev->dev, &dev_attr_subdev_conf_mode);
807 platform_set_drvdata(pdev, fmd);
811 media_device_unregister(&fmd->media_dev);
812 fimc_md_put_clocks(fmd);
813 fimc_md_unregister_entities(fmd);
815 v4l2_device_unregister(&fmd->v4l2_dev);
819 static int __devexit fimc_md_remove(struct platform_device *pdev)
821 struct fimc_md *fmd = platform_get_drvdata(pdev);
825 device_remove_file(&pdev->dev, &dev_attr_subdev_conf_mode);
826 fimc_md_unregister_entities(fmd);
827 media_device_unregister(&fmd->media_dev);
828 fimc_md_put_clocks(fmd);
832 static struct platform_driver fimc_md_driver = {
833 .probe = fimc_md_probe,
834 .remove = __devexit_p(fimc_md_remove),
836 .name = "s5p-fimc-md",
837 .owner = THIS_MODULE,
841 int __init fimc_md_init(void)
844 request_module("s5p-csis");
845 ret = fimc_register_driver();
848 return platform_driver_register(&fimc_md_driver);
850 void __exit fimc_md_exit(void)
852 platform_driver_unregister(&fimc_md_driver);
853 fimc_unregister_driver();
856 module_init(fimc_md_init);
857 module_exit(fimc_md_exit);
859 MODULE_AUTHOR("Sylwester Nawrocki <s.nawrocki@samsung.com>");
860 MODULE_DESCRIPTION("S5P FIMC camera host interface/video postprocessor driver");
861 MODULE_LICENSE("GPL");
862 MODULE_VERSION("2.0.1");