aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/w1/w1_netlink.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/w1/w1_netlink.h')
-rw-r--r--drivers/w1/w1_netlink.h35
1 files changed, 25 insertions, 10 deletions
diff --git a/drivers/w1/w1_netlink.h b/drivers/w1/w1_netlink.h
index eb0c8b3152c..56122b9e929 100644
--- a/drivers/w1/w1_netlink.h
+++ b/drivers/w1/w1_netlink.h
@@ -23,6 +23,7 @@
23#define __W1_NETLINK_H 23#define __W1_NETLINK_H
24 24
25#include <asm/types.h> 25#include <asm/types.h>
26#include <linux/connector.h>
26 27
27#include "w1.h" 28#include "w1.h"
28 29
@@ -31,29 +32,43 @@ enum w1_netlink_message_types {
31 W1_SLAVE_REMOVE, 32 W1_SLAVE_REMOVE,
32 W1_MASTER_ADD, 33 W1_MASTER_ADD,
33 W1_MASTER_REMOVE, 34 W1_MASTER_REMOVE,
35 W1_MASTER_CMD,
36 W1_SLAVE_CMD,
34}; 37};
35 38
36struct w1_netlink_msg 39struct w1_netlink_msg
37{ 40{
38 __u8 type; 41 __u8 type;
39 __u8 reserved[3]; 42 __u8 reserved;
40 union 43 __u16 len;
41 { 44 union {
42 struct w1_reg_num id; 45 __u8 id[8];
43 __u64 w1_id; 46 struct w1_mst {
44 struct
45 {
46 __u32 id; 47 __u32 id;
47 __u32 pid; 48 __u32 res;
48 } mst; 49 } mst;
49 } id; 50 } id;
51 __u8 data[0];
52};
53
54#define W1_CMD_READ 0x0
55#define W1_CMD_WRITE 0x1
56#define W1_CMD_SEARCH 0x2
57#define W1_CMD_ALARM_SEARCH 0x3
58
59struct w1_netlink_cmd
60{
61 __u8 cmd;
62 __u8 res;
63 __u16 len;
64 __u8 data[0];
50}; 65};
51 66
52#ifdef __KERNEL__ 67#ifdef __KERNEL__
53 68
54void w1_netlink_send(struct w1_master *, struct w1_netlink_msg *); 69void w1_netlink_send(struct w1_master *, struct w1_netlink_msg *);
55int dev_init_netlink(struct w1_master *dev); 70int w1_init_netlink(void);
56void dev_fini_netlink(struct w1_master *dev); 71void w1_fini_netlink(void);
57 72
58#endif /* __KERNEL__ */ 73#endif /* __KERNEL__ */
59#endif /* __W1_NETLINK_H */ 74#endif /* __W1_NETLINK_H */