summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2024-09-18 11:43:07 +0300
committerLinus Torvalds <torvalds@linux-foundation.org>2024-09-18 11:43:07 +0300
commit9b08f8327f71bf3b091567f0a9ddb72ca60f4fb2 (patch)
treea32fda2b4379418975938f16e02866b23e095540 /include/linux
parentcc52dc2fe39ff5dee9916ac2d9381ec3cbf650c0 (diff)
parent6b5e97c020060c2b8ad286002415106ab7034435 (diff)
downloadlinux-9b08f8327f71bf3b091567f0a9ddb72ca60f4fb2.tar.xz
Merge tag 'gpio-updates-for-v6.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux
Pull gpio updates from Bartosz Golaszewski: "Core GPIOLIB: - provide and add users for a macro allowing to iterate over accepted GPIO property names of consumer device nodes - remove legacy definitions that are no longer used - put legacy GPIO devres helpers together with the rest of the deprecated code - implement and use swnode_gpio_get_reference(): a wrapper simplifying the underlying calls to fwnode_property_get_reference_args() - use IS_ERR_OR_NULL() where it makes sense - replace of_find_property() with of_property_present() - simplify code with the scoped variant of OF-node children iterator Documentation: - update GPIO kerneldocs with Return sections - fix "Excess struct member description" warnings now being triggered with W=1 New drivers: - add support for Analog Devices ADP5585 Driver improvements: - add support for wake-on-GPIO to gpio-mpc8xxx - use GPIO_LOOKUP_IDX() in gpio-virtuser - use devm_clk_get_[optional_]enabled() where applicable in several drivers - replace OF-specific functions with provider-agnostic alternatives where possible - drop support for legacy platform data from gpio-ath79 and gpio-davinci - refactor gpio-stmpe - improve error reporting in gpio-pca953x - add support for reading the direction of pins for some models to gpio-vf610 DT bindings: - convert the bindings for nxp,lpc3220 to YAML - add gpio-reserved-ranges to gpio-davinci - simplify the GPIO hog schema - fix a GPIO hog issue in bindings for fcs,fxl6408 Other: - fix format specifiers in user-space tools - remove leftover files on make clean in tools/gpio/" * tag 'gpio-updates-for-v6.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux: (54 commits) gpio: mpc8xxx: switch to using DEFINE_RUNTIME_DEV_PM_OPS() gpio: xilinx: Use helper function devm_clk_get_optional_enabled() gpio: mb86s7x: Use helper function devm_clk_get_optional_enabled() gpio: lpc18xx: Use helper function devm_clk_get_enabled() gpio: cadence: Use helper function devm_clk_get_enabled() gpio: sama5d2-piobu: convert comma to semicolon gpio: mpc8xxx: order headers alphabetically gpio: davinci: use devm_clk_get_enabled() gpio: davinci: drop platform data support gpio: stmpe: Sort headers gpio: stmpe: Make use of device properties gpio: stmpe: Utilise temporary variable for struct device gpio: stmpe: Remove unused 'dev' member of struct stmpe_gpio gpio: stmpe: Fix IRQ related error messages gpio: pch: kerneldoc fixes for excess members gpio: zynq: Simplify using devm_clk_get_enabled() gpio: mpc8xxx: Add wake on GPIO support gpio: syscon: fix excess struct member build warning gpio: stp-xway: Simplify using devm_clk_get_enabled() gpiolib: legacy: Consolidate devm_gpio_*() with other legacy APIs ...
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/gpio.h12
-rw-r--r--include/linux/platform_data/gpio-ath79.h16
-rw-r--r--include/linux/platform_data/gpio-davinci.h21
3 files changed, 3 insertions, 46 deletions
diff --git a/include/linux/gpio.h b/include/linux/gpio.h
index 063f71b18a7c..2d105be7bbc3 100644
--- a/include/linux/gpio.h
+++ b/include/linux/gpio.h
@@ -17,15 +17,9 @@
struct device;
/* make these flag values available regardless of GPIO kconfig options */
-#define GPIOF_DIR_OUT (0 << 0)
-#define GPIOF_DIR_IN (1 << 0)
-
-#define GPIOF_INIT_LOW (0 << 1)
-#define GPIOF_INIT_HIGH (1 << 1)
-
-#define GPIOF_IN (GPIOF_DIR_IN)
-#define GPIOF_OUT_INIT_LOW (GPIOF_DIR_OUT | GPIOF_INIT_LOW)
-#define GPIOF_OUT_INIT_HIGH (GPIOF_DIR_OUT | GPIOF_INIT_HIGH)
+#define GPIOF_IN ((1 << 0))
+#define GPIOF_OUT_INIT_LOW ((0 << 0) | (0 << 1))
+#define GPIOF_OUT_INIT_HIGH ((0 << 0) | (1 << 1))
/* Gpio pin is active-low */
#define GPIOF_ACTIVE_LOW (1 << 2)
diff --git a/include/linux/platform_data/gpio-ath79.h b/include/linux/platform_data/gpio-ath79.h
deleted file mode 100644
index 3ea6dd942c27..000000000000
--- a/include/linux/platform_data/gpio-ath79.h
+++ /dev/null
@@ -1,16 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-only */
-/*
- * Atheros AR7XXX/AR9XXX GPIO controller platform data
- *
- * Copyright (C) 2015 Alban Bedel <albeu@free.fr>
- */
-
-#ifndef __LINUX_PLATFORM_DATA_GPIO_ATH79_H
-#define __LINUX_PLATFORM_DATA_GPIO_ATH79_H
-
-struct ath79_gpio_platform_data {
- unsigned ngpios;
- bool oe_inverted;
-};
-
-#endif
diff --git a/include/linux/platform_data/gpio-davinci.h b/include/linux/platform_data/gpio-davinci.h
deleted file mode 100644
index b82e44662efe..000000000000
--- a/include/linux/platform_data/gpio-davinci.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-only */
-/*
- * DaVinci GPIO Platform Related Defines
- *
- * Copyright (C) 2013 Texas Instruments Incorporated - https://www.ti.com/
- */
-
-#ifndef __DAVINCI_GPIO_PLATFORM_H
-#define __DAVINCI_GPIO_PLATFORM_H
-
-struct davinci_gpio_platform_data {
- bool no_auto_base;
- u32 base;
- u32 ngpio;
- u32 gpio_unbanked;
-};
-
-/* Convert GPIO signal to GPIO pin number */
-#define GPIO_TO_PIN(bank, gpio) (16 * (bank) + (gpio))
-
-#endif