From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752406AbbCJJnp (ORCPT ); Tue, 10 Mar 2015 05:43:45 -0400 Received: from gloria.sntech.de ([95.129.55.99]:38920 "EHLO gloria.sntech.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751501AbbCJJnl convert rfc822-to-8bit (ORCPT ); Tue, 10 Mar 2015 05:43:41 -0400 From: Heiko Stuebner To: Philipp Zabel Cc: David Airlie , djkurtz@chromium.org, Yakir Yang , Fabio Estevam , dianders@chromium.org, Andy Yan , Mark Yao , linux-rockchip@lists.infradead.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, broonie@kernel.org, devicetree@vger.kernel.org, Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH 2/3] drm/bridge: dw-hdmi: support optional supply regulators Date: Tue, 10 Mar 2015 10:43:37 +0100 Message-ID: <79223422.KFbmI1BzE4@phil> User-Agent: KMail/4.14.1 (Linux/3.19.0+; KDE/4.14.2; x86_64; ; ) In-Reply-To: <1425979013.3141.17.camel@pengutronix.de> References: <1429128.MSqYm0qZ9p@phil> <2297963.iMSNqyfSUx@phil> <1425979013.3141.17.camel@pengutronix.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8BIT Content-Type: text/plain; charset="iso-8859-1" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Philipp, Am Dienstag, 10. März 2015, 10:16:53 schrieb Philipp Zabel: [cut the obvious stuff I need to fix] > Am Dienstag, den 10.03.2015, 00:22 +0100 schrieb Heiko Stuebner: > > @@ -879,6 +883,12 @@ static int dw_hdmi_phy_init(struct dw_hdmi *hdmi) > > > > int i, ret; > > bool cscon = false; > > > > + if (hdmi->nsupplies > 0) { > > + ret = regulator_bulk_enable(hdmi->nsupplies, hdmi->supplies); > > + if (ret) > > + return ret; > > + } > > + > > Are these really supplies to the PHY or is this just a convenient place > to enable them? Looking at the i.MX6 docs, I suppose yes. According to the TRM, the supplies are "DC supply voltage for Analog part of HDMI", so I'd think phy supplies. > > > /*check csc whether needed activated in HDMI mode */ > > cscon = (is_color_space_conversion(hdmi) && > > > > !hdmi->hdmi_data.video_mode.mdvi); > > > > @@ -1105,6 +1115,9 @@ static void dw_hdmi_phy_disable(struct dw_hdmi > > *hdmi) > > > > dw_hdmi_phy_enable_tmds(hdmi, 0); > > dw_hdmi_phy_enable_power(hdmi, 0); > > > > + if (hdmi->nsupplies > 0) > > + regulator_bulk_disable(hdmi->nsupplies, hdmi->supplies); > > + > > > > hdmi->phy_enabled = false; > > > > } > > > > @@ -1549,7 +1562,8 @@ static int dw_hdmi_register(struct drm_device *drm, > > struct dw_hdmi *hdmi)> > > int dw_hdmi_bind(struct device *dev, struct device *master, > > > > void *data, struct drm_encoder *encoder, > > struct resource *iores, int irq, > > > > - const struct dw_hdmi_plat_data *plat_data) > > + const struct dw_hdmi_plat_data *plat_data, > > + struct regulator_bulk_data *supplies, int nsupplies) > > I'm not sure I like this function sprouting so many parameters. Is there > a good reason not to add this to struct dw_hdmi_plat_data? Nope, moving this to platdata sound sensible and I'll give this a try :-) Heiko