isp_driver_of.c 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619
  1. /****************************************************************************
  2. *
  3. * The MIT License (MIT)
  4. *
  5. * Copyright (c) 2020 VeriSilicon Holdings Co., Ltd.
  6. *
  7. * Permission is hereby granted, free of charge, to any person obtaining a
  8. * copy of this software and associated documentation files (the "Software"),
  9. * to deal in the Software without restriction, including without limitation
  10. * the rights to use, copy, modify, merge, publish, distribute, sublicense,
  11. * and/or sell copies of the Software, and to permit persons to whom the
  12. * Software is furnished to do so, subject to the following conditions:
  13. *
  14. * The above copyright notice and this permission notice shall be included in
  15. * all copies or substantial portions of the Software.
  16. *
  17. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  18. * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  19. * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  20. * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  21. * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  22. * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
  23. * DEALINGS IN THE SOFTWARE.
  24. *
  25. *****************************************************************************
  26. *
  27. * The GPL License (GPL)
  28. *
  29. * Copyright (c) 2020 VeriSilicon Holdings Co., Ltd.
  30. *
  31. * This program is free software; you can redistribute it and/or
  32. * modify it under the terms of the GNU General Public License
  33. * as published by the Free Software Foundation; either version 2
  34. * of the License, or (at your option) any later version.
  35. *
  36. * This program is distributed in the hope that it will be useful,
  37. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  38. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  39. * GNU General Public License for more details.
  40. *
  41. * You should have received a copy of the GNU General Public License
  42. * along with this program;
  43. *
  44. *****************************************************************************
  45. *
  46. * Note: This software is released under dual MIT and GPL licenses. A
  47. * recipient may use this file under the terms of either the MIT license or
  48. * GPL License. If you wish to use only one license not the other, you can
  49. * indicate your decision by deleting one of the above license notices in your
  50. * version of this file.
  51. *
  52. *****************************************************************************/
  53. #include <linux/module.h>
  54. #include <linux/pm_runtime.h>
  55. #include <media/v4l2-event.h>
  56. #include <linux/mfd/syscon.h>
  57. #include <linux/regmap.h>
  58. #include <linux/of_reserved_mem.h>
  59. #include "isp_driver.h"
  60. #include "isp_ioctl.h"
  61. #include "mrv_all_bits.h"
  62. #include "viv_video_kevent.h"
  63. struct clk *clk_isp;
  64. extern MrvAllRegister_t *all_regs;
  65. #ifdef CONFIG_COMPAT
  66. static long isp_ioctl_compat(struct v4l2_subdev *sd,
  67. unsigned int cmd, void *arg)
  68. {
  69. struct isp_device *isp_dev = v4l2_get_subdevdata(sd);
  70. return isp_priv_ioctl(&isp_dev->ic_dev, cmd, arg);
  71. }
  72. long isp_ioctl(struct v4l2_subdev *sd, unsigned int cmd, void *arg)
  73. {
  74. return isp_ioctl_compat(sd, cmd, arg);
  75. }
  76. #else /* CONFIG_COMPAT */
  77. long isp_ioctl(struct v4l2_subdev *sd, unsigned int cmd, void *arg)
  78. {
  79. struct isp_device *isp_dev = v4l2_get_subdevdata(sd);
  80. return isp_priv_ioctl(&isp_dev->ic_dev, cmd, arg);
  81. }
  82. #endif /* CONFIG_COMPAT */
  83. static int isp_enable_clocks(struct isp_device *isp_dev)
  84. {
  85. int ret;
  86. ret = clk_prepare_enable(isp_dev->clk_core);
  87. if (ret)
  88. return ret;
  89. ret = clk_prepare_enable(isp_dev->clk_axi);
  90. if (ret)
  91. goto disable_clk_core;
  92. ret = clk_prepare_enable(isp_dev->clk_ahb);
  93. if (ret)
  94. goto disable_clk_axi;
  95. return 0;
  96. disable_clk_axi:
  97. clk_disable_unprepare(isp_dev->clk_axi);
  98. disable_clk_core:
  99. clk_disable_unprepare(isp_dev->clk_core);
  100. return ret;
  101. }
  102. static void isp_disable_clocks(struct isp_device *isp_dev)
  103. {
  104. clk_disable_unprepare(isp_dev->clk_ahb);
  105. clk_disable_unprepare(isp_dev->clk_axi);
  106. clk_disable_unprepare(isp_dev->clk_core);
  107. }
  108. int isp_set_stream(struct v4l2_subdev *sd, int enable)
  109. {
  110. struct isp_device *isp_dev = v4l2_get_subdevdata(sd);
  111. struct vvbuf_ctx *ctx = &isp_dev->bctx;
  112. struct vb2_dc_buf *buf;
  113. if (!enable) {
  114. isp_dev->state &= ~STATE_STREAM_STARTED;
  115. buf = vvbuf_try_dqbuf(ctx);
  116. if (!buf)
  117. return 0;
  118. do {
  119. vvbuf_try_dqbuf_done(ctx, buf);
  120. if (buf->flags)
  121. kfree(buf);
  122. } while ((buf = vvbuf_try_dqbuf(ctx)));
  123. } else
  124. isp_dev->state |= STATE_STREAM_STARTED;
  125. return 0;
  126. }
  127. static void isp_post_event(struct isp_ic_dev *dev, void *data, size_t size)
  128. {
  129. struct isp_device *isp_dev;
  130. struct video_device *vdev;
  131. struct v4l2_event event;
  132. if (!dev || !data || !size)
  133. return;
  134. isp_dev = container_of(dev, struct isp_device, ic_dev);
  135. vdev = isp_dev->sd.devnode;
  136. if (!vdev)
  137. return;
  138. memset(&event, 0, sizeof(event));
  139. memcpy(event.u.data, data, min_t(size_t, size, 64));
  140. event.type = VIV_VIDEO_ISPIRQ_TYPE;
  141. v4l2_event_queue(vdev, &event);
  142. }
  143. static int isp_subdev_subscribe_event(struct v4l2_subdev *sd,
  144. struct v4l2_fh *fh, struct v4l2_event_subscription *sub)
  145. {
  146. struct isp_device *isp_dev = v4l2_get_subdevdata(sd);
  147. if (sub->type != VIV_VIDEO_ISPIRQ_TYPE)
  148. return -EINVAL;
  149. if (!isp_dev->ic_dev.post_event)
  150. isp_dev->ic_dev.post_event = isp_post_event;
  151. return v4l2_event_subscribe(fh, sub, 8, NULL);
  152. }
  153. static int isp_subdev_unsubscribe_event(struct v4l2_subdev *sd,
  154. struct v4l2_fh *fh, struct v4l2_event_subscription *sub)
  155. {
  156. struct isp_device *isp_dev = v4l2_get_subdevdata(sd);
  157. if (sub->type != VIV_VIDEO_ISPIRQ_TYPE)
  158. return -EINVAL;
  159. if (isp_dev->ic_dev.post_event)
  160. isp_dev->ic_dev.post_event = NULL;
  161. return v4l2_event_unsubscribe(fh, sub);
  162. }
  163. static struct v4l2_subdev_core_ops isp_v4l2_subdev_core_ops = {
  164. .ioctl = isp_ioctl,
  165. .subscribe_event = isp_subdev_subscribe_event,
  166. .unsubscribe_event = isp_subdev_unsubscribe_event,
  167. };
  168. static struct v4l2_subdev_video_ops isp_v4l2_subdev_video_ops = {
  169. .s_stream = isp_set_stream,
  170. };
  171. struct v4l2_subdev_ops isp_v4l2_subdev_ops = {
  172. .core = &isp_v4l2_subdev_core_ops,
  173. .video = &isp_v4l2_subdev_video_ops,
  174. };
  175. static int isp_link_setup(struct media_entity *entity,
  176. const struct media_pad *local,
  177. const struct media_pad *remote, u32 flags)
  178. {
  179. return 0;
  180. }
  181. static const struct media_entity_operations isp_media_ops = {
  182. .link_setup = isp_link_setup,
  183. .link_validate = v4l2_subdev_link_validate,
  184. };
  185. static void isp_buf_notify(struct vvbuf_ctx *ctx, struct vb2_dc_buf *buf)
  186. {
  187. struct v4l2_subdev *sd;
  188. struct isp_device *isp;
  189. unsigned long flags;
  190. if (unlikely(!ctx || !buf))
  191. return;
  192. sd = media_entity_to_v4l2_subdev(buf->pad->entity);
  193. isp = container_of(sd, struct isp_device, sd);
  194. if (!(isp->state & STATE_STREAM_STARTED)) {
  195. if (buf->flags) {
  196. kfree(buf);
  197. return;
  198. }
  199. }
  200. spin_lock_irqsave(&ctx->irqlock, flags);
  201. list_add_tail(&buf->irqlist, &ctx->dmaqueue);
  202. spin_unlock_irqrestore(&ctx->irqlock, flags);
  203. }
  204. static const struct vvbuf_ops isp_buf_ops = {
  205. .notify = isp_buf_notify,
  206. };
  207. static int isp_buf_alloc(struct isp_ic_dev *dev, struct isp_buffer_context *buf)
  208. {
  209. struct isp_device *isp_dev;
  210. struct vb2_dc_buf *buff, *b;
  211. unsigned long flags;
  212. if (!dev || !buf)
  213. return -EINVAL;
  214. isp_dev = container_of(dev, struct isp_device, ic_dev);
  215. buff = kzalloc(sizeof(struct vb2_dc_buf), GFP_KERNEL);
  216. if (!buff)
  217. return -ENOMEM;
  218. buff->pad = &isp_dev->pads[ISP_PAD_SOURCE];
  219. /*single plane*/
  220. #ifdef ISP_MP_34BIT
  221. buff->dma = buf->addr_y << 2;
  222. #else
  223. buff->dma = buf->addr_y;
  224. #endif
  225. buff->flags = 1;
  226. spin_lock_irqsave(&isp_dev->bctx.irqlock, flags);
  227. list_for_each_entry(b, &isp_dev->bctx.dmaqueue, irqlist) {
  228. if (b->dma == buff->dma) {
  229. list_del(&b->irqlist);
  230. if (b->flags)
  231. kfree(b);
  232. break;
  233. }
  234. }
  235. list_add_tail(&buff->irqlist, &isp_dev->bctx.dmaqueue);
  236. spin_unlock_irqrestore(&isp_dev->bctx.irqlock, flags);
  237. return 0;
  238. }
  239. static int isp_buf_free(struct isp_ic_dev *dev, struct vb2_dc_buf *buf)
  240. {
  241. struct isp_device *isp_dev;
  242. struct vvbuf_ctx *ctx;
  243. if (buf && buf->flags)
  244. kfree(buf);
  245. if (!dev)
  246. return -EINVAL;
  247. isp_dev = container_of(dev, struct isp_device, ic_dev);
  248. ctx = &isp_dev->bctx;
  249. buf = vvbuf_try_dqbuf(ctx);
  250. if (!buf || !buf->flags)
  251. return 0;
  252. do {
  253. vvbuf_try_dqbuf_done(ctx, buf);
  254. kfree(buf);
  255. } while ((buf = vvbuf_try_dqbuf(ctx)));
  256. return 0;
  257. }
  258. static int isp_open(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
  259. {
  260. struct isp_device *isp_dev = v4l2_get_subdevdata(sd);
  261. pm_runtime_get_sync(sd->dev);
  262. isp_dev->refcnt++;
  263. if (isp_dev->refcnt == 1) {
  264. msleep(1);
  265. isp_clear_interrupts(&isp_dev->ic_dev);
  266. if (devm_request_irq(sd->dev, isp_dev->irq, isp_hw_isr, IRQF_SHARED,
  267. dev_name(sd->dev), &isp_dev->ic_dev) != 0) {
  268. pr_err("failed to request irq.\n");
  269. isp_dev->refcnt = 0;
  270. pm_runtime_put_sync(sd->dev);
  271. return -1;
  272. }
  273. }
  274. return 0;
  275. }
  276. static int isp_close(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
  277. {
  278. struct isp_device *isp_dev = v4l2_get_subdevdata(sd);
  279. isp_dev->refcnt--;
  280. if (isp_dev->refcnt < 0) {
  281. isp_dev->refcnt = 0;
  282. return 0;
  283. }
  284. if (isp_dev->refcnt == 0){
  285. devm_free_irq(sd->dev, isp_dev->irq, &isp_dev->ic_dev);
  286. isp_priv_ioctl(&isp_dev->ic_dev, ISPIOC_RESET, NULL);
  287. isp_clear_interrupts(&isp_dev->ic_dev);
  288. msleep(5);
  289. }
  290. pm_runtime_put(sd->dev);
  291. return 0;
  292. }
  293. static struct v4l2_subdev_internal_ops isp_internal_ops = {
  294. .open = isp_open,
  295. .close = isp_close,
  296. };
  297. int isp_hw_probe(struct platform_device *pdev)
  298. {
  299. struct device *dev = &pdev->dev;
  300. struct isp_device *isp_dev;
  301. struct resource *mem_res;
  302. int irq;
  303. int rc;
  304. struct device_node *mem_node;
  305. pr_info("enter %s\n", __func__);
  306. isp_dev = kzalloc(sizeof(struct isp_device), GFP_KERNEL);
  307. if (!isp_dev)
  308. return -ENOMEM;
  309. rc = fwnode_property_read_u32(of_fwnode_handle(pdev->dev.of_node),
  310. "id", &isp_dev->id);
  311. if (rc) {
  312. pr_info("isp device id not found, use the default.\n");
  313. isp_dev->id = 0;
  314. }
  315. isp_dev->ic_dev.id = isp_dev->id;
  316. isp_dev->clk_core = devm_clk_get(dev, "core");
  317. if (IS_ERR(isp_dev->clk_core)) {
  318. rc = PTR_ERR(isp_dev->clk_core);
  319. dev_err(dev, "can't get core clock: %d\n", rc);
  320. return rc;
  321. }
  322. isp_dev->clk_axi = devm_clk_get(dev, "axi");
  323. if (IS_ERR(isp_dev->clk_axi)) {
  324. rc = PTR_ERR(isp_dev->clk_axi);
  325. dev_err(dev, "can't get axi clock: %d\n", rc);
  326. return rc;
  327. }
  328. isp_dev->clk_ahb = devm_clk_get(dev, "ahb");
  329. if (IS_ERR(isp_dev->clk_ahb)) {
  330. rc = PTR_ERR(isp_dev->clk_ahb);
  331. dev_err(dev, "can't get ahb clock: %d\n", rc);
  332. return rc;
  333. }
  334. isp_dev->sd.internal_ops = &isp_internal_ops;
  335. #ifdef ISP8000NANO_V1802
  336. isp_dev->ic_dev.mix_gpr = syscon_regmap_lookup_by_phandle(
  337. pdev->dev.of_node, "gpr");
  338. if (IS_ERR(isp_dev->ic_dev.mix_gpr)) {
  339. pr_warn("failed to get mix gpr\n");
  340. isp_dev->ic_dev.mix_gpr = NULL;
  341. return -ENOMEM;
  342. }
  343. #endif
  344. mem_node = of_parse_phandle(pdev->dev.of_node, "memory-region", 0);
  345. if (!mem_node) {
  346. pr_err("No memory-region found\n");
  347. return -ENODEV;
  348. }
  349. isp_dev->ic_dev.rmem = of_reserved_mem_lookup(mem_node);
  350. if (!isp_dev->ic_dev.rmem) {
  351. pr_err("of_reserved_mem_lookup() returned NULL\n");
  352. return -ENODEV;
  353. }
  354. v4l2_subdev_init(&isp_dev->sd, &isp_v4l2_subdev_ops);
  355. snprintf(isp_dev->sd.name, sizeof(isp_dev->sd.name),
  356. "%s.%d", ISP_DEVICE_NAME, isp_dev->id);
  357. isp_dev->sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
  358. isp_dev->sd.flags |= V4L2_SUBDEV_FL_HAS_EVENTS;
  359. isp_dev->sd.owner = THIS_MODULE;
  360. v4l2_set_subdevdata(&isp_dev->sd, isp_dev);
  361. isp_dev->sd.dev = &pdev->dev;
  362. mem_res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
  363. isp_dev->ic_dev.base = devm_ioremap_resource(&pdev->dev, mem_res);
  364. if (IS_ERR(isp_dev->ic_dev.base)) {
  365. pr_err("failed to get ioremap resource.\n");
  366. goto end;
  367. }
  368. #ifdef ISP_REG_RESET
  369. isp_dev->ic_dev.reset = ioremap(ISP_REG_RESET, 4);
  370. #endif
  371. pr_debug("ioremap addr: %px", isp_dev->ic_dev.base);
  372. isp_dev->ic_dev.state = &isp_dev->state;
  373. vvbuf_ctx_init(&isp_dev->bctx);
  374. isp_dev->bctx.ops = &isp_buf_ops;
  375. isp_dev->ic_dev.bctx = &isp_dev->bctx;
  376. isp_dev->ic_dev.alloc = isp_buf_alloc;
  377. isp_dev->ic_dev.free = isp_buf_free;
  378. irq = platform_get_irq(pdev, 0);
  379. if (irq < 0) {
  380. pr_err("failed to get irq number.\n");
  381. goto end;
  382. }
  383. isp_dev->irq = irq;
  384. pr_debug("request_irq num:%d, rc:%d", irq, rc);
  385. platform_set_drvdata(pdev, isp_dev);
  386. isp_dev->sd.entity.name = isp_dev->sd.name;
  387. isp_dev->sd.entity.obj_type = MEDIA_ENTITY_TYPE_V4L2_SUBDEV;
  388. isp_dev->sd.entity.function = MEDIA_ENT_F_IO_V4L;
  389. isp_dev->sd.entity.ops = &isp_media_ops;
  390. isp_dev->pads[ISP_PAD_SOURCE].flags =
  391. MEDIA_PAD_FL_SOURCE | MEDIA_PAD_FL_MUST_CONNECT;
  392. rc = media_entity_pads_init(&isp_dev->sd.entity,
  393. ISP_PADS_NUM, isp_dev->pads);
  394. if (rc)
  395. goto end;
  396. isp_dev->sd.fwnode = of_fwnode_handle(pdev->dev.of_node);
  397. rc = v4l2_async_register_subdev(&isp_dev->sd);
  398. if (rc)
  399. goto end;
  400. pm_runtime_enable(&pdev->dev);
  401. pr_info("vvcam isp driver registered\n");
  402. return 0;
  403. end:
  404. vvbuf_ctx_deinit(&isp_dev->bctx);
  405. kfree(isp_dev);
  406. pm_runtime_put(&pdev->dev);
  407. pm_runtime_disable(&pdev->dev);
  408. return rc;
  409. }
  410. int isp_hw_remove(struct platform_device *pdev)
  411. {
  412. struct isp_device *isp = platform_get_drvdata(pdev);
  413. pr_info("enter %s\n", __func__);
  414. if (!isp)
  415. return -1;
  416. vvbuf_ctx_deinit(&isp->bctx);
  417. media_entity_cleanup(&isp->sd.entity);
  418. v4l2_async_unregister_subdev(&isp->sd);
  419. kfree(isp);
  420. pm_runtime_disable(&pdev->dev);
  421. pr_info("vvcam isp driver removed\n");
  422. return 0;
  423. }
  424. static int isp_system_suspend(struct device *dev)
  425. {
  426. struct platform_device *pdev;
  427. struct isp_device *isp = NULL;
  428. pdev = container_of(dev, struct platform_device, dev);
  429. isp = platform_get_drvdata(pdev);
  430. if(!isp){
  431. dev_err(dev, "isp suspend failed!\n");
  432. return -1;
  433. }
  434. if(isp->ic_dev.streaming == true) {
  435. isp_stop_stream(&isp->ic_dev);
  436. }
  437. return pm_runtime_force_suspend(dev);
  438. }
  439. static int isp_system_resume(struct device *dev)
  440. {
  441. int ret;
  442. struct platform_device *pdev;
  443. struct isp_device *isp = NULL;
  444. ret = pm_runtime_force_resume(dev);
  445. if (ret < 0) {
  446. dev_err(dev, "force resume %s failed!\n", dev_name(dev));
  447. return ret;
  448. }
  449. pdev = container_of(dev, struct platform_device, dev);
  450. isp = platform_get_drvdata(pdev);
  451. if(!isp){
  452. dev_err(dev, "isp resume failed!\n");
  453. return -1;
  454. }
  455. if(isp->ic_dev.streaming == true) {
  456. isp_start_stream(&isp->ic_dev, 1);
  457. }
  458. return 0;
  459. }
  460. static int isp_runtime_suspend(struct device *dev)
  461. {
  462. struct isp_device *isp_dev = dev_get_drvdata(dev);
  463. isp_disable_clocks(isp_dev);
  464. return 0;
  465. }
  466. static int isp_runtime_resume(struct device *dev)
  467. {
  468. struct isp_device *isp_dev = dev_get_drvdata(dev);
  469. isp_enable_clocks(isp_dev);
  470. return 0;
  471. }
  472. static const struct dev_pm_ops isp_pm_ops = {
  473. SET_SYSTEM_SLEEP_PM_OPS(isp_system_suspend, isp_system_resume)
  474. SET_RUNTIME_PM_OPS(isp_runtime_suspend, isp_runtime_resume, NULL)
  475. };
  476. static const struct of_device_id isp_of_match[] = {
  477. {.compatible = ISP_COMPAT_NAME,},
  478. { /* sentinel */ },
  479. };
  480. MODULE_DEVICE_TABLE(of, isp_of_match);
  481. static struct platform_driver viv_isp_driver = {
  482. .probe = isp_hw_probe,
  483. .remove = isp_hw_remove,
  484. .driver = {
  485. .name = ISP_DEVICE_NAME,
  486. .owner = THIS_MODULE,
  487. .of_match_table = isp_of_match,
  488. .pm = &isp_pm_ops,
  489. }
  490. };
  491. static int __init viv_isp_init_module(void)
  492. {
  493. int ret = 0;
  494. pr_info("enter %s\n", __func__);
  495. ret = platform_driver_register(&viv_isp_driver);
  496. if (ret) {
  497. pr_err("register platform driver failed.\n");
  498. return ret;
  499. }
  500. return ret;
  501. }
  502. static void __exit viv_isp_exit_module(void)
  503. {
  504. pr_info("enter %s\n", __func__);
  505. platform_driver_unregister(&viv_isp_driver);
  506. }
  507. module_init(viv_isp_init_module);
  508. module_exit(viv_isp_exit_module);
  509. MODULE_AUTHOR("Verisilicon ISP SW Team");
  510. MODULE_LICENSE("GPL");
  511. MODULE_ALIAS("Verisilicon-ISP");
  512. MODULE_VERSION("1.0");