From patchwork Wed Feb 8 17:33:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 54540 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp3589123wrn; Wed, 8 Feb 2023 09:36:36 -0800 (PST) X-Google-Smtp-Source: AK7set8rqDbVKsuCAxLKUZ41YVYR2wHvsaa3H9WkqGcECC+w4Wu71sW0KBvsS+zyvPYFMTZ3JVu0 X-Received: by 2002:a05:6a20:7f94:b0:b8:b9e7:6d4 with SMTP id d20-20020a056a207f9400b000b8b9e706d4mr11025655pzj.0.1675877796512; Wed, 08 Feb 2023 09:36:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675877796; cv=none; d=google.com; s=arc-20160816; b=kd7qKta23alh/jV1pzJ2P9HgPVKjGGwaXruO9LpTxe7pWSGWxmuhvyT4BkGdT0+ieB 4Q34sMMD+M3fZy1mkqQWYcbvmeoQFoOed/psYcbdc9TZUQxWHMbrXwQB29HEKeI5dEXx FO7ij1m9PCsGVs2by3vlnySSNmMjqB+8E6wMd9ygL4SY1JDv9R0bGEy6WkGB1G5HeVNl BpR/WXPegEhdU2Cgu4VyXYsi7StUn6JJU+BL7xTv6G6hP3vK+Zw7C+JW+2/NPTsK8ydz 6kDDCwUJf3UjD78cwYy6SynDvety1Lfec5+zoN4i/2C1EAK16P9AUx5r0xAD8dS3fG5a 8Iiw== 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=kthZAet+H5oOpRT1zTA1MKQwlaKroeTGSZ+wwym/lPU=; b=KVg4cfbHa8miewllY6XP8gmDDbv6ELRa6Bn3AUmfBwqGIl/b07EZPnbYbgMo+0SN2l EzjeoS8GpHfhLyLU/sgciIGfVOQOSIHJXxOWdPq1cLdudJL7sc/woLGBdlbicGf7k/Oc +SkC2wHMVJpNmsis3PdpBAZocVaH4ANrWaTk1pXM0+r2Gc3j1zhAwfVcsMKlJrp+mbrB 0T7cnbwcUzyFOhB5+xii/YN0qySkv71TOkl4nVvWDthJj2hWIRNUoTgRHe/sE46nXdKf 461T0U6IPFz1PKHbN2J6QeFrlFd4ORlKHFl6NTdccWRzomA5csNW8IcAsriUa+5as4h8 TldQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=eFi8ChfT; 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=intel.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p11-20020a63950b000000b004cd1e132878si13851644pgd.764.2023.02.08.09.36.22; Wed, 08 Feb 2023 09:36:36 -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=@intel.com header.s=Intel header.b=eFi8ChfT; 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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232302AbjBHRfy (ORCPT + 99 others); Wed, 8 Feb 2023 12:35:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40284 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232063AbjBHReV (ORCPT ); Wed, 8 Feb 2023 12:34:21 -0500 Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 12AC6518C6; Wed, 8 Feb 2023 09:34:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1675877648; x=1707413648; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=8Loz5frdfBtc0l4PlP9rbgkvfnulxYbRlKr/4QRrkgw=; b=eFi8ChfT7++4L/EX4oeubArrcxrVDFm+apkv0gcgMX3ZzQBTdTgRBm3+ WcmmR8N5WOvyymDDzrXnCB7ZiwW+ebAQNX7uMvMtKtKINcZISmmJm/pg8 6fBMSvCW5nZqNn3It7FZrVu/4jN8/c5JnKoJUGuvh3Akxm7VRrmEXxhDk BCzdzYxAathBeU7G4q8rUlDEAnVjLJw0q9Cl63pUuNdi5/COlISrvh2q8 F9iXs+iH+G9wJmX3LShCfSsoC7QZKv2/fOqfTDQxeW9K+uLxrQ1S3+eTt RUXNG21KG3IsjaeSVxqWH/j1nKDXuURNOknXZm6rV1JCVWlX7pEOz7NQT g==; X-IronPort-AV: E=McAfee;i="6500,9779,10615"; a="310225405" X-IronPort-AV: E=Sophos;i="5.97,281,1669104000"; d="scan'208";a="310225405" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Feb 2023 09:33:28 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10615"; a="660703928" X-IronPort-AV: E=Sophos;i="5.97,281,1669104000"; d="scan'208";a="660703928" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga007.jf.intel.com with ESMTP; 08 Feb 2023 09:33:22 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id F316D37D; Wed, 8 Feb 2023 19:33:47 +0200 (EET) From: Andy Shevchenko To: Andy Shevchenko , Arnd Bergmann , Linus Walleij , Bartosz Golaszewski , Tony Lindgren , Thomas Gleixner , Krzysztof Kozlowski , Geert Uytterhoeven , Michael Ellerman , Christophe Leroy , Vincenzo Palazzo , Devarsh Thakkar , Michael Walle , Dmitry Torokhov , Dipen Patel , Thierry Reding , Stefan Schmidt , Miquel Raynal , Lee Jones , linux-gpio@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc-tw-discuss@lists.sourceforge.net, linux-arm-kernel@lists.infradead.org, linux-omap@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-m68k@lists.linux-m68k.org, linuxppc-dev@lists.ozlabs.org, linux-sh@vger.kernel.org, linux-acpi@vger.kernel.org, linux-tegra@vger.kernel.org, linux-input@vger.kernel.org, linux-media@vger.kernel.org, linux-wpan@vger.kernel.org, netdev@vger.kernel.org, linux-wireless@vger.kernel.org, brcm80211-dev-list.pdl@broadcom.com, SHA-cyfmac-dev-list@infineon.com, linux-arch@vger.kernel.org, devicetree@vger.kernel.org Cc: Bartosz Golaszewski , Jonathan Corbet , Alex Shi , Yanteng Si , Hu Haowen , Russell King , Aaro Koskinen , Janusz Krzysztofik , Andrew Lunn , Sebastian Hesselbarth , Gregory Clement , Alim Akhtar , Nicholas Piggin , Yoshinori Sato , Rich Felker , Mun Yew Tham , Keerthy , Mika Westerberg , Thierry Reding , Jonathan Hunter , Mauro Carvalho Chehab , Alexander Aring , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Arend van Spriel , Franky Lin , Hante Meuleman , Kalle Valo , Qiang Zhao , Li Yang , Rob Herring , Frank Rowand Subject: [PATCH v4 08/18] gpiolib: remove gpio_set_debounce() Date: Wed, 8 Feb 2023 19:33:33 +0200 Message-Id: <20230208173343.37582-9-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230208173343.37582-1-andriy.shevchenko@linux.intel.com> References: <20230208173343.37582-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE autolearn=ham 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?1757285236466435276?= X-GMAIL-MSGID: =?utf-8?q?1757285236466435276?= From: Arnd Bergmann gpio_set_debounce() only has a single user, which is trivially converted to gpiod_set_debounce(). Signed-off-by: Arnd Bergmann Reviewed-by: Linus Walleij Reviewed-by: Andy Shevchenko Signed-off-by: Andy Shevchenko Acked-by: Dmitry Torokhov --- Documentation/driver-api/gpio/legacy.rst | 2 -- .../translations/zh_CN/driver-api/gpio/legacy.rst | 1 - Documentation/translations/zh_TW/gpio.txt | 1 - drivers/input/touchscreen/ads7846.c | 5 +++-- include/linux/gpio.h | 10 ---------- 5 files changed, 3 insertions(+), 16 deletions(-) diff --git a/Documentation/driver-api/gpio/legacy.rst b/Documentation/driver-api/gpio/legacy.rst index a0559d93efd1..e0306e78e34b 100644 --- a/Documentation/driver-api/gpio/legacy.rst +++ b/Documentation/driver-api/gpio/legacy.rst @@ -238,8 +238,6 @@ setup or driver probe/teardown code, so this is an easy constraint.):: ## gpio_free_array() gpio_free() - gpio_set_debounce() - Claiming and Releasing GPIOs diff --git a/Documentation/translations/zh_CN/driver-api/gpio/legacy.rst b/Documentation/translations/zh_CN/driver-api/gpio/legacy.rst index 74fa473bb504..dee2a0517c1c 100644 --- a/Documentation/translations/zh_CN/driver-api/gpio/legacy.rst +++ b/Documentation/translations/zh_CN/driver-api/gpio/legacy.rst @@ -219,7 +219,6 @@ GPIO 值的命令需要等待其信息排到队首才发送命令,再获得其 ## gpio_free_array() gpio_free() - gpio_set_debounce() diff --git a/Documentation/translations/zh_TW/gpio.txt b/Documentation/translations/zh_TW/gpio.txt index 1b986bbb0909..dc608358d90a 100644 --- a/Documentation/translations/zh_TW/gpio.txt +++ b/Documentation/translations/zh_TW/gpio.txt @@ -226,7 +226,6 @@ GPIO 值的命令需要等待其信息排到隊首才發送命令,再獲得其 ## gpio_free_array() gpio_free() - gpio_set_debounce() diff --git a/drivers/input/touchscreen/ads7846.c b/drivers/input/touchscreen/ads7846.c index 17f11bce8113..bb1058b1e7fd 100644 --- a/drivers/input/touchscreen/ads7846.c +++ b/drivers/input/touchscreen/ads7846.c @@ -27,6 +27,7 @@ #include #include #include +#include #include #include #include @@ -1012,8 +1013,8 @@ static int ads7846_setup_pendown(struct spi_device *spi, ts->gpio_pendown = pdata->gpio_pendown; if (pdata->gpio_pendown_debounce) - gpio_set_debounce(pdata->gpio_pendown, - pdata->gpio_pendown_debounce); + gpiod_set_debounce(gpio_to_desc(ts->gpio_pendown), + pdata->gpio_pendown_debounce); } else { dev_err(&spi->dev, "no get_pendown_state nor gpio_pendown?\n"); return -EINVAL; diff --git a/include/linux/gpio.h b/include/linux/gpio.h index d5ce78e2bdd9..fc56733e8514 100644 --- a/include/linux/gpio.h +++ b/include/linux/gpio.h @@ -100,11 +100,6 @@ static inline int gpio_direction_output(unsigned gpio, int value) return gpiod_direction_output_raw(gpio_to_desc(gpio), value); } -static inline int gpio_set_debounce(unsigned gpio, unsigned debounce) -{ - return gpiod_set_debounce(gpio_to_desc(gpio), debounce); -} - static inline int gpio_get_value_cansleep(unsigned gpio) { return gpiod_get_raw_value_cansleep(gpio_to_desc(gpio)); @@ -214,11 +209,6 @@ static inline int gpio_direction_output(unsigned gpio, int value) return -ENOSYS; } -static inline int gpio_set_debounce(unsigned gpio, unsigned debounce) -{ - return -ENOSYS; -} - static inline int gpio_get_value(unsigned gpio) { /* GPIO can never have been requested or set as {in,out}put */