of: gpio: Add Kconfig variable to depend on
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
parent
9adc411ce2
commit
bb7929aaaa
|
@ -19,6 +19,11 @@ config OF_NET
|
||||||
depends on NET
|
depends on NET
|
||||||
def_bool y
|
def_bool y
|
||||||
|
|
||||||
|
config OF_GPIO
|
||||||
|
depends on CONFIG_GPIOLIB
|
||||||
|
depends on CONFIG_OFDEVICE
|
||||||
|
def_bool y
|
||||||
|
|
||||||
config OF_BAREBOX_DRIVERS
|
config OF_BAREBOX_DRIVERS
|
||||||
depends on OFDEVICE
|
depends on OFDEVICE
|
||||||
depends on ENV_HANDLING
|
depends on ENV_HANDLING
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
obj-y += address.o base.o fdt.o platform.o
|
obj-y += address.o base.o fdt.o platform.o
|
||||||
obj-$(CONFIG_OFTREE_MEM_GENERIC) += mem_generic.o
|
obj-$(CONFIG_OFTREE_MEM_GENERIC) += mem_generic.o
|
||||||
obj-$(CONFIG_GPIOLIB) += of_gpio.o
|
obj-$(CONFIG_OF_GPIO) += of_gpio.o
|
||||||
obj-y += partition.o
|
obj-y += partition.o
|
||||||
obj-y += of_net.o
|
obj-y += of_net.o
|
||||||
obj-$(CONFIG_MTD) += of_mtd.o
|
obj-$(CONFIG_MTD) += of_mtd.o
|
||||||
|
|
|
@ -21,11 +21,11 @@ enum of_gpio_flags {
|
||||||
OF_GPIO_ACTIVE_LOW = 0x1,
|
OF_GPIO_ACTIVE_LOW = 0x1,
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef CONFIG_OFTREE
|
#ifdef CONFIG_OF_GPIO
|
||||||
extern int of_get_named_gpio_flags(struct device_node *np,
|
extern int of_get_named_gpio_flags(struct device_node *np,
|
||||||
const char *list_name, int index, enum of_gpio_flags *flags);
|
const char *list_name, int index, enum of_gpio_flags *flags);
|
||||||
|
|
||||||
#else /* CONFIG_OFTREE */
|
#else /* CONFIG_OF_GPIO */
|
||||||
|
|
||||||
static inline int of_get_named_gpio_flags(struct device_node *np,
|
static inline int of_get_named_gpio_flags(struct device_node *np,
|
||||||
const char *list_name, int index, enum of_gpio_flags *flags)
|
const char *list_name, int index, enum of_gpio_flags *flags)
|
||||||
|
@ -33,7 +33,7 @@ static inline int of_get_named_gpio_flags(struct device_node *np,
|
||||||
return -ENOSYS;
|
return -ENOSYS;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* CONFIG_OFTREE */
|
#endif /* CONFIG_OF_GPIO */
|
||||||
|
|
||||||
static inline int of_get_named_gpio(struct device_node *np,
|
static inline int of_get_named_gpio(struct device_node *np,
|
||||||
const char *list_name, int index)
|
const char *list_name, int index)
|
||||||
|
|
Loading…
Reference in New Issue