Skip to content
Commit f0b57680 authored by Adamski, Krzysztof (Nokia - PL/Wroclaw)'s avatar Adamski, Krzysztof (Nokia - PL/Wroclaw) Committed by Wolfram Sang
Browse files

i2c: axxia: support slave mode



This device contains both master and slave controllers which can be
enabled simultaneously. Both controllers share the same SDA/SCL lines
and interrupt source but has separate control and status registers.
Controllers also works in loopback mode - slave device can communicate
with its own master controller internally. The controller can handle up
to two addresses, both of which may be 10 bit. Most of the logic
(sending (N)ACK, handling repeated start or switching between
write/read) is handled automatically which makes working with this
controller quite easy.

For simplicity, this patch adds basic support, limiting to only one
slave address. Support for the 2nd device may be added in the future.

Note that synchronize_irq() is used to ensure any running slave interrupt
is finished to make sure slave i2c_client structure can be safely used
by i2c_slave_event.

Signed-off-by: default avatarKrzysztof Adamski <krzysztof.adamski@nokia.com>
Reviewed-by: default avatarAlexander Sverdlin <alexander.sverdlin@nokia.com>
Signed-off-by: default avatarWolfram Sang <wsa@the-dreams.de>
parent 724041ae
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment