devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Neil Armstrong <narmstrong@baylibre.com>
To: "Jernej Škrabec" <jernej.skrabec@siol.net>
Cc: maxime.ripard@free-electrons.com, airlied@linux.ie,
	robh+dt@kernel.org, mark.rutland@arm.com, wens@csie.org,
	architt@codeaurora.org, a.hajda@samsung.com,
	Laurent.pinchart@ideasonboard.com, mturquette@baylibre.com,
	sboyd@codeaurora.org, Jose.Abreu@synopsys.com,
	dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org,
	linux-sunxi@googlegroups.com
Subject: Re: [PATCH v2 04/12] drm/bridge/synopsys: dw-hdmi: Export some PHY related functions
Date: Mon, 15 Jan 2018 16:13:22 +0100	[thread overview]
Message-ID: <3ea0c21c-0ab4-651e-3779-abdc71dcb599@baylibre.com> (raw)
In-Reply-To: <2850049.ORu4oj41BJ@jernej-laptop>

On 12/01/2018 21:42, Jernej Škrabec wrote:
> Hi all,
> 
> Dne sreda, 10. januar 2018 ob 20:25:04 CET je Jernej Skrabec napisal(a):
>> Parts of PHY code could be useful also for custom PHYs. For example,
>> Allwinner A83T has custom PHY which is probably Synopsys gen2 PHY
>> with few additional memory mapped registers, so most of the Synopsys PHY
>> related code could be reused.
>>
>> Functions exported here are actually not specific to Synopsys PHYs but
>> to DWC HDMI controller PHY interface. This means that even if the PHY is
>> completely custom, i.e. not designed by Synopsys, exported functions can
>> be useful.
>>
>> Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
>> ---
>>  drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 44
>> +++++++++++++++++++++---------- include/drm/bridge/dw_hdmi.h              |
>> 11 ++++++++
>>  2 files changed, 41 insertions(+), 14 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
>> b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c index
>> 7ca14d7325b5..7d80f4b56683 100644
>> --- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
>> +++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
>> @@ -1037,19 +1037,21 @@ static void dw_hdmi_phy_enable_svsret(struct dw_hdmi
>> *hdmi, u8 enable) HDMI_PHY_CONF0_SVSRET_MASK);
>>  }
>>
>> -static void dw_hdmi_phy_gen2_pddq(struct dw_hdmi *hdmi, u8 enable)
>> +void dw_hdmi_phy_gen2_pddq(struct dw_hdmi *hdmi, u8 enable)
>>  {
>>  	hdmi_mask_writeb(hdmi, enable, HDMI_PHY_CONF0,
>>  			 HDMI_PHY_CONF0_GEN2_PDDQ_OFFSET,
>>  			 HDMI_PHY_CONF0_GEN2_PDDQ_MASK);
>>  }
>> +EXPORT_SYMBOL_GPL(dw_hdmi_phy_gen2_pddq);
>>
>> -static void dw_hdmi_phy_gen2_txpwron(struct dw_hdmi *hdmi, u8 enable)
>> +void dw_hdmi_phy_gen2_txpwron(struct dw_hdmi *hdmi, u8 enable)
>>  {
>>  	hdmi_mask_writeb(hdmi, enable, HDMI_PHY_CONF0,
>>  			 HDMI_PHY_CONF0_GEN2_TXPWRON_OFFSET,
>>  			 HDMI_PHY_CONF0_GEN2_TXPWRON_MASK);
>>  }
>> +EXPORT_SYMBOL_GPL(dw_hdmi_phy_gen2_txpwron);
>>
>>  static void dw_hdmi_phy_sel_data_en_pol(struct dw_hdmi *hdmi, u8 enable)
>>  {
>> @@ -1065,6 +1067,22 @@ static void dw_hdmi_phy_sel_interface_control(struct
>> dw_hdmi *hdmi, u8 enable) HDMI_PHY_CONF0_SELDIPIF_MASK);
>>  }
>>
>> +void dw_hdmi_phy_reset(struct dw_hdmi *hdmi)
>> +{
>> +	/* PHY reset. The reset signal is active high on Gen2 PHYs. */
>> +	hdmi_writeb(hdmi, HDMI_MC_PHYRSTZ_PHYRSTZ, HDMI_MC_PHYRSTZ);
>> +	hdmi_writeb(hdmi, 0, HDMI_MC_PHYRSTZ);
>> +}
>> +EXPORT_SYMBOL_GPL(dw_hdmi_phy_reset);
> 
> I just noticed that meson dw hdmi driver uses function with the same name, 
> which break compilation. Is it ok if I rename meson specific reset to 
> meson_dw_hdmi_phy_reset()?

