1-wire driver in recent Kernels

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

1-wire driver in recent Kernels

Sven Geggus
Hi there,

first of all I have note, that owfs is the best 1-wire Application I have
seen on linux so far.

Having used a patched Version of digitemp for my tcl/tk Application so far I
was now able to suspend the patch and use the Tcl-Interface provided by owfs
instead.

Anyway, I was wondering if there are any benefits from the in-kernel 1-wire
driver which has been included in the Vanilla Kernel tree recently?

At the first glance, the in-kernel driver seems to almost entirely
undocumented.

Sven

--
"In the land of the brave and the free, we defend our freedom
with the GNU GPL" (Richard M. Stallman on www.gnu.org)

/me is giggls@ircnet, http://sven.gegg.us/ on the Web


-------------------------------------------------------
This SF.Net email is sponsored by Yahoo.
Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
Search APIs Find out how you can build Yahoo! directly into your own
Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005
_______________________________________________
Owfs-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/owfs-developers
Reply | Threaded
Open this post in threaded view
|

Re: 1-wire driver in recent Kernels

Peter Kropf
From my experience, the kernel drivers aren't worth the effort to try
to get working. Last time I looked at them, they were undocumented and
there was no user mode code / library / examples that used them. The
kernel drivers are also not compatable with OWFS.

My suggestion is to not load them into your running kernel and to just
use OWFS. But I am a bit biased towards OWFS ;-)

- Peter


On 5/24/05, Sven Geggus <[hidden email]> wrote:

> Hi there,
>
> first of all I have note, that owfs is the best 1-wire Application I have
> seen on linux so far.
>
> Having used a patched Version of digitemp for my tcl/tk Application so far I
> was now able to suspend the patch and use the Tcl-Interface provided by owfs
> instead.
>
> Anyway, I was wondering if there are any benefits from the in-kernel 1-wire
> driver which has been included in the Vanilla Kernel tree recently?
>
> At the first glance, the in-kernel driver seems to almost entirely
> undocumented.
>
> Sven
>
> --
> "In the land of the brave and the free, we defend our freedom
> with the GNU GPL" (Richard M. Stallman on www.gnu.org)
>
> /me is giggls@ircnet, http://sven.gegg.us/ on the Web
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by Yahoo.
> Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
> Search APIs Find out how you can build Yahoo! directly into your own
> Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005
> _______________________________________________
> Owfs-developers mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/owfs-developers
>


-------------------------------------------------------
This SF.Net email is sponsored by Yahoo.
Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
Search APIs Find out how you can build Yahoo! directly into your own
Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005
_______________________________________________
Owfs-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/owfs-developers
Reply | Threaded
Open this post in threaded view
|

Re: 1-wire driver in recent Kernels

Paul Alfille
On Tuesday 24 May 2005 12:16 pm, Peter Kropf wrote:

> From my experience, the kernel drivers aren't worth the effort to try
> to get working. Last time I looked at them, they were undocumented and
> there was no user mode code / library / examples that used them. The
> kernel drivers are also not compatable with OWFS.
>
> My suggestion is to not load them into your running kernel and to just
> use OWFS. But I am a bit biased towards OWFS ;-)
>
> - Peter
>

Peter says it very well. The idea behind the W1 drivers seem nice, a unified
abstraction layer hiding the adapter type. Unfortunately it will be
linux-specific (not too great a problem), and is undocumented.

A greater problem is that each adapter type has different strengths. A better
search routine, different in-band/out-of-band signaling, etc. OWFS has
evolved to use each adapter efficiently, for our usage pattern. A
kernel-based driver would not know when to reset, for instance, since it
wouldn't know which thread of OWFS was grabbing the adapter. I suspect that
the kernel driver would not be as efficient.

Currently W1 is only relevant to USB. OWFS unloads the ds9094r kernel driver
and uses libusb, so you really don't have to make any changes. When W1 is
finally documented, we will see about supporting it. I am most interested in
W1 for direct bitbanging interfaces in embedded systems and the Matrox video
card.

Paul



-------------------------------------------------------
This SF.Net email is sponsored by Yahoo.
Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
Search APIs Find out how you can build Yahoo! directly into your own
Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005
_______________________________________________
Owfs-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/owfs-developers
Reply | Threaded
Open this post in threaded view
|

Re: 1-wire driver in recent Kernels

jerry scharf
In reply to this post by Sven Geggus
--On 05/24/2005 03:39:59 PM +0000 Sven Geggus wrote:

