Commit c8acfe0a authored by Karoly Pados's avatar Karoly Pados Committed by Johan Hovold

USB: serial: cp210x: implement GPIO support for CP2102N

This patch adds GPIO support for CP2102N devices.

It introduces new generic code to support emulating separate
input and outputs directions even though these devices
only know output modes (open-drain and pushpull). Existing
GPIO support for CP2105 has been migrated over to the new
code structure.

Only limitation is that for the QFN28 variant, only 4 out of
7 GPIOs are supported. This is because the config array
locations of the last 3 pins are not documented, and reverse
engineering revealed offsets that conflicted with other
documented functions. Hence we'll play it safe instead
until somebody clears this up further.
Signed-off-by: default avatarKaroly Pados <pados@pados.hu>
[ johan: fix style issues and a couple of minor bugs; use Karoly's
         updated commit message ]
Acked-by: default avatarMartyn Welch <martyn.welch@collabora.co.uk>
Signed-off-by: default avatarJohan Hovold <johan@kernel.org>
parent 5edb65a3
This diff is collapsed.
Markdown is supported
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