Hi Jernej,

Yes,

Neil

> 
> Best regards,
> Jernej
> 
[...]

  reply	other threads:[~2018-01-15 15:13 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-10 19:25 [PATCH v2 00/12] drm/sun4i: Add A83T HDMI support Jernej Skrabec
     [not found] ` <20180110192512.19684-1-jernej.skrabec-gGgVlfcn5nU@public.gmane.org>
2018-01-10 19:25   ` [PATCH v2 01/12] clk: sunxi-ng: Mask nkmp factors when setting register Jernej Skrabec
2018-01-10 19:25   ` [PATCH v2 02/12] clk: sunxi-ng: Change formula for NKMP PLLs Jernej Skrabec
2018-01-10 19:25   ` [PATCH v2 03/12] drm/bridge/synopsys: dw-hdmi: Enable workaround for v1.32a Jernej Skrabec
2018-01-10 19:25   ` [PATCH v2 04/12] drm/bridge/synopsys: dw-hdmi: Export some PHY related functions Jernej Skrabec
     [not found]     ` <20180110192512.19684-5-jernej.skrabec-gGgVlfcn5nU@public.gmane.org>
2018-01-12 20:42       ` Jernej Škrabec
2018-01-15 15:13         ` Neil Armstrong [this message]
2018-01-12 23:04       ` Laurent Pinchart
2018-01-10 19:25   ` [PATCH v2 05/12] drm/bridge/synopsys: dw-hdmi: Add deinit callback Jernej Skrabec
2018-01-12  6:12     ` Chen-Yu Tsai
2018-01-10 19:25   ` [PATCH v2 06/12] dt-bindings: display: sun4i-drm: Add A83T HDMI pipeline Jernej Skrabec
2018-01-10 19:25   ` [PATCH v2 07/12] drm/sun4i: Add has_channel_0 TCON quirk Jernej Skrabec
2018-01-11 12:18     ` Maxime Ripard
2018-01-10 19:25   ` [PATCH v2 08/12] drm/sun4i: Add support for A83T second TCON Jernej Skrabec
     [not found]     ` <20180110192512.19684-9-jernej.skrabec-gGgVlfcn5nU@public.gmane.org>
2018-01-11 12:18       ` Maxime Ripard
2018-01-10 19:25   ` [PATCH v2 09/12] drm/sun4i: Add support for A83T second DE2 mixer Jernej Skrabec
2018-01-10 19:25   ` [PATCH v2 10/12] drm/sun4i: Implement A83T HDMI driver Jernej Skrabec
2018-01-10 19:25   ` [PATCH v2 11/12] ARM: dts: sun8i: a83t: Add HDMI display pipeline Jernej Skrabec
2018-01-10 19:25   ` [PATCH v2 12/12] ARM: dts: sun8i: a83t: Enable HDMI on BananaPi M3 Jernej Skrabec

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3ea0c21c-0ab4-651e-3779-abdc71dcb599@baylibre.com \
    --to=narmstrong@baylibre.com \
    --cc=Jose.Abreu@synopsys.com \
    --cc=Laurent.pinchart@ideasonboard.com \
    --cc=a.hajda@samsung.com \
    --cc=airlied@linux.ie \
    --cc=architt@codeaurora.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jernej.skrabec@siol.net \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sunxi@googlegroups.com \
    --cc=mark.rutland@arm.com \
    --cc=maxime.ripard@free-electrons.com \
    --cc=mturquette@baylibre.com \
    --cc=robh+dt@kernel.org \
    --cc=sboyd@codeaurora.org \
    --cc=wens@csie.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).