diff options
author | Lars Povlsen <lars.povlsen@microchip.com> | 2020-11-04 23:02:23 +0100 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2020-11-05 11:16:53 +0100 |
commit | 567b8e9fed8add9e20885be38ecd73bb0e07406b (patch) | |
tree | a0dbb9f850fecb0e5891208c59eec6b8edb52eab /net | |
parent | 34a9fa2025d9d3177c99351c7aaf256c5f50691f (diff) | |
download | linux-stable-567b8e9fed8add9e20885be38ecd73bb0e07406b.tar.gz linux-stable-567b8e9fed8add9e20885be38ecd73bb0e07406b.tar.bz2 linux-stable-567b8e9fed8add9e20885be38ecd73bb0e07406b.zip |
HID: mcp2221: Fix GPIO output handling
The mcp2221 driver GPIO output handling has has several issues.
* A wrong value is used for the GPIO direction.
* Wrong offsets are calculated for some GPIO set value/set direction
operations, when offset is larger than 0.
This has been fixed by introducing proper manifest constants for the
direction encoding, and using 'offsetof' when calculating GPIO
register offsets.
The updated driver has been tested with the Sparx5 pcb134/pcb135
board, which has the mcp2221 device with several (output) GPIO's.
Fixes: 328de1c519c5c092 ("HID: mcp2221: add GPIO functionality support")
Reviewed-by: Rishi Gupta <gupt21@gmail.com>
Signed-off-by: Lars Povlsen <lars.povlsen@microchip.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'net')
0 files changed, 0 insertions, 0 deletions