Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S936032AbdGTMqX (ORCPT ); Thu, 20 Jul 2017 08:46:23 -0400 Received: from metis.ext.4.pengutronix.de ([92.198.50.35]:49491 "EHLO metis.ext.4.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933994AbdGTMqV (ORCPT ); Thu, 20 Jul 2017 08:46:21 -0400 Message-ID: <1500554773.2354.67.camel@pengutronix.de> Subject: Re: [PATCH v2 3/3] drm/bridge/synopsys: dsi: explicitly request exclusive reset control From: Philipp Zabel To: Philippe CORNU Cc: Archit Taneja , Andrzej Hajda , Laurent Pinchart , David Airlie , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Yannick Fertre , Benjamin Gaignard , Vincent Abriou , Alexandre Torgue , Maxime Coquelin , Gabriel Fernandez , Ludovic Barre , Fabien Dessenne , Mickael Reulier Date: Thu, 20 Jul 2017 14:46:13 +0200 In-Reply-To: <1500553185-30077-4-git-send-email-philippe.cornu@st.com> References: <1500553185-30077-1-git-send-email-philippe.cornu@st.com> <1500553185-30077-4-git-send-email-philippe.cornu@st.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.12.9-1+b1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-SA-Exim-Connect-IP: 2001:67c:670:100:3ad5:47ff:feaf:1a17 X-SA-Exim-Mail-From: p.zabel@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2102 Lines: 58 Hi Philippe, On Thu, 2017-07-20 at 14:19 +0200, Philippe CORNU wrote: > Based on patch "Convert drivers to explicit reset API" from Philipp Zabel > > Commit a53e35db70d1 ("reset: Ensure drivers are explicit when requesting > reset lines") started to transition the reset control request API calls > to explicitly state whether the driver needs exclusive or shared reset > control behavior. Convert all drivers requesting exclusive resets to the > explicit API call so the temporary transition helpers can be removed. > > No functional changes. > > Cc: Philipp Zabel > Signed-off-by: Philippe CORNU This reset control indeed has to be exclusive, as the driver depends on the reset assertion to have an effect. Acked-by: Philipp Zabel Again, the reset seems to be optional, though. I would suggest to change this as follows: > --- > drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c b/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c > index 781340d..bb0bfa8 100644 > --- a/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c > +++ b/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c > @@ -885,7 +885,7 @@ static int dw_mipi_dsi_bridge_attach(struct drm_bridge *bridge) > * Note that the reset was not defined in the initial device tree, so > * we have to be prepared for it not being found. > */ > - apb_rst = devm_reset_control_get(dev, "apb"); > + apb_rst = devm_reset_control_get_exclusive(dev, "apb"); > if (IS_ERR(apb_rst)) { > ret = PTR_ERR(apb_rst); > if (ret == -ENOENT) { - apb_rst = devm_reset_control_get(dev, "apb"); + apb_rst = devm_reset_control_get_optional_exclusive(dev, "apb"); if (IS_ERR(apb_rst)) { ret = PTR_ERR(apb_rst); - if (ret == -ENOENT) { - apb_rst = NULL; - } else { - dev_err(dev, "Unable to get reset control: %d\n", ret); - return ERR_PTR(ret); - } + dev_err(dev, "Unable to get reset control: %d\n", ret); + return ERR_PTR(ret); } regards Philipp