Source-Changes archive

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

CVS commit: [netbsd-11] src



Module Name:    src
Committed By:   martin
Date:           Tue Nov 17 16:42:38 UTC 2026

Modified Files:
        src/share/man/man4 [netbsd-11]: ds2482ow.4
        src/sys/dev/i2c [netbsd-11]: ds2482ow.c ds2482owreg.h ds2482owvar.h
        src/sys/dev/onewire [netbsd-11]: onewire.c

Log Message:
Pull up following revision(s) (requested by brad in ticket #582):

        sys/dev/i2c/ds2482owreg.h: revision 1.2
        sys/dev/onewire/onewire.c: revision 1.23
        share/man/man4/ds2482ow.4: revision 1.2
        sys/dev/i2c/ds2482owvar.h: revision 1.4
        sys/dev/i2c/ds2482ow.c: revision 1.3

20 years ago when the 1-Wire infrastructure was ported over from
OpenBSD, the calls in the onewire_detach() function in the onewirebus
(sys/dev/onewire/onewire.c) code for config_detach_children() was
commented out.  I don't know why this was done, exactly, as there
wasn't any particular comments present.  I suspect it might have been
because owtemp, the common end device, could not detach or maybe
detaching just didn't work as expected at that time.

The string of devices are as follows:
End controller     -> onewirebus -> End device
gpioow or ds2482ow ->            -> such as owtemp or ds24e17iic

If the onewirebus does not call config_detach_children(), the end
devices will end up orphened and not detach if the controller is
unloaded, such as with modunload.  In a DIAGNOSTIC kernel, you will
panic with a complaint about the end device still being present.

Put back the config_detach_children() call in onewire.c.  Tested on
aarch64 on a DIAGNOSTIC kernel with several ds248x controllers and
some owtemp end devices.  Generally, one can now unload the controller
driver without any problems now, but I can't promise that there are
not bugs in all of this stuff.

Add support for the DS2483 and DS2484 I2C to 1-Wire bridge chips to
the DS2482 driver.  These members of the chip family are very simular
with the main exception being that there are programmable adjustments
that can be made to the 1-Wire protocol timing.  The DS2483 chip is
actually EOL, but may exist in the wild somewhere and there was no big
differences between it and the DS2484.  Adafruit has a very nice break
out board for the DS2484 chip for a reasonable amount of money.

The programmable timing adjustments of the DS2483 and DS2484 can be
done via sysctl.  While these chips support overdrive speed on the
1-Wire bus, the onewire(4) infrastructure does not support the
coordination of overdrive speeds, so this driver does not particularly
support that mode.

While there, fix a missing config_detach_children() call in
ds2482ow.c.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.1.2.1 src/share/man/man4/ds2482ow.4
cvs rdiff -u -r1.2 -r1.2.2.1 src/sys/dev/i2c/ds2482ow.c
cvs rdiff -u -r1.1 -r1.1.2.1 src/sys/dev/i2c/ds2482owreg.h
cvs rdiff -u -r1.3 -r1.3.2.1 src/sys/dev/i2c/ds2482owvar.h
cvs rdiff -u -r1.22 -r1.22.14.1 src/sys/dev/onewire/onewire.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index