Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp980893rwi; Fri, 14 Oct 2022 11:05:30 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7AQgkb+u9vane04VCI/k1u9SNZqK057aJGl/ONZlB2g6E81Tc6flvr3xeKHH/T/y9EFLKI X-Received: by 2002:a05:6402:3592:b0:45c:fb8a:c57d with SMTP id y18-20020a056402359200b0045cfb8ac57dmr5325064edc.290.1665770729990; Fri, 14 Oct 2022 11:05:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665770729; cv=none; d=google.com; s=arc-20160816; b=BAcnu2dwFSOoFlKmIj8L9cYe35uYh8CJIpySmgLcRIFIQLK5ZQuwNCIb/oAHT1YHVx W7OK2MCAJ3ILNtvCE/dW8z4/CvPbd2svacdgsjtaP9AC5p0F74ldK7eZry9kDs41ssV+ lzi6nHyjQMxai+/kSLuNZgE3tGjMIG6H3IaHBd3vDMZY1HyNdX9hSWvS7uMYrncH85nT vdtbjvLl0ielbV03buUNakB43+aNoyYAI4h3C7lHhLeBkr+SF+A6G14SfwZjU4DakCkx h8DaHnN7CztsOUdNXLH5Jkr6Rtk3ynFFPr6jp+ct3p0N34aAhtMbwD165gGnFAeCLFZu FB1w== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=bWZ+aGOI9zXRffRicNGgT9n+AHk/SzmN5RkqWoKLfug=; b=sb4DZENJfrkBSEqdfe+Q6B1G+rRtVZUKD8njPPCZvnsNNby/B7dMcuf4v3s/iDha8F rZ184dS7ibv9gkqND2s9cm3iWKUhtdUE9GlXBeaNv4ur+EyBbSZLkH72YJTwcguQww2f zybZc9vuxMVKBFieoNw0kYx91CvKm8b9U5fcyHkVcpTm0whGfpiYY14V+OT1omPg7HhO l2oniyDRgtlMJm7P+M7XHJloGVoL3gvVnvNHr1Wkeq7te5JilKWQPO1AkwzXsVaNaEUl vO/23mwE5rzThaRX5kGQxtWQGmJBqe77drOWekk32M4uWQ8L2bp0zJknE0EAC+GsKQ0n Xmhw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="fOuoZbM/"; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y4-20020aa7ce84000000b0045c29d74fd0si2579594edv.291.2022.10.14.11.05.04; Fri, 14 Oct 2022 11:05:29 -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="fOuoZbM/"; 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 S230169AbiJNRy5 (ORCPT + 99 others); Fri, 14 Oct 2022 13:54:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59954 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230111AbiJNRyp (ORCPT ); Fri, 14 Oct 2022 13:54:45 -0400 Received: from mail-pg1-x530.google.com (mail-pg1-x530.google.com [IPv6:2607:f8b0:4864:20::530]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EE2281A237; Fri, 14 Oct 2022 10:54:43 -0700 (PDT) Received: by mail-pg1-x530.google.com with SMTP id f193so4976653pgc.0; Fri, 14 Oct 2022 10:54:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=bWZ+aGOI9zXRffRicNGgT9n+AHk/SzmN5RkqWoKLfug=; b=fOuoZbM/KjXQtLJpXmlUZdf0h5Nn6/Px2oC5XUiQn9ZydwR3x4nYk6bH+rwzR5dPbm SgLxRAhCzrDPIM3ABgllWBkdEDMqpe5P1q/j05LWtiH0IfnlVlLfJHV/CEKctMuVLmBX lljNk27Nac8Jm7tB01ebLFIokCWjW11F5iEqF9Zuk+LBAhVz3BCQoeoPTYRVPS66tSoO LvzjCgHO1oX1UamlmU1uoelQkiPDHKmsc37EsElMWeAigXtFJivGPnFeO2fgDpAR0byB rqNp0sp1B8ZTfSi9hmmlN16nYt5/899wmkZgmqHf4qC65cD5+UsaCrhffmMgJK3cDIa/ PD6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=bWZ+aGOI9zXRffRicNGgT9n+AHk/SzmN5RkqWoKLfug=; b=M0MwgGtQckY6WlVSVW8+StNAzo9uTTvSb/vBYZkJLgYWTmlk1rd0HIm+YSB24yc+4O /yWqZkh/NQjzudGXrPlE9nyKyLytOuxZHfkuWc9H6G4JkVfiC6jOQeGfPZXzDBu8Ggni XMOR7Rz3ifJQvsma17ypYZyt7cy9paOWOOIfeNq5botf2QBVxMRPc1ZtLP3k6L2JpaF4 N3onaivtTSHaD/+q7DiULPBpYynSgcZACbulkgh2wBETVCGgeSuD/dfvicGqnAUJRln3 rHbjUqqiPK6VeQc08TqVZBGhaDKGQbdEBKby0lo7tN9+mvVtwNkIXwkCu1QrcuRWOD5E 8Zuw== X-Gm-Message-State: ACrzQf0kLhzFQzJZRiBkA1xWVRu0tZvi6w9XGf55R4sby+zHYHrNgYdk DGM/TozxeAoz/+naWH0VDyrnw4TuMhQ= X-Received: by 2002:a63:4e18:0:b0:43c:2fc7:2eea with SMTP id c24-20020a634e18000000b0043c2fc72eeamr5688379pgb.119.1665770082916; Fri, 14 Oct 2022 10:54:42 -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.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Oct 2022 10:54:42 -0700 (PDT) From: Dmitry Torokhov To: Bartosz Golaszewski , Linus Walleij Cc: linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org, Alexander Stein , linux-kernel@vger.kernel.org, Daniel Thompson , Andy Shevchenko , linux-gpio@vger.kernel.org Subject: [PATCH v2 3/9] gpiolib: of: tighten selection of gpio renaming quirks Date: Fri, 14 Oct 2022 10:54:27 -0700 Message-Id: <20221011-gpiolib-quirks-v2-3-73cb7176fd94@gmail.com> X-Mailer: git-send-email 2.38.0.413.g74048e4d9e-goog In-Reply-To: <20221011-gpiolib-quirks-v2-0-73cb7176fd94@gmail.com> References: <20221011-gpiolib-quirks-v2-0-73cb7176fd94@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" X-Mailer: b4 0.11.0-dev-5166b Content-Transfer-Encoding: 8bit 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: X-Mailing-List: linux-kernel@vger.kernel.org Tighten selection of legacy gpio renaming quirks so that they only considered on more relevant configurations. Suggested-by: Daniel Thompson Signed-off-by: Dmitry Torokhov --- drivers/gpio/gpiolib-of.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/drivers/gpio/gpiolib-of.c b/drivers/gpio/gpiolib-of.c index 63c6fa3086f3..7d4bbf6484bc 100644 --- a/drivers/gpio/gpiolib-of.c +++ b/drivers/gpio/gpiolib-of.c @@ -385,18 +385,21 @@ static struct gpio_desc *of_find_gpio_rename(struct device_node *np, #if IS_ENABLED(CONFIG_MFD_ARIZONA) { "wlf,reset", NULL, NULL }, #endif -#if IS_ENABLED(CONFIG_REGULATOR) + /* * Some regulator bindings happened before we managed to * establish that GPIO properties should be named * "foo-gpios" so we have this special kludge for them. */ +#if IS_ENABLED(CONFIG_REGULATOR_ARIZONA_LDO1) { "wlf,ldoena", NULL, NULL }, /* Arizona */ +#endif +#if IS_ENABLED(CONFIG_REGULATOR_WM8994) { "wlf,ldo1ena", NULL, NULL }, /* WM8994 */ { "wlf,ldo2ena", NULL, NULL }, /* WM8994 */ #endif -#if IS_ENABLED(CONFIG_SPI_MASTER) +#if IS_ENABLED(CONFIG_SPI_GPIO) /* * The SPI GPIO bindings happened before we managed to * establish that GPIO properties should be named @@ -405,6 +408,7 @@ static struct gpio_desc *of_find_gpio_rename(struct device_node *np, { "miso", "gpio-miso", "spi-gpio" }, { "mosi", "gpio-mosi", "spi-gpio" }, { "sck", "gpio-sck", "spi-gpio" }, +#endif /* * The old Freescale bindings use simply "gpios" as name @@ -412,10 +416,14 @@ static struct gpio_desc *of_find_gpio_rename(struct device_node *np, * all other SPI hardware. Allow this specifically for * Freescale and PPC devices. */ +#if IS_ENABLED(CONFIG_SPI_FSL_SPI) { "cs", "gpios", "fsl,spi" }, { "cs", "gpios", "aeroflexgaisler,spictrl" }, +#endif +#if IS_ENABLED(CONFIG_SPI_PPC4xx) { "cs", "gpios", "ibm,ppc4xx-spi" }, #endif + #if IS_ENABLED(CONFIG_TYPEC_FUSB302) /* * Fairchild FUSB302 host is using undocumented "fcs,int_n" -- b4 0.11.0-dev-5166b