HomeFreeBSD

Use a single write of 3 bytes instead of iicdev_writeto() in ads111x.

Description

Use a single write of 3 bytes instead of iicdev_writeto() in ads111x.

The iicdev_writeto() function basically does scatter-gather IO by filling
in a pair of iic_msg structs to write the register address then the data
from different locations but with a single bus START/xfer/STOP sequence.
It turns out several low-level i2c controller drivers do not honor the
IIC_NOSTART flag, so the second piece of the write gets a new START on
the bus, and that confuses the ads111x chips which expect a continuous
write of 3 bytes to set a register.

A proper fix for this is to track down all the misbehaving controllers
drivers and fix them. For now this change makes this driver work again.

Details

Provenance
ianAuthored on
Parents
rS351886: pkgbase: Add the pkg trusted keys to the FreeBSD-utilities package
Branches
Unknown
Tags
Unknown