ov5647.c 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657
  1. /*
  2. * A V4L2 driver for OmniVision OV5647 cameras.
  3. *
  4. * Based on Samsung S5K6AAFX SXGA 1/6" 1.3M CMOS Image Sensor driver
  5. * Copyright (C) 2011 Sylwester Nawrocki <s.nawrocki@samsung.com>
  6. *
  7. * Based on Omnivision OV7670 Camera Driver
  8. * Copyright (C) 2006-7 Jonathan Corbet <corbet@lwn.net>
  9. *
  10. * Copyright (C) 2016, Synopsys, Inc.
  11. *
  12. * This program is free software; you can redistribute it and/or
  13. * modify it under the terms of the GNU General Public License as
  14. * published by the Free Software Foundation version 2.
  15. *
  16. * This program is distributed .as is. WITHOUT ANY WARRANTY of any
  17. * kind, whether express or implied; without even the implied warranty
  18. * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  19. * GNU General Public License for more details.
  20. */
  21. #include <linux/clk.h>
  22. #include <linux/delay.h>
  23. #include <linux/i2c.h>
  24. #include <linux/init.h>
  25. #include <linux/io.h>
  26. #include <linux/module.h>
  27. #include <linux/of_graph.h>
  28. #include <linux/slab.h>
  29. #include <linux/videodev2.h>
  30. #include <media/v4l2-device.h>
  31. #include <media/v4l2-fwnode.h>
  32. #include <media/v4l2-image-sizes.h>
  33. #include <media/v4l2-mediabus.h>
  34. #define SENSOR_NAME "ov5647"
  35. #define MIPI_CTRL00_CLOCK_LANE_GATE BIT(5)
  36. #define MIPI_CTRL00_BUS_IDLE BIT(2)
  37. #define MIPI_CTRL00_CLOCK_LANE_DISABLE BIT(0)
  38. #define OV5647_SW_STANDBY 0x0100
  39. #define OV5647_SW_RESET 0x0103
  40. #define OV5647_REG_CHIPID_H 0x300A
  41. #define OV5647_REG_CHIPID_L 0x300B
  42. #define OV5640_REG_PAD_OUT 0x300D
  43. #define OV5647_REG_FRAME_OFF_NUMBER 0x4202
  44. #define OV5647_REG_MIPI_CTRL00 0x4800
  45. #define OV5647_REG_MIPI_CTRL14 0x4814
  46. #define REG_TERM 0xfffe
  47. #define VAL_TERM 0xfe
  48. #define REG_DLY 0xffff
  49. #define OV5647_ROW_START 0x01
  50. #define OV5647_ROW_START_MIN 0
  51. #define OV5647_ROW_START_MAX 2004
  52. #define OV5647_ROW_START_DEF 54
  53. #define OV5647_COLUMN_START 0x02
  54. #define OV5647_COLUMN_START_MIN 0
  55. #define OV5647_COLUMN_START_MAX 2750
  56. #define OV5647_COLUMN_START_DEF 16
  57. #define OV5647_WINDOW_HEIGHT 0x03
  58. #define OV5647_WINDOW_HEIGHT_MIN 2
  59. #define OV5647_WINDOW_HEIGHT_MAX 2006
  60. #define OV5647_WINDOW_HEIGHT_DEF 1944
  61. #define OV5647_WINDOW_WIDTH 0x04
  62. #define OV5647_WINDOW_WIDTH_MIN 2
  63. #define OV5647_WINDOW_WIDTH_MAX 2752
  64. #define OV5647_WINDOW_WIDTH_DEF 2592
  65. struct regval_list {
  66. u16 addr;
  67. u8 data;
  68. };
  69. struct ov5647 {
  70. struct v4l2_subdev sd;
  71. struct media_pad pad;
  72. struct mutex lock;
  73. struct v4l2_mbus_framefmt format;
  74. unsigned int width;
  75. unsigned int height;
  76. int power_count;
  77. struct clk *xclk;
  78. };
  79. static inline struct ov5647 *to_state(struct v4l2_subdev *sd)
  80. {
  81. return container_of(sd, struct ov5647, sd);
  82. }
  83. static struct regval_list sensor_oe_disable_regs[] = {
  84. {0x3000, 0x00},
  85. {0x3001, 0x00},
  86. {0x3002, 0x00},
  87. };
  88. static struct regval_list sensor_oe_enable_regs[] = {
  89. {0x3000, 0x0f},
  90. {0x3001, 0xff},
  91. {0x3002, 0xe4},
  92. };
  93. static struct regval_list ov5647_640x480[] = {
  94. {0x0100, 0x00},
  95. {0x0103, 0x01},
  96. {0x3034, 0x08},
  97. {0x3035, 0x21},
  98. {0x3036, 0x46},
  99. {0x303c, 0x11},
  100. {0x3106, 0xf5},
  101. {0x3821, 0x07},
  102. {0x3820, 0x41},
  103. {0x3827, 0xec},
  104. {0x370c, 0x0f},
  105. {0x3612, 0x59},
  106. {0x3618, 0x00},
  107. {0x5000, 0x06},
  108. {0x5001, 0x01},
  109. {0x5002, 0x41},
  110. {0x5003, 0x08},
  111. {0x5a00, 0x08},
  112. {0x3000, 0x00},
  113. {0x3001, 0x00},
  114. {0x3002, 0x00},
  115. {0x3016, 0x08},
  116. {0x3017, 0xe0},
  117. {0x3018, 0x44},
  118. {0x301c, 0xf8},
  119. {0x301d, 0xf0},
  120. {0x3a18, 0x00},
  121. {0x3a19, 0xf8},
  122. {0x3c01, 0x80},
  123. {0x3b07, 0x0c},
  124. {0x380c, 0x07},
  125. {0x380d, 0x68},
  126. {0x380e, 0x03},
  127. {0x380f, 0xd8},
  128. {0x3814, 0x31},
  129. {0x3815, 0x31},
  130. {0x3708, 0x64},
  131. {0x3709, 0x52},
  132. {0x3808, 0x02},
  133. {0x3809, 0x80},
  134. {0x380a, 0x01},
  135. {0x380b, 0xE0},
  136. {0x3801, 0x00},
  137. {0x3802, 0x00},
  138. {0x3803, 0x00},
  139. {0x3804, 0x0a},
  140. {0x3805, 0x3f},
  141. {0x3806, 0x07},
  142. {0x3807, 0xa1},
  143. {0x3811, 0x08},
  144. {0x3813, 0x02},
  145. {0x3630, 0x2e},
  146. {0x3632, 0xe2},
  147. {0x3633, 0x23},
  148. {0x3634, 0x44},
  149. {0x3636, 0x06},
  150. {0x3620, 0x64},
  151. {0x3621, 0xe0},
  152. {0x3600, 0x37},
  153. {0x3704, 0xa0},
  154. {0x3703, 0x5a},
  155. {0x3715, 0x78},
  156. {0x3717, 0x01},
  157. {0x3731, 0x02},
  158. {0x370b, 0x60},
  159. {0x3705, 0x1a},
  160. {0x3f05, 0x02},
  161. {0x3f06, 0x10},
  162. {0x3f01, 0x0a},
  163. {0x3a08, 0x01},
  164. {0x3a09, 0x27},
  165. {0x3a0a, 0x00},
  166. {0x3a0b, 0xf6},
  167. {0x3a0d, 0x04},
  168. {0x3a0e, 0x03},
  169. {0x3a0f, 0x58},
  170. {0x3a10, 0x50},
  171. {0x3a1b, 0x58},
  172. {0x3a1e, 0x50},
  173. {0x3a11, 0x60},
  174. {0x3a1f, 0x28},
  175. {0x4001, 0x02},
  176. {0x4004, 0x02},
  177. {0x4000, 0x09},
  178. {0x4837, 0x24},
  179. {0x4050, 0x6e},
  180. {0x4051, 0x8f},
  181. {0x0100, 0x01},
  182. };
  183. static int ov5647_write(struct v4l2_subdev *sd, u16 reg, u8 val)
  184. {
  185. int ret;
  186. unsigned char data[3] = { reg >> 8, reg & 0xff, val};
  187. struct i2c_client *client = v4l2_get_subdevdata(sd);
  188. ret = i2c_master_send(client, data, 3);
  189. if (ret < 0)
  190. dev_dbg(&client->dev, "%s: i2c write error, reg: %x\n",
  191. __func__, reg);
  192. return ret;
  193. }
  194. static int ov5647_read(struct v4l2_subdev *sd, u16 reg, u8 *val)
  195. {
  196. int ret;
  197. unsigned char data_w[2] = { reg >> 8, reg & 0xff };
  198. struct i2c_client *client = v4l2_get_subdevdata(sd);
  199. ret = i2c_master_send(client, data_w, 2);
  200. if (ret < 0) {
  201. dev_dbg(&client->dev, "%s: i2c write error, reg: %x\n",
  202. __func__, reg);
  203. return ret;
  204. }
  205. ret = i2c_master_recv(client, val, 1);
  206. if (ret < 0)
  207. dev_dbg(&client->dev, "%s: i2c read error, reg: %x\n",
  208. __func__, reg);
  209. return ret;
  210. }
  211. static int ov5647_write_array(struct v4l2_subdev *sd,
  212. struct regval_list *regs, int array_size)
  213. {
  214. int i, ret;
  215. for (i = 0; i < array_size; i++) {
  216. ret = ov5647_write(sd, regs[i].addr, regs[i].data);
  217. if (ret < 0)
  218. return ret;
  219. }
  220. return 0;
  221. }
  222. static int ov5647_set_virtual_channel(struct v4l2_subdev *sd, int channel)
  223. {
  224. u8 channel_id;
  225. int ret;
  226. ret = ov5647_read(sd, OV5647_REG_MIPI_CTRL14, &channel_id);
  227. if (ret < 0)
  228. return ret;
  229. channel_id &= ~(3 << 6);
  230. return ov5647_write(sd, OV5647_REG_MIPI_CTRL14, channel_id | (channel << 6));
  231. }
  232. static int ov5647_stream_on(struct v4l2_subdev *sd)
  233. {
  234. int ret;
  235. ret = ov5647_write(sd, OV5647_REG_MIPI_CTRL00, MIPI_CTRL00_BUS_IDLE);
  236. if (ret < 0)
  237. return ret;
  238. ret = ov5647_write(sd, OV5647_REG_FRAME_OFF_NUMBER, 0x00);
  239. if (ret < 0)
  240. return ret;
  241. return ov5647_write(sd, OV5640_REG_PAD_OUT, 0x00);
  242. }
  243. static int ov5647_stream_off(struct v4l2_subdev *sd)
  244. {
  245. int ret;
  246. ret = ov5647_write(sd, OV5647_REG_MIPI_CTRL00, MIPI_CTRL00_CLOCK_LANE_GATE
  247. | MIPI_CTRL00_BUS_IDLE | MIPI_CTRL00_CLOCK_LANE_DISABLE);
  248. if (ret < 0)
  249. return ret;
  250. ret = ov5647_write(sd, OV5647_REG_FRAME_OFF_NUMBER, 0x0f);
  251. if (ret < 0)
  252. return ret;
  253. return ov5647_write(sd, OV5640_REG_PAD_OUT, 0x01);
  254. }
  255. static int set_sw_standby(struct v4l2_subdev *sd, bool standby)
  256. {
  257. int ret;
  258. u8 rdval;
  259. ret = ov5647_read(sd, OV5647_SW_STANDBY, &rdval);
  260. if (ret < 0)
  261. return ret;
  262. if (standby)
  263. rdval &= ~0x01;
  264. else
  265. rdval |= 0x01;
  266. return ov5647_write(sd, OV5647_SW_STANDBY, rdval);
  267. }
  268. static int __sensor_init(struct v4l2_subdev *sd)
  269. {
  270. int ret;
  271. u8 resetval, rdval;
  272. struct i2c_client *client = v4l2_get_subdevdata(sd);
  273. ret = ov5647_read(sd, OV5647_SW_STANDBY, &rdval);
  274. if (ret < 0)
  275. return ret;
  276. ret = ov5647_write_array(sd, ov5647_640x480,
  277. ARRAY_SIZE(ov5647_640x480));
  278. if (ret < 0) {
  279. dev_err(&client->dev, "write sensor default regs error\n");
  280. return ret;
  281. }
  282. ret = ov5647_set_virtual_channel(sd, 0);
  283. if (ret < 0)
  284. return ret;
  285. ret = ov5647_read(sd, OV5647_SW_STANDBY, &resetval);
  286. if (ret < 0)
  287. return ret;
  288. if (!(resetval & 0x01)) {
  289. dev_err(&client->dev, "Device was in SW standby");
  290. ret = ov5647_write(sd, OV5647_SW_STANDBY, 0x01);
  291. if (ret < 0)
  292. return ret;
  293. }
  294. /*
  295. * stream off to make the clock lane into LP-11 state.
  296. */
  297. return ov5647_stream_off(sd);
  298. }
  299. static int ov5647_sensor_power(struct v4l2_subdev *sd, int on)
  300. {
  301. int ret = 0;
  302. struct ov5647 *ov5647 = to_state(sd);
  303. struct i2c_client *client = v4l2_get_subdevdata(sd);
  304. mutex_lock(&ov5647->lock);
  305. if (on && !ov5647->power_count) {
  306. dev_dbg(&client->dev, "OV5647 power on\n");
  307. ret = clk_prepare_enable(ov5647->xclk);
  308. if (ret < 0) {
  309. dev_err(&client->dev, "clk prepare enable failed\n");
  310. goto out;
  311. }
  312. ret = ov5647_write_array(sd, sensor_oe_enable_regs,
  313. ARRAY_SIZE(sensor_oe_enable_regs));
  314. if (ret < 0) {
  315. clk_disable_unprepare(ov5647->xclk);
  316. dev_err(&client->dev,
  317. "write sensor_oe_enable_regs error\n");
  318. goto out;
  319. }
  320. ret = __sensor_init(sd);
  321. if (ret < 0) {
  322. clk_disable_unprepare(ov5647->xclk);
  323. dev_err(&client->dev,
  324. "Camera not available, check Power\n");
  325. goto out;
  326. }
  327. } else if (!on && ov5647->power_count == 1) {
  328. dev_dbg(&client->dev, "OV5647 power off\n");
  329. ret = ov5647_write_array(sd, sensor_oe_disable_regs,
  330. ARRAY_SIZE(sensor_oe_disable_regs));
  331. if (ret < 0)
  332. dev_dbg(&client->dev, "disable oe failed\n");
  333. ret = set_sw_standby(sd, true);
  334. if (ret < 0)
  335. dev_dbg(&client->dev, "soft stby failed\n");
  336. clk_disable_unprepare(ov5647->xclk);
  337. }
  338. /* Update the power count. */
  339. ov5647->power_count += on ? 1 : -1;
  340. WARN_ON(ov5647->power_count < 0);
  341. out:
  342. mutex_unlock(&ov5647->lock);
  343. return ret;
  344. }
  345. #ifdef CONFIG_VIDEO_ADV_DEBUG
  346. static int ov5647_sensor_get_register(struct v4l2_subdev *sd,
  347. struct v4l2_dbg_register *reg)
  348. {
  349. u8 val;
  350. int ret;
  351. ret = ov5647_read(sd, reg->reg & 0xff, &val);
  352. if (ret < 0)
  353. return ret;
  354. reg->val = val;
  355. reg->size = 1;
  356. return 0;
  357. }
  358. static int ov5647_sensor_set_register(struct v4l2_subdev *sd,
  359. const struct v4l2_dbg_register *reg)
  360. {
  361. return ov5647_write(sd, reg->reg & 0xff, reg->val & 0xff);
  362. }
  363. #endif
  364. /*
  365. * Subdev core operations registration
  366. */
  367. static const struct v4l2_subdev_core_ops ov5647_subdev_core_ops = {
  368. .s_power = ov5647_sensor_power,
  369. #ifdef CONFIG_VIDEO_ADV_DEBUG
  370. .g_register = ov5647_sensor_get_register,
  371. .s_register = ov5647_sensor_set_register,
  372. #endif
  373. };
  374. static int ov5647_s_stream(struct v4l2_subdev *sd, int enable)
  375. {
  376. if (enable)
  377. return ov5647_stream_on(sd);
  378. else
  379. return ov5647_stream_off(sd);
  380. }
  381. static const struct v4l2_subdev_video_ops ov5647_subdev_video_ops = {
  382. .s_stream = ov5647_s_stream,
  383. };
  384. static int ov5647_enum_mbus_code(struct v4l2_subdev *sd,
  385. struct v4l2_subdev_pad_config *cfg,
  386. struct v4l2_subdev_mbus_code_enum *code)
  387. {
  388. if (code->index > 0)
  389. return -EINVAL;
  390. code->code = MEDIA_BUS_FMT_SBGGR8_1X8;
  391. return 0;
  392. }
  393. static const struct v4l2_subdev_pad_ops ov5647_subdev_pad_ops = {
  394. .enum_mbus_code = ov5647_enum_mbus_code,
  395. };
  396. static const struct v4l2_subdev_ops ov5647_subdev_ops = {
  397. .core = &ov5647_subdev_core_ops,
  398. .video = &ov5647_subdev_video_ops,
  399. .pad = &ov5647_subdev_pad_ops,
  400. };
  401. static int ov5647_detect(struct v4l2_subdev *sd)
  402. {
  403. u8 read;
  404. int ret;
  405. struct i2c_client *client = v4l2_get_subdevdata(sd);
  406. ret = ov5647_write(sd, OV5647_SW_RESET, 0x01);
  407. if (ret < 0)
  408. return ret;
  409. ret = ov5647_read(sd, OV5647_REG_CHIPID_H, &read);
  410. if (ret < 0)
  411. return ret;
  412. if (read != 0x56) {
  413. dev_err(&client->dev, "ID High expected 0x56 got %x", read);
  414. return -ENODEV;
  415. }
  416. ret = ov5647_read(sd, OV5647_REG_CHIPID_L, &read);
  417. if (ret < 0)
  418. return ret;
  419. if (read != 0x47) {
  420. dev_err(&client->dev, "ID Low expected 0x47 got %x", read);
  421. return -ENODEV;
  422. }
  423. return ov5647_write(sd, OV5647_SW_RESET, 0x00);
  424. }
  425. static int ov5647_open(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
  426. {
  427. struct v4l2_mbus_framefmt *format =
  428. v4l2_subdev_get_try_format(sd, fh->pad, 0);
  429. struct v4l2_rect *crop =
  430. v4l2_subdev_get_try_crop(sd, fh->pad, 0);
  431. crop->left = OV5647_COLUMN_START_DEF;
  432. crop->top = OV5647_ROW_START_DEF;
  433. crop->width = OV5647_WINDOW_WIDTH_DEF;
  434. crop->height = OV5647_WINDOW_HEIGHT_DEF;
  435. format->code = MEDIA_BUS_FMT_SBGGR8_1X8;
  436. format->width = OV5647_WINDOW_WIDTH_DEF;
  437. format->height = OV5647_WINDOW_HEIGHT_DEF;
  438. format->field = V4L2_FIELD_NONE;
  439. format->colorspace = V4L2_COLORSPACE_SRGB;
  440. return 0;
  441. }
  442. static const struct v4l2_subdev_internal_ops ov5647_subdev_internal_ops = {
  443. .open = ov5647_open,
  444. };
  445. static int ov5647_parse_dt(struct device_node *np)
  446. {
  447. struct v4l2_fwnode_endpoint bus_cfg;
  448. struct device_node *ep;
  449. int ret;
  450. ep = of_graph_get_next_endpoint(np, NULL);
  451. if (!ep)
  452. return -EINVAL;
  453. ret = v4l2_fwnode_endpoint_parse(of_fwnode_handle(ep), &bus_cfg);
  454. of_node_put(ep);
  455. return ret;
  456. }
  457. static int ov5647_probe(struct i2c_client *client,
  458. const struct i2c_device_id *id)
  459. {
  460. struct device *dev = &client->dev;
  461. struct ov5647 *sensor;
  462. int ret;
  463. struct v4l2_subdev *sd;
  464. struct device_node *np = client->dev.of_node;
  465. u32 xclk_freq;
  466. sensor = devm_kzalloc(dev, sizeof(*sensor), GFP_KERNEL);
  467. if (!sensor)
  468. return -ENOMEM;
  469. if (IS_ENABLED(CONFIG_OF) && np) {
  470. ret = ov5647_parse_dt(np);
  471. if (ret) {
  472. dev_err(dev, "DT parsing error: %d\n", ret);
  473. return ret;
  474. }
  475. }
  476. /* get system clock (xclk) */
  477. sensor->xclk = devm_clk_get(dev, NULL);
  478. if (IS_ERR(sensor->xclk)) {
  479. dev_err(dev, "could not get xclk");
  480. return PTR_ERR(sensor->xclk);
  481. }
  482. xclk_freq = clk_get_rate(sensor->xclk);
  483. if (xclk_freq != 25000000) {
  484. dev_err(dev, "Unsupported clock frequency: %u\n", xclk_freq);
  485. return -EINVAL;
  486. }
  487. mutex_init(&sensor->lock);
  488. sd = &sensor->sd;
  489. v4l2_i2c_subdev_init(sd, client, &ov5647_subdev_ops);
  490. sensor->sd.internal_ops = &ov5647_subdev_internal_ops;
  491. sensor->sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
  492. sensor->pad.flags = MEDIA_PAD_FL_SOURCE;
  493. sd->entity.function = MEDIA_ENT_F_CAM_SENSOR;
  494. ret = media_entity_pads_init(&sd->entity, 1, &sensor->pad);
  495. if (ret < 0)
  496. goto mutex_remove;
  497. ret = ov5647_detect(sd);
  498. if (ret < 0)
  499. goto error;
  500. ret = v4l2_async_register_subdev(sd);
  501. if (ret < 0)
  502. goto error;
  503. dev_dbg(dev, "OmniVision OV5647 camera driver probed\n");
  504. return 0;
  505. error:
  506. media_entity_cleanup(&sd->entity);
  507. mutex_remove:
  508. mutex_destroy(&sensor->lock);
  509. return ret;
  510. }
  511. static int ov5647_remove(struct i2c_client *client)
  512. {
  513. struct v4l2_subdev *sd = i2c_get_clientdata(client);
  514. struct ov5647 *ov5647 = to_state(sd);
  515. v4l2_async_unregister_subdev(&ov5647->sd);
  516. media_entity_cleanup(&ov5647->sd.entity);
  517. v4l2_device_unregister_subdev(sd);
  518. mutex_destroy(&ov5647->lock);
  519. return 0;
  520. }
  521. static const struct i2c_device_id ov5647_id[] = {
  522. { "ov5647", 0 },
  523. { }
  524. };
  525. MODULE_DEVICE_TABLE(i2c, ov5647_id);
  526. #if IS_ENABLED(CONFIG_OF)
  527. static const struct of_device_id ov5647_of_match[] = {
  528. { .compatible = "ovti,ov5647" },
  529. { /* sentinel */ },
  530. };
  531. MODULE_DEVICE_TABLE(of, ov5647_of_match);
  532. #endif
  533. static struct i2c_driver ov5647_driver = {
  534. .driver = {
  535. .of_match_table = of_match_ptr(ov5647_of_match),
  536. .name = SENSOR_NAME,
  537. },
  538. .probe = ov5647_probe,
  539. .remove = ov5647_remove,
  540. .id_table = ov5647_id,
  541. };
  542. module_i2c_driver(ov5647_driver);
  543. MODULE_AUTHOR("Ramiro Oliveira <roliveir@synopsys.com>");
  544. MODULE_DESCRIPTION("A low-level driver for OmniVision ov5647 sensors");
  545. MODULE_LICENSE("GPL v2");