From patchwork Tue Aug 1 12:03:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Matti Vaittinen X-Patchwork-Id: 709401 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 A4C35C001DF for ; Tue, 1 Aug 2023 12:04:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232665AbjHAMEB (ORCPT ); Tue, 1 Aug 2023 08:04:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50528 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234011AbjHAMDn (ORCPT ); Tue, 1 Aug 2023 08:03:43 -0400 Received: from mail-lj1-x22a.google.com (mail-lj1-x22a.google.com [IPv6:2a00:1450:4864:20::22a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 07D61173A; Tue, 1 Aug 2023 05:03:18 -0700 (PDT) Received: by mail-lj1-x22a.google.com with SMTP id 38308e7fff4ca-2b9b9f0387dso85806121fa.0; Tue, 01 Aug 2023 05:03:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1690891396; x=1691496196; 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=UBlaVyXcRzijB9wVsQtSzeKEzoa3c6OzUppL627hjBw=; b=Dp+olNtZ83HKky4tQkPpItoL1j6tF9PvKT3p59x9ZfNBmmu0TfyG3TIuy6hK1f9Rha 3aiYIsQo7odhJYsCIJkONjN0YUBgZDzXi3LI82N8CaCwO+TGficuuo8GYjvRdf64T37n kMwJyJ2Y18lZybPYi/ouE09kSKf2l9iHNyFQvJS9JMhHuRuS74e5vF2Losvm75sd0nqz BTsoc5XFbbyRDKrFZSQU+2ouda7GeyKMwgXgGLd7AGqJIkPoFDIaTgIBsgWa5a5MNrXw UcQZ3feLzpdqSDo+2WrDVstNwC4P84Kx8A4dq7Pz7aqh6ZJmSSYauIV/y9+bYXbr+fxG lB+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690891396; x=1691496196; 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=UBlaVyXcRzijB9wVsQtSzeKEzoa3c6OzUppL627hjBw=; b=jMjylBmoiCjF1zEhTjngoOsgPJ0lPhdhGglsbtjTtz2p01pxi+sBta0yCtgwno43AI MUXolZdap3HBVGbH5JhMQMNgJ0fVwIbpb84aQQ7BygJ+iAktJo/+iN2mSPesPhVSGDYm ZPSykGpBJs8YCx/VMeJnzVZYxtTiM2rmV4vJrrN+plqrfGe1AvUm+3TbEkL5XiwqAcni BqIwk0pkGNlpRigwbYqtga/RliO3bN4IES4S2luGKnqTcG9a0n5BB2HdGouuoDf66p2M I60BsMKKANXkdZETkWF9NS7Pw5Kw7cVHT6QY42PUtjqD3KMM2FpBq9sZeqtI7o1mKJcg 6gqA== X-Gm-Message-State: ABy/qLaO2Q9hAXyi1lTM6bKrKSzNQBw2ndk93/NbQ3W6Rhf/ndChSDwo LyfaCac8O7AzuRDHZB89s4U= X-Google-Smtp-Source: APBJJlG0gkGSqh8g5VaM+e88ZxtYsK4NH8RkcNysALY4B325PIG1JEBhoW4P89rjsPkzYoSmgZsFgg== X-Received: by 2002:a2e:3610:0:b0:2b5:974f:385 with SMTP id d16-20020a2e3610000000b002b5974f0385mr2369426lja.9.1690891395968; Tue, 01 Aug 2023 05:03:15 -0700 (PDT) Received: from fedora ([213.255.186.46]) by smtp.gmail.com with ESMTPSA id s23-20020a2e9c17000000b002b6fe751b6esm3048819lji.124.2023.08.01.05.03.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Aug 2023 05:03:15 -0700 (PDT) Date: Tue, 1 Aug 2023 15:03:11 +0300 From: Matti Vaittinen To: Matti Vaittinen , Matti Vaittinen Cc: Jonathan =?iso-8859-1?q?Neusch=E4fer?= , Linus Walleij , openbmc@lists.ozlabs.org, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v8 3/8] pinctrl: wpcm450: relax return value check for IRQ get Message-ID: <143e6d7a1d2b1fb692097f6c855f2553aca93589.1690890774.git.mazziesaccount@gmail.com> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org fwnode_irq_get[_byname]() were changed to not return 0 anymore. The special error case where device-tree based IRQ mapping fails can't no longer be reliably detected from this return value. This yields a functional change in the driver where the mapping failure is treated as an error. The mapping failure can occur for example when the device-tree IRQ information translation call-back(s) (xlate) fail, IRQ domain is not found, IRQ type conflicts, etc. In most cases this indicates an error in the device-tree and special handling is not really required. One more thing to note is that ACPI APIs do not return zero for any failures so this special handling did only apply on device-tree based systems. Drop the special (no error, just skip the IRQ) handling for DT mapping failures as these can no longer be separated from other errors at driver side. Signed-off-by: Matti Vaittinen Reviewed-by: Jonathan Neuschäfer Acked-by: Linus Walleij Reviewed-by: Jonathan Cameron --- Revision history: v5 => : - No changes v4 => v5: Fix typo in subject "elax" => "relax" Please note, I took Linus' reply to v4 cover-letter as ack && added the tag. Please let me know if this was not Ok. The patch changing the fwnode_irq_get() got merged during 5.4: https://lore.kernel.org/all/fb7241d3-d1d1-1c37-919b-488d6d007484@gmail.com/ This is a clean-up as agreed. --- drivers/pinctrl/nuvoton/pinctrl-wpcm450.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/pinctrl/nuvoton/pinctrl-wpcm450.c b/drivers/pinctrl/nuvoton/pinctrl-wpcm450.c index 2d1c1652cfd9..f9326210b5eb 100644 --- a/drivers/pinctrl/nuvoton/pinctrl-wpcm450.c +++ b/drivers/pinctrl/nuvoton/pinctrl-wpcm450.c @@ -1106,8 +1106,6 @@ static int wpcm450_gpio_register(struct platform_device *pdev, irq = fwnode_irq_get(child, i); if (irq < 0) break; - if (!irq) - continue; girq->parents[i] = irq; girq->num_parents++; From patchwork Tue Aug 1 12:03:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matti Vaittinen X-Patchwork-Id: 708998 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 9491DC001DF for ; Tue, 1 Aug 2023 12:04:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233357AbjHAMEE (ORCPT ); Tue, 1 Aug 2023 08:04:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51480 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234277AbjHAMDp (ORCPT ); Tue, 1 Aug 2023 08:03:45 -0400 Received: from mail-lj1-x232.google.com (mail-lj1-x232.google.com [IPv6:2a00:1450:4864:20::232]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C913D1734; Tue, 1 Aug 2023 05:03:37 -0700 (PDT) Received: by mail-lj1-x232.google.com with SMTP id 38308e7fff4ca-2b9b50be31aso84202331fa.3; Tue, 01 Aug 2023 05:03:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1690891416; x=1691496216; 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=8zpSRj+GD1K9ivzCsboyfWepvG0nnxsJI4neiOMEOJA=; b=J9YXI/qQWmc5foKYmcXr/mlM5rzoT7ewawJlMCCWUj6LqVxodgC86yvhX9LVcLzrId ZMkIdl0WnR24MEWt1s91jJUWB2YFfz+xv/6wJ3QScW6rg/hiNPf+6xxw2h8RpPg2W120 eLvpxuzfmRCQOR4uZj8OJAQyPe6pgJzwUQGN84YvXJiXkPBdPKsEITrwhkeEfuw9jGMO Cxy6RyLHU8T6grY7VKpp0XfSrhJxws3xim3yVFVyrpSRjcXTD+zBxKVE2QxoGmyvi68V q9Hj0nPh3vM3KnxiFNfgc+Cs1AWHntrw4iN1SvF4Bmb1ZzgEr7Pg1Op51Tf76WTE9XFj ItAg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690891416; x=1691496216; 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=8zpSRj+GD1K9ivzCsboyfWepvG0nnxsJI4neiOMEOJA=; b=Td0FvCqi2R8GJFCXfLdGRu31QBJsp0yunf3dXrjT1CU7uROhbNDCwObB1sdnfYN19+ 2ZjpvyZP5jFgEIpQskg5YiyogoIl6GNtrAS1gFT7GUPWdb5kxjfsDGh6b3mDpXHqC2/e 8bzYun2Stb0Q8IfBVctO1dMJ1DpnFiaTYnzxEqYB4tT1g2Hyy2GABSeNXEaVW+RUhuXM MnFoaj18A00GxEYHAeYqJBSLziYNOFkjyd2vn5OWr41DkZ/Aw+0UfQkBIfEcIdEyMT/y +c9cv+g3+shcBj9LHcZZ2hE9zWVSf5EL4qRb2dsUfsmcF4ebPR4o6mgDWe2PTmROo7kC vOaQ== X-Gm-Message-State: ABy/qLYfURSRWGI5ZNNGuCRWb2I6SQ2Dmffp2ainxGR44kOzzLSkOJkn lD3SS3+yPOY/Gfhhm3vrFFc= X-Google-Smtp-Source: APBJJlHjM5sGeXJ8scrk4aBLFhYKc236hH6cKgiTcqCKxDSEfv4vNXCF+LRTsngmIqRpheMWNP66IQ== X-Received: by 2002:a2e:8812:0:b0:2b9:3cb3:2592 with SMTP id x18-20020a2e8812000000b002b93cb32592mr2327537ljh.10.1690891415898; Tue, 01 Aug 2023 05:03:35 -0700 (PDT) Received: from fedora ([213.255.186.46]) by smtp.gmail.com with ESMTPSA id y16-20020a2e7d10000000b002b9899d0f0bsm2590417ljc.83.2023.08.01.05.03.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Aug 2023 05:03:35 -0700 (PDT) Date: Tue, 1 Aug 2023 15:03:31 +0300 From: Matti Vaittinen To: Matti Vaittinen , Matti Vaittinen Cc: Paul Cercueil , Linus Walleij , linux-mips@vger.kernel.org, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v8 4/8] pinctrl: ingenic: relax return value check for IRQ get Message-ID: <92e97e068e0f058d081886f0352715d1f22d43a1.1690890774.git.mazziesaccount@gmail.com> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org fwnode_irq_get[_byname]() were changed to not return 0 anymore. Drop check for return value 0. Signed-off-by: Matti Vaittinen Reviewed-by: Paul Cercueil Acked-by: Linus Walleij Reviewed-by: Jonathan Cameron --- Revision history: - No changes Please note, I took Linus' reply to v4 cover-letter as ack && added the tag. Please let me know if this was not Ok. The patch changing the fwnode_irq_get() got merged during 5.4: https://lore.kernel.org/all/fb7241d3-d1d1-1c37-919b-488d6d007484@gmail.com/ This is a clean-up as agreed. --- drivers/pinctrl/pinctrl-ingenic.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/pinctrl/pinctrl-ingenic.c b/drivers/pinctrl/pinctrl-ingenic.c index 2f220a47b749..86e71ad703a5 100644 --- a/drivers/pinctrl/pinctrl-ingenic.c +++ b/drivers/pinctrl/pinctrl-ingenic.c @@ -4201,8 +4201,6 @@ static int __init ingenic_gpio_probe(struct ingenic_pinctrl *jzpc, err = fwnode_irq_get(fwnode, 0); if (err < 0) return err; - if (!err) - return -EINVAL; jzgc->irq = err; girq = &jzgc->gc.irq; From patchwork Tue Aug 1 12:03:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matti Vaittinen X-Patchwork-Id: 709400 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 2AEE3C001DF for ; Tue, 1 Aug 2023 12:04:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234451AbjHAMER (ORCPT ); Tue, 1 Aug 2023 08:04:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50520 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232086AbjHAMD5 (ORCPT ); Tue, 1 Aug 2023 08:03:57 -0400 Received: from mail-lf1-x136.google.com (mail-lf1-x136.google.com [IPv6:2a00:1450:4864:20::136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9EB221990; Tue, 1 Aug 2023 05:03:56 -0700 (PDT) Received: by mail-lf1-x136.google.com with SMTP id 2adb3069b0e04-4fe0c566788so9199398e87.0; Tue, 01 Aug 2023 05:03:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1690891435; x=1691496235; 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=aE2psrYzSQU8So7H2lqtVFtbvK/aQHA4jm0AH9xBQUo=; b=Kt2466pEvz8QaUHjluSm/1dxuyp5VUaPGYzBbsiHrWYAi28e53FJAF2TG6wXZjkoRq 4K3o/fh0Ey5kPHKhL83Qgt+m1uJ3DigTwKl4ZtFQv8D2Fw+OzaF6FNbFQwjvw1ARdSII Qre33ysDCX60hrAa80VBLKIUGbdDo+uGWUnw5/ff4fpn/P5pcE1yzA4DFl5O7MedHNFQ c1vEj04FMU/DDpJmuS6vmT1GDdc2LyKc4r6tvsy6ioK83tVpwJ4V6hbKT36OKP4Il5BF towKWW6NwstJ9TTE7D2IZPQyIGxhaqh3AGE/G3G1myGVKCBsZfMIu6Kwq5+qEQOY8IDx qJPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690891435; x=1691496235; 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=aE2psrYzSQU8So7H2lqtVFtbvK/aQHA4jm0AH9xBQUo=; b=PQvcKgGgmwkARU0g8KUQZNpdQAkDtdWm2lBK+yG0Nd39F0J4u/oS7DwRqMrWtRYDFw egMF82wpeSps7gYcAWNeCmw3os8ReUDD7wnXbUqfGtL1ApA2AvOxkxCG42bjoLarVcSA JotjkamadjYhi5NA8iwNKFEps284vewq1w2slEk8cs9NQh+OtIo3Z0Yi4P6HegkI99LG tsyw1G8oRK25h8HH3nZET8zeeOmpdORGbzRpW+m7rzUp0UHBhKLZE0L6FqT0vbZGtPQ2 EHPkvcllhZM+wWULeAW/DuvjgruyJ83ERmGzcT/2/qgDQXFE/Q+iZkUzlpWIfmkSwLih ClWw== X-Gm-Message-State: ABy/qLZSTl1Pcy1guhwqykWGJIta82ToDlDil/xTNd8cXH//DiMN2XGX HeWGSIyab1LoLRlNr4A5raqdywzkIe4= X-Google-Smtp-Source: APBJJlG/vaA70Oy4b5vd7KmQuDtolMU4Sk6ht7mghTudw2X9PvGItUQ0DzoVxhgLpnub52sLgPS18g== X-Received: by 2002:a19:7b12:0:b0:4fe:958:88ac with SMTP id w18-20020a197b12000000b004fe095888acmr2062862lfc.6.1690891434702; Tue, 01 Aug 2023 05:03:54 -0700 (PDT) Received: from fedora ([213.255.186.46]) by smtp.gmail.com with ESMTPSA id b21-20020ac25635000000b004fe0ec5596bsm2542136lff.54.2023.08.01.05.03.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Aug 2023 05:03:54 -0700 (PDT) Date: Tue, 1 Aug 2023 15:03:50 +0300 From: Matti Vaittinen To: Matti Vaittinen , Matti Vaittinen Cc: Linus Walleij , linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v8 5/8] pinctrl: pistachio: relax return value check for IRQ get Message-ID: <5077c4df68da920ab1119d6332878d0d31dc6d1b.1690890774.git.mazziesaccount@gmail.com> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org fwnode_irq_get[_byname]() were changed to not return 0 anymore. Drop check for return value 0. Signed-off-by: Matti Vaittinen Acked-by: Linus Walleij Reviewed-by: Jonathan Cameron --- Revision history: - No changes Please note, I took Linus' reply to v4 cover-letter as ack && added the tag. Please let me know if this was not Ok. The patch changing the fwnode_irq_get() got merged during 5.4: https://lore.kernel.org/all/fb7241d3-d1d1-1c37-919b-488d6d007484@gmail.com/ This is a clean-up as agreed. --- drivers/pinctrl/pinctrl-pistachio.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/drivers/pinctrl/pinctrl-pistachio.c b/drivers/pinctrl/pinctrl-pistachio.c index 53408344927a..8c50e0091b32 100644 --- a/drivers/pinctrl/pinctrl-pistachio.c +++ b/drivers/pinctrl/pinctrl-pistachio.c @@ -1393,12 +1393,6 @@ static int pistachio_gpio_register(struct pistachio_pinctrl *pctl) dev_err(pctl->dev, "Failed to retrieve IRQ for bank %u\n", i); goto err; } - if (!ret) { - fwnode_handle_put(child); - dev_err(pctl->dev, "No IRQ for bank %u\n", i); - ret = -EINVAL; - goto err; - } irq = ret; bank = &pctl->gpio_banks[i];