From patchwork Tue Oct 11 22:19:28 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Torokhov X-Patchwork-Id: 614937 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 C08ECC433FE for ; Tue, 11 Oct 2022 22:19:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229436AbiJKWTm (ORCPT ); Tue, 11 Oct 2022 18:19:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50652 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229454AbiJKWTl (ORCPT ); Tue, 11 Oct 2022 18:19:41 -0400 Received: from mail-pf1-x42e.google.com (mail-pf1-x42e.google.com [IPv6:2607:f8b0:4864:20::42e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 14354630A; Tue, 11 Oct 2022 15:19:40 -0700 (PDT) Received: by mail-pf1-x42e.google.com with SMTP id i3so14775639pfk.9; Tue, 11 Oct 2022 15:19:40 -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=LU58/FgjDPCb4/HIjKdV8bVA1BTPcHJFbY4JeAoNkso=; b=Dda1Fo3vZibxh0267Q/K8n/G26/3vL5nhVEgDWa9oYWXyuyC4vlceQEYklqjoiFI4m gslkJAQ7VUfiP6NWf9UdkGkWRRYyRU7Nn+Id5vDYUsqCGLm0SPQxfU1EV+iIPUyq2mWp wpsKsVXsWeV9Fg7fGNPWKn2HU/71UeeHZfP3K5CcPvMWx+ccJy2pCEfgszE9AnjWaJAG 6Ag1CSNBmbwAJK04xIhZlgh6wP6oPLOunmRxgiKCunebfNahGFzRi7iG5VmtPrBRCDER MQHZF6v8IpvLGcQdEbNPhM6hIYjSRqq1h4JXSURjSJKnSDh5RHGiD/CqtT9IPFTB8F4D h+1g== 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=LU58/FgjDPCb4/HIjKdV8bVA1BTPcHJFbY4JeAoNkso=; b=07CUszVVAMVEGkHacdRlHJ6lRhjtbu7hWI0giaPEv7qol026EJLNFJ8PVj6snVrruC 7KpTFBXEWoMF5YVK5r4+odUHEWqrv9SLuMMu9Dy8r5tfo/Fj5KNZXaV3OW9HFH8hMc8b sfDvFrruklQgJ9ZZ6Jr8wUswcYiBjKX2WITWXv0ATUDpcLVAqU0KvphWuwKEWhED2X17 icBqZJFq223NDwz6+j0BOXDdarEaec7YW6fou9XfDrJp10gW83DHKkT7nWU5Wg3K8Na+ +nENwXQdIRMxbpYGX9m/glM3jxWv/O5OrTQ3Tvmv0IFtxoDmu8kIbhEkB9HFXD7kckOp J9kQ== X-Gm-Message-State: ACrzQf1WT31i6bc3HLkDMT9BtkP0y909DMZ72MU+RTe34s7McOC7IZ5P faQXmF5knYsMoocOmWFVGBA= X-Google-Smtp-Source: AMsMyM60TYBBYpvAQZQVq5swUJ8AxjHR56drU7Zo5/27UWyvFpAAvSntAJdq/H+P2tFIcHRfyOgvxA== X-Received: by 2002:a63:814a:0:b0:460:9253:bf8e with SMTP id t71-20020a63814a000000b004609253bf8emr15238664pgd.469.1665526779242; Tue, 11 Oct 2022 15:19:39 -0700 (PDT) Received: from dtor-ws.mtv.corp.google.com ([2620:15c:9d:2:becc:db10:eb45:dc35]) by smtp.gmail.com with ESMTPSA id l6-20020a17090ab70600b0020d39ffe987sm60151pjr.50.2022.10.11.15.19.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Oct 2022 15:19:38 -0700 (PDT) From: Dmitry Torokhov To: Linus Walleij , Bartosz Golaszewski Cc: Daniel Thompson , linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org, Andy Shevchenko , linux-arm-kernel@lists.infradead.org, linux-gpio@vger.kernel.org Subject: [PATCH 0/7] gpiolib: more quirks to handle legacy names Date: Tue, 11 Oct 2022 15:19:28 -0700 Message-Id: <20221011-gpiolib-quirks-v1-0-e01d9d3e7b29@gmail.com> X-Mailer: git-send-email 2.38.0.rc1.362.ged0d419d3c-goog MIME-Version: 1.0 X-Mailer: b4 0.11.0-dev-5166b Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org 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 To: Bartosz Golaszewski Cc: Andy Shevchenko Cc: Daniel Thompson 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 --- Dmitry Torokhov (7): gpiolib: of: add a quirk for legacy names in Mediatek mt2701-cs42448 gpiolib: of: consolidate simple renames into a single quirk 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 drivers/gpio/gpiolib-of.c | 294 +++++++++++++++++++++++++++------------------- 1 file changed, 171 insertions(+), 123 deletions(-) --- base-commit: cd9fd78f5c11b5e165d9317ef11e613f4aef4dd1 change-id: 20221011-gpiolib-quirks-d452ed31d24e Best regards, Dmitry