summaryrefslogtreecommitdiff
path: root/drivers/media/i2c/st-mipid02.c
diff options
context:
space:
mode:
authorHugues Fruchet <hugues.fruchet@st.com>2019-06-17 16:43:56 +0300
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>2019-06-24 20:03:12 +0300
commit197adee605642c72732fd07ed59a3950a80f4e77 (patch)
treea81a6216c7a2219c2ee64afd5d56012fe6d9794f /drivers/media/i2c/st-mipid02.c
parent6a381d1072f174cb80a27526a7ccdcfd6604ecb2 (diff)
downloadlinux-197adee605642c72732fd07ed59a3950a80f4e77.tar.xz
media: st-mipid02: add support of RGB565
Add support of RGB565 pixel format. Signed-off-by: Hugues Fruchet <hugues.fruchet@st.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'drivers/media/i2c/st-mipid02.c')
-rw-r--r--drivers/media/i2c/st-mipid02.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/media/i2c/st-mipid02.c b/drivers/media/i2c/st-mipid02.c
index 8623f3085b67..cbe476eb5d59 100644
--- a/drivers/media/i2c/st-mipid02.c
+++ b/drivers/media/i2c/st-mipid02.c
@@ -61,7 +61,8 @@ static const u32 mipid02_supported_fmt_codes[] = {
MEDIA_BUS_FMT_SGRBG10_1X10, MEDIA_BUS_FMT_SRGGB10_1X10,
MEDIA_BUS_FMT_SBGGR12_1X12, MEDIA_BUS_FMT_SGBRG12_1X12,
MEDIA_BUS_FMT_SGRBG12_1X12, MEDIA_BUS_FMT_SRGGB12_1X12,
- MEDIA_BUS_FMT_UYVY8_1X16, MEDIA_BUS_FMT_BGR888_1X24
+ MEDIA_BUS_FMT_UYVY8_1X16, MEDIA_BUS_FMT_BGR888_1X24,
+ MEDIA_BUS_FMT_RGB565_2X8_LE, MEDIA_BUS_FMT_RGB565_2X8_BE,
};
/* regulator supplies */
@@ -128,6 +129,8 @@ static int bpp_from_code(__u32 code)
case MEDIA_BUS_FMT_SRGGB12_1X12:
return 12;
case MEDIA_BUS_FMT_UYVY8_1X16:
+ case MEDIA_BUS_FMT_RGB565_2X8_LE:
+ case MEDIA_BUS_FMT_RGB565_2X8_BE:
return 16;
case MEDIA_BUS_FMT_BGR888_1X24:
return 24;
@@ -158,6 +161,9 @@ static u8 data_type_from_code(__u32 code)
return 0x1e;
case MEDIA_BUS_FMT_BGR888_1X24:
return 0x24;
+ case MEDIA_BUS_FMT_RGB565_2X8_LE:
+ case MEDIA_BUS_FMT_RGB565_2X8_BE:
+ return 0x22;
default:
return 0;
}