Message ID | 20221011-gpiolib-quirks-v2-0-73cb7176fd94@gmail.com |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp308063wrs; Fri, 14 Oct 2022 10:55:33 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4IswYUh3nRyBbhL8fOfIjFKlGGXU8nsZDPGPP/aOuQ5DuSDetJ3DPZWbaaexQqBCphC0Xb X-Received: by 2002:a17:907:8a23:b0:78d:a24e:a9aa with SMTP id sc35-20020a1709078a2300b0078da24ea9aamr4539809ejc.404.1665770133162; Fri, 14 Oct 2022 10:55:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665770133; cv=none; d=google.com; s=arc-20160816; b=X9ACNRnyo/YAu3lCGOK5kLhRnI0zpuP30vTz6jrAm5KTbT/6Ms74y/UkS4GYCR6ioE iU/wShy5kMOIE9FofrOqRFX236GVDuUkVIqF3Nqx/DbNkc6x9WZ2+Ahfh5nhh391o3PZ 5AXsZPF2kTJNCLzBHDaHNIXQOTwv8nvW68S2tr4WMA83QwIZA6A5R2AKGTqIZYODkS4Z nheKKlTLkkJyVmgDbpYfm667Z/oVt+xGy4AVeLDXF0PN3N9I4artW/ol5gH1QWUfCX+r RN4C/rD3B8xjAa5CaEkGeinwuvD1itE76tKCT6kMTeG0/+qWcEQ2uWTtHXw9Mt088rqL AXmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=avPRhaqVHvgZmZ8GBsQ+20zIBPkvVr2QT+2++f0G4/A=; b=JpBrYS0vZZtbYp1onyDX+bmVHt8YfTeYdfHHwoIraFVJpjkqyIzAd29nHhJOWW41LL kp9BE7pZ5bW6A9YAQ9jnwEht139noTcGji2kR4U6k03u9Q1Ny66xlaI5usX8nazj7GWJ CsSES400CC1dnNlGKD29mUTel53l0fehI8yUwwhTuHv0+iusZzdbuP5l37+vfmFJo9JF 71w+kbf6vC2Eo7h8t545amM9bNvB+Ey5eb4+PyI2r+hit4u1kdNwswB6JRZn6K5Mx1Kg rIdYb9oGV8Xg7mo10jE0dri//0hI7a/+AWzDO6cGJyg9YEmQno+6i1OnqKu5hcZVADWt qNRQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=kZhR7KCR; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hc13-20020a170907168d00b0078de57da349si259044ejc.463.2022.10.14.10.55.07; Fri, 14 Oct 2022 10:55:33 -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=@gmail.com header.s=20210112 header.b=kZhR7KCR; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230084AbiJNRyn (ORCPT <rfc822;ouuuleilei@gmail.com> + 99 others); Fri, 14 Oct 2022 13:54:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59502 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230057AbiJNRyl (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 14 Oct 2022 13:54:41 -0400 Received: from mail-pj1-x1033.google.com (mail-pj1-x1033.google.com [IPv6:2607:f8b0:4864:20::1033]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7C7726464; Fri, 14 Oct 2022 10:54:38 -0700 (PDT) Received: by mail-pj1-x1033.google.com with SMTP id o9-20020a17090a0a0900b0020ad4e758b3so5392976pjo.4; Fri, 14 Oct 2022 10:54:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=avPRhaqVHvgZmZ8GBsQ+20zIBPkvVr2QT+2++f0G4/A=; b=kZhR7KCRXJWnF12BPar5TJ6Jp7jOQu5oh+cHmvhzLyF05zeCaifFNhGK2RV9jJxsw7 VimZgYTfdukHBQwvv7OanK1IwigLv/d+xhi0TP3zAwnVA6N9Pky4WjZPRXan0Z3MsufV QghtZKG+k2mOjGl0Vg0S/t1x77BZevIUhmuxGLeSWD54IdegSklXCjVAKnkT2Oo/lxWy 2oWrH07lFCfFz6RCEuX6Jkpdeh2zLOt+eRMKV+TxgFflN6h9xcTnhT+iZgpDyxPmGITV pgq28asdkYqtuLzYBAHXMMVsZ9e6VVSZGlgtf3K/gA4Or5CvN8E9zKThvuSlj1BcZEgG QOrg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=avPRhaqVHvgZmZ8GBsQ+20zIBPkvVr2QT+2++f0G4/A=; b=tlXApg3FsPBKm8p7ItkyTwX2T1vF4R7JWZTtPpOnZMYcqpvjKT6H8fZT8mYCgvijAP VReRDyBZzgC/xeYF+TBhlpDFSCAoBT9NAvOfWnGvgCkV39uaCs3HpbzB9DYNmNDkIWEe n0UXr+m3NtfyyTRPKDKXyCxVqV3+o+mBaOkuLz5TEFatx42nPhDXI+n/Px0zsAZRB/dr wBP1u7roBeZe9qpzBk5yK/lxNIPd60LJEoWUIc5wpJi5u5aQxQB2Fvnc02H/X0zjf8YH w9yNukL+eXqhTfjsudPnwph7J5MgOSFMGDZMdfrnnflz0MI4I3KSn1DzCjKiIv4bU+Zu wdYA== X-Gm-Message-State: ACrzQf3ksjGajVS6qt2Ro1NqH3CSqkI/xdUQRj3H7ppd9eKkC2GQmCnY CNagtJhDVgiKL7ny8k2uJRI= X-Received: by 2002:a17:90b:3c8f:b0:20d:959b:26f4 with SMTP id pv15-20020a17090b3c8f00b0020d959b26f4mr7161668pjb.104.1665770077786; Fri, 14 Oct 2022 10:54:37 -0700 (PDT) Received: from dtor-ws.mtv.corp.google.com ([2620:15c:9d:2:da06:5604:594f:f6af]) by smtp.gmail.com with ESMTPSA id jj19-20020a170903049300b0017f7819732dsm2011780plb.77.2022.10.14.10.54.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Oct 2022 10:54:37 -0700 (PDT) From: Dmitry Torokhov <dmitry.torokhov@gmail.com> To: Bartosz Golaszewski <brgl@bgdev.pl>, Linus Walleij <linus.walleij@linaro.org> Cc: linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org, Alexander Stein <alexander.stein@ew.tq-group.com>, linux-kernel@vger.kernel.org, Daniel Thompson <daniel.thompson@linaro.org>, Andy Shevchenko <andriy.shevchenko@linux.intel.com>, linux-gpio@vger.kernel.org Subject: [PATCH v2 0/9] gpiolib: more quirks to handle legacy names Date: Fri, 14 Oct 2022 10:54:24 -0700 Message-Id: <20221011-gpiolib-quirks-v2-0-73cb7176fd94@gmail.com> X-Mailer: git-send-email 2.38.0.413.g74048e4d9e-goog MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" X-Mailer: b4 0.11.0-dev-5166b Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1746686583239912223?= X-GMAIL-MSGID: =?utf-8?q?1746686583239912223?= |
Series |
gpiolib: more quirks to handle legacy names
|
|
Message
Dmitry Torokhov
Oct. 14, 2022, 5:54 p.m. UTC
In preparation to converting several drivers to gpiod API, and to keep existing DTS working, this series adds additional quirks to locate gpio lines with legacy names. Additionally the quirk handling has been reworked (once again) to pull all simple renames (ones that do not involve change of indices or other complex manipulations) into a single quirk with a table containing transformations. This should make adding new quirks easier. When using legacy names gpiolib will emit a message to nudge users to update DTSes (when possible). Note that the last patch requires the following change from the OF tree: 88269151be67 ("of: base: make of_device_compatible_match() accept const device node") The change is also available in mainline - it has been merged in 6.1 merge window. Thanks. To: Linus Walleij <linus.walleij@linaro.org> To: Bartosz Golaszewski <brgl@bgdev.pl> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Alexander Stein <alexander.stein@ew.tq-group.com> Cc: Daniel Thompson <daniel.thompson@linaro.org> Cc: linux-gpio@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-mediatek@lists.infradead.org --- Changes in v2: - fixed 'fsl,imx8mq-fec' & 'fsl,imx8qm-fec' compatibles issue noticed by Alexander Stein - implemented Daniel Thompson's suggestion on tightening configs selecting renaming quirks and added a comment to discourage adding rename quirks without checks for specific compatible(s) - added a polarity quirk for Himax LCDs - collected reviewed-by tags - Link to v1: https://lore.kernel.org/r/20221011-gpiolib-quirks-v1-0-e01d9d3e7b29@gmail.com --- Dmitry Torokhov (9): gpiolib: of: add a quirk for legacy names in Mediatek mt2701-cs42448 gpiolib: of: consolidate simple renames into a single quirk gpiolib: of: tighten selection of gpio renaming quirks gpiolib: of: add quirk for locating reset lines with legacy bindings gpiolib: of: add a quirk for reset line for Marvell NFC controller gpiolib: of: add a quirk for reset line for Cirrus CS42L56 codec gpiolib: of: factor out code overriding gpio line polarity gpiolib: of: add quirk for phy reset polarity for Freescale Ethernet gpiolib: of: add a quirk for reset line polarity for Himax LCDs drivers/gpio/gpiolib-of.c | 344 ++++++++++++++++++++++++++++++---------------- 1 file changed, 222 insertions(+), 122 deletions(-) --- base-commit: cd9fd78f5c11b5e165d9317ef11e613f4aef4dd1 change-id: 20221011-gpiolib-quirks-d452ed31d24e Best regards, Dmitry
Comments
On Fri, Oct 14, 2022 at 7:54 PM Dmitry Torokhov <dmitry.torokhov@gmail.com> wrote: > In preparation to converting several drivers to gpiod API, and to keep > existing DTS working, this series adds additional quirks to locate > gpio lines with legacy names. > > Additionally the quirk handling has been reworked (once again) to pull > all simple renames (ones that do not involve change of indices or other > complex manipulations) into a single quirk with a table containing > transformations. This should make adding new quirks easier. > When using legacy names gpiolib will emit a message to nudge users to > update DTSes (when possible). > > Note that the last patch requires the following change from the OF tree: > > 88269151be67 ("of: base: make of_device_compatible_match() accept const device node") > > The change is also available in mainline - it has been merged in 6.1 > merge window. The series: Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Yours. Linus Walleij