From: Oliver McFadden Date: Fri, 17 Feb 2012 12:52:28 +0000 (+0200) Subject: drv: tc35876x: pass the DRM device to all tc35876x functions. X-Git-Tag: 2.1b_release~259 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=92923ddc5a7969768d62df6d68841e106d5fa583;p=kernel%2Fkernel-mfld-blackbay.git drv: tc35876x: pass the DRM device to all tc35876x functions. This patch is required for further patches in this series; no functional changes. Signed-off-by: Oliver McFadden Reviewed-by: Jani Nikula Signed-off-by: Kirill A. Shutemov --- diff --git a/drivers/staging/mrst/drv/mdfld_dsi_dpi.c b/drivers/staging/mrst/drv/mdfld_dsi_dpi.c index 9f5896c..596ab02 100644 --- a/drivers/staging/mrst/drv/mdfld_dsi_dpi.c +++ b/drivers/staging/mrst/drv/mdfld_dsi_dpi.c @@ -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); diff --git a/drivers/staging/mrst/drv/tc35876x-dsi-lvds.c b/drivers/staging/mrst/drv/tc35876x-dsi-lvds.c index abeb101..c7a694f 100644 --- a/drivers/staging/mrst/drv/tc35876x-dsi-lvds.c +++ b/drivers/staging/mrst/drv/tc35876x-dsi-lvds.c @@ -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; diff --git a/drivers/staging/mrst/drv/tc35876x-dsi-lvds.h b/drivers/staging/mrst/drv/tc35876x-dsi-lvds.h index 6d76f03..0a4fd5a 100644 --- a/drivers/staging/mrst/drv/tc35876x-dsi-lvds.h +++ b/drivers/staging/mrst/drv/tc35876x-dsi-lvds.h @@ -25,11 +25,11 @@ #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);