The new API now covers the entire character driver protocol, while
hiding all the message details. It should therefore be used by all
new character drivers. All existing drivers that already made use of
libchardriver have been changed to use the new API.
As one of the most important API changes, support for scatter and
gather transfers has been removed, as several key drivers already
did not support this, and it could be supported at the safecopy
level instead (for a future readv/writev).
Additional changes include:
- respond to block device open requests to avoid hanging VFS threads;
- add support for sef_cancel.
Change-Id: I1bab6c1cb66916c71b87aeb1db54a9bdf171fe6b
Previously it would use bits of the character driver protocol, which
will change heavily. In the new situation, the BUSC_I2C_xxx requests
use a protocol more in line with the PCI protocol, with the reply code
in m_type.
Change-Id: I51597b3f191078c8178ce17372de123031f7a4c4
- change all sync char drivers into async drivers;
- retire support for the sync protocol in libchardev;
- remove async dev style, as this is now the default;
- remove dev_status from VFS;
- clean up now-unused protocol messages.
Change-Id: I6aacff712292f6b29f2ccd51bc1e7d7003723e87
The sht21 temperature and humidity sensor holds the i2c bus while
an ADC conversion is in progress. For example, a temperature
measurement is requested, a read operation is started, and the
sht21 doesn't respond to the read request until the result of
the measurement is ready. The conversion time isn't constant.
On rare occations (one in hundreds of samples) the timeout in the
i2c driver expires returning an error.
The example code from Sensirion, the sht21's manufacturer, suggests
a bus timeout of 1 second to accommodate the sht21. This commit
increases the bus timeout to 1 second. The timeout is only reached
when chips do not respond normally, so the change doesn't affect the
performance of any other drivers.
Change-Id: I57b0f958a5d0b69b221af380b771fe67401ff604
On the AM335X, writes to the padconf registers must be done in privileged
mode. To allow userspace drivers to dynamically change the padconf at
runtime, a kernel call has been added.
Change-Id: I4b25d2879399b1785a360912faa0e90b5c258533
Implement changes based on Kees comments on the code review:
http://gerrit-minix.few.vu.nl/#/c/676/
Changes:
- use spin API instead of micro_delay() for busy-wait loops.
- use read16/write16/set16 from mmio.h to access I2C registers.
- reduce the timeout for soft reset.
- in read/write, don't mix variable declaration and initialization.
- after transfer, wait for access ready instead of blindly delaying.
- rename constants am335x, dm37xx to AM335X_I2C_BUS, DM37XX_I2C_BUS.
- rename ADDRESS_MASK to MAX_I2C_SA_MASK for clairity.
- rename omap_i2c_claim_bus() to omap_i2c_bus_is_free().
Change-Id: Ic221e6134e024ea0a6690f21cff208a728286948