public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Evgeniy Polyakov <zbr@ioremap.net>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org, Evgeniy Polyakov <zbr@ioremap.net>
Subject: [W1] W1 search/alarm search documentation.
Date: Thu,  4 Dec 2008 17:50:10 +0300	[thread overview]
Message-ID: <12284022154052-git-send-email-zbr@ioremap.net> (raw)
In-Reply-To: <1228402214589-git-send-email-zbr@ioremap.net>


Signed-off-by: Evgeniy Polyakov <zbr@ioremap.net>
---
 Documentation/w1/w1.netlink |   18 +++++++++++++++++-
 1 files changed, 17 insertions(+), 1 deletions(-)

diff --git a/Documentation/w1/w1.netlink b/Documentation/w1/w1.netlink
index eae5c8b..c98ca30 100644
--- a/Documentation/w1/w1.netlink
+++ b/Documentation/w1/w1.netlink
@@ -74,7 +74,23 @@ format:
 	Each message is at most 4k in size, so if number of master devices
 	exceeds this, it will be split into several messages, cn.seq will be
 	increased for each one.
-	
+
+W1 search and alarm search commands.
+request:
+[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_SEARCH or W1_CMD_ALARM_SEARCH]
+
+reply:
+  [cn_msg, ack = 1 and increasing, 0 means the last message, seq is equal to the request seq]
+  [w1_netlink_msg type = W1_MASTER_CMD]
+  [w1_netlink_cmd cmd = W1_CMD_SEARCH or W1_CMD_ALARM_SEARCH
+	len is equal to number of IDs multiplied by 8]
+  [64bit-id0 ... 64bit-idN]
+Length in each header corresponds to the size of the data behind it, so
+w1_netlink_cmd->len = N * 8; where N is number of IDs in this message. Can be zero.
+w1_netlink_msg->len = sizeof(struct w1_netlink_cmd) + N * 8;
+cn_msg->len = sizeof(struct w1_netlink_msg) + sizeof(struct w1_netlink_cmd) + N*8;
 
 Operation steps in w1 core when new command is received.
 =======================================================
-- 
1.5.2.5


  reply	other threads:[~2008-12-04 14:52 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-04 14:50 [W1] extend userspace commands Evgeniy Polyakov
2008-12-04 14:50 ` Evgeniy Polyakov
2008-12-04 14:50   ` [W1] Added list masters w1 command Evgeniy Polyakov
2008-12-04 14:50     ` [W1] Added touch block command Evgeniy Polyakov
2008-12-04 14:50       ` [W1] Updated documentation Evgeniy Polyakov
2008-12-04 14:50         ` [W1] List slaves commands Evgeniy Polyakov
2008-12-04 14:50           ` Evgeniy Polyakov [this message]
2008-12-04 23:53         ` [W1] Updated documentation Randy Dunlap
2008-12-05  6:28           ` Evgeniy Polyakov
2008-12-04 15:42       ` [W1] Added touch block command Frederik Deweerdt
2008-12-04 15:58         ` Evgeniy Polyakov
2008-12-04 15:41     ` [W1] Added list masters w1 command Frederik Deweerdt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=12284022154052-git-send-email-zbr@ioremap.net \
    --to=zbr@ioremap.net \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox