aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/w1/w1.netlink6
-rw-r--r--drivers/w1/w1_netlink.c3
-rw-r--r--drivers/w1/w1_netlink.h1
3 files changed, 10 insertions, 0 deletions
diff --git a/Documentation/w1/w1.netlink b/Documentation/w1/w1.netlink
index d596d406e0a..2756681b6ef 100644
--- a/Documentation/w1/w1.netlink
+++ b/Documentation/w1/w1.netlink
@@ -112,6 +112,12 @@ cn_msg->len = sizeof(struct w1_netlink_msg) +
112 sizeof(struct w1_netlink_cmd) + 112 sizeof(struct w1_netlink_cmd) +
113 N*8; 113 N*8;
114 114
115W1 reset command.
116[cn_msg]
117 [w1_netlink_msg type = W1_MASTER_CMD
118 id is equal to the bus master id to use for searching]
119 [w1_netlink_cmd cmd = W1_CMD_RESET]
120
115Operation steps in w1 core when new command is received. 121Operation steps in w1 core when new command is received.
116======================================================= 122=======================================================
117 123
diff --git a/drivers/w1/w1_netlink.c b/drivers/w1/w1_netlink.c
index a94336be765..f978c750400 100644
--- a/drivers/w1/w1_netlink.c
+++ b/drivers/w1/w1_netlink.c
@@ -197,6 +197,9 @@ static int w1_process_command_master(struct w1_master *dev, struct cn_msg *req_m
197 case W1_CMD_TOUCH: 197 case W1_CMD_TOUCH:
198 err = w1_process_command_io(dev, msg, hdr, cmd); 198 err = w1_process_command_io(dev, msg, hdr, cmd);
199 break; 199 break;
200 case W1_CMD_RESET:
201 err = w1_reset_bus(dev);
202 break;
200 default: 203 default:
201 cmd->res = EINVAL; 204 cmd->res = EINVAL;
202 cn_netlink_send(msg, 0, GFP_KERNEL); 205 cn_netlink_send(msg, 0, GFP_KERNEL);
diff --git a/drivers/w1/w1_netlink.h b/drivers/w1/w1_netlink.h
index 01d86a71cf3..68a4ff46cb9 100644
--- a/drivers/w1/w1_netlink.h
+++ b/drivers/w1/w1_netlink.h
@@ -58,6 +58,7 @@ enum w1_commands {
58 W1_CMD_SEARCH, 58 W1_CMD_SEARCH,
59 W1_CMD_ALARM_SEARCH, 59 W1_CMD_ALARM_SEARCH,
60 W1_CMD_TOUCH, 60 W1_CMD_TOUCH,
61 W1_CMD_RESET,
61 W1_CMD_MAX, 62 W1_CMD_MAX,
62}; 63};
63 64