summaryrefslogtreecommitdiffstats
path: root/drivers/media/video/s5p-fimc/mipi-csis.c
diff options
context:
space:
mode:
authorSylwester Nawrocki <s.nawrocki@samsung.com>2012-03-21 10:21:30 +0100
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-04-10 20:22:26 +0200
commit20676a4c9503dbcbb283c4c6565426dc63b81775 (patch)
treec4192a9a1e72b18667917ac1c47dde8dc7fd1611 /drivers/media/video/s5p-fimc/mipi-csis.c
parent[media] v4l: Support s_crop and g_crop through s/g_selection (diff)
downloadlinux-20676a4c9503dbcbb283c4c6565426dc63b81775.tar.xz
linux-20676a4c9503dbcbb283c4c6565426dc63b81775.zip
[media] s5p-fimc: Don't use platform data for CSI data alignment configuration
The MIPI-CSI2 data alignment parameter can be derived from media bus pixel code, so it can be now dropped from the platform data structure. This is a prerequisite for adding the device tree support. Once this patch is merged the corresponding fields will be removed from the drivers' public headers and corresponding board files. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/s5p-fimc/mipi-csis.c')
-rw-r--r--drivers/media/video/s5p-fimc/mipi-csis.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/media/video/s5p-fimc/mipi-csis.c b/drivers/media/video/s5p-fimc/mipi-csis.c
index f44f690397f7..1cd6b6bc6279 100644
--- a/drivers/media/video/s5p-fimc/mipi-csis.c
+++ b/drivers/media/video/s5p-fimc/mipi-csis.c
@@ -127,20 +127,24 @@ struct csis_state {
* multiple of 2^pix_width_alignment
* @code: corresponding media bus code
* @fmt_reg: S5PCSIS_CONFIG register value
+ * @data_alignment: MIPI-CSI data alignment in bits
*/
struct csis_pix_format {
unsigned int pix_width_alignment;
enum v4l2_mbus_pixelcode code;
u32 fmt_reg;
+ u8 data_alignment;
};
static const struct csis_pix_format s5pcsis_formats[] = {
{
.code = V4L2_MBUS_FMT_VYUY8_2X8,
.fmt_reg = S5PCSIS_CFG_FMT_YCBCR422_8BIT,
+ .data_alignment = 32,
}, {
.code = V4L2_MBUS_FMT_JPEG_1X8,
.fmt_reg = S5PCSIS_CFG_FMT_USER(1),
+ .data_alignment = 32,
},
};
@@ -239,7 +243,7 @@ static void s5pcsis_set_params(struct csis_state *state)
s5pcsis_set_hsync_settle(state, pdata->hs_settle);
val = s5pcsis_read(state, S5PCSIS_CTRL);
- if (pdata->alignment == 32)
+ if (state->csis_fmt->data_alignment == 32)
val |= S5PCSIS_CTRL_ALIGN_32BIT;
else /* 24-bits */
val &= ~S5PCSIS_CTRL_ALIGN_32BIT;