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 ED42BC4332F for ; Tue, 11 Oct 2022 14:30:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229548AbiJKOaR (ORCPT ); Tue, 11 Oct 2022 10:30:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50006 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229464AbiJKOaQ (ORCPT ); Tue, 11 Oct 2022 10:30:16 -0400 Received: from muru.com (muru.com [72.249.23.125]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 2E0C9357F8; Tue, 11 Oct 2022 07:30:15 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by muru.com (Postfix) with ESMTPS id 49BB080F9; Tue, 11 Oct 2022 14:21:26 +0000 (UTC) Date: Tue, 11 Oct 2022 17:30:12 +0300 From: Tony Lindgren To: Dmitry Torokhov Cc: Sebastian Reichel , =?utf-8?Q?Beno=C3=AEt?= Cousson , Krzysztof Kozlowski , Rob Herring , devicetree@vger.kernel.org, linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/4] ARM: dts: omap3-n900: fix LCD reset line polarity Message-ID: References: <20221004213503.848262-1-dmitry.torokhov@gmail.com> <20221011123726.elsr53ue7nxzhvww@mercury.elektranox.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org * Dmitry Torokhov [221011 13:57]: > Hi Sebastian, > > On Tue, Oct 11, 2022 at 02:37:26PM +0200, Sebastian Reichel wrote: > > Hi, > > > > On Tue, Oct 11, 2022 at 08:45:54AM +0300, Tony Lindgren wrote: > > > * Dmitry Torokhov [221004 21:26]: > > > > The LCD driver (panel-sony-acx565akm), when probing, starts with line > > > > driven low, and then toggles it to high and keeps it there. Also, the > > > > line is driven low when powering off the device, and ls released when > > > > powering it back on. This means that the reset line should be described > > > > as "active low" in DTS. This will be important when the driver is > > > > converted to gpiod API which respects the polarity declared in DTS. > > > > > > We should ensure these patches get merged together with the driver > > > change to avoid breaking LCD for booting. Probably no need to have > > > the driver quirk handling for inverted polartity in this case. > > > > > > It's probably easiest to have an immutable branch for the driver > > > changes I can base the dts changes on. Or I can ack the dts changes > > > if they get merged with the driver. > > > > Both drivers are already using gpiod API: > > > > drivers/gpu/drm/panel/panel-sony-acx565akm.c > > drivers/gpu/drm/panel/panel-dsi-cm.c > > I was looking at > > drivers/video/fbdev/omap2/omapfb/displays/panel-sony-acx565akm.c > drivers/video/fbdev/omap2/omapfb/displays/panel-dsi-cm.c Ah OK that explains :) > which are not using gpiod. Should they be retired? Yes we should just get rid of them with omapdrm working just fine. > > So this just breaks things. > > I missed the drivers in drivers/gpu/... and I see that they essentially > abuse gpiod API as gpiod_set_value() operates on logical level > (active/inactive) and not absolute (high/low). They should either use > the gpiod_*_raw() variants, or they should be adjusted to do the proper > thing together with the accompanying DTS change. > > What are your preferences? Seems like high/low at the connected device end is what we should use, right? Otherwise things will misbehave if the panel is connected to some other SoC possibly. Regards, Tony