summaryrefslogtreecommitdiff
path: root/drivers/media/video/mt9m001.c
diff options
context:
space:
mode:
authorGuennadi Liakhovetski <g.liakhovetski@pengutronix.de>2008-04-22 14:45:13 -0300
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-04-24 14:07:44 -0300
commitbb55de3b0e3523469491a48c51dcf7c6738162b2 (patch)
tree364cda8ce8498e85ae0fb6ea280b60dd50bc06af /drivers/media/video/mt9m001.c
parentb1daf7e1233845db556ace20f80c7c531143498c (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.c17
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 @@
#define MT9M001_CHIP_ENABLE 0xF1
static const struct soc_camera_data_format mt9m001_colour_formats[] = {
+ /* Order important: first natively supported,
+ * second supported with a GPIO extender */
{
- .name = "RGB Bayer (sRGB)",
- .depth = 16,
+ .name = "Bayer (sRGB) 10 bit",
+ .depth = 10,
+ .fourcc = V4L2_PIX_FMT_SBGGR16,
+ .colorspace = V4L2_COLORSPACE_SRGB,
+ }, {
+ .name = "Bayer (sRGB) 8 bit",
+ .depth = 8,
.fourcc = V4L2_PIX_FMT_SBGGR8,
.colorspace = V4L2_COLORSPACE_SRGB,
}
};
static const struct soc_camera_data_format mt9m001_monochrome_formats[] = {
+ /* Order important - see above */
{
.name = "Monochrome 10 bit",
.depth = 10,
@@ -547,7 +555,10 @@ static int mt9m001_video_probe(struct soc_camera_device *icd)
case 0x8421:
mt9m001->model = V4L2_IDENT_MT9M001C12ST;
mt9m001_ops.formats = mt9m001_colour_formats;
- mt9m001_ops.num_formats = ARRAY_SIZE(mt9m001_colour_formats);
+ if (mt9m001->client->dev.platform_data)
+ mt9m001_ops.num_formats = ARRAY_SIZE(mt9m001_colour_formats);
+ else
+ mt9m001_ops.num_formats = 1;
break;
case 0x8431:
mt9m001->model = V4L2_IDENT_MT9M001C12STM;