e2eab8e254
Summary: The hardware does not expose a classic SMBus interface. Instead it has a lower level interface that can express a far richer I2C protocol than what smbus offers. However, the interface does not provide a way to explicitly generate the I2C stop and start conditions. It's only possible to request that the stop condition is generated after transferring the next byte in either direction. So, at least one data byte must always be transferred. Thus, some I2C sequences are impossible to generate, e.g., an equivalent of smbus quick command (<start>-<slave addr>-<r/w bit>-<stop>). At the same time isl(4) and cyapa(4) are moved to iicbus and now they use iicbus_transfer for communication. Previously they used smbus_trans() interface that is not defined by the SMBus protocol and was implemented only by ig4(4). In fact, that interface was impossible to implement for the typical SMBus controllers like intpm(4) or ichsmb(4) where a type of the SMBus command must be programmed. The plan is to remove smbus_trans() and all its uses. As an aside, the smbus_trans() method deviates from the standard, but perhaps backwards, FreeBSD convention of using 8-bit slave addresses (shifted by 1 bit to the left). The method expects 7-bit addresses. There is a user facing consequence of this change. A user must now provide device hints for isl and cyapa that specify an iicbus to use and a slave address on it. On Chromebook hardware where isl and cyapa devices are commonly found it is also possible to use a new chromebook_platform(4) driver that automatically configures isl and cyapa devices. There is no need to provide the device hints in that case, Right now smbus(4) driver tries to discover all slaves on the bus. That is very dangerous. Fortunately, the probing code uses smbus_trans() to do its job, so it is really enabled for ig4 only. The plan is to remove that auto-probing code and smbus_trans(). Tested by: grembo, Matthias Apitz <guru@unixarea.de> (w/o chromebook_platform) Discussed with: grembo, imp Reviewed by: wblock (docs) MFC after: 1 month Relnotes: yes Differential Revision: https://reviews.freebsd.org/D8172 |
||
---|---|---|
.. | ||
twsi | ||
ad7417.c | ||
ad7418.c | ||
adm1030.c | ||
adt746x.c | ||
ds133x.c | ||
ds1307.c | ||
ds1307reg.h | ||
ds1374.c | ||
ds1631.c | ||
ds1672.c | ||
ds1775.c | ||
ds3231.c | ||
ds3231reg.h | ||
icee.c | ||
if_ic.c | ||
iic.c | ||
iic.h | ||
iicbb_if.m | ||
iicbb.c | ||
iicbus_if.m | ||
iicbus.c | ||
iicbus.h | ||
iicoc.c | ||
iicoc.h | ||
iiconf.c | ||
iiconf.h | ||
iicsmb.c | ||
lm75.c | ||
max6690.c | ||
ofw_iicbus.c | ||
pcf8563.c | ||
pcf8563reg.h | ||
s35390a.c | ||
sy8106a.c |