Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp769448rdg; Wed, 11 Oct 2023 05:14:03 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFopnqTylAOrAzoMUJxBFSUCtfX6Y2GGISAXg02yDwtv5MZBHkyzUmpfPv4BhfE+ySWeS6D X-Received: by 2002:a17:90b:4a91:b0:274:729c:e4f with SMTP id lp17-20020a17090b4a9100b00274729c0e4fmr19985211pjb.15.1697026442796; Wed, 11 Oct 2023 05:14:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697026442; cv=none; d=google.com; s=arc-20160816; b=ZWof3MLTr6k4GIEFRTTpe9ec12SJUMe09Nwlt+h8LJ61L3gcexbdLuc14q2gY2vPJk hbiRJEt68geEzID/IaNtnAaptwuRL72JsaQFPWEnd13xv+9hSReGmt6h1/oMOd5kBthy ForC5kENiWRgrTFXZKU3/QWCX5MMxYNuUXVmJfbsqzpJcK3moyzGnHIG2LaO9gZrjUt4 zuEOuISTzHSZq02SfzvOgqA5deCNdyYhbrs8mDTymMyxsqVyNa32lBwy8njqLVs8wFF3 cJkDIfMcgQ8yhfY616Ap9gTGevFKaMp/kxCbHLpcy5oTXzdsI29CS41gXfP7HWVqQiM7 kdVg== 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=63WjOp9UsiT59ywyo99tyOEp/CpCY6vvpVWnONIBEpw=; fh=kOxmq+prcfKKX/dgMaMxTb6TRjzyc//QKXZBiaS/a94=; b=YAOAaBXwScf45faC1O/he491VImuRyUTr5LaWXYxml/qJErFM1iJJ49TQIfVbk9/3l lCzLOL/eQ5+qfQ3b2abjU9SGgJFoqAd20300fj36eZMGKt11oVjObWlB4vpBRA42knEt MJSjO6T30N1SFZYXm6aumWVNpMBA77Gy93gipy/6P6sx6Zyaiw4ifVih9wLPGwoYgkfk 5X5dL7TU6RRJnGdrWvlfAuA0h0Pz68nc0dIRvHl5DR0l5kPyme/NJQGSmqhKnZiGyX5u ug/cStY135FFn/b0AGeQEuXm5anGQexCNsGsvvr14R1xE+N3v2MrMcwJfFRwI3dCBfBN JOwA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20230601.gappssmtp.com header.s=20230601 header.b=peZ6Fsn4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id c18-20020a17090a8d1200b002743b58483asi13698328pjo.66.2023.10.11.05.14.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 05:14:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@bgdev-pl.20230601.gappssmtp.com header.s=20230601 header.b=peZ6Fsn4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 1F79C805D3A1; Wed, 11 Oct 2023 05:13:50 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346917AbjJKMMn (ORCPT + 99 others); Wed, 11 Oct 2023 08:12:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38196 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234938AbjJKMMV (ORCPT ); Wed, 11 Oct 2023 08:12:21 -0400 Received: from mail-wm1-x32d.google.com (mail-wm1-x32d.google.com [IPv6:2a00:1450:4864:20::32d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 858F110C2 for ; Wed, 11 Oct 2023 05:09:53 -0700 (PDT) Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-405524e6769so5546535e9.1 for ; Wed, 11 Oct 2023 05:09:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1697026176; x=1697630976; darn=vger.kernel.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=63WjOp9UsiT59ywyo99tyOEp/CpCY6vvpVWnONIBEpw=; b=peZ6Fsn4XUud0jFzjDcUHU7bu940Yb+Qq18xQh6tfTox0KEXXlHg0GzaVQBzZ1WrkW 8LC6khX/Mqs5oj0I66uhoMua09XwyvbfO1RjDKdbsw2M+ntfysESyl9teV3K7WUuHivy PJNqjWhVX8sdgY9YGUpHOIiT0ZTigNSTZzLvKtmsO6lTuTZlStqC2LW3B0f7tJrVtUKS les8SHyNm34qh101w2wcR3UkdelzO6WU+P4ExnZp66nu1w6vmFQktbIfcedUFAaX2uHA 1Y0Rcbp9XC85zRbXe9Jny/5cv5O99Wb0ZTT5075oFCkPakSTl9q2R7zDLRIIZFRzSJpU NF5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697026176; x=1697630976; 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=63WjOp9UsiT59ywyo99tyOEp/CpCY6vvpVWnONIBEpw=; b=iLqrfq6AMv7zq0/+B76TWxIOYJxctGT8Be1z9YWyVCJ4HPyIqCMoUw6rNnQHLrDD4Q GP5Y13cmfy96+McVT4w6i9ooUZ02QWTNPWfKzYBn3ZU0w0PWf+yUIp9E20R5h8NSvyMg QVmgARtek8LofmNA++nU4cy6ZckvQAJUcyU2HLHv9LPHYTOaq6+1LiCdTEcXKxdS0hoo ipAv6dDOI+ybLZHEYHs1dcfN3+QtIAwgP82GvTXb3eE6+euyYrjPoKQ1bLXh/2pdlZZC euBIktOHm+9p1ne+NpPdr+NaRcSI06uXI4cISKhwy09+Zbu3hDhBm+mkxUXf1tdLKxAN oTXw== X-Gm-Message-State: AOJu0YwPuzva9JTMV8siVKGlZ/+niiDuPOprl8ejUh18p7AEqJd9QM3N pykoyGvsJqfbRTpn1Ukvtybrdw== X-Received: by 2002:a05:600c:895:b0:405:3be0:c78d with SMTP id l21-20020a05600c089500b004053be0c78dmr13871009wmp.3.1697026176573; Wed, 11 Oct 2023 05:09:36 -0700 (PDT) Received: from brgl-uxlite.home ([2a01:cb1d:334:ac00:e551:3946:26fc:f94]) by smtp.gmail.com with ESMTPSA id w21-20020a05600c015500b0040652e8ca13sm19012253wmm.43.2023.10.11.05.09.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 05:09:36 -0700 (PDT) From: Bartosz Golaszewski To: Linus Walleij , Andy Shevchenko Cc: linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, Bartosz Golaszewski Subject: [PATCH v2 32/62] pinctrl: remove pinctrl_gpio_free() Date: Wed, 11 Oct 2023 14:08:00 +0200 Message-Id: <20231011120830.49324-33-brgl@bgdev.pl> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231011120830.49324-1-brgl@bgdev.pl> References: <20231011120830.49324-1-brgl@bgdev.pl> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=2.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_SBL_CSS, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Wed, 11 Oct 2023 05:13:50 -0700 (PDT) X-Spam-Level: ** From: Bartosz Golaszewski There are no more users of pinctrl_gpio_free() so remove it. Signed-off-by: Bartosz Golaszewski --- drivers/pinctrl/core.c | 41 +++++++++++++------------------- include/linux/pinctrl/consumer.h | 1 - 2 files changed, 17 insertions(+), 25 deletions(-) diff --git a/drivers/pinctrl/core.c b/drivers/pinctrl/core.c index 837d35b0e5c3..6e163841d145 100644 --- a/drivers/pinctrl/core.c +++ b/drivers/pinctrl/core.c @@ -819,29 +819,6 @@ int pinctrl_gpio_request_new(struct gpio_chip *gc, unsigned int offset) } EXPORT_SYMBOL_GPL(pinctrl_gpio_request_new); -/* This function is deprecated and will be removed. Don't use. */ -void pinctrl_gpio_free(unsigned gpio) -{ - struct pinctrl_dev *pctldev; - struct pinctrl_gpio_range *range; - int ret; - int pin; - - ret = pinctrl_get_device_gpio_range(gpio, &pctldev, &range); - if (ret) { - return; - } - mutex_lock(&pctldev->mutex); - - /* Convert to the pin controllers number space */ - pin = gpio_to_pin(range, gpio); - - pinmux_free_gpio(pctldev, pin, range); - - mutex_unlock(&pctldev->mutex); -} -EXPORT_SYMBOL_GPL(pinctrl_gpio_free); - /** * pinctrl_gpio_free_new() - free control on a single pin, currently used as GPIO * @gc: GPIO chip structure from the GPIO subsystem @@ -853,7 +830,23 @@ EXPORT_SYMBOL_GPL(pinctrl_gpio_free); */ void pinctrl_gpio_free_new(struct gpio_chip *gc, unsigned int offset) { - return pinctrl_gpio_free(gc->base + offset); + struct pinctrl_gpio_range *range; + struct pinctrl_dev *pctldev; + int ret, pin; + + ret = pinctrl_get_device_gpio_range(gc->base + offset, &pctldev, + &range); + if (ret) + return; + + mutex_lock(&pctldev->mutex); + + /* Convert to the pin controllers number space */ + pin = gpio_to_pin(range, gc->base + offset); + + pinmux_free_gpio(pctldev, pin, range); + + mutex_unlock(&pctldev->mutex); } EXPORT_SYMBOL_GPL(pinctrl_gpio_free_new); diff --git a/include/linux/pinctrl/consumer.h b/include/linux/pinctrl/consumer.h index ffce8d7dd0d3..467f02b0aa98 100644 --- a/include/linux/pinctrl/consumer.h +++ b/include/linux/pinctrl/consumer.h @@ -28,7 +28,6 @@ struct pinctrl_state; /* External interface to pin control */ bool pinctrl_gpio_can_use_line_new(struct gpio_chip *gc, unsigned int offset); int pinctrl_gpio_request_new(struct gpio_chip *gc, unsigned int offset); -void pinctrl_gpio_free(unsigned gpio); void pinctrl_gpio_free_new(struct gpio_chip *gc, unsigned int offset); int pinctrl_gpio_direction_input(unsigned gpio); int pinctrl_gpio_direction_input_new(struct gpio_chip *gc, -- 2.39.2