Commit Graph

109 Commits

Author SHA1 Message Date
perry
b6a2ef7569 Convert many of the uses of __attribute__ to equivalent
__packed, __unused and __dead macros from cdefs.h
2007-12-25 18:33:32 +00:00
njoly
74ac36ac9c Do not try to attach spdmem if i2c adress exceed 0x57.
It must follow the reserved eeprom adresses range.
2007-12-14 13:18:43 +00:00
xtraeme
fcad73742f Check return value of pmf_device_register(), pointed out by joerg.
Looks like the pmf(9) manpage declared it as void and not bool...
2007-12-13 15:36:29 +00:00
lukem
b55306727c use __KERNEL_RCSID() 2007-12-11 12:09:21 +00:00
lukem
3290dbb81a use __KERNEL_RCSID() 2007-12-11 05:38:12 +00:00
xtraeme
747de0248d Register to pmf(9). 2007-12-09 20:59:37 +00:00
jmcneill
4c1d81b2b5 Merge jmcneill-pm branch. 2007-12-09 20:27:42 +00:00
kiyohara
f400953756 Fix lost direction for the check on status, and read/writes. 2007-12-01 06:32:54 +00:00
kefren
7ff1853b95 Initialize sensor's state
on behalf of xtraeme
2007-11-17 08:30:35 +00:00
njoly
20aee1e2a0 Set sensor state to ENVSYS_SVALID for correct values. Otherwise,
envstat(8) will report an unknown state and won't print the sensor
value.

ok by xtraeme.
2007-11-16 22:46:56 +00:00
xtraeme
31962fc6e5 Extend the envsys2 API (one more time, sorry) as defined in:
http://mail-index.netbsd.org/tech-kern/2007/11/09/0001.html

sysmon_envsys_create() and sysmon_envsys_destroy() were added to
create/destroy sysmon_envsys objects (and its TAILQ/LIST for sensors/events).

sysmon_envsys_sensor_attach() and sysmon_envsys_sensor_detach() were
added to attach/detach sensors to a specified sysmon_envsys device.

The events framework is now per device and configurable via the
ENVSYS_SETDICTIONARY ioctl or /etc/envsys.conf and envstat(8).

Update all users and documentation to reflect these changes.
2007-11-16 08:00:11 +00:00
joerg
09f732085f From jmcneill-pm: don't probe for I2C device. It has limited usefulness
and hangs a number of machines.
2007-11-12 19:42:44 +00:00
ad
a2a3828545 machine/{bus,cpu,intr}.h -> sys/{bus,cpu,intr}.h 2007-10-19 11:59:34 +00:00
xtraeme
d0ee80aad0 Make this report correct DDR2 speed/type, and round up the
MHz value as suggested by Alan Barret (apb@).

While I'm here make it report the correct type, it should be PC2 not PC
for DDR2.

spdmem0 at iic0 addr 0x50
spdmem0: DDR2 SDRAM memory, no parity or ECC, 1024MB, 800MHz, PC2-6400
spdmem0: 14 rows, 10 cols, 2 ranks, 4 banks/chip, 2.50ns cycle time
spdmem0: voltage SSTL 1.8V, refresh time 7.8us (self-refreshing)
spdmem1 at iic0 addr 0x51
spdmem1: DDR2 SDRAM memory, no parity or ECC, 1024MB, 667MHz, PC2-5300
spdmem1: 14 rows, 10 cols, 2 ranks, 4 banks/chip, 3.00ns cycle time
spdmem1: voltage SSTL 1.8V, refresh time 7.8us (self-refreshing)
2007-09-20 23:09:59 +00:00
xtraeme
b50c672fb3 Add missing SYSCTL_SETUP_PROTO() to make the LKM happy. 2007-09-09 13:48:14 +00:00
macallan
01e17775ae don't include machine/autoconf.h - we don't need it (anymore?) 2007-09-02 01:41:29 +00:00
macallan
20316fb57c defflag DEBUG_SGSMIX 2007-09-02 01:40:46 +00:00
xtraeme
e5db35db44 typo: ENVSYS_FVALID -> ENVSYS_SVALID. 2007-09-02 00:31:23 +00:00
riz
a550eae132 For SMBus, add the ability to enumerate devices on the bus.
This does NOT identify the devices, merely indicates the
presence of devices at certain addresses.  Tested on ichsmb
and nfsmb - other SMBus devices will need to ensure the
proper bus type is set. (I2C_TYPE_SMBUS)

