From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?iso-8859-1?Q?=22St=E9phane_Viau=22?= Subject: Re: [PATCH v2] drm/msm/hdmi: Use pinctrl in HDMI driver Date: Tue, 2 Jun 2015 10:42:43 -0500 Message-ID: <47f871d505975cab42fe2a32d18cf3b9.squirrel@www.codeaurora.org> References: <1433190528-30026-1-git-send-email-sviau@codeaurora.org> <1433228366.6844.18.camel@mm-sol.com> <1433258732.6844.28.camel@mm-sol.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: Received: from smtp.codeaurora.org ([198.145.29.96]:50708 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758948AbbFBPmo (ORCPT ); Tue, 2 Jun 2015 11:42:44 -0400 In-Reply-To: <1433258732.6844.28.camel@mm-sol.com> Sender: linux-arm-msm-owner@vger.kernel.org List-Id: linux-arm-msm@vger.kernel.org To: "Ivan T. Ivanov" Cc: =?iso-8859-1?Q?=22St=E9phane_Viau=22?= , dri-devel@lists.freedesktop.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, robdclark@gmail.com > > On Tue, 2015-06-02 at 10:12 -0500, "St=C3=A9phane Viau" wrote: >> Hi Ivan, >> >> > Hi Stephane, >> > >> > On Mon, 2015-06-01 at 16:28 -0400, Stephane Viau wrote: >> > > Some targets (eg: msm8994) use the pinctrl framework to configur= e >> > > interface pins. This change adds support for initialization and >> > > pinctrl active/sleep state control for the HDMI driver. >> > > >> > > Signed-off-by: Stephane Viau >> > > --- >> > > v2: >> > > - Add devicetree binding documentation for pinctrl property [Iv= an] >> > > - Use pinctrl framework's PINCTRL_STATE_DEFAULT/SLEEP states [Iv= an] >> > > >> > >> > >> > >> > > static int hdmi_bind(struct device *dev, struct device *master, >> void >> > > *data) >> > > @@ -365,6 +379,7 @@ static int hdmi_bind(struct device *dev, str= uct >> > > device *master, void *data) >> > > #ifdef CONFIG_OF >> > > struct device_node *of_node =3D dev->of_node; >> > > const struct of_device_id *match; >> > > + struct pinctrl *pinctrl; >> > > >> > > match =3D of_match_node(dt_match, of_node); >> > > if (match && match->data) { >> > > @@ -383,6 +398,18 @@ static int hdmi_bind(struct device *dev, st= ruct >> > > device *master, void *data) >> > > hdmi_cfg->mux_sel_gpio =3D get_gpio(dev, of_node, >> > > "qcom,hdmi-tx-mux-sel"); >> > > hdmi_cfg->mux_lpm_gpio =3D get_gpio(dev, of_node, >> > > "qcom,hdmi-tx-mux-lpm"); >> > > >> > > + /* not all targets have pinctrl, do not fail in case of >> error: >> > > */ >> > > + pinctrl =3D devm_pinctrl_get(dev); >> > >> > Probably I have to be more explicit. Why not using pins binding >> handled in >> > driver >> > really_probe()? I have to admit that I am not familiar with DRM >> subsystem. >> >> This would work, indeed, for default/sleep/idle states. >> >> I actually had in mind that we'd need to keep track of HDMI pinctrl >> states >> because we may need to add a couple more in the near future in order= to >> independently enable/disable certain parts of the HDMI controller (e= g: >> HPD, DDC, CEC..). >> >> Each of this HW sub-sections of the controller are driven by a diffe= rent >> "pin" in the downstream driver... But since this is nowhere close to >> being >> upstream-ed yet, I'll go ahead with your idea of using the common pi= ns >> binding (v3 to follow). > > v3? Why we need a patch if we already have required support? To actually call pinctrl_pm_select_default/sleep_state() from the drm/msm/hdmi driver (in hdp_enable/disable() functions). Stephane. > > Regards, > Ivan > > -- > To unsubscribe from this list: send the line "unsubscribe linux-arm-m= sm" > in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > --=20 Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of the Code Aurora For= um, a Linux Foundation Collaborative Project