From 102a0743326a03cd1a1202ceda21e175b7d3575c Mon Sep 17 00:00:00 2001 From: hc <hc@nodka.com> Date: Tue, 20 Feb 2024 01:20:52 +0000 Subject: [PATCH] add new system file --- kernel/include/linux/of_gpio.h | 22 ++++++++-------------- 1 files changed, 8 insertions(+), 14 deletions(-) diff --git a/kernel/include/linux/of_gpio.h b/kernel/include/linux/of_gpio.h index 163b79e..f821095 100644 --- a/kernel/include/linux/of_gpio.h +++ b/kernel/include/linux/of_gpio.h @@ -11,9 +11,8 @@ #define __LINUX_OF_GPIO_H #include <linux/compiler.h> -#include <linux/kernel.h> -#include <linux/errno.h> -#include <linux/gpio.h> +#include <linux/gpio/driver.h> +#include <linux/gpio.h> /* FIXME: Shouldn't be here */ #include <linux/of.h> struct device_node; @@ -28,9 +27,13 @@ OF_GPIO_SINGLE_ENDED = 0x2, OF_GPIO_OPEN_DRAIN = 0x4, OF_GPIO_TRANSITORY = 0x8, + OF_GPIO_PULL_UP = 0x10, + OF_GPIO_PULL_DOWN = 0x20, }; #ifdef CONFIG_OF_GPIO + +#include <linux/kernel.h> /* * OF GPIO chip for memory mapped banks @@ -59,11 +62,9 @@ } extern void of_mm_gpiochip_remove(struct of_mm_gpio_chip *mm_gc); -extern int of_gpio_simple_xlate(struct gpio_chip *gc, - const struct of_phandle_args *gpiospec, - u32 *flags); - #else /* CONFIG_OF_GPIO */ + +#include <linux/errno.h> /* Drivers may not strictly depend on the GPIO support, so let them link. */ static inline int of_get_named_gpio_flags(struct device_node *np, @@ -72,13 +73,6 @@ if (flags) *flags = 0; - return -ENOSYS; -} - -static inline int of_gpio_simple_xlate(struct gpio_chip *gc, - const struct of_phandle_args *gpiospec, - u32 *flags) -{ return -ENOSYS; } -- Gitblit v1.6.2