xref: /openbmc/linux/drivers/gpio/gpiolib-sysfs.h (revision 08a149c4)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 
3 #ifndef GPIOLIB_SYSFS_H
4 #define GPIOLIB_SYSFS_H
5 
6 #ifdef CONFIG_GPIO_SYSFS
7 
8 struct gpio_device;
9 
10 int gpiochip_sysfs_register(struct gpio_device *gdev);
11 void gpiochip_sysfs_unregister(struct gpio_device *gdev);
12 
13 #else
14 
gpiochip_sysfs_register(struct gpio_device * gdev)15 static inline int gpiochip_sysfs_register(struct gpio_device *gdev)
16 {
17 	return 0;
18 }
19 
gpiochip_sysfs_unregister(struct gpio_device * gdev)20 static inline void gpiochip_sysfs_unregister(struct gpio_device *gdev)
21 {
22 }
23 
24 #endif /* CONFIG_GPIO_SYSFS */
25 
26 #endif /* GPIOLIB_SYSFS_H */
27