From mboxrd@z Thu Jan 1 00:00:00 1970 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 59F2FC433EF for ; Tue, 9 Nov 2021 10:02:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4782F61130 for ; Tue, 9 Nov 2021 10:02:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245127AbhKIKFB (ORCPT ); Tue, 9 Nov 2021 05:05:01 -0500 Received: from mail.kernel.org ([198.145.29.99]:60984 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229845AbhKIKFA (ORCPT ); Tue, 9 Nov 2021 05:05:00 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 4B5E961167; Tue, 9 Nov 2021 10:02:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1636452134; bh=ui2E4K1SAqfqBcQkhRszhSJbnk4ch4RwvUhXriHue1g=; h=From:To:Cc:Subject:Date:From; b=qi1aLG6b3a9xMaa83NWs9xtjC4mZA1g7JKfE+mFVqGVqblGL9OLMFrl+EACDKaPz+ K9IbAtz0AMadnrb6ozyTU+XmiFBCk2GDOWq6SboqHk8pE88406oAs011YsaPWqpVO8 RJ1rB8Lr8DgyXWv6TwSMowsVtAWKmvd/nN2sH61oozzhdSFiEM97dKFU4Mf4/OGouw 645Lz6zb2Jkd7/SkIb2BbfOcz2K0h1SbTGf4eC60xj8WkfpjRupqFOkeQOSUbrL/Sp GWjzakeKnGYjFvJn7IWyOeVKJetHM2bBvhWpau1vyG8H2R5QdRWST1ohkJBJvxEfxr Bx+3HvJDf/uoA== From: Arnd Bergmann To: linux-gpio@vger.kernel.org Cc: Arnd Bergmann , Linus Walleij , Bartosz Golaszewski , Andy Shevchenko , Geert Uytterhoeven , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 0/8] gpiolib header cleanup Date: Tue, 9 Nov 2021 11:01:59 +0100 Message-Id: <20211109100207.2474024-1-arnd@kernel.org> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org From: Arnd Bergmann I got a bit carried away after posting the first three patches, so here is a somewhat larger rework towards simplifying the remainder of the traditional linux/gpio.h interface, removing some of the rarely used functions, and dropping the inclusion of linux/gpio/driver.h from linux/gpio.h. This makes linux/gpio.h mainly a wrapper for the consumer interface. There is one more possible follow-up that I did not include here: As there are only around 350 files[1] remaining that actually use the legacy interfaces, we could rename linux/gpio.h to e.g. linux/gpio/legacy.h, and leave linux/gpio.h as an alias for linux/gpio/consumer.h until we remove it entirely. Arnd Changes since v1: - incorporate feedback from Geert Uytterhoeven - remove asm-generic/gpio.h - drop legacy export interface and a few other functions - stop including linux/gpio/driver.h Arnd Bergmann (8): gpiolib: remove irq_to_gpio() definition gpiolib: remove empty asm/gpio.h files gpiolib: coldfire: remove custom asm/gpio.h gpiolib: remove asm-generic/gpio.h gpiolib: shrink further gpiolib: remove legacy gpio_export gpiolib: remove gpio_to_chip gpiolib: split linux/gpio/driver.h out of linux/gpio.h Documentation/admin-guide/gpio/sysfs.rst | 2 +- .../driver-api/driver-model/devres.rst | 1 - Documentation/driver-api/gpio/legacy.rst | 52 +----- Documentation/translations/zh_CN/gpio.txt | 26 --- Documentation/translations/zh_TW/gpio.txt | 27 --- arch/arm/Kconfig | 1 - arch/arm/include/asm/gpio.h | 22 --- arch/arm/mach-davinci/board-dm646x-evm.c | 28 +-- 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-pxa/lubbock.c | 2 +- arch/arm/mach-s3c/mach-h1940.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 | 102 ----------- arch/m68k/include/asm/mcfgpio.h | 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 | 50 ----- drivers/gpio/Kconfig | 8 - drivers/gpio/gpio-davinci.c | 3 +- drivers/gpio/gpio-ucb1400.c | 1 + drivers/gpio/gpiolib-devres.c | 25 --- drivers/gpio/gpiolib-sysfs.c | 4 +- drivers/input/touchscreen/ads7846.c | 3 +- drivers/media/i2c/noon010pc30.c | 5 +- drivers/media/i2c/ov9650.c | 4 +- drivers/media/i2c/s5k4ecgx.c | 3 +- drivers/media/pci/sta2x11/sta2x11_vip.c | 10 +- drivers/mfd/dm355evm_msp.c | 3 +- drivers/mfd/htc-i2cpld.c | 1 + drivers/mfd/ucb1400_core.c | 1 + drivers/net/ieee802154/ca8210.c | 3 +- .../broadcom/brcm80211/brcmsmac/led.c | 1 + drivers/pinctrl/core.c | 5 +- drivers/soc/fsl/qe/gpio.c | 4 +- include/asm-generic/gpio.h | 172 ------------------ include/linux/bcma/bcma_driver_chipcommon.h | 2 +- include/linux/gpio.h | 123 +++++++------ include/linux/mfd/ucb1x00.h | 1 + include/linux/ucb1400.h | 1 + 45 files changed, 133 insertions(+), 590 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 -- 2.29.2 Cc: linux-gpio@vger.kernel.org Cc: Linus Walleij Cc: Bartosz Golaszewski Cc: Andy Shevchenko Cc: Geert Uytterhoeven Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org [1] git grep -wl '\<\(gpio_direction_input\|gpio_direction_output\|gpio_get_value_cansleep\|gpio_set_value_cansleep\|gpio_get_value\|gpio_set_value\|gpio_to_irq\|gpio_request\|gpio_request_one\|gpio_request_array\)\>\|\<\(ARCH_NR_GPIOS\|GPIOF_DIR_\|GPIOF_INIT\|GPIOF_EXPORT\|GPIOF_OPEN\|GPIOF_IN\|GPIOF_OUT\|gpio_is_valid\\|gpio_free\|devm_gpio_\)' | wc -l From mboxrd@z Thu Jan 1 00:00:00 1970 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E4D5CC433F5 for ; Tue, 9 Nov 2021 10:04:17 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id B64EA61167 for ; Tue, 9 Nov 2021 10:04:17 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org B64EA61167 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org 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: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:In-Reply-To:References: List-Owner; bh=WzzcPBlNbwlfKjxL4u9/I4BKDffnhKF7lmR0xdaYpWU=; b=gkAWVfWxVxX2cF 8vpTpxYgv2zQ228eOhiuf3gS3Mlsonxyf1Z3245AuP5VWzZBIoKlkhnSUcA8iV786sGphl85HbkCl vq2tugmr7LYDdkO9cLnmAeIbdvuBd7LGFevYD0PZVsLlLG5hxKXvI0hrpr+icRFXItthAdeXOnKG6 vCQ3HMOyXQDij3nbOr8cDJzaLDxBRL5nlm9pT/6vYEFKM+apAcItZaVmllz4/ZFrjKrc5YoSDy37f F+/C+4ZPYnRQsFCHEBCV99NF5YTMdSR9SvYnFwhBRIX33mr7vNqO6HcCny7kwSlqgZ4eNcuZYDMCW +fqgzmfchYyPBV/O12IA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mkNxV-001OQi-G0; Tue, 09 Nov 2021 10:02:31 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mkNxH-001OOZ-8f for linux-arm-kernel@lists.infradead.org; Tue, 09 Nov 2021 10:02:18 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id 4B5E961167; Tue, 9 Nov 2021 10:02:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1636452134; bh=ui2E4K1SAqfqBcQkhRszhSJbnk4ch4RwvUhXriHue1g=; h=From:To:Cc:Subject:Date:From; b=qi1aLG6b3a9xMaa83NWs9xtjC4mZA1g7JKfE+mFVqGVqblGL9OLMFrl+EACDKaPz+ K9IbAtz0AMadnrb6ozyTU+XmiFBCk2GDOWq6SboqHk8pE88406oAs011YsaPWqpVO8 RJ1rB8Lr8DgyXWv6TwSMowsVtAWKmvd/nN2sH61oozzhdSFiEM97dKFU4Mf4/OGouw 645Lz6zb2Jkd7/SkIb2BbfOcz2K0h1SbTGf4eC60xj8WkfpjRupqFOkeQOSUbrL/Sp GWjzakeKnGYjFvJn7IWyOeVKJetHM2bBvhWpau1vyG8H2R5QdRWST1ohkJBJvxEfxr Bx+3HvJDf/uoA== From: Arnd Bergmann To: linux-gpio@vger.kernel.org Cc: Arnd Bergmann , Linus Walleij , Bartosz Golaszewski , Andy Shevchenko , Geert Uytterhoeven , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 0/8] gpiolib header cleanup Date: Tue, 9 Nov 2021 11:01:59 +0100 Message-Id: <20211109100207.2474024-1-arnd@kernel.org> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211109_020215_382235_C5D07BBC X-CRM114-Status: GOOD ( 15.10 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Arnd Bergmann I got a bit carried away after posting the first three patches, so here is a somewhat larger rework towards simplifying the remainder of the traditional linux/gpio.h interface, removing some of the rarely used functions, and dropping the inclusion of linux/gpio/driver.h from linux/gpio.h. This makes linux/gpio.h mainly a wrapper for the consumer interface. There is one more possible follow-up that I did not include here: As there are only around 350 files[1] remaining that actually use the legacy interfaces, we could rename linux/gpio.h to e.g. linux/gpio/legacy.h, and leave linux/gpio.h as an alias for linux/gpio/consumer.h until we remove it entirely. Arnd Changes since v1: - incorporate feedback from Geert Uytterhoeven - remove asm-generic/gpio.h - drop legacy export interface and a few other functions - stop including linux/gpio/driver.h Arnd Bergmann (8): gpiolib: remove irq_to_gpio() definition gpiolib: remove empty asm/gpio.h files gpiolib: coldfire: remove custom asm/gpio.h gpiolib: remove asm-generic/gpio.h gpiolib: shrink further gpiolib: remove legacy gpio_export gpiolib: remove gpio_to_chip gpiolib: split linux/gpio/driver.h out of linux/gpio.h Documentation/admin-guide/gpio/sysfs.rst | 2 +- .../driver-api/driver-model/devres.rst | 1 - Documentation/driver-api/gpio/legacy.rst | 52 +----- Documentation/translations/zh_CN/gpio.txt | 26 --- Documentation/translations/zh_TW/gpio.txt | 27 --- arch/arm/Kconfig | 1 - arch/arm/include/asm/gpio.h | 22 --- arch/arm/mach-davinci/board-dm646x-evm.c | 28 +-- 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-pxa/lubbock.c | 2 +- arch/arm/mach-s3c/mach-h1940.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 | 102 ----------- arch/m68k/include/asm/mcfgpio.h | 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 | 50 ----- drivers/gpio/Kconfig | 8 - drivers/gpio/gpio-davinci.c | 3 +- drivers/gpio/gpio-ucb1400.c | 1 + drivers/gpio/gpiolib-devres.c | 25 --- drivers/gpio/gpiolib-sysfs.c | 4 +- drivers/input/touchscreen/ads7846.c | 3 +- drivers/media/i2c/noon010pc30.c | 5 +- drivers/media/i2c/ov9650.c | 4 +- drivers/media/i2c/s5k4ecgx.c | 3 +- drivers/media/pci/sta2x11/sta2x11_vip.c | 10 +- drivers/mfd/dm355evm_msp.c | 3 +- drivers/mfd/htc-i2cpld.c | 1 + drivers/mfd/ucb1400_core.c | 1 + drivers/net/ieee802154/ca8210.c | 3 +- .../broadcom/brcm80211/brcmsmac/led.c | 1 + drivers/pinctrl/core.c | 5 +- drivers/soc/fsl/qe/gpio.c | 4 +- include/asm-generic/gpio.h | 172 ------------------ include/linux/bcma/bcma_driver_chipcommon.h | 2 +- include/linux/gpio.h | 123 +++++++------ include/linux/mfd/ucb1x00.h | 1 + include/linux/ucb1400.h | 1 + 45 files changed, 133 insertions(+), 590 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 -- 2.29.2 Cc: linux-gpio@vger.kernel.org Cc: Linus Walleij Cc: Bartosz Golaszewski Cc: Andy Shevchenko Cc: Geert Uytterhoeven Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org [1] git grep -wl '\<\(gpio_direction_input\|gpio_direction_output\|gpio_get_value_cansleep\|gpio_set_value_cansleep\|gpio_get_value\|gpio_set_value\|gpio_to_irq\|gpio_request\|gpio_request_one\|gpio_request_array\)\>\|\<\(ARCH_NR_GPIOS\|GPIOF_DIR_\|GPIOF_INIT\|GPIOF_EXPORT\|GPIOF_OPEN\|GPIOF_IN\|GPIOF_OUT\|gpio_is_valid\\|gpio_free\|devm_gpio_\)' | wc -l _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel