From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 57A32EB64DC for ; Fri, 21 Jul 2023 10:38:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229749AbjGUKiZ (ORCPT ); Fri, 21 Jul 2023 06:38:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40142 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229618AbjGUKiL (ORCPT ); Fri, 21 Jul 2023 06:38:11 -0400 Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AF2EA12F; Fri, 21 Jul 2023 03:38:10 -0700 (PDT) X-IronPort-AV: E=McAfee;i="6600,9927,10777"; a="367031193" X-IronPort-AV: E=Sophos;i="6.01,220,1684825200"; d="scan'208";a="367031193" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Jul 2023 03:38:10 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10777"; a="1055520267" X-IronPort-AV: E=Sophos;i="6.01,220,1684825200"; d="scan'208";a="1055520267" Received: from smile.fi.intel.com ([10.237.72.54]) by fmsmga005.fm.intel.com with ESMTP; 21 Jul 2023 03:38:07 -0700 Received: from andy by smile.fi.intel.com with local (Exim 4.96) (envelope-from ) id 1qMnWP-000NvT-2t; Fri, 21 Jul 2023 13:38:05 +0300 Date: Fri, 21 Jul 2023 13:38:05 +0300 From: "andy@kernel.org" To: Ying Liu Cc: "dri-devel@lists.freedesktop.org" , "linux-fbdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "lee@kernel.org" , "daniel.thompson@linaro.org" , "jingoohan1@gmail.com" , "deller@gmx.de" , "linus.walleij@linaro.org" , "brgl@bgdev.pl" Subject: Re: [PATCH v4] backlight: gpio_backlight: Drop output GPIO direction check for initial power state Message-ID: References: <20230721093342.1532531-1-victor.liu@nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230721093342.1532531-1-victor.liu@nxp.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org On Fri, Jul 21, 2023 at 09:29:03AM +0000, Ying Liu wrote: > If GPIO pin is in input state but backlight is currently off due to > default pull downs, then initial power state is set to FB_BLANK_UNBLANK > in DT boot mode with phandle link and the backlight is effectively > turned on in gpio_backlight_probe(), which is undesirable according to > patch description of commit ec665b756e6f ("backlight: gpio-backlight: > Correct initial power state handling"). > > Quote: > ---8<--- > If in DT boot we have phandle link then leave the GPIO in a state which the > bootloader left it and let the user of the backlight to configure it further. > ---8<--- > > So, let's drop output GPIO direction check and only check GPIO value to set > the initial power state. LGTM, Reviewed-by: Andy Shevchenko -- With Best Regards, Andy Shevchenko From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 17F3FEB64DC for ; Fri, 21 Jul 2023 10:38:15 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 7AAC910E64E; Fri, 21 Jul 2023 10:38:13 +0000 (UTC) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by gabe.freedesktop.org (Postfix) with ESMTPS id D89B710E64E for ; Fri, 21 Jul 2023 10:38:10 +0000 (UTC) X-IronPort-AV: E=McAfee;i="6600,9927,10777"; a="367031195" X-IronPort-AV: E=Sophos;i="6.01,220,1684825200"; d="scan'208";a="367031195" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Jul 2023 03:38:10 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10777"; a="1055520267" X-IronPort-AV: E=Sophos;i="6.01,220,1684825200"; d="scan'208";a="1055520267" Received: from smile.fi.intel.com ([10.237.72.54]) by fmsmga005.fm.intel.com with ESMTP; 21 Jul 2023 03:38:07 -0700 Received: from andy by smile.fi.intel.com with local (Exim 4.96) (envelope-from ) id 1qMnWP-000NvT-2t; Fri, 21 Jul 2023 13:38:05 +0300 Date: Fri, 21 Jul 2023 13:38:05 +0300 From: "andy@kernel.org" To: Ying Liu Subject: Re: [PATCH v4] backlight: gpio_backlight: Drop output GPIO direction check for initial power state Message-ID: References: <20230721093342.1532531-1-victor.liu@nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230721093342.1532531-1-victor.liu@nxp.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "daniel.thompson@linaro.org" , "jingoohan1@gmail.com" , "deller@gmx.de" , "lee@kernel.org" , "linux-fbdev@vger.kernel.org" , "dri-devel@lists.freedesktop.org" , "linux-kernel@vger.kernel.org" , "brgl@bgdev.pl" Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Fri, Jul 21, 2023 at 09:29:03AM +0000, Ying Liu wrote: > If GPIO pin is in input state but backlight is currently off due to > default pull downs, then initial power state is set to FB_BLANK_UNBLANK > in DT boot mode with phandle link and the backlight is effectively > turned on in gpio_backlight_probe(), which is undesirable according to > patch description of commit ec665b756e6f ("backlight: gpio-backlight: > Correct initial power state handling"). > > Quote: > ---8<--- > If in DT boot we have phandle link then leave the GPIO in a state which the > bootloader left it and let the user of the backlight to configure it further. > ---8<--- > > So, let's drop output GPIO direction check and only check GPIO value to set > the initial power state. LGTM, Reviewed-by: Andy Shevchenko -- With Best Regards, Andy Shevchenko