2020-06-16 17:36:15 +08:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0 */
|
|
|
|
|
|
|
|
#ifndef GPIOLIB_CDEV_H
|
|
|
|
#define GPIOLIB_CDEV_H
|
|
|
|
|
2020-10-05 17:56:22 +08:00
|
|
|
#include <linux/types.h>
|
|
|
|
|
|
|
|
struct gpio_device;
|
2020-06-16 17:36:15 +08:00
|
|
|
|
2020-09-28 08:27:52 +08:00
|
|
|
#ifdef CONFIG_GPIO_CDEV
|
|
|
|
|
2020-06-16 17:36:15 +08:00
|
|
|
int gpiolib_cdev_register(struct gpio_device *gdev, dev_t devt);
|
|
|
|
void gpiolib_cdev_unregister(struct gpio_device *gdev);
|
|
|
|
|
2020-09-28 08:27:52 +08:00
|
|
|
#else
|
|
|
|
|
|
|
|
static inline int gpiolib_cdev_register(struct gpio_device *gdev, dev_t devt)
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline void gpiolib_cdev_unregister(struct gpio_device *gdev)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif /* CONFIG_GPIO_CDEV */
|
|
|
|
|
2020-06-16 17:36:15 +08:00
|
|
|
#endif /* GPIOLIB_CDEV_H */
|