Commit Graph

23 Commits

Author SHA1 Message Date
pgoyette
cf99d387f4 Change the i2c bus scan routine to use the write_quick protocol for most
addresses, rather than trying to read a byte of data from the device.

Some devices don't like to be read from (certain clock devices are, I'm
told, write-only!), while others expect to be asked only for words (or
pairs of bytes).

While here, skip a bunch of i2c addresses that can't (or at the very
least, shouldn't) have any slave devices.

This is the only use in NetBSD of the quick_read/quick_write protocol,
and it remains disabled by default.  I've updated all the generic i2c
drivers to handle the quick_* protocols, but several port-specific
drivers have not been updated since I'm in no position to verify that
the changes work.  Assistance from sandpoint, arm/xscale, evbarm/gumstix,
mips/alchemy, and macppc would be greatly appreciated.
2009-02-03 16:41:31 +00:00
pgoyette
d17ee48907 When scanning i2c bus for responding devices, skip over the multicast
i2c Alert Response Address.  Skipping this won't hurt (the address is
allegedly reserved), and it might avoid the lock-ups that have been
seen by others.
2008-09-29 22:55:08 +00:00
pgoyette
6d5a4d28bb Provide an option I2C_SCAN to enable sanning i2c bus for responses. This
is disabled by default, preserving current behavior.

OK garbled@
2008-09-11 20:48:50 +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
lukem
b55306727c use __KERNEL_RCSID() 2007-12-11 12:09:21 +00:00
jmcneill
4c1d81b2b5 Merge jmcneill-pm branch. 2007-12-09 20:27:42 +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
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
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
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
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
christos
168cd830d2 __unused removal on arguments; approved by core. 2006-11-16 01:32:37 +00:00
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
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
thorpej
8fc3572573 Use device_private(). 2006-03-29 06:41:24 +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
christos
95e1ffb156 merge ktrace-lwp. 2005-12-11 12:16:03 +00:00
drochner
46ed4b50c4 s/locdesc_t/int/g 2005-08-26 12:42:11 +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
wiz
b1ec4ffea9 Fix typo in comment, reported by Alexander Yurchenko grange at rt mipt ru. 2004-05-16 11:42:28 +00:00
thorpej
2652188cc4 New generic I2C framework. Supports bit-bang and "intelligent" I2C
interface controllers (of varying intelligence levels).

Contributed by Wasabi Systems, Inc.  Primarily written by Steve Woodford,
with some modification by me.
2003-09-30 00:35:30 +00:00