Commit Graph

56 Commits

Author SHA1 Message Date
christos 4d595fd7b1 - sprinkle __unused on function decls.
- fix a couple of unused bugs
- no more -Wno-unused for i386
2006-10-12 01:30:41 +00:00
gdamore 7020797810 Convert to MI clock_ymdhms versions of todr calls. 2006-09-09 21:10:01 +00:00
gdamore a37acb1b52 Remove unused todr_setcal/todr_getcal and all the assorted stub
implementations.
2006-09-04 23:45:30 +00:00
bjh21 b223d41e99 gettime and settime functions are meant to return errno values. Make
the pcf8583 ones do so.
2006-08-23 21:21:34 +00:00
gdamore 4c26da3f0e Add support for 10-bit addressing, per i2c specs. This has not been tested
with any actual 10-bit devices (as I don't have any), but it doesn't seem to
impact 7-bit addressing any.  Approved by christos@, briggs@, and thorpej@.
2006-07-14 17:25:17 +00:00
thorpej 55e8bbeb6e Put appropriate prefixes on property names to reduce chances of name
collisions.
2006-07-10 16:28:44 +00:00
drochner 665742bb91 remove the "name" element from the i2cbus attach args, that's what
interface attributes are good for
2006-06-26 18:19:40 +00:00
kiyohara 19d35b3135 It necessary to mask to validate bits. 2006-06-12 16:07:33 +00:00
kiyohara 43911ef4e2 Support LM77 Temperature. 2006-05-17 00:10:54 +00:00
elad 2867b68bc3 integrate kauth. 2006-05-14 21:42:26 +00:00
thorpej fb44a8574b Remove the devprop API and switch everthing over to the new proplib. Add
a new device_properties() accessor for device_t that returns the device's
property dictionary.
2006-05-05 18:04:41 +00:00
xtraeme c28f2b42a3 PR kern/32885: adt7463 i2c device does not always unlock i2c bus on error.
Apply patch from Nicolas Joly.
2006-04-30 18:54:20 +00:00
gdamore 5c69d23f28 Oops! ddc.c was accidentally getting included in *all* kernel configs.
Added a new define so it can be included without doing the attach dance.
2006-04-26 06:52:09 +00:00
gdamore 9f862191dc Add basic DDC (VESA Data Display Channel) driver for use by framebuffers.
Reviewed by jmcneill@ and macallan@.
2006-04-25 21:18:16 +00:00
riz 99cd9e5be7 Correct a couple of typos in comments ("Hook info" -> "Hook into",
"prescision"->"precision")
2006-04-04 19:38:38 +00:00
thorpej 8fc3572573 Use device_private(). 2006-03-29 06:41:24 +00:00
thorpej 2be6494fc9 Use device_cfdata(). 2006-03-29 04:16:44 +00:00
jmcneill 913f185f8f Implement a handful of missing smbus protocol functions. Proposed on
tech-kern: http://mail-index.netbsd.org/tech-kern/2006/03/16/0029.html
2006-03-27 23:59:38 +00:00
shige 94274c9331 Add r2025rtc. 2006-03-06 20:29:06 +00:00
shige 2e6c8a97d2 Add a driver for RICOH R2025S/D I2C RTC. 2006-03-06 19:55:08 +00:00
christos 1b2709754a cleanup more SET/CLR/ISSET lossage 2006-03-05 17:33:33 +00:00
xtraeme 80a3ae858b * Add missing $NetBSD$ tag and __KERNEL_RCSID.
* Nuke completely __P().
2006-02-19 08:40:12 +00:00
tls b69125454c Add support for i2c bus on AMD-8111 used on many Opteron server motherboards,
and ADT 7463c thermal and voltage monitor found on the Tyan S2881 and S2882-D
(and probably other boards as well).  We do not currently support any kind
of detection of the i2c address of the thermal monitor; it appears to be
at 0x2D on the S2881 and 0x2E on the S2882-D (kernel config examples
forthcoming).

From PR kern/32463 submitted by Anil Gopinath, anil_public@yahoo.com.
2006-02-19 02:24:20 +00:00
thorpej 680d9eea68 - Don't expose dev_propdb directly -- provide devprop_*() wrappers instead.
- Rework the ARMADILLO / epe device properties interaction so that it actually
  associates the MAC address property with the epe device instance.
2006-02-18 05:04:11 +00:00
macallan 4d89623450 back out previous commit 2006-02-17 18:45:40 +00:00
macallan 3d6233f0c1 set I2C_OP_WRITE when passing a write buffer to iic_exec() 2006-02-17 17:58:53 +00:00
abs 97ca1ffebb Update some missed _close() and _open() functions from 'struct proc *p'
to 'struct lwp *l'.
2005-12-13 20:55:46 +00:00
christos 95e1ffb156 merge ktrace-lwp. 2005-12-11 12:16:03 +00:00
nonaka 4fa7623be8 Use I2C_OP_{READ,WRITE}_WITH_STOP instead of I2C_OP_{READ,WRITE}. 2005-10-22 15:12:28 +00:00
macallan 6a34aa32a0 Shuffle thermal sensor numbering so temp0 is always the on-chip sensor and temp1
is always CPU temperature.
2005-09-11 20:26:15 +00:00
drochner 46ed4b50c4 s/locdesc_t/int/g 2005-08-26 12:42:11 +00:00
nonaka 0ec1cb9383 Initialize CONTROL1 registers. 2005-08-16 16:33:50 +00:00
nonaka f4372b7c37 Added RICOH RS5C372[AB] Real Time Clock. 2005-08-16 11:09:12 +00:00
macallan d0c6868c13 added drivers for Analog Devices ADT7467 and ADM1030 thermal monitor / fan controller chips found in various Apple laptops and probably other machines. 2005-08-10 14:18:28 +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
scw 1d6e3e9f5a Check and clear the HT bit in strtc_clock_read(), not just strtc_clock_write()
otherwise we end up reading the date/time of the previous powerfail event.
2004-11-24 14:46:18 +00:00
briggs 1991e35ca9 PR kern/27088 from Jared Momose. The read function should specify the
length of the command buffer (1) instead of 0.  Otherwise, data will
have an implied offset of 0 and reads at non-0 locations will incorrectly
return the data from 0.  Fix as suggested in the report.
2004-09-30 18:57:39 +00:00
drochner 96b589fc18 a round of autoconf cleanup:
-convert submatch() style functions (passed to config_search() or
 config_found_sm()) to the locator passing variants
-pass interface attributes in some cases
-make submatch() functions look uniformly as far as possible
-avoid macros which just hide cfdata members, and reduce dependencies
 on "locators.h"
2004-09-13 12:55:47 +00:00
scw 14cb917552 Support the DS75; a variant of the LM75 but with a slightly different
data format.
2004-08-03 13:40:20 +00:00
wiz b1ec4ffea9 Fix typo in comment, reported by Alexander Yurchenko grange at rt mipt ru. 2004-05-16 11:42:28 +00:00
christos 29f176cc88 PR/24746: Jared Momose: The _write routine in the at24cxx eeprom driver has
a =/== bug.
2004-03-11 15:11:53 +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
briggs e1aa8a2dd7 Handle the Halt Update Bit (HT), stored in the Alarm Hour register.
This bit will be set if the clock lost power (and may therefore
not have the correct time).  If this bit is set, the stored time
does not advance.  So, when setting the clock, if that bit is set,
we simply clear it.  It might be nice in some applications to pass
the information up a few layers if the bit is set when we read the
register initially.  For now, though, we ignore it.
2004-01-20 19:12:54 +00:00
mycroft dc3fafca35 Remove bogus initializer, and instead fix an =/== typo. 2003-10-29 00:34:58 +00:00
christos fb6335f225 Don't return random errors. 2003-10-25 21:33:36 +00:00
briggs 1ce6ced119 As suggested by Jason Thorpe, rename m41t to m41trtc. 2003-10-20 16:24:10 +00:00
shige cd5706bccd Add xrtc device for XICOR X1226 RTC. 2003-10-06 18:02:54 +00:00