Xenomai  3.0.8
gpio.h
1 
18 #ifndef _COBALT_RTDM_GPIO_H
19 #define _COBALT_RTDM_GPIO_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 struct gpio_desc;
28 
29 struct rtdm_gpio_pin {
30  struct rtdm_device dev;
31  struct list_head next;
32  rtdm_irq_t irqh;
33  rtdm_event_t event;
34  char *name;
35  struct gpio_desc *desc;
36 };
37 
38 struct rtdm_gpio_chip {
39  struct gpio_chip *gc;
40  struct rtdm_driver driver;
41  struct class *devclass;
42  struct list_head next;
43  rtdm_lock_t lock;
44  struct rtdm_gpio_pin pins[0];
45 };
46 
47 int rtdm_gpiochip_add(struct rtdm_gpio_chip *rgc,
48  struct gpio_chip *gc,
49  int gpio_subclass);
50 
51 struct rtdm_gpio_chip *
52 rtdm_gpiochip_alloc(struct gpio_chip *gc,
53  int gpio_subclass);
54 
55 void rtdm_gpiochip_remove(struct rtdm_gpio_chip *rgc);
56 
57 int rtdm_gpiochip_add_by_name(struct rtdm_gpio_chip *rgc,
58  const char *label, int gpio_subclass);
59 
60 int rtdm_gpiochip_post_event(struct rtdm_gpio_chip *rgc,
61  unsigned int offset);
62 
63 #ifdef CONFIG_OF
64 
65 int rtdm_gpiochip_scan_of(struct device_node *from,
66  const char *compat, int type);
67 
68 int rtdm_gpiochip_scan_array_of(struct device_node *from,
69  const char *compat[],
70  int nentries, int type);
71 
72 void rtdm_gpiochip_remove_of(int type);
73 
74 #endif
75 
76 #endif /* !_COBALT_RTDM_GPIO_H */
ipipe_spinlock_t rtdm_lock_t
Lock variable.
Definition: driver.h:551
Real-Time Driver Model for Xenomai, driver API header.
RTDM device.
Definition: driver.h:338
RTDM driver.
Definition: driver.h:249