Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp866705rwi; Thu, 13 Oct 2022 06:20:02 -0700 (PDT) X-Google-Smtp-Source: AMsMyM60jzuOHL2ubVd109s9Sm1aeuCPX++VAyUZ7wW8oVb2d/oJ4A2z+a/zyFpf5mwnZLZ0HtMa X-Received: by 2002:a17:907:2c74:b0:78d:845a:1cf9 with SMTP id ib20-20020a1709072c7400b0078d845a1cf9mr23541295ejc.359.1665667201940; Thu, 13 Oct 2022 06:20:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665667201; cv=none; d=google.com; s=arc-20160816; b=vHIdE+jggu+XHUFaU9ddLSsQLzI1dd+/lZkvzGGYtwO4VoECe7j1IcRRmEakcpF+UQ q/I0tAm58NGas/b8DRgXI/7ltk4NwBb4l/b8O38bQI6GINCEUdHv4v5iGpyBEgEx4Sin Prq7sAFRypxJ1/3TGW7+eAekEEqtBMqFBRxR9GzV9VR5o7+zWyCOAChjapgMVHYCj02j XvDk+j4RFUOsqoAmi9kwX13L7jfoUFPObDiREtn6l8JU1jizMMc9GTDidzUemk/kxvjr EtV6Ee4gYPJi0Tl86HVrjp4I/UDfudutkMXd+kf78gorHYE17rp0XDLDxTU8YGhhl/Vv wcCQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=gFL+3ZqTNQ0jAeQ0BPwipAbFLiwXOxlfEp1/HJDetMI=; b=M/PUSezkJZ2MvbqErfTTB/Y3bHsZvkjrMF3ZZ5sRLzVT/WmQJbFNC6PmZpMVCnsL2T i4VhNFE15z6hl2zAZZWO711sfSiiQYYNIlMQhsGD2XdbdYqR6eN6RJy4IxuoBq7tXWHT /TVIVbW2TRLhoJr5DC0ZfbRR9NsgiOw83zqDd5g7V2ci8skrwQ9XoHRySgr0IvPfFURA iDSCE791sTnkUbhrvVd3yMI+CPI+SLA0gjl4FDF2pQpAdj4VJrZKVyVCUedkjaS0xQcI S2S4vpdlxAHCczdJJPMZoZV8HzoyHpKqrAAPJXG5EeW7vlgt7IWsJDG1oap1gvlcre2U TGfg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=VoFnV5SL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hu9-20020a170907a08900b0073ffabc3352si18013598ejc.836.2022.10.13.06.19.28; Thu, 13 Oct 2022 06:20:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=VoFnV5SL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229807AbiJMMoC (ORCPT + 99 others); Thu, 13 Oct 2022 08:44:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43132 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229686AbiJMMoA (ORCPT ); Thu, 13 Oct 2022 08:44:00 -0400 Received: from mail-wr1-x433.google.com (mail-wr1-x433.google.com [IPv6:2a00:1450:4864:20::433]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D0AD4123457 for ; Thu, 13 Oct 2022 05:43:56 -0700 (PDT) Received: by mail-wr1-x433.google.com with SMTP id bu30so2632858wrb.8 for ; Thu, 13 Oct 2022 05:43:56 -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=D9tNiuHRgWyB6wCYDo8Ow6Bq93ytAtGg1MvUjQ3G8fjTOYd2fmYKv7id6un1B9Cj6x gnes+BZnpkkfkwl4c87u0FML+HDY70OJGHB230fsH3NVcSK1PPniv1f4ir1NDXrzRUDS 7lty5NPc3PCDO4LzuNloew/U6g0aJy3ingid3x/vwNQpYMedumc9lbjr+NDmkTXj8/u0 HJNQDzMO2n2J93ebRrEJLF3hfS23J1Rn+HfXRrpRCHuaX7xQbV+78gxv4sDy1RQmK5J0 ACVSyvBHT1755W0UOF1jGAv2QkArF4H7nt5SOvGOknbBbr83N9spO5r7Nbhcs0eXmxwj 573Q== X-Gm-Message-State: ACrzQf2ArtQ/w0+6Eoc8N2U0Vl0LfVsy8hovdGssvGqQI1RQz9dMrv8Z skHRoMk2V/n26hz+zuOapOHQ1A== 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-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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.