[media] omap3isp: Support configurable HS/VS polarities
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Wed, 25 May 2011 07:16:28 +0000 (04:16 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Wed, 27 Jul 2011 20:56:07 +0000 (17:56 -0300)
Add two fields to the ISP parallel platform data to set the HS and VS
signals polarities.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Sakari Ailus <sakari.ailus@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/omap3isp/isp.h
drivers/media/video/omap3isp/ispccdc.c

index 2620c405f5e42cf0f37d7d724535b7e3593f6a1c..529e582ef94875488a8b8ff239183a2f9054ca42 100644 (file)
@@ -139,6 +139,10 @@ struct isp_reg {
  *             3 - CAMEXT[13:6] -> CAM[7:0]
  * @clk_pol: Pixel clock polarity
  *             0 - Non Inverted, 1 - Inverted
+ * @hs_pol: Horizontal synchronization polarity
+ *             0 - Active high, 1 - Active low
+ * @vs_pol: Vertical synchronization polarity
+ *             0 - Active high, 1 - Active low
  * @bridge: CCDC Bridge input control
  *             ISPCTRL_PAR_BRIDGE_DISABLE - Disable
  *             ISPCTRL_PAR_BRIDGE_LENDIAN - Little endian
@@ -147,6 +151,8 @@ struct isp_reg {
 struct isp_parallel_platform_data {
        unsigned int data_lane_shift:2;
        unsigned int clk_pol:1;
+       unsigned int hs_pol:1;
+       unsigned int vs_pol:1;
        unsigned int bridge:4;
 };
 
index 67662470661dd9ef8d87bc573960aeea28e06439..9d3459de04b2b5f48b6ede40d53468de8ab8a155 100644 (file)
@@ -1148,6 +1148,8 @@ static void ccdc_configure(struct isp_ccdc_device *ccdc)
        omap3isp_configure_bridge(isp, ccdc->input, pdata, shift);
 
        ccdc->syncif.datsz = depth_out;
+       ccdc->syncif.hdpol = pdata ? pdata->hs_pol : 0;
+       ccdc->syncif.vdpol = pdata ? pdata->vs_pol : 0;
        ccdc_config_sync_if(ccdc, &ccdc->syncif);
 
        /* CCDC_PAD_SINK */
@@ -2256,8 +2258,6 @@ int omap3isp_ccdc_init(struct isp_device *isp)
        ccdc->syncif.fldout = 0;
        ccdc->syncif.fldpol = 0;
        ccdc->syncif.fldstat = 0;
-       ccdc->syncif.hdpol = 0;
-       ccdc->syncif.vdpol = 0;
 
        ccdc->clamp.oblen = 0;
        ccdc->clamp.dcsubval = 0;