From patchwork Mon Feb 5 14:34:30 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiko Stuebner X-Patchwork-Id: 10200519 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id F2753601A1 for ; Mon, 5 Feb 2018 14:37:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D86C12858B for ; Mon, 5 Feb 2018 14:37:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CD10A28764; Mon, 5 Feb 2018 14:37:10 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 4916B2858B for ; Mon, 5 Feb 2018 14:37:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=XwVkU4nPdMV9WG1UPU7r4jikoKXx+7PJM4/hcjCIDEU=; b=TYi3Q8Ph+hEDW21pgnrUhObDFO VtZj/MmWY9WKUacVmnNxEpZLkE2FuDrj4IOZfdwatU7y95f/O2t1S9Y2SrzyRvgUSMjNW8HV3YDtL f6i6lAURGEXz/eGCLw5m1g65s8ZLfKDWqMOkukJJlxPuhkRpW4q5vuRQC4T62ngD/3ahFCR078J5U fGbOlnG+G3IOJqt8BiIRI9thov/iLtJlMuYjCvDD+uPtoXRbxhJC2doJUp/wggjAjsInzJuT5xmpP THQQscW9fmyx5pHLIMt2o8MoBhy1HnXDMACM3S4StM3soFIDqUOiadVgYUlGODrDNISPf8MxXs6F2 EZe5efwQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1eihtL-00021z-7m; Mon, 05 Feb 2018 14:37:07 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1eihro-0000EV-VC; Mon, 05 Feb 2018 14:35:32 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=4T0pBx5X+CZhFprwMZucGj2a+sNabLaK266tZpau5+w=; b=C9kX9ulMYLVUq1nEvQLhiJGu+ m8/zeeRscF3vCVEbwYfNoffBlLsx73/2/S1nuWHZRTvCVDhhJgOoja3FWL9winx+IgP3+lKi92DMJ PWUZzN7IKm7IvmPD0goU54SDEUmbO7ElfniROMPXyatbH38pZoLkZIizComVQ/ZcsxOpQFeMeHVjm 1qrsfX1cTwwYLc5K62DFmvTT7YZ3jBafMxaZsD0iF3WtcNxxAicrQvlmUUsYiEbSBGmB5bSbj0Td1 qFSDKbjhCwgWloNWWJOV0orToOTn+CxYEmXn1YoLD5b04d666lET4IUFm6OEjD32wYvpF+b56jzX/ KLhT1+94A==; Received: from gloria.sntech.de ([95.129.55.99]) by casper.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1eihrl-0003Cb-Iy; Mon, 05 Feb 2018 14:35:31 +0000 Received: from ip9234b6d7.dynamic.kabel-deutschland.de ([146.52.182.215] helo=phil.fritz.box) by gloria.sntech.de with esmtpsa (TLS1.1:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1eihrD-0005IM-8m; Mon, 05 Feb 2018 15:34:55 +0100 From: Heiko Stuebner To: hjc@rock-chips.com, architt@codeaurora.org, a.hajda@samsung.com, kishon@ti.com Subject: [PATCH 4/9] drm/bridge: dw-hdmi: export hotplug functions Date: Mon, 5 Feb 2018 15:34:30 +0100 Message-Id: <20180205143435.4723-5-heiko@sntech.de> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20180205143435.4723-1-heiko@sntech.de> References: <20180205143435.4723-1-heiko@sntech.de> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180205_143529_650037_3047F0DD X-CRM114-Status: UNSURE ( 9.14 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mark.rutland@arm.com, Jose.Abreu@synopsys.com, algea.cao@rock-chips.com, Heiko Stuebner , devicetree@vger.kernel.org, airlied@linux.ie, dri-devel@lists.freedesktop.org, linux-rockchip@lists.infradead.org, robh+dt@kernel.org, Laurent.pinchart@ideasonboard.com, linux-arm-kernel@lists.infradead.org, zhengyang@rock-chips.com MIME-Version: 1.0 Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Algea Cao External phys may not provide their own hotplug-related routines but instead rely on the dw-hdmi ones. Export these functions so that external hdmi-phys can use them if necessary. Signed-off-by: Algea Cao [export all 3 hotplug-related functions] Signed-off-by: Heiko Stuebner --- drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 11 +++++++---- include/drm/bridge/dw_hdmi.h | 6 +++++- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c index 7255fafce089..2760e1b51422 100644 --- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c +++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c @@ -1251,14 +1251,15 @@ static void dw_hdmi_phy_disable(struct dw_hdmi *hdmi, void *data) dw_hdmi_phy_power_off(hdmi); } -static enum drm_connector_status dw_hdmi_phy_read_hpd(struct dw_hdmi *hdmi, - void *data) +enum drm_connector_status dw_hdmi_phy_read_hpd(struct dw_hdmi *hdmi, + void *data) { return hdmi_readb(hdmi, HDMI_PHY_STAT0) & HDMI_PHY_HPD ? connector_status_connected : connector_status_disconnected; } +EXPORT_SYMBOL_GPL(dw_hdmi_phy_read_hpd); -static void dw_hdmi_phy_update_hpd(struct dw_hdmi *hdmi, void *data, +void dw_hdmi_phy_update_hpd(struct dw_hdmi *hdmi, void *data, bool force, bool disabled, bool rxsense) { u8 old_mask = hdmi->phy_mask; @@ -1271,8 +1272,9 @@ static void dw_hdmi_phy_update_hpd(struct dw_hdmi *hdmi, void *data, if (old_mask != hdmi->phy_mask) hdmi_writeb(hdmi, hdmi->phy_mask, HDMI_PHY_MASK0); } +EXPORT_SYMBOL_GPL(dw_hdmi_phy_update_hpd); -static void dw_hdmi_phy_setup_hpd(struct dw_hdmi *hdmi, void *data) +void dw_hdmi_phy_setup_hpd(struct dw_hdmi *hdmi, void *data) { /* * Configure the PHY RX SENSE and HPD interrupts polarities and clear @@ -1291,6 +1293,7 @@ static void dw_hdmi_phy_setup_hpd(struct dw_hdmi *hdmi, void *data) hdmi_writeb(hdmi, ~(HDMI_IH_PHY_STAT0_HPD | HDMI_IH_PHY_STAT0_RX_SENSE), HDMI_IH_MUTE_PHY_STAT0); } +EXPORT_SYMBOL_GPL(dw_hdmi_phy_setup_hpd); static const struct dw_hdmi_phy_ops dw_hdmi_synopsys_phy_ops = { .init = dw_hdmi_phy_init, diff --git a/include/drm/bridge/dw_hdmi.h b/include/drm/bridge/dw_hdmi.h index c5bc2804b29e..d9d7c75b3bfb 100644 --- a/include/drm/bridge/dw_hdmi.h +++ b/include/drm/bridge/dw_hdmi.h @@ -152,7 +152,11 @@ int dw_hdmi_bind(struct platform_device *pdev, struct drm_encoder *encoder, const struct dw_hdmi_plat_data *plat_data); void dw_hdmi_setup_rx_sense(struct device *dev, bool hpd, bool rx_sense); - +enum drm_connector_status dw_hdmi_phy_read_hpd(struct dw_hdmi *hdmi, + void *data); +void dw_hdmi_phy_update_hpd(struct dw_hdmi *hdmi, void *data, + bool force, bool disabled, bool rxsense); +void dw_hdmi_phy_setup_hpd(struct dw_hdmi *hdmi, void *data); void dw_hdmi_set_sample_rate(struct dw_hdmi *hdmi, unsigned int rate); void dw_hdmi_audio_enable(struct dw_hdmi *hdmi); void dw_hdmi_audio_disable(struct dw_hdmi *hdmi);