Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp3116973rdg; Tue, 17 Oct 2023 05:21:12 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEGe/1nDlxlnY64LNyJTkUPx7oztJP2mnO55i9QRR0XJyX+hH1/ncUiWct+imytrZe+1Zhu X-Received: by 2002:a17:903:78f:b0:1ca:86db:1d31 with SMTP id kn15-20020a170903078f00b001ca86db1d31mr1595413plb.7.1697545271215; Tue, 17 Oct 2023 05:21:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697545271; cv=none; d=google.com; s=arc-20160816; b=SuHBVJDXbDmMnu66rOExMQ0n2Uj41OovAjyU0u42WMkKJV3cGKhIMTlzfs2DMfrzPa VtGvIAz+wNEgPmcK71/HWpOmeW8ijY7cE6fU761z2RhqbI6tnkr/VQzXv/5ubuz+u297 jS0aySydtq7+MZRm0/pbtPuakNmDiGHwuVallACAtFr7J313Xr/G7KshROW47qxmepYs Mnu3RxvRaki3vfvXJC68g5YoeM6v6UNrm/wozPsWeINY/ZdjPQGOlP3e/y3LdMPbhjym pgNyHlybc3dbG75dcgQP0WhpeCQZ9l+ED4E8Uk90kOwiB1F+wQIzyZf48Lw09DPcsFi3 U1+Q== 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=Lqh80WdRi0gOj4xJupqHqeCuK7TYCSZZE8MoyG0FXMc=; fh=kOxmq+prcfKKX/dgMaMxTb6TRjzyc//QKXZBiaS/a94=; b=k0i+n+ogsvW2qjplhoC1Et2uzTtBYV2UvFHuY4UZm3Om7pR84f7TzQmM8+U/kSp0It 891S5pFKVVbMsJHmRwVAMbYsDUhOp/GFwzrF1I+9a+zBZTu25rAQB3Q6TEIupsKCQHLI bYeSGiGjJL8cDzjWuMak1fhgVNmRojxVoJgpX/V6YTtd9HOfqAVMfceNlAEd7vdDvV8k fqfvKPeEhJOyEytS/OdqljNhVcOT2GEzUdwlo9wjbwURYKWw01BQZg/VDoXsd1V0S3iN WlHkB+zmuXHDZ+D99xf5srFO/c2ld8IM6euA/ARu/AwqP2O+pTOJfNx63QyF7xOtbxQf 6s8w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20230601.gappssmtp.com header.s=20230601 header.b=Jp9HR6nF; 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 r18-20020a170902c61200b001c5da8b630fsi1488742plr.421.2023.10.17.05.21.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Oct 2023 05:21:11 -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=Jp9HR6nF; 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 D7A29804A9FF; Tue, 17 Oct 2023 05:21:07 -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 S235191AbjJQMU4 (ORCPT + 99 others); Tue, 17 Oct 2023 08:20:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48566 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235137AbjJQMUi (ORCPT ); Tue, 17 Oct 2023 08:20:38 -0400 Received: from mail-wm1-x330.google.com (mail-wm1-x330.google.com [IPv6:2a00:1450:4864:20::330]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 361561BF6 for ; Tue, 17 Oct 2023 05:05:30 -0700 (PDT) Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-4064867903cso62409455e9.2 for ; Tue, 17 Oct 2023 05:05:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1697544328; x=1698149128; 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=Lqh80WdRi0gOj4xJupqHqeCuK7TYCSZZE8MoyG0FXMc=; b=Jp9HR6nFwhdnzZ3rk2trcvAffihrRRbD9skIVXxL4UrSkktfEAcQ0zEBNNgc7DA57o lg6prSQKRZhqhDb7R1abWL0PdiKfT9ZZ02gunA+qoYz2GAhmDIz2US8pNmzZC/R6hqkn iaSHSLts84BPCmm3AH/+M2s3KFNqDpwdxxKMAwy/kY9qpTTQWELq6z+4T9F9uhQ5sHOF gRJV3rrQefVLG7dFeTsjOZ4NMgv0ETSZpvtE+34IzWQDjP1mBWjwMxk6nEtaz+WNIAzs mO1CD0WBwKZPoRQglRTWGREK9jZzammWM+SMsrS5Fv2ymUArnannog0ymacwrs2xHlgL FEmg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697544328; x=1698149128; 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=Lqh80WdRi0gOj4xJupqHqeCuK7TYCSZZE8MoyG0FXMc=; b=qgss9RXRJbCqhh+Pnxj+bw7TCNbpf/pLXc3oeutFKKnpconOoEBYaDf/DMZ70q071l Uo5SvJdDXsbcFWLw2tYpUeyQqfNYbsR1qpCoxEBpsCSyro8iI69w5TbqaCTicl9d0H3a sbYQbQVx3U0Ds+Rypifd+0rNWcKXI6s2jp8S/KsutkKCL5iVpnSEYQQqxkLGxmjhH8dQ xQtXR7FQktABFBNdhl+mTESj+waL3Mo+l/uaLi+zOSWfT2J7CM1ccu/9bO+f0g/bxpJl CMRFQliZKs7KfQ/JY5G9A7HKhgdYu4VcwEsn12oZikcAijua7AL2CVt1SPrppd9bYzFL +fDA== X-Gm-Message-State: AOJu0YxcN3GPg+KScu3jP83R96ODvw8fO2LvDVge32jN6HBX6JSFfjxy 4HoJFPB543tZY5Jxw9fhybsZV4lduOCEpnJPQhQ= X-Received: by 2002:a05:600c:4f0d:b0:405:37bb:d940 with SMTP id l13-20020a05600c4f0d00b0040537bbd940mr1723644wmq.0.1697544328006; Tue, 17 Oct 2023 05:05:28 -0700 (PDT) Received: from brgl-uxlite.home ([2a01:cb1d:334:ac00:f1ee:b000:ce90:ed14]) by smtp.gmail.com with ESMTPSA id a2-20020a05600c224200b00405442edc69sm1353859wmm.14.2023.10.17.05.05.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Oct 2023 05:05:27 -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 v3 41/73] pinctrl: remove pinctrl_gpio_set_config() Date: Tue, 17 Oct 2023 14:03:59 +0200 Message-Id: <20231017120431.68847-42-brgl@bgdev.pl> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231017120431.68847-1-brgl@bgdev.pl> References: <20231017120431.68847-1-brgl@bgdev.pl> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,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 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]); Tue, 17 Oct 2023 05:21:08 -0700 (PDT) From: Bartosz Golaszewski There are no more users of pinctrl_gpio_set_config() so remove it. Signed-off-by: Bartosz Golaszewski --- drivers/pinctrl/core.c | 38 ++++++++++++++------------------ include/linux/pinctrl/consumer.h | 6 ----- 2 files changed, 16 insertions(+), 28 deletions(-) diff --git a/drivers/pinctrl/core.c b/drivers/pinctrl/core.c index 0d66b3d5e685..881845395885 100644 --- a/drivers/pinctrl/core.c +++ b/drivers/pinctrl/core.c @@ -904,27 +904,6 @@ int pinctrl_gpio_direction_output_new(struct gpio_chip *gc, unsigned int offset) } EXPORT_SYMBOL_GPL(pinctrl_gpio_direction_output_new); -/* This function is deprecated and will be removed. Don't use. */ -int pinctrl_gpio_set_config(unsigned gpio, unsigned long config) -{ - unsigned long configs[] = { config }; - struct pinctrl_gpio_range *range; - struct pinctrl_dev *pctldev; - int ret, pin; - - ret = pinctrl_get_device_gpio_range(gpio, &pctldev, &range); - if (ret) - return ret; - - mutex_lock(&pctldev->mutex); - pin = gpio_to_pin(range, gpio); - ret = pinconf_set_config(pctldev, pin, configs, ARRAY_SIZE(configs)); - mutex_unlock(&pctldev->mutex); - - return ret; -} -EXPORT_SYMBOL_GPL(pinctrl_gpio_set_config); - /** * pinctrl_gpio_set_config_new() - Apply config to given GPIO pin * @gc: GPIO chip structure from the GPIO subsystem @@ -938,7 +917,22 @@ EXPORT_SYMBOL_GPL(pinctrl_gpio_set_config); int pinctrl_gpio_set_config_new(struct gpio_chip *gc, unsigned int offset, unsigned long config) { - return pinctrl_gpio_set_config(gc->base + offset, config); + unsigned long configs[] = { config }; + 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 ret; + + mutex_lock(&pctldev->mutex); + pin = gpio_to_pin(range, gc->base + offset); + ret = pinconf_set_config(pctldev, pin, configs, ARRAY_SIZE(configs)); + mutex_unlock(&pctldev->mutex); + + return ret; } EXPORT_SYMBOL_GPL(pinctrl_gpio_set_config_new); diff --git a/include/linux/pinctrl/consumer.h b/include/linux/pinctrl/consumer.h index e25e9b0599ac..aa3a7a7ca52d 100644 --- a/include/linux/pinctrl/consumer.h +++ b/include/linux/pinctrl/consumer.h @@ -33,7 +33,6 @@ int pinctrl_gpio_direction_input_new(struct gpio_chip *gc, unsigned int offset); int pinctrl_gpio_direction_output_new(struct gpio_chip *gc, unsigned int offset); -int pinctrl_gpio_set_config(unsigned gpio, unsigned long config); int pinctrl_gpio_set_config_new(struct gpio_chip *gc, unsigned int offset, unsigned long config); @@ -97,11 +96,6 @@ pinctrl_gpio_direction_output_new(struct gpio_chip *gc, unsigned int offset) return 0; } -static inline int pinctrl_gpio_set_config(unsigned gpio, unsigned long config) -{ - return 0; -} - static inline int pinctrl_gpio_set_config_new(struct gpio_chip *gc, unsigned int offset, unsigned long config) -- 2.39.2