summaryrefslogtreecommitdiff
path: root/drivers/w1/w1.h
diff options
context:
space:
mode:
authorEvgeniy Polyakov <johnpol@2ka.mipt.ru>2006-03-23 19:11:58 +0300
committerGreg Kroah-Hartman <gregkh@suse.de>2006-06-22 11:22:50 -0700
commitf522d2396138e68bcb9cc5650aa368a81d7f7ff0 (patch)
tree3446d411b996b19094856c5729725e0e43ff4b0e /drivers/w1/w1.h
parent52ab3f3dc711eeccbfbcc5d4f5c5d9b9ff59650f (diff)
[PATCH] w1: Added default generic read/write operations.
Special file in each w1 slave device's directory called "rw" is created each time new slave and no appropriate w1 family is registered. "rw" file supports read and write operations, which allows to perform almost any kind of operations. Each logical operation is a transaction in nature, which can contain several (two or one) low-level operations. Let's see how one can read EEPROM context: 1. one must write control buffer, i.e. buffer containing command byte and two byte address. At this step bus is reset and appropriate device is selected using either W1_SKIP_ROM or W1_MATCH_ROM command. Then provided control buffer is being written to the wire. 2. reading. This will issue reading eeprom response. It is possible that between 1. and 2. w1 master thread will reset bus for searching and slave device will be even removed, but in this case 0xff will be read, since no device was selected. Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/w1/w1.h')
-rw-r--r--drivers/w1/w1.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/w1/w1.h b/drivers/w1/w1.h
index 56980505e6c..02e8caddfb3 100644
--- a/drivers/w1/w1.h
+++ b/drivers/w1/w1.h
@@ -60,7 +60,7 @@ struct w1_reg_num
#define W1_READ_PSUPPLY 0xB4
#define W1_MATCH_ROM 0x55
-#define W1_SLAVE_ACTIVE (1<<0)
+#define W1_SLAVE_ACTIVE 0
struct w1_slave
{