From Nicolas Joly, via Paul Goyette, in PR#36744.
2007-09-01 22:19:25 +00:00
tnn
449902fc06 Add spdmem(4) driver. This decodes technical specifications stored in
the eeprom on common types of memory modules. The specifications are
displayed during boot and can later be queried in the hw.spdmemN sysctl
subtree. Stub driver written by Nicolas Joly and greatly improved upon by
Paul Goyette. From PR 36745, with additional improvements by Paul and me.
2007-08-18 11:26:35 +00:00
njoly
b7a7f31e43 Add missing STOP conditions at the end of I2C operations. 2007-07-25 11:18:15 +00:00
xtraeme
a63e9584d6 Forgot to set the description in the sensor. 2007-07-13 00:27:47 +00:00
njoly
db58331d9d Mark sensor as invalid if no fan is connected.
ok by xtraeme
2007-07-11 21:15:54 +00:00
ad
88ab7da936 Merge some of the less invasive changes from the vmlocking branch:
- kthread, callout, devsw API changes
- select()/poll() improvements
- miscellaneous MT safety improvements
2007-07-09 20:51:58 +00:00
xtraeme
60ed581de9 There's no need to set the "envsys-description" property in the
driver's dictionary anymore, because with envsys2 you can change
descriptions.
2007-07-04 19:00:43 +00:00
xtraeme
1492e24783 There's no need to get initial sensor data before registering the driver
to the sysmon_envsys(9) framework, because at register time, the
framework will get initial data by itself.
2007-07-04 18:56:16 +00:00
xtraeme
02974d235e pic16lc_update: use the edata pointer rather than using softc's array
index.
2007-07-02 10:36:47 +00:00
xtraeme
7c07c6cee5 adt74673_refresh_{fan,temp,volt}: use the edata pointer rather than
using softc's edata array index.
2007-07-02 10:25:54 +00:00
xtraeme
777c61efe0 There's no need to use another envsys_data_t pointer that points to
sme->sme_sensor_data again, just use the edata pointer passed in
the gtredata function.
2007-07-01 11:28:14 +00:00
xtraeme
da3f163bd2 Imported envsys 2, a brief description of the new features:
(Part 2: drivers)

* Support for detachable sensors.
* Cleaned up the API for simplicity and efficiency.
* Ability to send capacity/critical/warning events to powerd(8).
* Adapted all the code to the new locking order.
* Compatibility with the old envsys API: the ENVSYS_GTREINFO
  and ENVSYS_GTREDATA ioctl(2)s are supported.
* Added support for a 'dictionary based communication channel' between
  sysmon_power(9) and powerd(8), that means there is no 32 bytes event
  size restriction anymore.
* Binary compatibility with old envstat(8) and powerd(8) via COMPAT_40.
* All drivers with the n^2 gtredata bug were fixed, PR kern/36226.

Tested by:

blymn: smsc(4).
bouyer: ipmi(4), mfi(4).
kefren: ug(4).
njoly: viaenv(4), adt7463.c.
riz: owtemp(4).
xtraeme: acpiacad(4), acpibat(4), acpitz(4), aiboost(4), it(4), lm(4).
2007-07-01 07:37:12 +00:00
christos
33da203dba KNF, from Anon Ymous. Also kill extra unneeded initializers and use size_t
for indexes.
2007-06-15 19:47:59 +00:00
christos
09d8955eab Eliminate unnessary floating point.
XXX: someone should KNF this file.
2007-06-14 18:20:44 +00:00
macallan
a9c87314bd add support for i2c waitstates so we can actually talk to slow slaves
Suggestions and review by simon
2007-04-30 00:07:54 +00:00
njoly
47ae0ac9f2 Fix envsys ranges. 2007-04-15 13:03:20 +00:00
jmcneill
d93606a8fe Missing LIST_INIT. Pointed out by uebayasi@ 2007-02-06 12:39:15 +00:00
jmcneill
042d1598ba Remove debug printf accidentally added in last commit. 2007-02-05 23:56:13 +00:00
jmcneill
02ad924a21 Register an SMBus interrupt handler to trap the reset on eject "feature"
on the Microsoft Xbox. Also print details on other system management type
events while we're here -- they may come in handy in the future.
2007-02-05 23:33:53 +00:00
jmcneill
be9836eac7 Allow i2c child devices to register interrupt handlers to the smbus host
controller. Both interrupt context and process context type handlers are
supported.
2007-02-05 23:31:37 +00:00
macallan
daae1989bc add sgsmix 2007-01-17 23:33:23 +00:00
macallan
5ff56dc685 driver for the SGS 7433 mixer found in some G3 macs 2007-01-17 23:32:10 +00:00
cube
4cdd8aada6 Complete initializers so those files compile. 2007-01-13 18:42:45 +00:00
cube
e37986b806 Add missing initializers in cdevsw structs. 2007-01-12 19:33:21 +00:00
imp
d6b291ee71 Update a few comments based on newer members of the at24xx family.
Add support for the 128kbit, 256kbit and 512kbit parts.  Note issues
with the 1024kbit and larger parts, but don't add support for them at
this time.  I've not updated with the explosion of part numbers in
this family.
2007-01-12 08:47:43 +00:00
cube
eb54877e1f Complete initialiser of the cdevsw structure. 2007-01-10 18:53:31 +00:00
jmcneill
9db92e3203 Rename a few possible avpack values to reflect reality. 2007-01-07 01:08:51 +00:00
jmcneill
a733c906b1 Move register definitions to a separate header. 2007-01-07 01:02:34 +00:00
jmcneill
643b8aef05 Report the version string from the PIC16LC. 2007-01-06 19:11:08 +00:00
jmcneill
33e535f8fd Provide external functions for setting the LED, rebooting, and powering off
the system.
2007-01-06 18:38:28 +00:00
jmcneill
8ea80379e0 Microsoft Xbox serial EEPROM driver. Currently reports the system serial
number as sysctl machdep.xbox_serial.
2007-01-06 18:04:53 +00:00
jmcneill
4a2776e2e1 Fix __KERNEL_RCSID text (missing $) 2007-01-06 16:57:19 +00:00