Commit Graph

133 Commits

Author SHA1 Message Date
pgoyette
ca20a59d5d Fix typo - no functional changes.
OK macallan@
2008-09-08 23:07:51 +00:00
pgoyette
63a1d80294 Provide correct URL for current data sheet. This device is now owned
by ON Semi.
2008-09-08 16:05:44 +00:00
pgoyette
9b30bc57d1 Note that previous URL for ADT7463 datasheet is no longer operative, and
provide link to an earlier, but still active, revision.
2008-09-07 19:07:21 +00:00
macallan
5eb6bd1c4f allow wildcard for addr so we can have spdmem* at iic? addr ? 2008-08-26 16:29:14 +00:00
macallan
f675bba464 fix incomplete device_t-ification
Now it works again.
2008-08-01 19:33:07 +00:00
tsutsui
b7ae6e7fa1 Set SDA High (it means turning off open-collector driver
regardless of DIR() on the formal I2C hardware implementation)
during DIR() is set to INPUT. Some MD drivers might assume it.

tl(4) still works with this change.
2008-07-12 02:11:32 +00:00
tsutsui
b3d67eaca7 Remove unnecessary casts against void pointers. 2008-06-08 03:56:09 +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
tsutsui
3a70013d4e Reorganize I2C bitbang ops:
- don't set DIR(INPUT) in i2c_wait_for_scl() because it could cause
  unexpected stop condition in SCL=H, SDL=L and DIR(OUTPUT) case,
  and DIR() should be used only to switch SDA direction, not SCL
  that is always output on the master device
  (I'm not sure if reading SCL on the master is defined in the I2C spec)
- set SDA right after SCL H->L edge on Tx, fetch SDA at SCL L->H edge on Rx,
  and make sure not to change SDA during SCL=H except start/stop conditions
  so that we don't have to rely on data setup time which might be critical
- don't set DIR(OUTPUT) during SDA bit read in i2c_bitbang_read_byte()
- explicitly specify both SDA and SCL bits in SETBITS() for readability
- sprinkle comments

Fixes "tl0: error reading Ethernet address" problem on tl(4).
2008-06-01 01:13:18 +00:00
tsutsui
a2180d724d - use 'us' for microsecond rather than 'uS'
- unwrap not so long lines
- some KNF
2008-05-31 18:26:43 +00:00
macallan
1da90a4ef8 nuke clause 3 2008-05-08 02:32:48 +00:00
macallan
92b89da10e nuke clause 3 2008-05-08 02:03:22 +00:00
jmcneill
729313d52c Use 2-clause license. 2008-05-05 00:12:49 +00:00
xtraeme
9fbdf1594f device_t/softc split and other related cosmetic changes. 2008-05-04 15:26:29 +00:00
xtraeme
07c2a78bc8 device_t/softc split for adt7467c(4) and adm1030, and other related
cosmetic changes.
2008-05-04 14:45:01 +00:00
cegger
f98b30fb5e Re-add chunk of code that got lost in rev. 1.10. Makes this file build/work again. vi sometimes plays games with me. Spotted by dogcow. 2008-04-09 06:13:26 +00:00
dogcow
9bad45d03e deparenthesize 'return (x);' and add missing close-brace. 2008-04-09 05:57:00 +00:00
cegger
0e50a9464d use aprint_*_dev and device_xname 2008-04-06 20:25:59 +00:00
xtraeme
63e2f604f6 Split device_t/softc and other related cosmetic changes. 2008-04-04 10:11:01 +00:00
xtraeme
74fc6cf06c Split device_t/softc and other related cosmetic changes. 2008-04-04 09:49:49 +00:00
ad
b19c5369ab Make it compile again. 2008-03-27 17:34:54 +00:00
jmcneill
bd7babb259 Split device_t and softc, use cfdata_t 2008-03-27 12:15:16 +00:00
jmcneill
0a866f5754 Use device_t, cfdata_t 2008-03-27 12:14:54 +00:00
jmcneill
9655a911a4 Split device_t and softc, replace malloc with kmem_alloc 2008-03-27 12:08:37 +00:00
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