]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
w1: added w1 reset command
authorEvgeniy Polyakov <zbr@ioremap.net>
Thu, 8 Jan 2009 02:09:04 +0000 (18:09 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 8 Jan 2009 16:31:14 +0000 (08:31 -0800)
Command which allows to reset the bus.

Signed-off-by: Evgeniy Polyakov <zbr@ioremap.net>
Cc: Paul Alfille <paul.alfille@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Documentation/w1/w1.netlink
drivers/w1/w1_netlink.c
drivers/w1/w1_netlink.h

index d596d406e0a5386fb360921245554d4bc2c8bccd..2756681b6ef53b8f69eea8eef8186e2ae60acd6c 100644 (file)
@@ -112,6 +112,12 @@ cn_msg->len = sizeof(struct w1_netlink_msg) +
              sizeof(struct w1_netlink_cmd) +
              N*8;
 
+W1 reset command.
+[cn_msg]
+  [w1_netlink_msg type = W1_MASTER_CMD
+       id is equal to the bus master id to use for searching]
+  [w1_netlink_cmd cmd = W1_CMD_RESET]
+
 Operation steps in w1 core when new command is received.
 =======================================================
 
index a94336be76543cec7f8c544dc46e59add1927cd9..f978c75040040b3ad2447b336665e1736ca53cc9 100644 (file)
@@ -197,6 +197,9 @@ static int w1_process_command_master(struct w1_master *dev, struct cn_msg *req_m
        case W1_CMD_TOUCH:
                err = w1_process_command_io(dev, msg, hdr, cmd);
                break;
+       case W1_CMD_RESET:
+               err = w1_reset_bus(dev);
+               break;
        default:
                cmd->res = EINVAL;
                cn_netlink_send(msg, 0, GFP_KERNEL);
index 01d86a71cf32a0bea559a0cc2f7b67b065a430c1..68a4ff46cb961c7e974643abc8c6240e8e9f7afe 100644 (file)
@@ -58,6 +58,7 @@ enum w1_commands {
        W1_CMD_SEARCH,
        W1_CMD_ALARM_SEARCH,
        W1_CMD_TOUCH,
+       W1_CMD_RESET,
        W1_CMD_MAX,
 };