Received: by 10.192.165.156 with SMTP id m28csp569922imm; Thu, 19 Apr 2018 04:03:51 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/O65g8K9fM/zjyvuh41XM9KL77cQfUxwlSFT4mHvbn+C6+M5p45+NTlMx3d8MEG8YCefRq X-Received: by 10.167.130.209 with SMTP id f17mr5403125pfn.161.1524135831456; Thu, 19 Apr 2018 04:03:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524135831; cv=none; d=google.com; s=arc-20160816; b=gr9v1e9Mcb0Wt/lreDODei4Z6btJc+N8ZwJMMs1oQpIbWydpFvI3gG/M3yM3nKAvp6 c2zW0p4uWeGfdompXFsL+ZPsC5se6pCcstBqoYD6oWCpvWruu4JNzPiKm9KNuhaErE5V LuSUotCJ+rhaWlkzwWpn02aJYg5aOy2493MbjtI9vR1EUCW5zQG3Q/0DGf1hu8xS1fzJ YPe9oqkzcrn6PG5LcWn8Mhj0iIWihQEXQ/hF2ssIbt7KgEdi6sB+5lYfBrp7eDi3kQpR 7PoqIaVOX5RRvCj0wBu+/YSqTIozvV0pxrEuDQHYF8LDMn+RvARVIegfiEN1x8tdLQoF m2Og== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:organization:message-id:date:subject:cc:to :from:dkim-signature:arc-authentication-results; bh=VSz+WzminHdxUfhTSJh1wy0yt1C1nsSEDolVLZzkptE=; b=AMnV1dqDVu0kG2TpT4P3eVox+a2iR6PSJIcKZE5OgMwpUdDas1cunpO90yykShZ7MC Bg1v4odlrkUosUpqN6fsMTcs3BA1fFBdFBJDm90jX9qNjIYGDqtTfx9ltXmyKlBEYKXV gemVynnaR4WVM7Whyv32jikY13MZL5A/XFvWBPHdi1ijKxn1T+wpOCXpalyk6m+I+D+z qE1FK4xh8E6Xvo/7JlZJo1McO3I7NyJ83bxXKKXNYrqIDssGROYBDUWWS3cO8oWqMjBG hTQowR1HF3+pPn5+JLsyzsgWFmHkdG2TeISC6jX6ZKVsUOLyMY+JtI0tbKTSmg0DIvju GH1w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=cuz+Li38; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t25si2652169pge.26.2018.04.19.04.03.37; Thu, 19 Apr 2018 04:03:51 -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 (test mode) header.i=@ideasonboard.com header.s=mail header.b=cuz+Li38; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752838AbeDSLAl (ORCPT + 99 others); Thu, 19 Apr 2018 07:00:41 -0400 Received: from perceval.ideasonboard.com ([213.167.242.64]:34934 "EHLO perceval.ideasonboard.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752686AbeDSLAk (ORCPT ); Thu, 19 Apr 2018 07:00:40 -0400 Received: from avalon.localnet (dfj612ybrt5fhg77mgycy-3.rev.dnainternet.fi [IPv6:2001:14ba:21f5:5b00:2e86:4862:ef6a:2804]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 10E695FF6; Thu, 19 Apr 2018 13:00:37 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1524135637; bh=uccImB74cGSHTKvsOOyggvqYnaV3GZTiOw74nZR+yq8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cuz+Li38jWD3l+unT8eEb52gUZKJ8S1paSixiHHB6VqyLnlKlYOHycx9pggGS4PK3 8AmsyRqJJBwUzyAXOvVKOwiijihBRN1/hWym8cAbA5V0XTtvCTIWzfUJVX7OnDtp/a /TU15riAC7nFiNYUMn03qQx5cbshzN3H/hXg/eQ8= From: Laurent Pinchart To: Philippe CORNU Cc: Archit Taneja , Andrzej Hajda , David Airlie , Rob Herring , Mark Rutland , "dri-devel@lists.freedesktop.org" , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Yannick FERTRE , Benjamin Gaignard , Alexandre TORGUE Subject: Re: [PATCH 2/2] drm/bridge: sii902x: add optional power supplies Date: Thu, 19 Apr 2018 14:00:47 +0300 Message-ID: <2003583.WmldKZVqDK@avalon> Organization: Ideas on Board Oy In-Reply-To: References: <20180410051927.8268-1-philippe.cornu@st.com> <3775994.jviQhGlOpf@avalon> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Philippe, On Thursday, 19 April 2018 12:46:31 EEST Philippe CORNU wrote: > On 04/19/2018 10:20 AM, Laurent Pinchart wrote: > > On Tuesday, 10 April 2018 08:19:27 EEST Philippe Cornu wrote: > > > >> Add the 3 optional power supplies using the exact description > >> found in the document named > >> "SiI9022A/SiI9024A HDMI Transmitter Data Sheet (August 2016)". > >> > >> Signed-off-by: Philippe Cornu > >> --- > >> drivers/gpu/drm/bridge/sii902x.c | 39 +++++++++++++++++++++++++++++++---- > >> 1 file changed, 35 insertions(+), 4 deletions(-) > >> > >> diff --git a/drivers/gpu/drm/bridge/sii902x.c > >> b/drivers/gpu/drm/bridge/sii902x.c index 60373d7eb220..e17ba6db1ec8 > >> 100644 > >> --- a/drivers/gpu/drm/bridge/sii902x.c > >> +++ b/drivers/gpu/drm/bridge/sii902x.c [snip] > >> @@ -443,6 +471,9 @@ static int sii902x_remove(struct i2c_client *client) > >> > >> drm_bridge_remove(&sii902x->bridge); > >> > >> + regulator_bulk_disable(ARRAY_SIZE(sii902x->supplies), > >> + sii902x->supplies); > >> + > > > > While this seems functionally correct, would it be useful to only enable > > power supplies when needed to save power ? > that is a good point. I do not know well (yet) this bridge. Maybe I can > add a 3rd patch with bridge pre_enable() and post_disable() containing > reset & supplies management. Or I can put reset&supplies in bridge > enable() & disable() but it could be a little messy. > > Any opinion/advice? I'm not familiar with this bridge yet, so we need to be careful. The first point you need to check is the hardware requirements regarding power supply sequencing. For instance could it damage the chip if the I/O supply is turned off while the I/O pins are externally driven ? Can the core supplies be turned off with the I/O supply on ? Then, based on the hardware limitations, you should pick the appropriate location for power handling. > >> return 0; > >> } -- Regards, Laurent Pinchart