Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1031978AbbKEJkm (ORCPT ); Thu, 5 Nov 2015 04:40:42 -0500 Received: from metis.ext.4.pengutronix.de ([92.198.50.35]:51272 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1030886AbbKEJkk (ORCPT ); Thu, 5 Nov 2015 04:40:40 -0500 Message-ID: <1446716430.3894.12.camel@pengutronix.de> Subject: Re: [PATCH v2] pwm-backlight: fix the panel power sequence From: Philipp Zabel To: YH Huang Cc: linux-pwm@vger.kernel.org, linux-fbdev@vger.kernel.org, Jingoo Han , Tomi Valkeinen , Jean-Christophe Plagniol-Villard , linux-kernel@vger.kernel.org, Thierry Reding , linux-mediatek@lists.infradead.org, Sascha Hauer , Matthias Brugger , yingjoe.chen@mediatek.com, Lee Jones , linux-arm-kernel@lists.infradead.org Date: Thu, 05 Nov 2015 10:40:30 +0100 In-Reply-To: <1446601656.15340.11.camel@mtksdaap41> References: <1444987060-48202-1-git-send-email-yh.huang@mediatek.com> <1444988219.3541.3.camel@pengutronix.de> <1445526750.27586.8.camel@mtksdaap41> <1446133259.3274.52.camel@pengutronix.de> <1446190900.17558.16.camel@mtksdaap41> <1446201271.3334.22.camel@pengutronix.de> <1446538299.2449.8.camel@mtksdaap41> <1446548924.3373.3.camel@pengutronix.de> <1446601656.15340.11.camel@mtksdaap41> 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:96de:80ff:fec2:9969 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: 1849 Lines: 47 Am Mittwoch, den 04.11.2015, 09:47 +0800 schrieb YH Huang: > On Tue, 2015-11-03 at 12:08 +0100, Philipp Zabel wrote: > > Hi YH, > > > > Am Dienstag, den 03.11.2015, 16:11 +0800 schrieb YH Huang: > > > > The reasoning is that devices where there is no phandle link pointing to > > > > the backlight (for example from a simple-panel node), we should keep the > > > > current default behaviour (enable during probe). > > > > > > I have a little problem for the current default behaviour. > > > Should we enable during probe? > > > > Here I mean enabling the backlight (at the end of the probe function), > > not enabling the GPIO already when requesting it. > > > > > Before this patch ( http://patchwork.ozlabs.org/patch/324690/ ), > > > we disable "enable-gpio" in the probe function. > > > > While before this patch the GPIO would be initialized in the disabled > > state, the call to backlight_update_status at the end of the probe > > function would still enable the backlight afterwards. > > Based on this, could we disable it initially and update in the > backlight_update_status function? > > Like this, > > if (pb->enable_gpio) { > if (phandle && > gpiod_get_direction(pb->enable_gpio) == GPIOF_DIR_OUT && > gpiod_get_value(pb->enable_gpio) == 1) > gpiod_direction_output(pb->enable_gpio, 1); The gpiod_direction_output call is a no-op, since the direction is already output and the value is already 1. Also, I propose to set initial blanking to FB_BLANK_POWERDOWN in this case, and wait for the panel driver to enable the backlight at the appropriate time. regards Philipp -- 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/