This source file includes following definitions.
- siox_master_get_devdata
- siox_master_put
1
2
3
4
5 #include <linux/kernel.h>
6 #include <linux/kthread.h>
7 #include <linux/siox.h>
8
9 #define to_siox_master(_dev) container_of((_dev), struct siox_master, dev)
10 struct siox_master {
11
12 int busno;
13 int (*pushpull)(struct siox_master *smaster,
14 size_t setbuf_len, const u8 setbuf[],
15 size_t getbuf_len, u8 getbuf[]);
16
17
18 unsigned long poll_interval;
19
20
21 struct mutex lock;
22 bool active;
23 struct module *owner;
24 struct device dev;
25 unsigned int num_devices;
26 struct list_head devices;
27
28 size_t setbuf_len, getbuf_len;
29 size_t buf_len;
30 u8 *buf;
31 u8 status;
32
33 unsigned long last_poll;
34 struct task_struct *poll_thread;
35 };
36
37 static inline void *siox_master_get_devdata(struct siox_master *smaster)
38 {
39 return dev_get_drvdata(&smaster->dev);
40 }
41
42 struct siox_master *siox_master_alloc(struct device *dev, size_t size);
43 static inline void siox_master_put(struct siox_master *smaster)
44 {
45 put_device(&smaster->dev);
46 }
47
48 int siox_master_register(struct siox_master *smaster);
49 void siox_master_unregister(struct siox_master *smaster);