drv: tc35876x: pass the DRM device to all tc35876x functions.
authorOliver McFadden <oliver.mcfadden@intel.com>
Fri, 17 Feb 2012 12:52:28 +0000 (14:52 +0200)
committerMarkus Lehtonen <markus.lehtonen@linux.intel.com>
Tue, 3 Jul 2012 09:30:15 +0000 (12:30 +0300)
This patch is required for further patches in this series; no functional
changes.

Signed-off-by: Oliver McFadden <oliver.mcfadden@intel.com>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
drivers/staging/mrst/drv/mdfld_dsi_dpi.c
drivers/staging/mrst/drv/tc35876x-dsi-lvds.c
drivers/staging/mrst/drv/tc35876x-dsi-lvds.h

index 9f5896c..596ab02 100644 (file)
@@ -207,8 +207,8 @@ static void mdfld_dsi_configure_down(struct mdfld_dsi_encoder * dsi_encoder, int
                printk(KERN_ALERT "[DISPLAY] %s: DPI Panel is Already Off\n", __func__);
                return;
        }
-       tc35876x_toshiba_bridge_panel_off();
-       tc35876x_set_bridge_reset_state(1);
+       tc35876x_toshiba_bridge_panel_off(dev);
+       tc35876x_set_bridge_reset_state(dev, 1);
        dsi_set_pipe_plane_enable_state(dev, 0, pipe);  //Disable pipe and plane
 
        mdfld_dsi_dpi_shut_down(dpi_output, pipe);  //Send shut down command
@@ -236,7 +236,7 @@ static void mdfld_dsi_configure_up(struct mdfld_dsi_encoder * dsi_encoder, int p
        dsi_set_device_ready_state(dev, 0, pipe);  //Clear Device Ready Bit
 
        dsi_set_device_ready_state(dev, 1, pipe);  //Set device ready state
-       tc35876x_set_bridge_reset_state(0);
+       tc35876x_set_bridge_reset_state(dev, 0);
        tc35876x_configure_lvds_bridge(dev);
        mdfld_dsi_dpi_turn_on(dpi_output, pipe);  //Send turn on command
        dsi_set_pipe_plane_enable_state(dev, 1, pipe);  //Enable plane and pipe
@@ -583,7 +583,7 @@ void mdfld_dsi_dpi_controller_init(struct mdfld_dsi_config * dsi_config, int pip
        REG_WRITE(MIPI_CLK_LANE_SWITCH_TIME_CNT_REG(pipe), (0xa << 16) | 0x14);
 
        if (get_panel_type(dev, pipe) == TC35876X)
-               tc35876x_set_bridge_reset_state(0);  /*Pull High Reset */
+               tc35876x_set_bridge_reset_state(dev, 0);  /*Pull High Reset */
 
        /*set device ready*/
        REG_FLD_MOD(MIPI_DEVICE_READY_REG(pipe), 1, 0, 0);
@@ -917,8 +917,8 @@ void mdfld_dsi_dpi_mode_set(struct drm_encoder * encoder,
                 */
                int timeout = 0;
 
-               tc35876x_set_bridge_reset_state(0);  /*Pull High Reset */
-               tc35876x_toshiba_bridge_panel_on();
+               tc35876x_set_bridge_reset_state(dev, 0);  /*Pull High Reset */
+               tc35876x_toshiba_bridge_panel_on(dev);
                udelay(100);
                /* Now start the DSI clock */
                REG_WRITE(MRST_DPLL_A, 0x00);
index abeb101..c7a694f 100644 (file)
@@ -310,7 +310,7 @@ static int tc35876x_regr(struct i2c_client *client, u16 reg, u32 *value)
        return 0;
 }
 
-void tc35876x_set_bridge_reset_state(int state)
+void tc35876x_set_bridge_reset_state(struct drm_device *dev, int state)
 {
        struct tc35876x_platform_data *pdata;
 
@@ -455,7 +455,7 @@ void tc35876x_brightness_control(struct drm_device *dev, int pipe,
        }
 }
 
-void tc35876x_toshiba_bridge_panel_off(void)
+void tc35876x_toshiba_bridge_panel_off(struct drm_device *dev)
 {
        struct tc35876x_platform_data *pdata;
 
@@ -473,7 +473,7 @@ void tc35876x_toshiba_bridge_panel_off(void)
                gpio_set_value_cansleep(pdata->gpio_panel_vadd, 0);
 }
 
-void tc35876x_toshiba_bridge_panel_on(void)
+void tc35876x_toshiba_bridge_panel_on(struct drm_device *dev)
 {
        struct tc35876x_platform_data *pdata;
 
index 6d76f03..0a4fd5a 100644 (file)
 #ifndef __MDFLD_DSI_LVDS_BRIDGE_H__
 #define __MDFLD_DSI_LVDS_BRIDGE_H__
 
-void tc35876x_set_bridge_reset_state(int state);
+void tc35876x_set_bridge_reset_state(struct drm_device *dev, int state);
 void tc35876x_configure_lvds_bridge(struct drm_device *dev);
 void tc35876x_brightness_control(struct drm_device *dev, int pipe, int level);
-void tc35876x_toshiba_bridge_panel_off(void);
-void tc35876x_toshiba_bridge_panel_on(void);
+void tc35876x_toshiba_bridge_panel_off(struct drm_device *dev);
+void tc35876x_toshiba_bridge_panel_on(struct drm_device *dev);
 void tc35876x_init(struct drm_device *dev, struct panel_funcs *pf);
 void tc35876x_exit(void);