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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 B6F7FC433FE for ; Thu, 13 Oct 2022 12:45:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=RO98+QoexHzgm+QQp5Ptb1Ur+wNpMzkdbzf9HkI4Vz8=; b=H6lDXcDN0y0mJs HrKAO7jT0K1jtQaVfZ3zGeaABW390UBTevt4ylVl0cgLaY7ortEiBIjrTvUELIm7jYgnHkzWryVyu dFHPgTWG6ybm8/qqArRQne0pNbocXgbOUBysahMhKADWzrnPiu+6oOVmk2eeVQQYUly/XMHTV/loP RpJvcuVyrWC3yJKGikdFI7xRigyfrQ/VwKveIiq8+3z2hcaSSb5Aje5FHSE09V9h5iau9mCPDoQ5v /yFfJCaN+1vogDC6s7PxIAZXvS1QRPJ5QutsCa0qtBKsd4FRoMd8v4qrAeB96XPv/XJBKbZQTxjNu q8DI2uZUD40CBAAAikVw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oixZA-00Biil-No; Thu, 13 Oct 2022 12:44:00 +0000 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oixZ7-00Bihi-Pd for linux-arm-kernel@lists.infradead.org; Thu, 13 Oct 2022 12:43:59 +0000 Received: by mail-wr1-x430.google.com with SMTP id a3so2736409wrt.0 for ; Thu, 13 Oct 2022 05:43:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=gFL+3ZqTNQ0jAeQ0BPwipAbFLiwXOxlfEp1/HJDetMI=; b=VoFnV5SLcBBiz1iP+USM4ERmiHztM1qhrWGXXnzA+n2JphKF/PV3WP+tQLfo1V/WZg zrz4XrSeAIXscbce56til+dnXxsIBQvyjXz25AKnWwsibpdbOYz6i3phpcERiiT/E0Vx RSfIly/JkROs2RGIJR4ULYzq66mEUCBYWOp8uPRXN/ZoXcEl1JId6yrz3/ImqBzGJhfu Hji1PMqS4lUxFG9/VVIItVo9ahiZb2wI5iI7aJgtA/61CS137qs7f+a/DX3Ht/QnVRVW NiHH7jX2C0b4RVzQUhAKH5tzhhUO4mmdcOdWMz6baykUUDB9B6+BHntcngAkQITyfi6J KO8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=gFL+3ZqTNQ0jAeQ0BPwipAbFLiwXOxlfEp1/HJDetMI=; b=nvnfSVCq72KATrmb5Fzfyuj/dGULooDQJ+b8aM663lNYGceLPJ1c7uvGnEInTbzKQx DG5aMCDwwZRNpylXhkGJxrewYPmUMDCv76LkdRCAG+Gq2WNbf9JsZ1p+97FBp+Nmo3VQ F7m+5eynEYLIuofpHA8pxtBvcRHpMfdzVtsaSE9teXWyiDSHTzqohZ9fMrE4ffCGLxLP ZsrJviKixBjZ0J6d6x45Fvw746vSlmXufKrj0m/FXo0LdpsFCD1OcFgzYRHzoB9aBpUA OdQewbYdwtoru5z4+ZGQYgONMN/pzCD669oiXewtmUPIIL8inogztw3KnlWA0clz3jIN Rf6g== X-Gm-Message-State: ACrzQf0QHgITfnhSTKmMWgbn3uJRIm3zAywEYJliQ1M1LiFzevsjpcFG H9Nro+YqQIlflcN8mhDC205A5A== X-Google-Smtp-Source: AMsMyM4wXATrnUjeGnfBevz2YqoW6F0UBPLgNZxr7qyXYH6BLvynxwwy3ThKFM67S9PZfcNv00HhJg== X-Received: by 2002:adf:fbc7:0:b0:220:6004:18ca with SMTP id d7-20020adffbc7000000b00220600418camr20624644wrs.632.1665665034607; Thu, 13 Oct 2022 05:43:54 -0700 (PDT) Received: from maple.lan (cpc141216-aztw34-2-0-cust174.18-1.cable.virginm.net. [80.7.220.175]) by smtp.gmail.com with ESMTPSA id u3-20020a056000038300b00231910fa71asm1912596wrf.57.2022.10.13.05.43.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Oct 2022 05:43:54 -0700 (PDT) Date: Thu, 13 Oct 2022 13:43:52 +0100 From: Daniel Thompson To: Dmitry Torokhov Cc: Linus Walleij , Sascha Hauer , Krzysztof Kozlowski , Rob Herring , Lee Jones , Jingoo Han , Shawn Guo , Fabio Estevam , NXP Linux Team , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Subject: Re: [RFC/PATCH] backlight: hx8357: prepare to conversion to gpiod API Message-ID: References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221013_054357_858412_68450BA9 X-CRM114-Status: GOOD ( 37.77 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, Oct 12, 2022 at 01:34:38PM -0700, Dmitry Torokhov wrote: > On Mon, Oct 10, 2022 at 10:36:00PM +0200, Linus Walleij wrote: > > On Thu, Oct 6, 2022 at 12:05 PM Daniel Thompson > > wrote: > > > On Thu, Oct 06, 2022 at 11:03:15AM +0200, Linus Walleij wrote: > > > > On Tue, Oct 4, 2022 at 10:35 PM Dmitry Torokhov > > > > wrote: > > > > > > > > > > Dmitry, could you fix this? Just patch away in gpiolib-of.c. > > > > > > > > > > Sure, I'll add a few quirks. I wonder what is the best way to merge > > > > > this? I can create a bunch of IBs to be pulled, or I can send quirks to > > > > > you/Bartosz and once they land send the patches to drivers... > > > > > > > > When I did it I was sufficiently convinced that I was the only one patching > > > > the quirks in gpiolib-of.c that merge window so I just included it as > > > > a hunk in the driver patch. If there will be some more patches to that > > > > file I guess some separate patch(es) for gpiolib-of.c is needed, maybe > > > > an immutable branch for those if it becomes a lot. > > > > > > Are renames likely to be a common quirk on the road to libgpiod > > > conversion? > > > > > > I admit I sort of expected it to be common enough that there would be > > > one rename quirk in the code supported by an alphabetized string table. > > > Such a table would certainly still provoke troublesome merges but ones > > > that are trivially resolved. > > > > Dmitry added a table of sorts, the problems are usually a bit unique > > for each instance of nonstandard DT GPIO bindings, that's why I > > mostly solved it with open coding in gpiolib-of.c. > > OK, so I sent out the patch adding "reset-gpios" -> "gpios-reset" > translation quirk to keep compatibility with the legacy names, but > we still need to figure out what to do with incorrect line polarity > in current DTses in tree. Unlike with names we have no indication > if out of tree DTSes specify correct polarity or not, so we can't > reasonably come up with workarounds that are guaranteed to work for > everyone. I see several options: > > 1 the driver could continue ignoring line polarity specified in DTS > (and use gpiod_set_value_raw()) and hope that they all/will be > wired in the same way? > > 2 we could fix up in-kernel DTSes, allow flexibility of connection > in new designs and respect polarity specified in out of tree DTSes, > but accept that there can be breakages with old DTSes not contributed > to the mainline or DTSes that were "cached" from an older kernel > release > > 3 add another quirk forcing "active low" polarity for the legacy > "gpios-reset" name, which will allow us respecting polarity in > new "reset-gpios" name. I don't think they is any point in having a rename if legacy DTs break anyway! Thus if there is a rename then there should also be an active low quirk applied when the old name is used. Daniel. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel