vimc-debayer.c 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603
  1. /*
  2. * vimc-debayer.c Virtual Media Controller Driver
  3. *
  4. * Copyright (C) 2015-2017 Helen Koike <helen.fornazier@gmail.com>
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation; either version 2 of the License, or
  9. * (at your option) any later version.
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. *
  16. */
  17. #include <linux/component.h>
  18. #include <linux/module.h>
  19. #include <linux/mod_devicetable.h>
  20. #include <linux/platform_device.h>
  21. #include <linux/vmalloc.h>
  22. #include <linux/v4l2-mediabus.h>
  23. #include <media/v4l2-subdev.h>
  24. #include "vimc-common.h"
  25. #define VIMC_DEB_DRV_NAME "vimc-debayer"
  26. static unsigned int deb_mean_win_size = 3;
  27. module_param(deb_mean_win_size, uint, 0000);
  28. MODULE_PARM_DESC(deb_mean_win_size, " the window size to calculate the mean.\n"
  29. "NOTE: the window size need to be an odd number, as the main pixel "
  30. "stays in the center of the window, otherwise the next odd number "
  31. "is considered");
  32. #define IS_SINK(pad) (!pad)
  33. #define IS_SRC(pad) (pad)
  34. enum vimc_deb_rgb_colors {
  35. VIMC_DEB_RED = 0,
  36. VIMC_DEB_GREEN = 1,
  37. VIMC_DEB_BLUE = 2,
  38. };
  39. struct vimc_deb_pix_map {
  40. u32 code;
  41. enum vimc_deb_rgb_colors order[2][2];
  42. };
  43. struct vimc_deb_device {
  44. struct vimc_ent_device ved;
  45. struct v4l2_subdev sd;
  46. struct device *dev;
  47. /* The active format */
  48. struct v4l2_mbus_framefmt sink_fmt;
  49. u32 src_code;
  50. void (*set_rgb_src)(struct vimc_deb_device *vdeb, unsigned int lin,
  51. unsigned int col, unsigned int rgb[3]);
  52. /* Values calculated when the stream starts */
  53. u8 *src_frame;
  54. const struct vimc_deb_pix_map *sink_pix_map;
  55. unsigned int sink_bpp;
  56. };
  57. static const struct v4l2_mbus_framefmt sink_fmt_default = {
  58. .width = 640,
  59. .height = 480,
  60. .code = MEDIA_BUS_FMT_RGB888_1X24,
  61. .field = V4L2_FIELD_NONE,
  62. .colorspace = V4L2_COLORSPACE_DEFAULT,
  63. };
  64. static const struct vimc_deb_pix_map vimc_deb_pix_map_list[] = {
  65. {
  66. .code = MEDIA_BUS_FMT_SBGGR8_1X8,
  67. .order = { { VIMC_DEB_BLUE, VIMC_DEB_GREEN },
  68. { VIMC_DEB_GREEN, VIMC_DEB_RED } }
  69. },
  70. {
  71. .code = MEDIA_BUS_FMT_SGBRG8_1X8,
  72. .order = { { VIMC_DEB_GREEN, VIMC_DEB_BLUE },
  73. { VIMC_DEB_RED, VIMC_DEB_GREEN } }
  74. },
  75. {
  76. .code = MEDIA_BUS_FMT_SGRBG8_1X8,
  77. .order = { { VIMC_DEB_GREEN, VIMC_DEB_RED },
  78. { VIMC_DEB_BLUE, VIMC_DEB_GREEN } }
  79. },
  80. {
  81. .code = MEDIA_BUS_FMT_SRGGB8_1X8,
  82. .order = { { VIMC_DEB_RED, VIMC_DEB_GREEN },
  83. { VIMC_DEB_GREEN, VIMC_DEB_BLUE } }
  84. },
  85. {
  86. .code = MEDIA_BUS_FMT_SBGGR10_1X10,
  87. .order = { { VIMC_DEB_BLUE, VIMC_DEB_GREEN },
  88. { VIMC_DEB_GREEN, VIMC_DEB_RED } }
  89. },
  90. {
  91. .code = MEDIA_BUS_FMT_SGBRG10_1X10,
  92. .order = { { VIMC_DEB_GREEN, VIMC_DEB_BLUE },
  93. { VIMC_DEB_RED, VIMC_DEB_GREEN } }
  94. },
  95. {
  96. .code = MEDIA_BUS_FMT_SGRBG10_1X10,
  97. .order = { { VIMC_DEB_GREEN, VIMC_DEB_RED },
  98. { VIMC_DEB_BLUE, VIMC_DEB_GREEN } }
  99. },
  100. {
  101. .code = MEDIA_BUS_FMT_SRGGB10_1X10,
  102. .order = { { VIMC_DEB_RED, VIMC_DEB_GREEN },
  103. { VIMC_DEB_GREEN, VIMC_DEB_BLUE } }
  104. },
  105. {
  106. .code = MEDIA_BUS_FMT_SBGGR12_1X12,
  107. .order = { { VIMC_DEB_BLUE, VIMC_DEB_GREEN },
  108. { VIMC_DEB_GREEN, VIMC_DEB_RED } }
  109. },
  110. {
  111. .code = MEDIA_BUS_FMT_SGBRG12_1X12,
  112. .order = { { VIMC_DEB_GREEN, VIMC_DEB_BLUE },
  113. { VIMC_DEB_RED, VIMC_DEB_GREEN } }
  114. },
  115. {
  116. .code = MEDIA_BUS_FMT_SGRBG12_1X12,
  117. .order = { { VIMC_DEB_GREEN, VIMC_DEB_RED },
  118. { VIMC_DEB_BLUE, VIMC_DEB_GREEN } }
  119. },
  120. {
  121. .code = MEDIA_BUS_FMT_SRGGB12_1X12,
  122. .order = { { VIMC_DEB_RED, VIMC_DEB_GREEN },
  123. { VIMC_DEB_GREEN, VIMC_DEB_BLUE } }
  124. },
  125. };
  126. static const struct vimc_deb_pix_map *vimc_deb_pix_map_by_code(u32 code)
  127. {
  128. unsigned int i;
  129. for (i = 0; i < ARRAY_SIZE(vimc_deb_pix_map_list); i++)
  130. if (vimc_deb_pix_map_list[i].code == code)
  131. return &vimc_deb_pix_map_list[i];
  132. return NULL;
  133. }
  134. static int vimc_deb_init_cfg(struct v4l2_subdev *sd,
  135. struct v4l2_subdev_pad_config *cfg)
  136. {
  137. struct vimc_deb_device *vdeb = v4l2_get_subdevdata(sd);
  138. struct v4l2_mbus_framefmt *mf;
  139. unsigned int i;
  140. mf = v4l2_subdev_get_try_format(sd, cfg, 0);
  141. *mf = sink_fmt_default;
  142. for (i = 1; i < sd->entity.num_pads; i++) {
  143. mf = v4l2_subdev_get_try_format(sd, cfg, i);
  144. *mf = sink_fmt_default;
  145. mf->code = vdeb->src_code;
  146. }
  147. return 0;
  148. }
  149. static int vimc_deb_enum_mbus_code(struct v4l2_subdev *sd,
  150. struct v4l2_subdev_pad_config *cfg,
  151. struct v4l2_subdev_mbus_code_enum *code)
  152. {
  153. /* We only support one format for source pads */
  154. if (IS_SRC(code->pad)) {
  155. struct vimc_deb_device *vdeb = v4l2_get_subdevdata(sd);
  156. if (code->index)
  157. return -EINVAL;
  158. code->code = vdeb->src_code;
  159. } else {
  160. if (code->index >= ARRAY_SIZE(vimc_deb_pix_map_list))
  161. return -EINVAL;
  162. code->code = vimc_deb_pix_map_list[code->index].code;
  163. }
  164. return 0;
  165. }
  166. static int vimc_deb_enum_frame_size(struct v4l2_subdev *sd,
  167. struct v4l2_subdev_pad_config *cfg,
  168. struct v4l2_subdev_frame_size_enum *fse)
  169. {
  170. struct vimc_deb_device *vdeb = v4l2_get_subdevdata(sd);
  171. if (fse->index)
  172. return -EINVAL;
  173. if (IS_SINK(fse->pad)) {
  174. const struct vimc_deb_pix_map *vpix =
  175. vimc_deb_pix_map_by_code(fse->code);
  176. if (!vpix)
  177. return -EINVAL;
  178. } else if (fse->code != vdeb->src_code) {
  179. return -EINVAL;
  180. }
  181. fse->min_width = VIMC_FRAME_MIN_WIDTH;
  182. fse->max_width = VIMC_FRAME_MAX_WIDTH;
  183. fse->min_height = VIMC_FRAME_MIN_HEIGHT;
  184. fse->max_height = VIMC_FRAME_MAX_HEIGHT;
  185. return 0;
  186. }
  187. static int vimc_deb_get_fmt(struct v4l2_subdev *sd,
  188. struct v4l2_subdev_pad_config *cfg,
  189. struct v4l2_subdev_format *fmt)
  190. {
  191. struct vimc_deb_device *vdeb = v4l2_get_subdevdata(sd);
  192. /* Get the current sink format */
  193. fmt->format = fmt->which == V4L2_SUBDEV_FORMAT_TRY ?
  194. *v4l2_subdev_get_try_format(sd, cfg, 0) :
  195. vdeb->sink_fmt;
  196. /* Set the right code for the source pad */
  197. if (IS_SRC(fmt->pad))
  198. fmt->format.code = vdeb->src_code;
  199. return 0;
  200. }
  201. static void vimc_deb_adjust_sink_fmt(struct v4l2_mbus_framefmt *fmt)
  202. {
  203. const struct vimc_deb_pix_map *vpix;
  204. /* Don't accept a code that is not on the debayer table */
  205. vpix = vimc_deb_pix_map_by_code(fmt->code);
  206. if (!vpix)
  207. fmt->code = sink_fmt_default.code;
  208. fmt->width = clamp_t(u32, fmt->width, VIMC_FRAME_MIN_WIDTH,
  209. VIMC_FRAME_MAX_WIDTH) & ~1;
  210. fmt->height = clamp_t(u32, fmt->height, VIMC_FRAME_MIN_HEIGHT,
  211. VIMC_FRAME_MAX_HEIGHT) & ~1;
  212. if (fmt->field == V4L2_FIELD_ANY)
  213. fmt->field = sink_fmt_default.field;
  214. vimc_colorimetry_clamp(fmt);
  215. }
  216. static int vimc_deb_set_fmt(struct v4l2_subdev *sd,
  217. struct v4l2_subdev_pad_config *cfg,
  218. struct v4l2_subdev_format *fmt)
  219. {
  220. struct vimc_deb_device *vdeb = v4l2_get_subdevdata(sd);
  221. struct v4l2_mbus_framefmt *sink_fmt;
  222. if (fmt->which == V4L2_SUBDEV_FORMAT_ACTIVE) {
  223. /* Do not change the format while stream is on */
  224. if (vdeb->src_frame)
  225. return -EBUSY;
  226. sink_fmt = &vdeb->sink_fmt;
  227. } else {
  228. sink_fmt = v4l2_subdev_get_try_format(sd, cfg, 0);
  229. }
  230. /*
  231. * Do not change the format of the source pad,
  232. * it is propagated from the sink
  233. */
  234. if (IS_SRC(fmt->pad)) {
  235. fmt->format = *sink_fmt;
  236. /* TODO: Add support for other formats */
  237. fmt->format.code = vdeb->src_code;
  238. } else {
  239. /* Set the new format in the sink pad */
  240. vimc_deb_adjust_sink_fmt(&fmt->format);
  241. dev_dbg(vdeb->dev, "%s: sink format update: "
  242. "old:%dx%d (0x%x, %d, %d, %d, %d) "
  243. "new:%dx%d (0x%x, %d, %d, %d, %d)\n", vdeb->sd.name,
  244. /* old */
  245. sink_fmt->width, sink_fmt->height, sink_fmt->code,
  246. sink_fmt->colorspace, sink_fmt->quantization,
  247. sink_fmt->xfer_func, sink_fmt->ycbcr_enc,
  248. /* new */
  249. fmt->format.width, fmt->format.height, fmt->format.code,
  250. fmt->format.colorspace, fmt->format.quantization,
  251. fmt->format.xfer_func, fmt->format.ycbcr_enc);
  252. *sink_fmt = fmt->format;
  253. }
  254. return 0;
  255. }
  256. static const struct v4l2_subdev_pad_ops vimc_deb_pad_ops = {
  257. .init_cfg = vimc_deb_init_cfg,
  258. .enum_mbus_code = vimc_deb_enum_mbus_code,
  259. .enum_frame_size = vimc_deb_enum_frame_size,
  260. .get_fmt = vimc_deb_get_fmt,
  261. .set_fmt = vimc_deb_set_fmt,
  262. };
  263. static void vimc_deb_set_rgb_mbus_fmt_rgb888_1x24(struct vimc_deb_device *vdeb,
  264. unsigned int lin,
  265. unsigned int col,
  266. unsigned int rgb[3])
  267. {
  268. unsigned int i, index;
  269. index = VIMC_FRAME_INDEX(lin, col, vdeb->sink_fmt.width, 3);
  270. for (i = 0; i < 3; i++)
  271. vdeb->src_frame[index + i] = rgb[i];
  272. }
  273. static int vimc_deb_s_stream(struct v4l2_subdev *sd, int enable)
  274. {
  275. struct vimc_deb_device *vdeb = v4l2_get_subdevdata(sd);
  276. int ret;
  277. if (enable) {
  278. const struct vimc_pix_map *vpix;
  279. unsigned int frame_size;
  280. if (vdeb->src_frame)
  281. return 0;
  282. /* Calculate the frame size of the source pad */
  283. vpix = vimc_pix_map_by_code(vdeb->src_code);
  284. frame_size = vdeb->sink_fmt.width * vdeb->sink_fmt.height *
  285. vpix->bpp;
  286. /* Save the bytes per pixel of the sink */
  287. vpix = vimc_pix_map_by_code(vdeb->sink_fmt.code);
  288. vdeb->sink_bpp = vpix->bpp;
  289. /* Get the corresponding pixel map from the table */
  290. vdeb->sink_pix_map =
  291. vimc_deb_pix_map_by_code(vdeb->sink_fmt.code);
  292. /*
  293. * Allocate the frame buffer. Use vmalloc to be able to
  294. * allocate a large amount of memory
  295. */
  296. vdeb->src_frame = vmalloc(frame_size);
  297. if (!vdeb->src_frame)
  298. return -ENOMEM;
  299. /* Turn the stream on in the subdevices directly connected */
  300. ret = vimc_pipeline_s_stream(&vdeb->sd.entity, 1);
  301. if (ret) {
  302. vfree(vdeb->src_frame);
  303. vdeb->src_frame = NULL;
  304. return ret;
  305. }
  306. } else {
  307. if (!vdeb->src_frame)
  308. return 0;
  309. /* Disable streaming from the pipe */
  310. ret = vimc_pipeline_s_stream(&vdeb->sd.entity, 0);
  311. if (ret)
  312. return ret;
  313. vfree(vdeb->src_frame);
  314. vdeb->src_frame = NULL;
  315. }
  316. return 0;
  317. }
  318. static const struct v4l2_subdev_video_ops vimc_deb_video_ops = {
  319. .s_stream = vimc_deb_s_stream,
  320. };
  321. static const struct v4l2_subdev_ops vimc_deb_ops = {
  322. .pad = &vimc_deb_pad_ops,
  323. .video = &vimc_deb_video_ops,
  324. };
  325. static unsigned int vimc_deb_get_val(const u8 *bytes,
  326. const unsigned int n_bytes)
  327. {
  328. unsigned int i;
  329. unsigned int acc = 0;
  330. for (i = 0; i < n_bytes; i++)
  331. acc = acc + (bytes[i] << (8 * i));
  332. return acc;
  333. }
  334. static void vimc_deb_calc_rgb_sink(struct vimc_deb_device *vdeb,
  335. const u8 *frame,
  336. const unsigned int lin,
  337. const unsigned int col,
  338. unsigned int rgb[3])
  339. {
  340. unsigned int i, seek, wlin, wcol;
  341. unsigned int n_rgb[3] = {0, 0, 0};
  342. for (i = 0; i < 3; i++)
  343. rgb[i] = 0;
  344. /*
  345. * Calculate how many we need to subtract to get to the pixel in
  346. * the top left corner of the mean window (considering the current
  347. * pixel as the center)
  348. */
  349. seek = deb_mean_win_size / 2;
  350. /* Sum the values of the colors in the mean window */
  351. dev_dbg(vdeb->dev,
  352. "deb: %s: --- Calc pixel %dx%d, window mean %d, seek %d ---\n",
  353. vdeb->sd.name, lin, col, vdeb->sink_fmt.height, seek);
  354. /*
  355. * Iterate through all the lines in the mean window, start
  356. * with zero if the pixel is outside the frame and don't pass
  357. * the height when the pixel is in the bottom border of the
  358. * frame
  359. */
  360. for (wlin = seek > lin ? 0 : lin - seek;
  361. wlin < lin + seek + 1 && wlin < vdeb->sink_fmt.height;
  362. wlin++) {
  363. /*
  364. * Iterate through all the columns in the mean window, start
  365. * with zero if the pixel is outside the frame and don't pass
  366. * the width when the pixel is in the right border of the
  367. * frame
  368. */
  369. for (wcol = seek > col ? 0 : col - seek;
  370. wcol < col + seek + 1 && wcol < vdeb->sink_fmt.width;
  371. wcol++) {
  372. enum vimc_deb_rgb_colors color;
  373. unsigned int index;
  374. /* Check which color this pixel is */
  375. color = vdeb->sink_pix_map->order[wlin % 2][wcol % 2];
  376. index = VIMC_FRAME_INDEX(wlin, wcol,
  377. vdeb->sink_fmt.width,
  378. vdeb->sink_bpp);
  379. dev_dbg(vdeb->dev,
  380. "deb: %s: RGB CALC: frame index %d, win pos %dx%d, color %d\n",
  381. vdeb->sd.name, index, wlin, wcol, color);
  382. /* Get its value */
  383. rgb[color] = rgb[color] +
  384. vimc_deb_get_val(&frame[index], vdeb->sink_bpp);
  385. /* Save how many values we already added */
  386. n_rgb[color]++;
  387. dev_dbg(vdeb->dev, "deb: %s: RGB CALC: val %d, n %d\n",
  388. vdeb->sd.name, rgb[color], n_rgb[color]);
  389. }
  390. }
  391. /* Calculate the mean */
  392. for (i = 0; i < 3; i++) {
  393. dev_dbg(vdeb->dev,
  394. "deb: %s: PRE CALC: %dx%d Color %d, val %d, n %d\n",
  395. vdeb->sd.name, lin, col, i, rgb[i], n_rgb[i]);
  396. if (n_rgb[i])
  397. rgb[i] = rgb[i] / n_rgb[i];
  398. dev_dbg(vdeb->dev,
  399. "deb: %s: FINAL CALC: %dx%d Color %d, val %d\n",
  400. vdeb->sd.name, lin, col, i, rgb[i]);
  401. }
  402. }
  403. static void vimc_deb_process_frame(struct vimc_ent_device *ved,
  404. struct media_pad *sink,
  405. const void *sink_frame)
  406. {
  407. struct vimc_deb_device *vdeb = container_of(ved, struct vimc_deb_device,
  408. ved);
  409. unsigned int rgb[3];
  410. unsigned int i, j;
  411. /* If the stream in this node is not active, just return */
  412. if (!vdeb->src_frame)
  413. return;
  414. for (i = 0; i < vdeb->sink_fmt.height; i++)
  415. for (j = 0; j < vdeb->sink_fmt.width; j++) {
  416. vimc_deb_calc_rgb_sink(vdeb, sink_frame, i, j, rgb);
  417. vdeb->set_rgb_src(vdeb, i, j, rgb);
  418. }
  419. /* Propagate the frame through all source pads */
  420. for (i = 1; i < vdeb->sd.entity.num_pads; i++) {
  421. struct media_pad *pad = &vdeb->sd.entity.pads[i];
  422. vimc_propagate_frame(pad, vdeb->src_frame);
  423. }
  424. }
  425. static void vimc_deb_comp_unbind(struct device *comp, struct device *master,
  426. void *master_data)
  427. {
  428. struct vimc_ent_device *ved = dev_get_drvdata(comp);
  429. struct vimc_deb_device *vdeb = container_of(ved, struct vimc_deb_device,
  430. ved);
  431. vimc_ent_sd_unregister(ved, &vdeb->sd);
  432. kfree(vdeb);
  433. }
  434. static int vimc_deb_comp_bind(struct device *comp, struct device *master,
  435. void *master_data)
  436. {
  437. struct v4l2_device *v4l2_dev = master_data;
  438. struct vimc_platform_data *pdata = comp->platform_data;
  439. struct vimc_deb_device *vdeb;
  440. int ret;
  441. /* Allocate the vdeb struct */
  442. vdeb = kzalloc(sizeof(*vdeb), GFP_KERNEL);
  443. if (!vdeb)
  444. return -ENOMEM;
  445. /* Initialize ved and sd */
  446. ret = vimc_ent_sd_register(&vdeb->ved, &vdeb->sd, v4l2_dev,
  447. pdata->entity_name,
  448. MEDIA_ENT_F_PROC_VIDEO_PIXEL_ENC_CONV, 2,
  449. (const unsigned long[2]) {MEDIA_PAD_FL_SINK,
  450. MEDIA_PAD_FL_SOURCE},
  451. &vimc_deb_ops);
  452. if (ret) {
  453. kfree(vdeb);
  454. return ret;
  455. }
  456. vdeb->ved.process_frame = vimc_deb_process_frame;
  457. dev_set_drvdata(comp, &vdeb->ved);
  458. vdeb->dev = comp;
  459. /* Initialize the frame format */
  460. vdeb->sink_fmt = sink_fmt_default;
  461. /*
  462. * TODO: Add support for more output formats, we only support
  463. * RGB888 for now
  464. * NOTE: the src format is always the same as the sink, except
  465. * for the code
  466. */
  467. vdeb->src_code = MEDIA_BUS_FMT_RGB888_1X24;
  468. vdeb->set_rgb_src = vimc_deb_set_rgb_mbus_fmt_rgb888_1x24;
  469. return 0;
  470. }
  471. static const struct component_ops vimc_deb_comp_ops = {
  472. .bind = vimc_deb_comp_bind,
  473. .unbind = vimc_deb_comp_unbind,
  474. };
  475. static int vimc_deb_probe(struct platform_device *pdev)
  476. {
  477. return component_add(&pdev->dev, &vimc_deb_comp_ops);
  478. }
  479. static int vimc_deb_remove(struct platform_device *pdev)
  480. {
  481. component_del(&pdev->dev, &vimc_deb_comp_ops);
  482. return 0;
  483. }
  484. static const struct platform_device_id vimc_deb_driver_ids[] = {
  485. {
  486. .name = VIMC_DEB_DRV_NAME,
  487. },
  488. { }
  489. };
  490. static struct platform_driver vimc_deb_pdrv = {
  491. .probe = vimc_deb_probe,
  492. .remove = vimc_deb_remove,
  493. .id_table = vimc_deb_driver_ids,
  494. .driver = {
  495. .name = VIMC_DEB_DRV_NAME,
  496. },
  497. };
  498. module_platform_driver(vimc_deb_pdrv);
  499. MODULE_DEVICE_TABLE(platform, vimc_deb_driver_ids);
  500. MODULE_DESCRIPTION("Virtual Media Controller Driver (VIMC) Debayer");
  501. MODULE_AUTHOR("Helen Mae Koike Fornazier <helen.fornazier@gmail.com>");
  502. MODULE_LICENSE("GPL");