History log of /fuchsia/zircon/system/dev/board/hikey960/hikey960-i2c-test.c
Revision Date Author Comments
# 3ab16f4f 19-Sep-2018 Andres Oportus <andresoportus@google.com>

[ddk][i2c] Refactor the I2C protocol

This change is similar to "[gpio] Refactor the GPIO protocol" but for
I2C channels: https://fuchsia-review.googlesource.com/c/zircon/+/199400

After this change an instance of the ZX_PROTOCOL_I2C protocol
now represents a single I2C channel. The protocol remains the same,
except the "uint32_t index" has been removed from all the protocol functions.

For devices that have only one I2C channel assigned to them, the
driver can simply call device_get_protocol() to access the I2C protocol for the
channel. To support multiple channel, a new API in the platform bus called
pdev_get_protocol() allows accessing the I2C channels protocols by index.

ZX-2621 #comment Refactor the I2C protocol removing index.

Test: Boot and I2C transactions work on astro and NXP IMX8

Change-Id: I55d08aa3d82024f6977646425fd3d75a378f2740


# ea3daa68 06-Sep-2018 Andres Oportus <andresoportus@google.com>

[ddk][i2c] Add arbitrary number of RWs support to I2C protocol

Augment the I2C protocol transact function to allow more than 2
write and/or read operations in one transaction. Rename the old
transact to write_read.

Test: Astro light sensor (uses I2C based interface) readings work

Change-Id: I3c83025b7ca697551638ed9824cb7547e37afc4b


# 3d0477f4 11-Mar-2018 Mike Voydanoff <voydanoff@google.com>

[ddk][i2c] Phase 2 of i2c protocol clean-up

- Remove i2c_channel_t. Now the i2c protocol ops use a uint32_t index
to specify the i2c channel

- Remove i2c_set_bitrate() from the high level i2c protocol.
None of our drivers actually implement this, and if they did
this would be something set by the platform board driver,
not the client.

- Remove the "actual" parameter from i2c_complete_cb.
i2c read transfers either return the amount requested or fail,
so this parameter is not needed.

Change-Id: I2dc2499ba1218d9bfd3501a43982279a3c534157


# e64fe1c7 14-Dec-2017 Payam <payamm@google.com>

[hikey][i2c] Basic I2C driver based on DesignWare IP for Hikey960 board

Change-Id: Ic0fd4a190652b096435cae48c9fd8921ab4e9d86