Skip to contentSkip to conversation

w1-dev (second attempt)

lm-sensors [email protected] 1 participant 1 message Jun 14, 2005

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

I attached the wrong patch in the last email.
This one should work better.

Quoted 15 lines · On Tuesday 14 June 2005 12:39 pm, [email protected] wrote:

Hi Evgeniy,

I've been toying with a dev interface for the w1 bus to allow a user-space program to talk directly to a w1 slave.
The w1 slave that I am using it with is the DS2433 (family 23 4kb EEPROM). The examples in the documentation refer to that chip.

The dev interface accepts a string as a series of w1 commands. You then read back the results.
Documentation is included in the patch.

Although it works, I don't think it is quite ready to be considered 'done'. There are a few areas that I am not comfortable with: locking, reference counts, etc.

Quoted 6 lines

If you (or anyone else) would like to play with it, feel free to do so.

The patch is against the latest set of w1 changes that we did.

Thanks,
Ben

-------------- next part --------------

drivers/w1/Kconfig +9 -0
@@ -11,6 +11,15 @@
 	  This W1 support can also be built as a module.  If so, the module
 	  will be called wire.ko.
 
+config W1_DEV
+	tristate "w1 master character device"
+	depends on W1
+	help
+	  Enables a char device interface to the w1 bus.
+
+	  This can also be built as a module.  If so, the module
+	  will be called w1_dev.
+
 config W1_MATROX
 	tristate "Matrox G400 transport layer for 1-wire"
 	depends on W1 && PCI
drivers/w1/Makefile +2 -0
@@ -18,3 +18,5 @@
 
 obj-$(CONFIG_W1_DS9490_BRIDGE)	+= ds_w1_bridge.o
 
+obj-$(CONFIG_W1_DEV)		+= w1_dev.o 
+
drivers/w1/w1_int.h +8 -0
@@ -27,6 +27,14 @@
 
 #include "w1.h"
 
+struct w1_notify_ops
+{
+	void	(*notify_add)(struct w1_master *master);
+	void	(*notify_remove)(struct w1_master *master);
+};
+int w1_add_notify(struct w1_notify_ops *ops);
+int w1_remove_notify(struct w1_notify_ops *ops);
+
 int w1_add_master_device(struct w1_bus_master *);
 void w1_remove_master_device(struct w1_bus_master *);
 void __w1_remove_master_device(struct w1_master *);
drivers/w1/w1_int.c +51 -0

92 lines not on this page · raw message

drivers/w1/w1_dev.c +536 -0

536 lines not on this page · raw message

Documentation/w1/w1.dev +103 -0

103 lines not on this page · raw message