Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759404AbbFBPZo (ORCPT ); Tue, 2 Jun 2015 11:25:44 -0400 Received: from ns.mm-sol.com ([37.157.136.199]:43900 "EHLO extserv.mm-sol.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753464AbbFBPZg (ORCPT ); Tue, 2 Jun 2015 11:25:36 -0400 Message-ID: <1433258732.6844.28.camel@mm-sol.com> Subject: Re: [PATCH v2] drm/msm/hdmi: Use pinctrl in HDMI driver From: "Ivan T. Ivanov" To: =?ISO-8859-1?Q?=22St=E9phane?= "Viau\"" Cc: dri-devel@lists.freedesktop.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, robdclark@gmail.com Date: Tue, 02 Jun 2015 18:25:32 +0300 In-Reply-To: References: <1433190528-30026-1-git-send-email-sviau@codeaurora.org> <1433228366.6844.18.camel@mm-sol.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.13.7-fta1.2~trusty Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2588 Lines: 68 On Tue, 2015-06-02 at 10:12 -0500, "Stéphane 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 configure > > > 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 [Ivan] > > > - Use pinctrl framework's PINCTRL_STATE_DEFAULT/SLEEP states [Ivan] > > > > > > > > > > > > static int hdmi_bind(struct device *dev, struct device *master, void > > > *data) > > > @@ -365,6 +379,7 @@ static int hdmi_bind(struct device *dev, struct > > > device *master, void *data) > > > #ifdef CONFIG_OF > > > struct device_node *of_node = dev->of_node; > > > const struct of_device_id *match; > > > + struct pinctrl *pinctrl; > > > > > > match = of_match_node(dt_match, of_node); > > > if (match && match->data) { > > > @@ -383,6 +398,18 @@ static int hdmi_bind(struct device *dev, struct > > > device *master, void *data) > > > hdmi_cfg->mux_sel_gpio = get_gpio(dev, of_node, > > > "qcom,hdmi-tx-mux-sel"); > > > hdmi_cfg->mux_lpm_gpio = get_gpio(dev, of_node, > > > "qcom,hdmi-tx-mux-lpm"); > > > > > > + /* not all targets have pinctrl, do not fail in case of error: > > > */ > > > + pinctrl = 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 (eg: > HPD, DDC, CEC..). > > Each of this HW sub-sections of the controller are driven by a different > "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 pins > binding (v3 to follow). v3? Why we need a patch if we already have required support? Regards, Ivan -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/