From patchwork Fri Jan 27 10:11:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 4621 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp754921wrn; Fri, 27 Jan 2023 02:16:36 -0800 (PST) X-Google-Smtp-Source: AK7set83i5I9aAzL64TlXs0XnY6dpGveDCneUyXQ5z9zO/UOLVifENAwXK7/vnEtdpYLHU7h/qGk X-Received: by 2002:a17:903:2013:b0:196:37db:b4b7 with SMTP id s19-20020a170903201300b0019637dbb4b7mr4502559pla.62.1674814596434; Fri, 27 Jan 2023 02:16:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674814596; cv=none; d=google.com; s=arc-20160816; b=bNuVTV8GyGR8jHC2LGFvto2Qv/tz1jm8rT0lD8Wa7y3t6CVN+PLC2qWyCdjkXefyPt +n4Pu4qpsvQdxsCk9GgqRrGUSnQ6fqMiZsBw10WDmWaEg/4BomJ7b3TWZ+9x3jXRhoKz uqgeKOGA3ZpHxrFMbRPoAQ74vkvo7qJ2Q6iEyZEJ+do36fDyadqJNVb52zUuhG3is+lL HHt7OH0Tnl/hbAZjGyQ2UdDUqX8xhelQKuHAC8r1v9vI1hkkB2aST/m9SXz3hdT8f+7z ipmxX8Ti4b2X3JCJKLhvMhJbZZwCXW6ynHzX2KQBf6wPam6GVxJVtCVrV08XLSJVysdu HGaQ== 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=zRx/ALXEjgJ8uNaShwI169a0Dfvx3vbu7dUKsX0vsyQ=; b=L7PxIZLSGGFFGmXZ6rUkaAjmor2XxCQDiIizFgq57BlWN6C8aTRUMEtaxuZLiRduWl RlKxu8gsNNrOeMBPKQyWwDxubF3SaEMxTdZb+3AhLzBsW/EWjPUWf2nb631vpsexsQZX IdAjuOZNnVxwhBAiImG4xSWpKCgMFw8reCOdEwpqScSh9JZn5l/2RDHlD7U8FIERvlfv e6ngD5ILL5XZO76L2TUoRBYDHyp/BxA5kr9VnfUtMLr0jsR5zZz1WgFBXHJ806P4YrVA AE/Z6r0zOuK/MNxCgXcy2D86pC5/LJttUAWuWahF+9fznlLEKDk0n2eIY8G4PSpVAtfY 8gKw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="p9u/J713"; 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=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o17-20020a639211000000b004df7f2fd5e0si359658pgd.9.2023.01.27.02.16.23; Fri, 27 Jan 2023 02:16: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=@kernel.org header.s=k20201202 header.b="p9u/J713"; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232587AbjA0KMK (ORCPT + 99 others); Fri, 27 Jan 2023 05:12:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49102 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230484AbjA0KMJ (ORCPT ); Fri, 27 Jan 2023 05:12:09 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 76CBE4B75C; Fri, 27 Jan 2023 02:12:08 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 1136561AAF; Fri, 27 Jan 2023 10:12:08 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9FDDAC433D2; Fri, 27 Jan 2023 10:12:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1674814327; bh=i67XWQ4u907BdUnMEggi2iwwv63y+dXueqd42qyYI/g=; h=From:To:Cc:Subject:Date:From; b=p9u/J713JaKCr9HZIpEsVA1TuD4U/3a9uGG+fZi74FlOkJEn9xbfHPBXwIhiBbZGX Nlxyk6Fzlf8vFQRKbHYnABiLzV29efCx4PUMiSwFNUMfKqM6UB3bS+0sivbvB7qrUa djXPpWL8cGUbZR9ghP8C2wzYuAueT/fGOG0Gk9PHI103oeeSni9CNjAFWOYz3QC3ei 5dsLyHNQDiR1cPi1mqvUgeCcyAWw7MXM7foG+g/+GpmhNwT3tRZp9xIqXrhLE2kGYF jQ9geivCNR0KcI2iAx53T7uTPnZbqnifE/Siz7Onf1NMfOmwFy/1gH4c+AnAC+4X+C c46yZHmIUV8eg== From: Arnd Bergmann To: linux-gpio@vger.kernel.org Cc: Arnd Bergmann , Andy Shevchenko , Bartosz Golaszewski , Christophe Leroy , Dmitry Torokhov , Linus Walleij , linux-kernel@vger.kernel.org Subject: [PATCH v2 0/7] gpiolib cleanups Date: Fri, 27 Jan 2023 11:11:42 +0100 Message-Id: <20230127101149.3475929-1-arnd@kernel.org> X-Mailer: git-send-email 2.39.0 MIME-Version: 1.0 X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS 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?1756170390271777488?= X-GMAIL-MSGID: =?utf-8?q?1756170390271777488?= From: Arnd Bergmann These are some older patches I did last year, rebased to linux-next-20230127. The main goal is to remove some of the legacy bits of the gpiolib interfaces, where the corner cases are easily avoided or replaced with gpio descriptor based interfaces. Arnd Changes in v2: - dropped patch 8 after Andy's identical patch was merged - rebase on latest gpio tree - leave unused gpio_cansleep() in place for now - address feedback from Andy Shevchenko Cc: Andy Shevchenko Cc: Bartosz Golaszewski Cc: Christophe Leroy Cc: Dmitry Torokhov Cc: Linus Walleij Cc: linux-gpio@vger.kernel.org> Cc: linux-kernel@vger.kernel.org Arnd Bergmann (7): gpiolib: remove empty asm/gpio.h files gpiolib: coldfire: remove custom asm/gpio.h gpiolib: remove asm-generic/gpio.h gpiolib: remove gpio_set_debounce gpiolib: remove legacy gpio_export gpiolib: split linux/gpio/driver.h out of linux/gpio.h gpiolib: split of_mm_gpio_chip out of linux/of_gpio.h Documentation/admin-guide/gpio/sysfs.rst | 2 +- Documentation/driver-api/gpio/legacy.rst | 23 --- .../zh_CN/driver-api/gpio/legacy.rst | 20 --- Documentation/translations/zh_TW/gpio.txt | 19 --- MAINTAINERS | 1 - arch/arm/Kconfig | 1 - arch/arm/include/asm/gpio.h | 21 --- arch/arm/mach-omap1/irq.c | 1 + arch/arm/mach-omap2/pdata-quirks.c | 9 +- arch/arm/mach-orion5x/board-rd88f5182.c | 1 + arch/arm/mach-s3c/s3c64xx.c | 1 + arch/arm/mach-sa1100/assabet.c | 1 + arch/arm/plat-orion/gpio.c | 1 + arch/m68k/Kconfig.cpu | 1 - arch/m68k/include/asm/gpio.h | 95 ----------- arch/m68k/include/asm/mcfgpio.h | 2 +- arch/powerpc/platforms/44x/Kconfig | 1 + arch/powerpc/platforms/4xx/gpio.c | 2 +- arch/powerpc/platforms/8xx/Kconfig | 1 + arch/powerpc/platforms/8xx/cpm1.c | 2 +- arch/powerpc/platforms/Kconfig | 2 + arch/powerpc/sysdev/cpm_common.c | 2 +- arch/sh/Kconfig | 1 - arch/sh/boards/board-magicpanelr2.c | 1 + arch/sh/boards/mach-ap325rxa/setup.c | 7 +- arch/sh/include/asm/gpio.h | 45 ------ drivers/gpio/Kconfig | 19 ++- drivers/gpio/TODO | 15 +- drivers/gpio/gpio-altera.c | 2 +- drivers/gpio/gpio-davinci.c | 2 - drivers/gpio/gpio-mm-lantiq.c | 2 +- drivers/gpio/gpio-mpc5200.c | 2 +- drivers/gpio/gpiolib-of.c | 3 + drivers/gpio/gpiolib-sysfs.c | 4 +- drivers/input/touchscreen/ads7846.c | 25 +-- drivers/media/pci/sta2x11/sta2x11_vip.c | 10 +- drivers/net/ieee802154/ca8210.c | 3 +- .../broadcom/brcm80211/brcmsmac/led.c | 1 + drivers/pinctrl/core.c | 1 - drivers/soc/fsl/qe/gpio.c | 2 +- include/asm-generic/gpio.h | 147 ------------------ include/linux/gpio.h | 91 +++++++---- include/linux/gpio/legacy-of-mm-gpiochip.h | 36 +++++ include/linux/mfd/ucb1x00.h | 1 + include/linux/of_gpio.h | 21 --- 45 files changed, 174 insertions(+), 476 deletions(-) delete mode 100644 arch/arm/include/asm/gpio.h delete mode 100644 arch/m68k/include/asm/gpio.h delete mode 100644 arch/sh/include/asm/gpio.h delete mode 100644 include/asm-generic/gpio.h create mode 100644 include/linux/gpio/legacy-of-mm-gpiochip.h