diff options
author | Guennadi Liakhovetski <g.liakhovetski@pengutronix.de> | 2008-04-22 13:45:13 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-04-24 13:07:44 -0400 |
commit | bb55de3b0e3523469491a48c51dcf7c6738162b2 (patch) | |
tree | 364cda8ce8498e85ae0fb6ea280b60dd50bc06af /drivers/media/video/mt9m001.c | |
parent | b1daf7e1233845db556ace20f80c7c531143498c (diff) |
V4L/DVB (7249): Fix advertised pixel formats in mt9m001 and mt9v022
Only advertise pixel formats, that we actually can support in the
present configuration.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@pengutronix.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/mt9m001.c')
-rw-r--r-- | drivers/media/video/mt9m001.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/drivers/media/video/mt9m001.c b/drivers/media/video/mt9m001.c index e3afc82050af..4ad834326fa8 100644 --- a/drivers/media/video/mt9m001.c +++ b/drivers/media/video/mt9m001.c | |||
@@ -44,15 +44,23 @@ | |||
44 | #define MT9M001_CHIP_ENABLE 0xF1 | 44 | #define MT9M001_CHIP_ENABLE 0xF1 |
45 | 45 | ||
46 | static const struct soc_camera_data_format mt9m001_colour_formats[] = { | 46 | static const struct soc_camera_data_format mt9m001_colour_formats[] = { |
47 | /* Order important: first natively supported, | ||
48 | * second supported with a GPIO extender */ | ||
47 | { | 49 | { |
48 | .name = "RGB Bayer (sRGB)", | 50 | .name = "Bayer (sRGB) 10 bit", |
49 | .depth = 16, | 51 | .depth = 10, |
52 | .fourcc = V4L2_PIX_FMT_SBGGR16, | ||
53 | .colorspace = V4L2_COLORSPACE_SRGB, | ||
54 | }, { | ||
55 | .name = "Bayer (sRGB) 8 bit", | ||
56 | .depth = 8, | ||
50 | .fourcc = V4L2_PIX_FMT_SBGGR8, | 57 | .fourcc = V4L2_PIX_FMT_SBGGR8, |
51 | .colorspace = V4L2_COLORSPACE_SRGB, | 58 | .colorspace = V4L2_COLORSPACE_SRGB, |
52 | } | 59 | } |
53 | }; | 60 | }; |
54 | 61 | ||
55 | static const struct soc_camera_data_format mt9m001_monochrome_formats[] = { | 62 | static const struct soc_camera_data_format mt9m001_monochrome_formats[] = { |
63 | /* Order important - see above */ | ||
56 | { | 64 | { |
57 | .name = "Monochrome 10 bit", | 65 | .name = "Monochrome 10 bit", |
58 | .depth = 10, | 66 | .depth = 10, |
@@ -547,7 +555,10 @@ static int mt9m001_video_probe(struct soc_camera_device *icd) | |||
547 | case 0x8421: | 555 | case 0x8421: |
548 | mt9m001->model = V4L2_IDENT_MT9M001C12ST; | 556 | mt9m001->model = V4L2_IDENT_MT9M001C12ST; |
549 | mt9m001_ops.formats = mt9m001_colour_formats; | 557 | mt9m001_ops.formats = mt9m001_colour_formats; |
550 | mt9m001_ops.num_formats = ARRAY_SIZE(mt9m001_colour_formats); | 558 | if (mt9m001->client->dev.platform_data) |
559 | mt9m001_ops.num_formats = ARRAY_SIZE(mt9m001_colour_formats); | ||
560 | else | ||
561 | mt9m001_ops.num_formats = 1; | ||
551 | break; | 562 | break; |
552 | case 0x8431: | 563 | case 0x8431: |
553 | mt9m001->model = V4L2_IDENT_MT9M001C12STM; | 564 | mt9m001->model = V4L2_IDENT_MT9M001C12STM; |