summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2024-08-28 17:23:57 +0300
committerBartosz Golaszewski <bartosz.golaszewski@linaro.org>2024-09-02 11:47:06 +0200
commit4b2b0a2ce8153d65d0829e45e73bf6acdc291344 (patch)
tree12056525c924e01df58b29c01998a7c76ee0e61e /include
parent1882e769362b8e4ef68fd30a05295f5eedf5c54a (diff)
downloadlwn-4b2b0a2ce8153d65d0829e45e73bf6acdc291344.tar.gz
lwn-4b2b0a2ce8153d65d0829e45e73bf6acdc291344.zip
gpiolib: legacy: Kill GPIOF_INIT_* definitions
Besides the fact that (old) drivers use wrong definitions, e.g., GPIOF_INIT_HIGH instead of GPIOF_OUT_INIT_HIGH, shrink the legacy definitions by killing those GPIOF_INIT_* completely. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Acked-by: Alexander Sverdlin <alexander.sverdlin@gmail.com> Reviewed-by: Alexander Sverdlin <alexander.sverdlin@gmail.com> Link: https://lore.kernel.org/r/20240828142554.2424189-2-andriy.shevchenko@linux.intel.com Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/gpio.h7
1 files changed, 2 insertions, 5 deletions
diff --git a/include/linux/gpio.h b/include/linux/gpio.h
index 063f71b18a7c..4af8ad114557 100644
--- a/include/linux/gpio.h
+++ b/include/linux/gpio.h
@@ -20,12 +20,9 @@ struct device;
#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_OUT_INIT_LOW (GPIOF_DIR_OUT | (0 << 1))
+#define GPIOF_OUT_INIT_HIGH (GPIOF_DIR_OUT | (1 << 1))
/* Gpio pin is active-low */
#define GPIOF_ACTIVE_LOW (1 << 2)