Xenomai  3.0.8
spi-device.h
1 
18 #ifndef _RTDM_SPI_DEVICE_H
19 #define _RTDM_SPI_DEVICE_H
20 
21 #include <linux/list.h>
22 #include <linux/atomic.h>
23 #include <linux/mutex.h>
24 #include <rtdm/driver.h>
25 #include <rtdm/uapi/spi.h>
26 
27 struct class;
28 struct rtdm_spi_master;
29 
30 struct rtdm_spi_remote_slave {
31  u8 chip_select;
32  int cs_gpio;
33  struct gpio_desc *cs_gpiod;
34  struct rtdm_device dev;
35  struct list_head next;
36  struct rtdm_spi_config config;
37  struct rtdm_spi_master *master;
38  atomic_t mmap_refs;
39  struct mutex ctl_lock;
40 };
41 
42 static inline struct device *
43 slave_to_kdev(struct rtdm_spi_remote_slave *slave)
44 {
45  return rtdm_dev_to_kdev(&slave->dev);
46 }
47 
48 int rtdm_spi_add_remote_slave(struct rtdm_spi_remote_slave *slave,
49  struct rtdm_spi_master *spim,
50  struct spi_device *spi);
51 
52 void rtdm_spi_remove_remote_slave(struct rtdm_spi_remote_slave *slave);
53 
54 #endif /* !_RTDM_SPI_DEVICE_H */
Definition: spi.h:23
Real-Time Driver Model for Xenomai, driver API header.
Copyright © 2011 Gilles Chanteperdrix gilles.chanteperdrix@xenomai.org.
Definition: atomic.h:24
RTDM device.
Definition: driver.h:338