From: Yakir Yang Date: Fri, 22 Apr 2016 08:13:00 +0000 (+0800) Subject: drm/rockchip: analogix_dp: distinguish chip type for each chips X-Git-Tag: firefly_0821_release~2751 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=d7b965329c28c4ec8ffe183c0c6ede7c8110785d;p=firefly-linux-kernel-4.4.55.git drm/rockchip: analogix_dp: distinguish chip type for each chips Driver could check the chip type to do some special things. Change-Id: I2a33da466db0aa5133868c200a122df675f4c925 Signed-off-by: Yakir Yang --- diff --git a/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c b/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c index 7f484c1c1bb8..e14c1b399eec 100644 --- a/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c +++ b/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c @@ -36,11 +36,17 @@ #define to_dp(nm) container_of(nm, struct rockchip_dp_device, nm) +enum rockchip_dp_chip_type { + RK3288_DP, + RK3399_EDP, +}; + struct rockchip_dp_chip_data { u32 lcdsel_grf_reg; u32 lcdsel_big; u32 lcdsel_lit; u32 lcdsel_mask; + u32 chip_type; }; struct rockchip_dp_device { @@ -376,6 +382,7 @@ static const struct rockchip_dp_chip_data rk3399_edp = { .lcdsel_big = 0, .lcdsel_lit = BIT(5), .lcdsel_mask = BIT(21), + .chip_type = RK3399_EDP, }; static const struct rockchip_dp_chip_data rk3288_dp = { @@ -383,6 +390,7 @@ static const struct rockchip_dp_chip_data rk3288_dp = { .lcdsel_big = 0, .lcdsel_lit = BIT(5), .lcdsel_mask = BIT(21), + .chip_type = RK3288_DP, }; static const struct of_device_id rockchip_dp_dt_ids[] = {