Merge tag 'mailbox-v6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/jassibrar...
[linux-block.git] / drivers / gpio / gpiolib-sysfs.h
1 /* SPDX-License-Identifier: GPL-2.0 */
2
3 #ifndef GPIOLIB_SYSFS_H
4 #define GPIOLIB_SYSFS_H
5
6 struct gpio_device;
7
8 #ifdef CONFIG_GPIO_SYSFS
9
10 int gpiochip_sysfs_register(struct gpio_device *gdev);
11 int gpiochip_sysfs_register_all(void);
12 void gpiochip_sysfs_unregister(struct gpio_device *gdev);
13
14 #else
15
16 static inline int gpiochip_sysfs_register(struct gpio_device *gdev)
17 {
18         return 0;
19 }
20
21 static inline int gpiochip_sysfs_register_all(void)
22 {
23         return 0;
24 }
25
26 static inline void gpiochip_sysfs_unregister(struct gpio_device *gdev)
27 {
28 }
29
30 #endif /* CONFIG_GPIO_SYSFS */
31
32 #endif /* GPIOLIB_SYSFS_H */