Commit Graph

23 Commits

Author SHA1 Message Date
thorpej 9f0d6bd066 Use todr_gettime_ymdhms / todr_settime_ymdhms. 2020-01-02 19:00:34 +00:00
thorpej 8f96eb4ccf - No need to use I2C_F_POLL here.
- Correctly propagate errors up the stack.
2020-01-02 17:40:27 +00:00
thorpej aa41e9922c More cleanup to i2c autoconfiguration:
- Get all of the drivers onto the new match quality constants.
- Introduce a new helper function, iic_use_direct_match(), that has
  all of the logic for direct-config matching.  If it returns true,
  the driver returns the match result (which may be 0).  If it returns
  false, the driver does indirect-config matching.
- iic_compat_match() now returns a weighted match quality; matches to
  lower-indexed "compatible" device property are more-specific matches,
  and return a better match quality accordingly.
2018-06-16 21:22:13 +00:00
riastradh 82b8caba92 Kill some more extern struct cfdriver declarations.
Down with externs in .c!
2017-10-28 04:53:54 +00:00
christos b59f66e17c use the inline bcdtobin and bintobcd directly instead through a macro. 2014-11-20 16:34:25 +00:00
joerg 4581fa8163 Assume bitops are meant here. 2014-08-04 23:28:19 +00:00
dholland f9228f4225 Add d_discard to all struct cdevsw instances I could find.
All have been set to "nodiscard"; some should get a real implementation.
2014-07-25 08:10:31 +00:00
skrll 7f6a34a4a9 Fix build.
Hi dh!
2014-03-17 15:57:56 +00:00
dholland a68f9396b6 Change (mostly mechanically) every cdevsw/bdevsw I can find to use
designated initializers.

I have not built every extant kernel so I have probably broken at
least one build; however I've also found and fixed some wrong
cdevsw/bdevsw entries so even if so I think we come out ahead.
2014-03-16 05:20:22 +00:00
tsutsui 471e528b58 Remove `volatile' qualifier from argument types of
struct timeval passed to todr_gettime(9) and todr_settime(9).
We no longer have an ancient and volatile struct timeval `time'
global since we have switched to MI timercounter(9) on all port.

XXX1: some of these RTC drivers still assume 32bit time_t
XXX2: some of these should be rewritten to use todr_[gs]ettime_ymdhms()
XXX3: todr(9) man page doesn't mention todr_[gs]ettime_ymdhms()
2009-12-12 14:44:08 +00:00
tsutsui ec3c45aecf Replace device_lookup() with device_lookup_private() to get softc
after device_t/softc split.  PR kern/38885 from Jonathan A. Kollasch.
2008-06-08 03:49:26 +00:00
xtraeme 9fbdf1594f device_t/softc split and other related cosmetic changes. 2008-05-04 15:26:29 +00:00
cegger 0e50a9464d use aprint_*_dev and device_xname 2008-04-06 20:25:59 +00:00
cube 4cdd8aada6 Complete initializers so those files compile. 2007-01-13 18:42:45 +00:00
gdamore a37acb1b52 Remove unused todr_setcal/todr_getcal and all the assorted stub
implementations.
2006-09-04 23:45:30 +00:00
thorpej 8fc3572573 Use device_private(). 2006-03-29 06:41:24 +00:00
christos 95e1ffb156 merge ktrace-lwp. 2005-12-11 12:16:03 +00:00
he aafdb08c5a Fix the various todr_gettime() and todr_settime() fallouts from
-Wcast-qual differently, by instead changing the signatore of those
"functions" to take a "volatile struct timeval*" instead of a
"struct timeval*".  Many places, these functions are called with
&time, and time is declared as volatile in <sys/kernel.h>.  This
way we can get rid of all the ugly casts which now also triggered
warnings, and caused more code to be added to work around the
problem.

Reviewed by thorpej.
2005-06-04 20:14:24 +00:00
scw 812d004464 Appease -Wshadow 2005-06-03 12:18:46 +00:00
shige f8b38a76cf Fix unlocking operation (RWEL register).
PR:		kern/24231
Submitted by:	KIYOHARA Takashi <kiyohara@kk.iij4u.or.jp>
2004-02-13 20:12:00 +00:00
shige 571b4462da Fix problem: checking 24H flag.
PR:		kern/24229
Submitted by:	KIYOHARA Takashi <kiyohara@kk.iij4u.or.jp>
2004-02-12 17:01:31 +00:00
shige 8fe65bf226 Fix fatal bug.
1. read/write overflow to array size.
  2. abnormal master addressing

PR:		kern/23825 (splitted kern/{24227,24228,24229,24230,24231,24232})
Submitted by:	KIYOHARA Takashi <kiyohara@kk.iij4u.or.jp>
2004-02-04 12:03:07 +00:00
shige a6e367af69 Add XICOR X1226 RTC driver. 2003-10-06 18:02:02 +00:00