Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp258520ybn; Thu, 3 Oct 2019 04:47:31 -0700 (PDT) X-Google-Smtp-Source: APXvYqz2wF3xhUxANq4/K1tYMC4VVPFMhF5hwIL9ixnsuRWiFH3HPqPEOUgoRLxzH+cdinX4SMaY X-Received: by 2002:a50:d718:: with SMTP id t24mr8857840edi.168.1570103251821; Thu, 03 Oct 2019 04:47:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570103251; cv=none; d=google.com; s=arc-20160816; b=hyoVXReU/B2fA/kPXJ2xloMY5HiIIV64mZBs9l9mjQI4fk3k2cn7pnIJAFuLj2NMHZ CVurFrVxOoBNugkPvjoGWkP6r3MqZAodBZ9CssqHByezvrlu1DJyIoT/ru9QWi0koBic ww5DhrSgY5zkggRZjdFR9fPTvDov11jnx/eHp+gA0pChrJ9gk3TgDnqzSJtqH7YoSNOU YxBp+Ti7xUZRL1mg9fkkt9GpzNypsMNnxsdvuDKWP7jgBwxAjdKojhB8L8LQ9gghHsqD CrSaf6hxwaWr3Uyc4qwFVRS9M2dzFyJ0ILebTVJYHQIbi3C3bKc7AxFNmlT/Arrc1VrP YqDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=VGqB+f1MbaCDlXy9t/YCSNO7bxh6+ijWCVJmfaBfAl0=; b=jP/Q0yiC9eEui/dsblkiiWhkSvuhIFuqWbmqxrKEdkHDTVqmI0c/gtdRGYfObgyvCN +DPwEmegDtXznGR1T5KQpQPpkmfueHcSyhdEo1rSfvp2MjnHq7rPZziWVfFqaOOcF+CH RruprIsu+2Rm0p7lGixDhWoDOSSnAiVvsFTKbI24G6kJrQU6JkDr4+pzN/+unvG14hcM 9lOvFHl6u69GiG8c5tgyjD7gTka+Vay8kguQPgBtqltYtzr7qJfzL+nKxYV1dt524Skf 1dTCbid8WOnBVwzS8vm0J97dlWAZaE0H0yW/2FHTdCjKxYPRSU7HOrcarMvrNrl1/pGp hkNQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Fk9TfOQd; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v39si1345269edc.234.2019.10.03.04.47.06; Thu, 03 Oct 2019 04:47:31 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Fk9TfOQd; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730060AbfJCLql (ORCPT + 99 others); Thu, 3 Oct 2019 07:46:41 -0400 Received: from mail.kernel.org ([198.145.29.99]:34634 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729823AbfJCLql (ORCPT ); Thu, 3 Oct 2019 07:46:41 -0400 Received: from localhost (lfbn-1-10718-76.w90-89.abo.wanadoo.fr [90.89.68.76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 219D02070B; Thu, 3 Oct 2019 11:46:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1570103199; bh=rZXyTCe8Ve7vHC9DAOD50UwJrWsPWN27OLElnsbF2ak=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Fk9TfOQdKkrfXA+BV72LZAo2ee2u/I18By1yu0xrL3XqvxyZjSzev1gLHO9UUztUu 6NIe7cp3hszcjq6mMOIgl4++kDKGi7oJEcY1Iy7Fx2FawPbfs9RVn3LDu2TFYf1Ky8 j0SbtjERUcdTGZg6ppk9VV0F1amb0UDG6Ku7c2RQ= Date: Thu, 3 Oct 2019 13:46:37 +0200 From: Maxime Ripard To: Jagan Teki Cc: Chen-Yu Tsai , David Airlie , Daniel Vetter , Michael Trimarchi , Icenowy Zheng , linux-sunxi , dri-devel , linux-arm-kernel , linux-kernel , devicetree Subject: Re: [PATCH v11 5/7] drm/sun4i: sun6i_mipi_dsi: Add VCC-DSI regulator support Message-ID: <20191003114637.qd723p4jviwbns26@gilmour> References: <20191003064527.15128-1-jagan@amarulasolutions.com> <20191003064527.15128-6-jagan@amarulasolutions.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="sioambykdk554e5i" Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --sioambykdk554e5i Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Oct 03, 2019 at 12:31:31PM +0530, Jagan Teki wrote: > On Thu, Oct 3, 2019 at 12:26 PM Chen-Yu Tsai wrote: > > > > On Thu, Oct 3, 2019 at 2:46 PM Jagan Teki wrote: > > > > > > Allwinner MIPI DSI controllers are supplied with SoC > > > DSI power rails via VCC-DSI pin. > > > > > > Add support for this supply pin by adding voltage > > > regulator handling code to MIPI DSI driver. > > > > > > Tested-by: Merlijn Wajer > > > Signed-off-by: Jagan Teki > > > --- > > > drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c | 14 ++++++++++++++ > > > drivers/gpu/drm/sun4i/sun6i_mipi_dsi.h | 2 ++ > > > 2 files changed, 16 insertions(+) > > > > > > diff --git a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c > > > index 446dc56cc44b..fe9a3667f3a1 100644 > > > --- a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c > > > +++ b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c > > > @@ -1110,6 +1110,12 @@ static int sun6i_dsi_probe(struct platform_device *pdev) > > > return PTR_ERR(base); > > > } > > > > > > + dsi->regulator = devm_regulator_get(dev, "vcc-dsi"); > > > + if (IS_ERR(dsi->regulator)) { > > > + dev_err(dev, "Couldn't get VCC-DSI supply\n"); > > > + return PTR_ERR(dsi->regulator); > > > + } > > > + > > > dsi->regs = devm_regmap_init_mmio_clk(dev, "bus", base, > > > &sun6i_dsi_regmap_config); > > > if (IS_ERR(dsi->regs)) { > > > @@ -1183,6 +1189,13 @@ static int sun6i_dsi_remove(struct platform_device *pdev) > > > static int __maybe_unused sun6i_dsi_runtime_resume(struct device *dev) > > > { > > > struct sun6i_dsi *dsi = dev_get_drvdata(dev); > > > + int err; > > > + > > > + err = regulator_enable(dsi->regulator); > > > + if (err) { > > > + dev_err(dsi->dev, "failed to enable VCC-DSI supply: %d\n", err); > > > + return err; > > > + } > > > > > > reset_control_deassert(dsi->reset); > > > clk_prepare_enable(dsi->mod_clk); > > > @@ -1215,6 +1228,7 @@ static int __maybe_unused sun6i_dsi_runtime_suspend(struct device *dev) > > > > > > clk_disable_unprepare(dsi->mod_clk); > > > reset_control_assert(dsi->reset); > > > + regulator_disable(dsi->regulator); > > > > > > return 0; > > > } > > > diff --git a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.h b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.h > > > index 5c3ad5be0690..a01d44e9e461 100644 > > > --- a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.h > > > +++ b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.h > > > @@ -12,6 +12,7 @@ > > > #include > > > #include > > > #include > > > +#include > > > > You don't need to include the header file since you are only > > including a pointer to the struct, and nothing else. > > Yes, make sense. I will drop it. > > > > > Otherwise, > > > > Reviewed-by: Chen-Yu Tsai > > thanks. I've moved the include to the driver that was lacking it while applying, thanks! Maxime --sioambykdk554e5i Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRcEzekXsqa64kGDp7j7w1vZxhRxQUCXZXfnQAKCRDj7w1vZxhR xdo1AP9qbRxlDAMsATrfD1TcpRGv8AL/+bvjh0JOK0bF9TnEsAD/cPQeOM7j0eND SGuUJnDS/wwejedPPPjCzS3+gawyeQo= =fbpL -----END PGP SIGNATURE----- --sioambykdk554e5i--