From patchwork Wed Apr 24 18:50:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Doug Berger X-Patchwork-Id: 13642388 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 70A80C4345F for ; Wed, 24 Apr 2024 18:51:43 +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:References:In-Reply-To: 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: List-Owner; bh=CBgkwd+fsxxXSz0veW/vFQ0KGWKHDhy7J23EJmQYZOU=; b=bFkHeSvjjC+yru KBZPd8Mb6b5+LhVsS6w0YnfYSOCh+RWiWCtPp2X5EFyywJJABjXJLi+fNv3B2G4edUpwndezleJRH t5EhSbV42rXI+QWhh+xLSf5eRHzT8/KKJUvbj6S8pJA0KejHdJl/Ab8zM/qsgymQ+vdW3XHAPg2JT Zo7M0HBLeTg1CiUdrR+e6SzDtb8bqkn7RaNxbqWoYO8kyGommKCxd7xod6pQZQUyZ0WRFYVykgQZL jcy70y/G6EwWa2MiRlaDULe1rmGlwUqXLhUqoQGUZf7WGX6k4vvSxScjwnWXyvNnH94/GeQBomA9A 8TfxZ4RxbUef+9VoDUhA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rzhiN-00000005UBh-1hZj; Wed, 24 Apr 2024 18:51:31 +0000 Received: from mail-pj1-x102c.google.com ([2607:f8b0:4864:20::102c]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rzhi9-00000005U3z-3lGC for linux-arm-kernel@lists.infradead.org; Wed, 24 Apr 2024 18:51:20 +0000 Received: by mail-pj1-x102c.google.com with SMTP id 98e67ed59e1d1-2a4b457769eso202641a91.2 for ; Wed, 24 Apr 2024 11:51:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1713984674; x=1714589474; darn=lists.infradead.org; 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=M6X+5q1a247m8fqLqnCGs505zqCuuzBrbu8TFFgUqlA=; b=JKi6bWqPPMqW8wlE90eYs0G9+UsWbdiiY7IUrj60Hi4FCNQ7RweYaIsTRsBHNeZ8XI xMBykojGRPxefl6PPdqj7Qt8Xf/gNGGx/A4yxmf9jZ/Nd4K1vOdU9jVJIq5DcFa9aUu6 3lhzWYk5kUn2D/dMIR0cc5zM4fHdrAMw+/QFz9zD9qnaraMqFOd0h4UYu1DjcvOqcbOl /yyiRfG8Z/w14gQJ2dNJ3s58flZpt1l7+GViHlcq7uCbqcvc4NVjAkdfraexWOmD1i87 89UlGHI/HENe5NZiEF9DWcIVcqES1Py7xe5GT/tLwqX+Po9mgyeo6N9MEUe86mCHIaSI OC8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713984674; x=1714589474; 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=M6X+5q1a247m8fqLqnCGs505zqCuuzBrbu8TFFgUqlA=; b=lqKPDeaLvfrxwFznOMOGOHrfArKsSVmxH3iX2KhuXH4L9bB8dgqx4O0y65utEI0UJM MI22xMyWlADsDPw34QlJTgfaK6Q+bJkizqP7Do/u73XHsUcUAsG/z5hZNyocsAlgWK/P 5evDEDLcG5yHdEVK7zSaXLKleP3iouplU25l/1SvIvIZPVWSmtxQu2IVDOW//76R+69J TJWTFb9RclK7YkqyWYzga9zO6ksqlgv5XgMGC5KkNYi74hZY5L5i5/COT5F2ZaRvm+ZA EBotubjbEM86cZP/gbGndsOzcp9WybYiGCOBibPG1DRTtuUa3Quc800mTKiiFqz4OyhN BKyg== X-Forwarded-Encrypted: i=1; AJvYcCWxdqpVAa9kdiQE9mGuowgEMov257KlNEj5ckhFdIr++24PIlGN4lWPz9ZbEzp4Z17xqjVolEePaet4wlyDCge6GIMXbUQI4y5p1VcldJ8DR8xNUUQ= X-Gm-Message-State: AOJu0Yx/7WXFFxU6o43nI2CT3o8dyiTu5lzkefTSz86/SCui3wvs+tvU e113gAeUy1vAhasPtboiBVOzytb/tV7M6PDnZWaYpXTaQXzjz4W5 X-Google-Smtp-Source: AGHT+IG2S6ThdztYb6nuOhNHcsI2+OyS+uqKCdcFORMaUGu/yUaxmgf9JxNsSHJqm+2ECP5SHr4tZg== X-Received: by 2002:a17:90b:1d0e:b0:2a2:f284:5196 with SMTP id on14-20020a17090b1d0e00b002a2f2845196mr3224723pjb.45.1713984674335; Wed, 24 Apr 2024 11:51:14 -0700 (PDT) Received: from stbirv-lnx-1.igp.broadcom.net ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id u8-20020a170902e5c800b001e425d86ad9sm12268728plf.151.2024.04.24.11.51.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Apr 2024 11:51:13 -0700 (PDT) From: Doug Berger To: Linus Walleij , Bartosz Golaszewski Cc: Phil Elwell , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Florian Fainelli , bcm-kernel-feedback-list@broadcom.com, linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Doug Berger Subject: [PATCH 3/3] gpio: brcmstb: add support for gpio-ranges Date: Wed, 24 Apr 2024 11:50:39 -0700 Message-Id: <20240424185039.1707812-4-opendmb@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240424185039.1707812-1-opendmb@gmail.com> References: <20240424185039.1707812-1-opendmb@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240424_115117_992794_FC4D3231 X-CRM114-Status: GOOD ( 12.29 ) 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 A pin controller device mapped with the gpio-ranges property will need implementations of the .request and .free members of the gpiochip. Signed-off-by: Doug Berger Tested-by: Phil Elwell Acked-by: Florian Fainelli --- drivers/gpio/gpio-brcmstb.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpio/gpio-brcmstb.c b/drivers/gpio/gpio-brcmstb.c index 790cb278b72a..8dce78ea7139 100644 --- a/drivers/gpio/gpio-brcmstb.c +++ b/drivers/gpio/gpio-brcmstb.c @@ -694,6 +694,8 @@ static int brcmstb_gpio_probe(struct platform_device *pdev) /* not all ngpio lines are valid, will use bank width later */ gc->ngpio = MAX_GPIO_PER_BANK; gc->offset = bank->id * MAX_GPIO_PER_BANK; + gc->request = gpiochip_generic_request; + gc->free = gpiochip_generic_free; if (priv->parent_irq > 0) gc->to_irq = brcmstb_gpio_to_irq;