Xenomai 3.3.2
Loading...
Searching...
No Matches
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
25struct class;
26struct device_node;
27struct gpio_desc;
28
29struct 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 nanosecs_abs_t timestamp;
37 bool monotonic_timestamp;
38};
39
40struct rtdm_gpio_chip {
41 struct gpio_chip *gc;
42 struct rtdm_driver driver;
43 struct class *devclass;
44 struct list_head next;
45 rtdm_lock_t lock;
46 struct rtdm_gpio_pin pins[0];
47};
48
49int rtdm_gpiochip_add(struct rtdm_gpio_chip *rgc,
50 struct gpio_chip *gc,
51 int gpio_subclass);
52
53struct rtdm_gpio_chip *
54rtdm_gpiochip_alloc(struct gpio_chip *gc,
55 int gpio_subclass);
56
57void rtdm_gpiochip_remove(struct rtdm_gpio_chip *rgc);
58
59int rtdm_gpiochip_add_by_name(struct rtdm_gpio_chip *rgc,
60 const char *label, int gpio_subclass);
61
62int rtdm_gpiochip_post_event(struct rtdm_gpio_chip *rgc,
63 unsigned int offset);
64
65int rtdm_gpiochip_find(struct device_node *from, const char *label, int type);
66
67int rtdm_gpiochip_array_find(struct device_node *from, const char *label[],
68 int nentries, int type);
69
70#ifdef CONFIG_OF
71
72int rtdm_gpiochip_scan_of(struct device_node *from,
73 const char *compat, int type);
74
75int rtdm_gpiochip_scan_array_of(struct device_node *from,
76 const char *compat[],
77 int nentries, int type);
78#endif
79
80void rtdm_gpiochip_remove_by_type(int type);
81
82#endif /* !_COBALT_RTDM_GPIO_H */
Real-Time Driver Model for Xenomai, driver API header.
pipeline_spinlock_t rtdm_lock_t
Lock variable.
Definition driver.h:552
uint64_t nanosecs_abs_t
RTDM type for representing absolute dates.
Definition rtdm.h:43
RTDM device.
Definition driver.h:340
RTDM driver.
Definition driver.h:251