summaryrefslogtreecommitdiff
path: root/sys/dev/usb/udcf.c
AgeCommit message (Collapse)Author
2007-11-23Make sure that variables used during detach are initialized during attach.Marc Balmer
Discussed with dlg.
2007-11-23No need for process context to degrade the sensor status.Marc Balmer
Discussed with kettenis.
2007-10-11treat usb vendor/product names as a locator, and have usbd_print handle it,Theo de Raadt
so that it shows up before the :. as a result, all the usb devices do not need to have name printing code anymore. all this now works and prints nicely because usbd_probe_and_attach() is serialized. ok kettenis
2007-06-14Remove the definition and usage of the USB_DECLARE_DRIVER_CLASS andMarc Balmer
USB_DECLARE_DRIVER macros. No binary change. ok dlg.
2007-06-12Remove the definition and use of the device_ptr_t which was a struct device *.Marc Balmer
No binary change. ok mk.
2007-06-10Remove the definition and use of the USBDEVNAME macro.Marc Balmer
(This might look easy, but it was a big diff. Thanks to dlg and especially jsg for looking over it; we found at least four mistakes in the initial diff.) ok jsg.
2007-06-10Remove the definition and use of the USBDEV macro. It only created confusionMarc Balmer
and the address of it's argument: USBDEV(sc->sc_dev) yields &sc->sc_dev. No binary changes. ok jsg.
2007-06-06Mechanical removal of USBBASEDEVICE. No binary change.Michael Knudsen
Tested by thib and myself. ok mbalmer jsg
2007-05-27Farewell USB_{ATTACH,MATCH,DETACH}* you will not be missed.Jonathan Gray
ok deraadt@ krw@ mbalmer@
2007-04-21Back out last. the world is not i386.Artur Grabowski
2007-04-21Remove unused header files.Marc Balmer
2007-03-22split userland & kernel struct sensor/sensordev so that the additionTheo de Raadt
of new fields in the future is less disruptive. This is done similar to how struct proc is handled for ps(1). ok jmc (man page changes) tested fkr simon, and more suggestions from millert
2007-01-02return is not a function.Marc Balmer
2006-12-23adapt to new two-level sensor api; Constantine A. MureninTheo de Raadt
2006-12-10Make sure the bit collecting is restarted after signal loss.Marc Balmer
2006-12-10restart collecting bits immediately after a parity error, i.e. use the frameMarc Balmer
immediately following the corrupt one; there is no no need to skip it by waiting for the next minute gap and the sensor value has valid data one minute earlier than before.
2006-12-10Re-arm signal loss detection only after we received a bit, not in itself. ThisMarc Balmer
prevents the signal loss function from being called repeatedly when we have no signal.
2006-12-10Faster synchronization after an unexpected minute gap.Marc Balmer
Only look at the skew value if it is != 0. Remove some dead code.
2006-12-06When compiled with UDCF_DEBUG, only output the bits received whenMarc Balmer
udcfdebug > 1.
2006-12-05Add code to detect (and eliminate) statistical outliers. Tested by me andMarc Balmer
naddy; many thanks to naddy for continous testing and feedback during the last weeks. ok naddy
2006-11-15Fix an integer type promotion that can lead to wrong offsets on 64 bit arches.Marc Balmer
Problem and solution found by Christian "Naddy" Weisgerber <naddy@openbsd.org>, thanks!
2006-10-28- Use better names for the variables containing the timeouts in Hz instead ofMarc Balmer
just t1-t10. - Remove some unused variables. - Restructure some functions to remove some levels of indentation.
2006-10-27udcf(4) degraded the sensor status from OK to WARNING on the first receiptionMarc Balmer
error, which is to fast as this does not give ntpd the opportunity to use the sensor value. If we decode a valid time information, it has to be available to applications for some minimal time. I choose a value of 5 minutes. If we do not receive any new valid time information during this period, the sensor will be degraded to WARNING, and after another fifteen minutes it will be further degraded to CRITICAL. "makes sense to me" henning@, "sure" deraadt@
2006-10-14Apply some formatting.Marc Balmer
2006-10-11Make the timedelta sensor appear right when a device is plugged-in, with aMarc Balmer
status of SENSOR_S_UNKNOWN. Do not set the SENSOR_FINVALID bit, sysctl hw.sensors does not list sensors with this flags set and we want to the sensor when the device is present. ok henning
2006-06-23In a drivers activate() entry point, if on DVACT_DEACTIVATE it doesMiod Vallat
something, then it MUST return zero on DVACT_ACTIVATE, not EOPNOTSUPP; this very popular bug has been cut and pasted a lot of times... ok deraadt@ mickey@
2006-06-19remove the no longer needed time calculations now that we have them inMarc Balmer
sys/kern/clock_subr.c
2006-06-19move clock_subr.c to a better place, and now it is always in the kernelTheo de Raadt
so that things can use it; tested on all architectures; ok kettenis
2006-06-17udcf(4) no longer needs the file sys/dev/clock_subr.c to be compiled and linkedMarc Balmer
to the kernel, the two functions it used from this file are now included in the driver itself (like in nmea(4)). udcf(4) can now be enabled to the zaurus, too. in fact on all arches that have USB support.
2006-06-12Typos in comments.Marc Balmer
2006-06-05cleanup.Marc Balmer
2006-06-04- ntpd no longer needs the NTP identifier as part of a timedelta sensorMarc Balmer
description. - create the timedelta sensors as early as possible, but mark them invalid as long as there is no real data. - update docs accordingly
2006-05-28Change the timedelta sensor descritpion so that the first four bytes containMarc Balmer
the NTP identifier (filled with spaces), followed by a space and the station name (which might be the same as the NTP identifier). All timedelta sensor have to follow this scheme as OpenNTPD needs it. Requested by henning.
2006-05-27There is no longer the need to create INVALID sensors on stock, the sensorMarc Balmer
framework will create hotplug events for sensor addition/deletion. ntpd will catch these events.
2006-05-27When the device is attached, immediately create the timedelta sensor with theMarc Balmer
SENSOR_FINVALID flag set and without a description. We do not need a dummy description as a sensor with the FINVALID flags set will not show up or be used anyways. It's merely an indication to applications that there is a sensor that will eventually have a correct value. The SENSOR_FINVALID flag is removed and the description is set to the proper clockname as soon as we have received the first valid time information. This enables ntpd to check for hotplug events and rescan the list of timedelta sensors after a hotplug event. discussed with deraadt.
2006-04-27cope with recent changes in the sensor frameworkMarc Balmer
- provide the timedelta in nanoseconds - provide a timestamp in the sensor support for HBG and DCF77: - detect clocktype (DCF77 or HBG) and set it once is the sensor description
2006-04-22Simplify time calculations.Marc Balmer
help and ok kettenis@
2006-04-21make udcf work as a SENSOR_TIMEDELTA type sensor. The sensor value is theMarc Balmer
offset between the time of the device and the localtime in mSec. the sensor status is set to OK once we received a complete and valid time information. help and ok deraadt
2006-04-20open/close/cdevsw code goes bye bye; ok mbalberTheo de Raadt
2006-04-20- remove the 'needs-flag' from the udcf entry in files.usb and the #ifdef NUDCFMarc Balmer
idom in udcf.c - declare t1 to t7 as static to prevent the risk of name clashes - add two missing function prototypes help and ok miod@
2006-04-19Driver to decode the DCF77 time code using a USB attached Gude ExpertMarc Balmer
mouseCLOCK device; without a mechanism to pass data out. ok deraadt