diff options
author | Guennadi Liakhovetski <g.liakhovetski@gmx.de> | 2009-12-11 09:15:05 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-12-16 06:27:15 -0500 |
commit | 5d28d525452f170e30bc038955439731462a5228 (patch) | |
tree | 319c221f63b580cdec53a046b2fe5af2e0b92b36 /drivers/media/video/mt9v022.c | |
parent | 325361088b73269f4cc96256276a142addbf3454 (diff) |
V4L/DVB (13645): soc-camera: fix multi-line comment coding style
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/mt9v022.c')
-rw-r--r-- | drivers/media/video/mt9v022.c | 48 |
1 files changed, 32 insertions, 16 deletions
diff --git a/drivers/media/video/mt9v022.c b/drivers/media/video/mt9v022.c index b71898f1b085..f60a9a107f20 100644 --- a/drivers/media/video/mt9v022.c +++ b/drivers/media/video/mt9v022.c | |||
@@ -18,9 +18,11 @@ | |||
18 | #include <media/v4l2-chip-ident.h> | 18 | #include <media/v4l2-chip-ident.h> |
19 | #include <media/soc_camera.h> | 19 | #include <media/soc_camera.h> |
20 | 20 | ||
21 | /* mt9v022 i2c address 0x48, 0x4c, 0x58, 0x5c | 21 | /* |
22 | * mt9v022 i2c address 0x48, 0x4c, 0x58, 0x5c | ||
22 | * The platform has to define ctruct i2c_board_info objects and link to them | 23 | * The platform has to define ctruct i2c_board_info objects and link to them |
23 | * from struct soc_camera_link */ | 24 | * from struct soc_camera_link |
25 | */ | ||
24 | 26 | ||
25 | static char *sensor_type; | 27 | static char *sensor_type; |
26 | module_param(sensor_type, charp, S_IRUGO); | 28 | module_param(sensor_type, charp, S_IRUGO); |
@@ -63,8 +65,10 @@ MODULE_PARM_DESC(sensor_type, "Sensor type: \"colour\" or \"monochrome\""); | |||
63 | #define MT9V022_ROW_SKIP 4 | 65 | #define MT9V022_ROW_SKIP 4 |
64 | 66 | ||
65 | static const struct soc_camera_data_format mt9v022_colour_formats[] = { | 67 | static const struct soc_camera_data_format mt9v022_colour_formats[] = { |
66 | /* Order important: first natively supported, | 68 | /* |
67 | * second supported with a GPIO extender */ | 69 | * Order important: first natively supported, |
70 | * second supported with a GPIO extender | ||
71 | */ | ||
68 | { | 72 | { |
69 | .name = "Bayer (sRGB) 10 bit", | 73 | .name = "Bayer (sRGB) 10 bit", |
70 | .depth = 10, | 74 | .depth = 10, |
@@ -144,9 +148,11 @@ static int mt9v022_init(struct i2c_client *client) | |||
144 | struct mt9v022 *mt9v022 = to_mt9v022(client); | 148 | struct mt9v022 *mt9v022 = to_mt9v022(client); |
145 | int ret; | 149 | int ret; |
146 | 150 | ||
147 | /* Almost the default mode: master, parallel, simultaneous, and an | 151 | /* |
152 | * Almost the default mode: master, parallel, simultaneous, and an | ||
148 | * undocumented bit 0x200, which is present in table 7, but not in 8, | 153 | * undocumented bit 0x200, which is present in table 7, but not in 8, |
149 | * plus snapshot mode to disable scan for now */ | 154 | * plus snapshot mode to disable scan for now |
155 | */ | ||
150 | mt9v022->chip_control |= 0x10; | 156 | mt9v022->chip_control |= 0x10; |
151 | ret = reg_write(client, MT9V022_CHIP_CONTROL, mt9v022->chip_control); | 157 | ret = reg_write(client, MT9V022_CHIP_CONTROL, mt9v022->chip_control); |
152 | if (!ret) | 158 | if (!ret) |
@@ -298,8 +304,10 @@ static int mt9v022_s_crop(struct v4l2_subdev *sd, struct v4l2_crop *a) | |||
298 | if (!ret) | 304 | if (!ret) |
299 | ret = reg_write(client, MT9V022_ROW_START, rect.top); | 305 | ret = reg_write(client, MT9V022_ROW_START, rect.top); |
300 | if (!ret) | 306 | if (!ret) |
301 | /* Default 94, Phytec driver says: | 307 | /* |
302 | * "width + horizontal blank >= 660" */ | 308 | * Default 94, Phytec driver says: |
309 | * "width + horizontal blank >= 660" | ||
310 | */ | ||
303 | ret = reg_write(client, MT9V022_HORIZONTAL_BLANKING, | 311 | ret = reg_write(client, MT9V022_HORIZONTAL_BLANKING, |
304 | rect.width > 660 - 43 ? 43 : | 312 | rect.width > 660 - 43 ? 43 : |
305 | 660 - rect.width); | 313 | 660 - rect.width); |
@@ -376,8 +384,10 @@ static int mt9v022_s_fmt(struct v4l2_subdev *sd, struct v4l2_format *f) | |||
376 | }; | 384 | }; |
377 | int ret; | 385 | int ret; |
378 | 386 | ||
379 | /* The caller provides a supported format, as verified per call to | 387 | /* |
380 | * icd->try_fmt(), datawidth is from our supported format list */ | 388 | * The caller provides a supported format, as verified per call to |
389 | * icd->try_fmt(), datawidth is from our supported format list | ||
390 | */ | ||
381 | switch (pix->pixelformat) { | 391 | switch (pix->pixelformat) { |
382 | case V4L2_PIX_FMT_GREY: | 392 | case V4L2_PIX_FMT_GREY: |
383 | case V4L2_PIX_FMT_Y16: | 393 | case V4L2_PIX_FMT_Y16: |
@@ -635,8 +645,10 @@ static int mt9v022_s_ctrl(struct v4l2_subdev *sd, struct v4l2_control *ctrl) | |||
635 | 48 + range / 2) / range + 16; | 645 | 48 + range / 2) / range + 16; |
636 | if (gain >= 32) | 646 | if (gain >= 32) |
637 | gain &= ~1; | 647 | gain &= ~1; |
638 | /* The user wants to set gain manually, hope, she | 648 | /* |
639 | * knows, what she's doing... Switch AGC off. */ | 649 | * The user wants to set gain manually, hope, she |
650 | * knows, what she's doing... Switch AGC off. | ||
651 | */ | ||
640 | 652 | ||
641 | if (reg_clear(client, MT9V022_AEC_AGC_ENABLE, 0x2) < 0) | 653 | if (reg_clear(client, MT9V022_AEC_AGC_ENABLE, 0x2) < 0) |
642 | return -EIO; | 654 | return -EIO; |
@@ -655,8 +667,10 @@ static int mt9v022_s_ctrl(struct v4l2_subdev *sd, struct v4l2_control *ctrl) | |||
655 | unsigned long range = qctrl->maximum - qctrl->minimum; | 667 | unsigned long range = qctrl->maximum - qctrl->minimum; |
656 | unsigned long shutter = ((ctrl->value - qctrl->minimum) * | 668 | unsigned long shutter = ((ctrl->value - qctrl->minimum) * |
657 | 479 + range / 2) / range + 1; | 669 | 479 + range / 2) / range + 1; |
658 | /* The user wants to set shutter width manually, hope, | 670 | /* |
659 | * she knows, what she's doing... Switch AEC off. */ | 671 | * The user wants to set shutter width manually, hope, |
672 | * she knows, what she's doing... Switch AEC off. | ||
673 | */ | ||
660 | 674 | ||
661 | if (reg_clear(client, MT9V022_AEC_AGC_ENABLE, 0x1) < 0) | 675 | if (reg_clear(client, MT9V022_AEC_AGC_ENABLE, 0x1) < 0) |
662 | return -EIO; | 676 | return -EIO; |
@@ -689,8 +703,10 @@ static int mt9v022_s_ctrl(struct v4l2_subdev *sd, struct v4l2_control *ctrl) | |||
689 | return 0; | 703 | return 0; |
690 | } | 704 | } |
691 | 705 | ||
692 | /* Interface active, can use i2c. If it fails, it can indeed mean, that | 706 | /* |
693 | * this wasn't our capture interface, so, we wait for the right one */ | 707 | * Interface active, can use i2c. If it fails, it can indeed mean, that |
708 | * this wasn't our capture interface, so, we wait for the right one | ||
709 | */ | ||
694 | static int mt9v022_video_probe(struct soc_camera_device *icd, | 710 | static int mt9v022_video_probe(struct soc_camera_device *icd, |
695 | struct i2c_client *client) | 711 | struct i2c_client *client) |
696 | { | 712 | { |