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: 61657 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp2106345wrd; Sun, 26 Feb 2023 13:30:34 -0800 (PST) X-Google-Smtp-Source: AK7set/G+7D/EF1W2xKendnUa/kAmTajgiyuE77WvHLzHj4roW8gmF45E+J2YEfN0/BdJxFrLbtD X-Received: by 2002:a05:6402:274c:b0:4af:81f1:5b02 with SMTP id z12-20020a056402274c00b004af81f15b02mr10261819edd.2.1677447034791; Sun, 26 Feb 2023 13:30:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677447034; cv=none; d=google.com; s=arc-20160816; b=NOvdwB6PQUaoGTCMai9jfXlrVw3VxSOi4/gS190YeQ70e9kQ9kbpW3xVHUsht9Y8RT 7I4sOXHVZWzuFiU9yiHzmE2OdChL2a3umlDoBsklXpnp3IX5uHpAp5Yccpi0cmY7aGFk 7vpzh6ThnJIyTt4qx0ilgCphXrAkIG3ywnL4BJjmysbq1FDsrRYD57t0Ch7l59PNQ08R zSpI+qLGXzbJc5sw6OgYR0qgkT7umnrvrYX8Ynwo0lKbGg2Fk0VzqdUySf6fNBzQ7iW/ sWRl7OrUEJyy+qJOVpdUxx/xacy2Gd4e5dGpvvU6gci7XE0oVwsHiFQktuR6rfNNpVS0 YacA== 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=0xCc6hdBBOY36yrfSA2b2U559vub69VWaEmSIo4wJJw=; b=mFroe3Wo0wJLonPZtUjc2pUIxWNRef3f1OGHBoC8OV5k0ucrDNwIw1vc6Kj7+NxJQj 2WYyNn6nxDrxGGuY1h06+0C26iDgFHxnfwGh4BL92WA3RHhsOE4oj22J8yDbqUIIFEco 6z+6Ua93/VVOFp+lV43kaKfE7znnbaKyL9BbZenfGUzNMaUThVPlDG7Ira1GxfP3QGiz gNDaf7sQpAP9B+5GP2W3WPQP/Q4a89MYnQXJPB3cQR9pK9cWZGhk+f0WcBWe5mHSrJAF fk1frX+RreSPwx1+kBGxDBltjdpauiOLo7pt1gnoc5rVG6VUSv8pfUqtwCaQ4VVtDLKx 3dKw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=SMeeXl1u; 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=NONE dis=NONE) header.from=amarulasolutions.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d8-20020aa7c1c8000000b004ad7ac04a59si6585163edp.389.2023.02.26.13.30.03; Sun, 26 Feb 2023 13:30:34 -0800 (PST) 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=@amarulasolutions.com header.s=google header.b=SMeeXl1u; 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=NONE dis=NONE) header.from=amarulasolutions.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229625AbjBZUyF (ORCPT + 99 others); Sun, 26 Feb 2023 15:54:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53258 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229535AbjBZUyD (ORCPT ); Sun, 26 Feb 2023 15:54:03 -0500 Received: from mail-ed1-x52b.google.com (mail-ed1-x52b.google.com [IPv6:2a00:1450:4864:20::52b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E4B4E10AB1 for ; Sun, 26 Feb 2023 12:54:02 -0800 (PST) Received: by mail-ed1-x52b.google.com with SMTP id i34so18025031eda.7 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=zqQ8cUmdOURY8L/n1xjjH5Tn7227BjzJOkomqKn9dp+2OXeXuUay0H9nB/XOu6AnRc vTz/JwDthrhP9LTLtsKFT1JPRqSK1TV1vzNJFK2atQ5YY1lsuncbMfp/OPo1OP+HlpgT jb0e1c9wejzD7Yj4OIZxxQntuULA9/5+hINmWYMyPrlS/C0tYWmtlsGZCOgAOx+x33lc lZU+oLR97EB1T8ae5Tw0GI+2/7AJ+Y+kBV0/YXuPOu/Lb1N+U4eexYVPiGJzWfQeLdC5 9yMalUb6qtfeuCMGT8Siz8846arPWZkTyXpndobLh2TJaRWpSFLSiePPztco1dUpw/tl CVOQ== X-Gm-Message-State: AO0yUKVlUYNyCpBSd6jWwnttRSRZAoi+lJF+TSwabvVV+sHaMnhW6hIR rC03/EagAQIbD8bdTPeUH35Nn4a7RSOInTKy+zA= 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-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1758930701910975198?= X-GMAIL-MSGID: =?utf-8?q?1758930701910975198?= 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)