[RESEND3] Dallas 1-wire protocol implementation.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> On Mon, 7 Jun 2004 17:19:37 +0200
> Aurelien Jarno <aurelien at aurel32.net> wrote:
> 
> > Hi Evgeniy!
> > 
> > I have quickly looked through your patch, and it seems your
> > implementation only support 1 wire adapters in bit mode, ie the data
> > line is drived by the driver.
> > 
> > I own a 1 wire <-> USB bridge built using a DS2490 chip from Dallas.
> > It drivew directly the 1 wire bus, so you just have to send it
> > "medium" level commands such as "Match access", "Search access",
> > "Block I/O","Write EEPROM", etc.
> > 
> > It would be good if your patch has a preliminary support for this
> > type of adapters, I mean I think it would be better to move all bit
> > functions into a separate file called w1-algo-bit.c, just like for
> > the I2C bus.
> > 
> > BTW, I would like to write a driver for the DS2490, but I don't
> > really have the time by now. Maybe latter.
> 
> I think it is definitely a good idea.
> I will think about design and try to create new weekly-resend-patchset
> with this feature implemented.
> 
> Thank you.

Hello.
I have some notes about such devices and design of the Linux kernel w1
implementation.

1. After rereading specs for various *<->w1 master
devices I found that all they do support bit interface since it is
required by w1 search algorithm. Maybe some devices exist that drive
some register when they found new slave device on the bus and provide
it's address in other register, and also such devices require flags that
indicates that search must be proceeded or stopped.
I don't now about such devices, but if they exist one can easily
update w1 master operations structure to support search callback for
it, and main master's ->process() routing to call it instead of default
bit-banging w1_search() call. I will do it if you provide datasheet.

2. By design I leave main master's ->process() call as easy as possible
and move all data processing out to slave device drivers(family
drivers). Master just searches for devices on the bus, requests it's
drivers and provide them all needed functionality.
Now I extended a bit w1 master operations to support read_/write_byte()
and reset_bus() calls, so if provided they will be called before bit
operations.

So in case of DS2490 you just need to write driver implementing read_bit
and write_bit operations using some USB commands, then register it as
master. Any slave devices that will be found in bus connected to DS2490
will use automatically any operations that you will provide, but they
actually needs only bit operations. Others are just extensions.

Thank you for review and comments.

> 
> > Bye,
> > Aurelien
> 
> > -- 
> >   .''`.  Aurelien Jarno	              GPG: 1024D/F1BCDB73
> >  : :' :  Debian GNU/Linux developer | Electrical Engineering Student
> >  
> >  `. `'   aurel32 at debian.org         | aurelien at aurel32.net
> >    `-    people.debian.org/~aurel32 | www.aurel32.net


	Evgeniy Polyakov ( s0mbre )

Only failure makes us experts. -- Theo de Raadt
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: MAINTAINERS.diff
Url: http://lists.lm-sensors.org/pipermail/lm-sensors/attachments/20040620/95438966/attachment.pl 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: drivers_Kconfig.diff
Url: http://lists.lm-sensors.org/pipermail/lm-sensors/attachments/20040620/95438966/attachment-0001.pl 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: drivers_Makefile.diff
Url: http://lists.lm-sensors.org/pipermail/lm-sensors/attachments/20040620/95438966/attachment-0002.pl 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: w1.diff
Url: http://lists.lm-sensors.org/pipermail/lm-sensors/attachments/20040620/95438966/attachment-0003.pl 


[Index of Archives]     [Linux Kernel]     [Linux Hardware Monitoring]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux