From patchwork Sun Feb 26 20:53:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 13152481 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id DD622C7EE2D for ; Sun, 26 Feb 2023 20:55:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=z00tNTXWTkMWpM4DAXchlhsSc+4Z0867jMkiEMW6Tmg=; b=WJ8pZw1ihFKMgS I+mC8uJWQu3wnKcEh6QsKG4qDWjemozyQjLgBPOdqIm9R32FcPTOCSflHYTsFJUsCHW6r6awAp67j O6QpYMPOxIH6UyC8O/IXw2NeeoxuCc/A58FPzy7cva383IMP9g9MjDufESLuEsLhognc6ucf9Q0de 6BSZVfDiebscDYfBBYyhcNdMyosELFVVs3iDyrwff/GvNPCODDk2okOwjhNUID9Q4zhqpvsRwu4pA VXxA8A6MIw6jzTTZdy4r6KRZ8OGG34ZGrx01vbxu91pG6oGfyOv5U7aQ23n7sZ57dftoj9rS2hUfK hNqdoM/xEvSGAV5xR9wg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pWO24-007rGg-Ez; Sun, 26 Feb 2023 20:54:08 +0000 Received: from mail-ed1-x52e.google.com ([2a00:1450:4864:20::52e]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pWO20-007rGI-VU for linux-arm-kernel@lists.infradead.org; Sun, 26 Feb 2023 20:54:06 +0000 Received: by mail-ed1-x52e.google.com with SMTP id o12so17969282edb.9 for ; Sun, 26 Feb 2023 12:54:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=0xCc6hdBBOY36yrfSA2b2U559vub69VWaEmSIo4wJJw=; b=SMeeXl1uXWvpcsnn6+YTJTplSH7r1sn5v0jQLPV0uuM6eZ8NSBeUCPJct+UDIbDfhE hUz9whtZe9H0GWdqkRZmx2lLO80M2ZWam06soXPbvfqNEAKu3NZ7Lf8a/HzlWeqUXFoc PTUqnprv3G8kpA+6PG+qBflVBseS6XsKp6Yg4= 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=0xCc6hdBBOY36yrfSA2b2U559vub69VWaEmSIo4wJJw=; b=yhXWT4tlGrsNRnnHwAD67gkBM9eyrEk2g890DCsPxCskX5NtMR9Kft2OxSUleREzHe 2Oeg5NydSiII76fKs+ioMUyZRn1/5TbrWmEZV2Mfqe+X0Cr1rqZryexlX2h/qGqUHpgH 8BxbS5mQjIX8bemyLA7l2YWoppYYwSDS8ImHixcqbU/m5aDINE+K7G2raIrRrDkJvnrz 5wT3QPfwaCFfKDCZZjaESC2e0AqY4rnHtU7YEqJLozqY/a/klWEUzUsO7VixqasSmFGj gLq5wfL91jqtGKmK939UTTfW+EC2s9DREQn4Xw7TTcTFoX5YTlLY09GRLf/PIPWdDIGr Kvsw== X-Gm-Message-State: AO0yUKXhuP85jVdqx0fhI1J7TkyhRXEa5m70Oq22bAoItVHz44DI8mZN VvAxi9Lulh2ESbEkZ2GvQ6UE0A== X-Google-Smtp-Source: AK7set8V6hoMz0ECwaPMOpg+24nD8v3A2PKT8QB9l9btM0fXTE2gC6XCHB9TJ6kADcZOags+3mOjmg== X-Received: by 2002:a17:906:9991:b0:8b1:7eb1:590e with SMTP id af17-20020a170906999100b008b17eb1590emr32173637ejc.20.1677444841214; Sun, 26 Feb 2023 12:54:01 -0800 (PST) Received: from dario-ThinkPad-T14s-Gen-2i.homenet.telecomitalia.it (host-82-56-22-12.retail.telecomitalia.it. [82.56.22.12]) by smtp.gmail.com with ESMTPSA id lz15-20020a170906fb0f00b008dffda52d71sm2320013ejb.124.2023.02.26.12.54.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 Feb 2023 12:54:00 -0800 (PST) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: Dario Binacchi , Bartosz Golaszewski , Fabio Estevam , Linus Walleij , NXP Linux Team , Pengutronix Kernel Team , Sascha Hauer , Shawn Guo , linux-arm-kernel@lists.infradead.org, linux-gpio@vger.kernel.org Subject: [PATCH] gpio: mxs: use dynamic allocation of base Date: Sun, 26 Feb 2023 21:53:57 +0100 Message-Id: <20230226205357.1013504-1-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230226_125405_055285_5E271C4E X-CRM114-Status: GOOD ( 12.00 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Since commit 502df79b860563d7 ("gpiolib: Warn on drivers still using static gpiobase allocation"), one or more warnings are printed during boot on systems where static allocation of GPIO base is used: [ 0.136834] gpio gpiochip0: Static allocation of GPIO base is deprecated, use dynamic allocation. [ 0.142753] gpio gpiochip1: Static allocation of GPIO base is deprecated, use dynamic allocation. [ 0.148452] gpio gpiochip2: Static allocation of GPIO base is deprecated, use dynamic allocation. [ 0.154341] gpio gpiochip3: Static allocation of GPIO base is deprecated, use dynamic allocation. [ 0.160097] gpio gpiochip4: Static allocation of GPIO base is deprecated, use dynamic allocation. So let's follow the suggestion and use dynamic allocation. Signed-off-by: Dario Binacchi --- drivers/gpio/gpio-mxs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpio/gpio-mxs.c b/drivers/gpio/gpio-mxs.c index 7f59e5d936c2..b48a7c1fb7c1 100644 --- a/drivers/gpio/gpio-mxs.c +++ b/drivers/gpio/gpio-mxs.c @@ -330,7 +330,7 @@ static int mxs_gpio_probe(struct platform_device *pdev) port->gc.to_irq = mxs_gpio_to_irq; port->gc.get_direction = mxs_gpio_get_direction; - port->gc.base = port->id * 32; + port->gc.base = -1; err = gpiochip_add_data(&port->gc, port); if (err)