Commit a432e054 authored by Chris Zhong's avatar Chris Zhong Committed by Sean Paul

drm/rockchip/dsi: dw-mipi: correct the coding style

correct the coding style, according the checkpatch scripts
Signed-off-by: default avatarChris Zhong <zyw@rock-chips.com>
Reviewed-by: default avatarSean Paul <seanpaul@chromium.org>
Signed-off-by: default avatarSean Paul <seanpaul@chromium.org>
Link: http://patchwork.freedesktop.org/patch/msgid/1487577744-2855-4-git-send-email-zyw@rock-chips.com
parent ef6eba19
...@@ -158,7 +158,6 @@ ...@@ -158,7 +158,6 @@
#define LPRX_TO_CNT(p) ((p) & 0xffff) #define LPRX_TO_CNT(p) ((p) & 0xffff)
#define DSI_BTA_TO_CNT 0x8c #define DSI_BTA_TO_CNT 0x8c
#define DSI_LPCLK_CTRL 0x94 #define DSI_LPCLK_CTRL 0x94
#define AUTO_CLKLANE_CTRL BIT(1) #define AUTO_CLKLANE_CTRL BIT(1)
#define PHY_TXREQUESTCLKHS BIT(0) #define PHY_TXREQUESTCLKHS BIT(0)
...@@ -224,11 +223,11 @@ ...@@ -224,11 +223,11 @@
#define HSFREQRANGE_SEL(val) (((val) & 0x3f) << 1) #define HSFREQRANGE_SEL(val) (((val) & 0x3f) << 1)
#define INPUT_DIVIDER(val) ((val - 1) & 0x7f) #define INPUT_DIVIDER(val) (((val) - 1) & 0x7f)
#define LOW_PROGRAM_EN 0 #define LOW_PROGRAM_EN 0
#define HIGH_PROGRAM_EN BIT(7) #define HIGH_PROGRAM_EN BIT(7)
#define LOOP_DIV_LOW_SEL(val) ((val - 1) & 0x1f) #define LOOP_DIV_LOW_SEL(val) (((val) - 1) & 0x1f)
#define LOOP_DIV_HIGH_SEL(val) (((val - 1) >> 5) & 0x1f) #define LOOP_DIV_HIGH_SEL(val) ((((val) - 1) >> 5) & 0x1f)
#define PLL_LOOP_DIV_EN BIT(5) #define PLL_LOOP_DIV_EN BIT(5)
#define PLL_INPUT_DIV_EN BIT(4) #define PLL_INPUT_DIV_EN BIT(4)
...@@ -370,6 +369,7 @@ static inline struct dw_mipi_dsi *encoder_to_dsi(struct drm_encoder *encoder) ...@@ -370,6 +369,7 @@ static inline struct dw_mipi_dsi *encoder_to_dsi(struct drm_encoder *encoder)
{ {
return container_of(encoder, struct dw_mipi_dsi, encoder); return container_of(encoder, struct dw_mipi_dsi, encoder);
} }
static inline void dsi_write(struct dw_mipi_dsi *dsi, u32 reg, u32 val) static inline void dsi_write(struct dw_mipi_dsi *dsi, u32 reg, u32 val)
{ {
writel(val, dsi->base + reg); writel(val, dsi->base + reg);
...@@ -493,7 +493,6 @@ static int dw_mipi_dsi_phy_init(struct dw_mipi_dsi *dsi) ...@@ -493,7 +493,6 @@ static int dw_mipi_dsi_phy_init(struct dw_mipi_dsi *dsi)
dsi_write(dsi, DSI_PHY_RSTZ, PHY_ENFORCEPLL | PHY_ENABLECLK | dsi_write(dsi, DSI_PHY_RSTZ, PHY_ENFORCEPLL | PHY_ENABLECLK |
PHY_UNRSTZ | PHY_UNSHUTDOWNZ); PHY_UNRSTZ | PHY_UNSHUTDOWNZ);
ret = readl_poll_timeout(dsi->base + DSI_PHY_STATUS, ret = readl_poll_timeout(dsi->base + DSI_PHY_STATUS,
val, val & LOCK, 1000, PHY_STATUS_TIMEOUT_US); val, val & LOCK, 1000, PHY_STATUS_TIMEOUT_US);
if (ret < 0) { if (ret < 0) {
...@@ -1024,14 +1023,14 @@ dw_mipi_dsi_encoder_atomic_check(struct drm_encoder *encoder, ...@@ -1024,14 +1023,14 @@ dw_mipi_dsi_encoder_atomic_check(struct drm_encoder *encoder,
return 0; return 0;
} }
static struct drm_encoder_helper_funcs static const struct drm_encoder_helper_funcs
dw_mipi_dsi_encoder_helper_funcs = { dw_mipi_dsi_encoder_helper_funcs = {
.enable = dw_mipi_dsi_encoder_enable, .enable = dw_mipi_dsi_encoder_enable,
.disable = dw_mipi_dsi_encoder_disable, .disable = dw_mipi_dsi_encoder_disable,
.atomic_check = dw_mipi_dsi_encoder_atomic_check, .atomic_check = dw_mipi_dsi_encoder_atomic_check,
}; };
static struct drm_encoder_funcs dw_mipi_dsi_encoder_funcs = { static const struct drm_encoder_funcs dw_mipi_dsi_encoder_funcs = {
.destroy = drm_encoder_cleanup, .destroy = drm_encoder_cleanup,
}; };
...@@ -1067,7 +1066,7 @@ static void dw_mipi_dsi_drm_connector_destroy(struct drm_connector *connector) ...@@ -1067,7 +1066,7 @@ static void dw_mipi_dsi_drm_connector_destroy(struct drm_connector *connector)
drm_connector_cleanup(connector); drm_connector_cleanup(connector);
} }
static struct drm_connector_funcs dw_mipi_dsi_atomic_connector_funcs = { static const struct drm_connector_funcs dw_mipi_dsi_atomic_connector_funcs = {
.dpms = drm_atomic_helper_connector_dpms, .dpms = drm_atomic_helper_connector_dpms,
.fill_modes = drm_helper_probe_single_connector_modes, .fill_modes = drm_helper_probe_single_connector_modes,
.destroy = dw_mipi_dsi_drm_connector_destroy, .destroy = dw_mipi_dsi_drm_connector_destroy,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment