From patchwork Thu Aug 6 14:19:49 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yakir Yang X-Patchwork-Id: 6959611 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 547B79F38B for ; Thu, 6 Aug 2015 14:22:10 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7A2B12066F for ; Thu, 6 Aug 2015 14:22:09 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 4734820658 for ; Thu, 6 Aug 2015 14:22:07 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3BCA9895E1; Thu, 6 Aug 2015 07:22:06 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from regular1.263xmail.com (regular1.263xmail.com [211.150.99.137]) by gabe.freedesktop.org (Postfix) with ESMTPS id 50FEA6E7DA for ; Thu, 6 Aug 2015 07:22:04 -0700 (PDT) Received: from ykk?rock-chips.com (unknown [192.168.167.158]) by regular1.263xmail.com (Postfix) with SMTP id 6338B7B4B; Thu, 6 Aug 2015 22:21:52 +0800 (CST) X-263anti-spam: KSV:0; X-MAIL-GRAY: 0 X-MAIL-DELIVERY: 1 X-KSVirus-check: 0 X-ABS-CHECKED: 4 X-ADDR-CHECKED: 0 Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.263.net (Postfix) with ESMTP id 686BD29DEF; Thu, 6 Aug 2015 22:21:46 +0800 (CST) X-RL-SENDER: ykk@rock-chips.com X-FST-TO: heiko@sntech.de X-SENDER-IP: 58.22.7.114 X-LOGIN-NAME: ykk@rock-chips.com X-UNIQUE-TAG: X-ATTACHMENT-NUM: 0 X-SENDER: ykk@rock-chips.com X-DNS-TYPE: 0 Received: from localhost.localdomain (unknown [58.22.7.114]) by smtp.263.net (Postfix) whith ESMTP id 9531N0LK97; Thu, 06 Aug 2015 22:21:49 +0800 (CST) From: Yakir Yang To: Heiko Stuebner , Russell King , Fabio Estevam , Jingoo Han , Inki Dae Subject: [RFC PATCH 5/8] drm: bridge/analogix_dp: add platform device type support Date: Thu, 6 Aug 2015 09:19:49 -0500 Message-Id: <1438870789-23898-1-git-send-email-ykk@rock-chips.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1438868947-22132-1-git-send-email-ykk@rock-chips.com> References: <1438868947-22132-1-git-send-email-ykk@rock-chips.com> Cc: Krzysztof Kozlowski , dri-devel@lists.freedesktop.org, Andrzej Hajda , Yakir Yang , Gustavo Padovan , Ajay Kumar , linux-samsung-soc@vger.kernel.org, Vincent Palatin , linux-rockchip@lists.infradead.org, Kukjin Kim , Thierry Reding , dianders@google.com, linux-arm-kernel@lists.infradead.org, Seung-Woo Kim , linux-kernel@vger.kernel.org, Kyungmin Park , djkurtz@google.com, Andy Yan X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Yakir Yang --- drivers/gpu/drm/exynos/analogix_dp-exynos.c | 1 + drivers/gpu/drm/rockchip/analogix_dp-rockchip.c | 1 + include/drm/bridge/analogix_dp.h | 6 ++++++ 3 files changed, 8 insertions(+) diff --git a/drivers/gpu/drm/exynos/analogix_dp-exynos.c b/drivers/gpu/drm/exynos/analogix_dp-exynos.c index b8d09d4..0668e77 100644 --- a/drivers/gpu/drm/exynos/analogix_dp-exynos.c +++ b/drivers/gpu/drm/exynos/analogix_dp-exynos.c @@ -124,6 +124,7 @@ static int exynos_dp_bind(struct device *dev, struct device *master, void *data) dp->dev = dev; dp->drm_dev = drm_dev; + dp->plat_data.dev_type = EXYNOS_DP; dp->plat_data.power_on = exynos_dp_poweron; dp->plat_data.power_off = exynos_dp_poweroff; dp->plat_data.attach = exynos_dp_bridge_attach; diff --git a/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c b/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c index 804048c..b532c21 100644 --- a/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c +++ b/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c @@ -312,6 +312,7 @@ static int rockchip_dp_bind(struct device *dev, struct device *master, return ret; } + dp->plat_data.dev_type = RK3288_DP; dp->plat_data.attach = NULL; dp->plat_data.power_on = rockchip_dp_poweron; dp->plat_data.power_off = rockchip_dp_poweroff; diff --git a/include/drm/bridge/analogix_dp.h b/include/drm/bridge/analogix_dp.h index 9a207f8..f317003 100644 --- a/include/drm/bridge/analogix_dp.h +++ b/include/drm/bridge/analogix_dp.h @@ -3,7 +3,13 @@ #include +enum analogix_dp_devtype { + EXYNOS_DP, + RK3288_DP, +}; + struct analogix_dp_plat_data { + enum analogix_dp_devtype dev_type; struct drm_panel *panel; int (*power_on)(struct analogix_dp_plat_data *);