Xenomai  3.0.5
gpio-core.h
1 
18 #ifndef _RTDM_GPIO_CORE_H
19 #define _RTDM_GPIO_CORE_H
20 
21 #include <linux/list.h>
22 #include <rtdm/driver.h>
23 #include <rtdm/uapi/gpio.h>
24 
25 struct class;
26 struct device_node;
27 
28 struct rtdm_gpio_chip {
29  struct gpio_chip *gc;
30  struct rtdm_driver driver;
31  struct class *devclass;
32  struct list_head pins;
33  struct list_head next;
34  rtdm_lock_t lock;
35 };
36 
37 int rtdm_gpiochip_add(struct rtdm_gpio_chip *rgc,
38  struct gpio_chip *gc,
39  int gpio_subclass);
40 
41 void rtdm_gpiochip_remove(struct rtdm_gpio_chip *rgc);
42 
43 int rtdm_gpiochip_add_by_name(struct rtdm_gpio_chip *rgc,
44  const char *label, int gpio_subclass);
45 
46 #ifdef CONFIG_OF
47 
48 int rtdm_gpiochip_scan_of(struct device_node *from,
49  const char *compat, int type);
50 
51 void rtdm_gpiochip_remove_of(int type);
52 
53 extern struct list_head rtdm_gpio_chips;
54 
55 #endif
56 
57 #endif /* !_RTDM_GPIO_CORE_H */
ipipe_spinlock_t rtdm_lock_t
Lock variable.
Definition: driver.h:551
Real-Time Driver Model for Xenomai, driver API header.
RTDM driver.
Definition: driver.h:249