> Hi there,
>
> first of all I have note, that owfs is the best 1-wire Application I have
> seen on linux so far.
>
> Having used a patched Version of digitemp for my tcl/tk Application so
> far I was now able to suspend the patch and use the Tcl-Interface
> provided by owfs instead.
>
> Anyway, I was wondering if there are any benefits from the in-kernel
> 1-wire driver which has been included in the Vanilla Kernel tree recently?
>
> At the first glance, the in-kernel driver seems to almost entirely
> undocumented.
>
> Sven
>

Sven,

I'll go farther than what Peter said. In my opinion, most "let's add it to
the kernel" ideas are misguided. My initial stand is always that if it
doesn't need to be in the kernel, it shouldn't be. What performance gain,
sharing capability or security issue would drive such a choice? It seems
that OWFS has solved the sharing issue without kernel hacks. Even without
that, a server with network ports can share things out very nicely without
kernel work.

There are also some practical issues. Debugging is much harder, and bugs
have much greater consequences. There are limits to what you can do in the
kernel, so it can't do the whole job. ioctl() is not my favorite control
interface and local state abstractions are left to the user.

Maybe part of this comes from listening to "put it in the kernel" for 20
years now and the responses of smart kernel programmers.

jerry



Jerry Scharf
laguna way consulting


-------------------------------------------------------
SF.Net email is sponsored by: GoToMeeting - the easiest way to collaborate
online with coworkers and clients while avoiding the high cost of travel and
communications. There is no equipment to buy and you can meet as often as
you want. Try it free.http://ads.osdn.com/?ad_id=7402&alloc_id=16135&op=click
_______________________________________________
Owfs-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/owfs-developers
Reply | Threaded
Open this post in threaded view
|

Re: 1-wire driver in recent Kernels

Sven Geggus
jerry scharf <[hidden email]> wrote:

> I'll go farther than what Peter said. In my opinion, most "let's add it to
> the kernel" ideas are misguided. My initial stand is always that if it
> doesn't need to be in the kernel, it shouldn't be.

Actually this is the Opinion of many Kernel-Hackers as well.

I was wondering if 1-wire may require some strange timing stuff which would
suggest an in-kernel implementation rather than userspace.

Sven

--
This golden age of communication Means everyone talks at the same time
(Lyrics of "New Model Army" song "225")

/me is giggls@ircnet, http://sven.gegg.us/ on the Web


-------------------------------------------------------
SF.Net email is sponsored by: GoToMeeting - the easiest way to collaborate
online with coworkers and clients while avoiding the high cost of travel and
communications. There is no equipment to buy and you can meet as often as
you want. Try it free.http://ads.osdn.com/?ad_id=7402&alloc_id=16135&op=click
_______________________________________________
Owfs-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/owfs-developers
Reply | Threaded
Open this post in threaded view
|

RE: 1-wire driver in recent Kernels

Alfille, Paul H.,M.D.
In reply to this post by Sven Geggus
I was wondering if 1-wire may require some strange timing stuff which would
suggest an in-kernel implementation rather than userspace.

Sven

--
Not when connected to through the serial or USB adapters. A direct IO pin might
be a different story, though that seems very hardware-specific.

Paul


-------------------------------------------------------
SF.Net email is sponsored by: GoToMeeting - the easiest way to collaborate
online with coworkers and clients while avoiding the high cost of travel and
communications. There is no equipment to buy and you can meet as often as
you want. Try it free.<a href="http://ads.osdn.com/?ad_idt02&alloc_id135&op=click">http://ads.osdn.com/?ad_idt02&alloc_id135&op=click
_______________________________________________
Owfs-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/owfs-developers
Reply | Threaded
Open this post in threaded view
|

Re: 1-wire driver in recent Kernels

Sven Geggus
Alfille, Paul H.,M.D. <[hidden email]> wrote:

>> I was wondering if 1-wire may require some strange timing stuff which
>> would suggest an in-kernel implementation rather than userspace.
>>
>> Not when connected to through the serial or USB adapters. A direct IO pin
>> might be a different story, though that seems very hardware-specific.

Huh, why is this? At least the passive serial Adapter
(http://owfs.sourceforge.net/adapter.gif) I'm using should not change any
bus-timing shouldn't it?

Sven

--
                       This APT has Super Cow Powers.
                                        (apt-get --help on debian woody)

/me is giggls@ircnet, http://sven.gegg.us/ on the Web


-------------------------------------------------------
SF.Net email is sponsored by: GoToMeeting - the easiest way to collaborate
online with coworkers and clients while avoiding the high cost of travel and
communications. There is no equipment to buy and you can meet as often as
you want. Try it free.http://ads.osdn.com/?ad_id=7402&alloc_id=16135&op=click
_______________________________________________
Owfs-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/owfs-developers