linux-stable/drivers
Lars Povlsen 567b8e9fed 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: 328de1c519 ("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>
2020-11-05 11:16:53 +01:00
..
accessibility
acpi dma-mapping updates for 5.10 2020-10-15 14:43:29 -07:00
amba
android
ata
atm
auxdisplay
base dma-mapping updates for 5.10 2020-10-15 14:43:29 -07:00
bcma
block
bluetooth
bus
cdrom
char
clk
clocksource
connector
counter
cpufreq
cpuidle
crypto
dax
dca
devfreq
dio
dma
dma-buf dma-mapping updates for 5.10 2020-10-15 14:43:29 -07:00
edac
eisa
extcon
firewire
firmware
fpga
fsi
gnss
gpio
gpu dma-mapping updates for 5.10 2020-10-15 14:43:29 -07:00
greybus
hid HID: mcp2221: Fix GPIO output handling 2020-11-05 11:16:53 +01:00
hsi
hv
hwmon
hwspinlock
hwtracing
i2c
i3c
ide
idle
iio
infiniband
input
interconnect
iommu dma-mapping updates for 5.10 2020-10-15 14:43:29 -07:00
ipack
irqchip
isdn
leds
lightnvm
macintosh
mailbox
mcb
md
media dma-mapping updates for 5.10 2020-10-15 14:43:29 -07:00
memory
memstick
message
mfd
misc dma-mapping updates for 5.10 2020-10-15 14:43:29 -07:00
mmc
most
mtd
mux
net dma-mapping updates for 5.10 2020-10-15 14:43:29 -07:00
nfc
ntb
nubus
nvdimm
nvme
nvmem
of dma-mapping updates for 5.10 2020-10-15 14:43:29 -07:00
opp
oprofile
parisc
parport
pci dma-mapping updates for 5.10 2020-10-15 14:43:29 -07:00
pcmcia
perf
phy
pinctrl
platform
pnp
power
powercap
pps
ps3
ptp
pwm
rapidio
ras
regulator
remoteproc dma-mapping updates for 5.10 2020-10-15 14:43:29 -07:00
reset
rpmsg
rtc
s390
sbus
scsi dma-mapping updates for 5.10 2020-10-15 14:43:29 -07:00
sfi
sh
siox
slimbus
soc
soundwire
spi
spmi
ssb
staging dma-mapping updates for 5.10 2020-10-15 14:43:29 -07:00
target
tc
tee
thermal
thunderbolt
tty
uio
usb dma-mapping updates for 5.10 2020-10-15 14:43:29 -07:00
vdpa dma-mapping updates for 5.10 2020-10-15 14:43:29 -07:00
vfio
vhost
video
virt
virtio
visorbus
vlynq
vme
w1
watchdog
xen dma-mapping updates for 5.10 2020-10-15 14:43:29 -07:00
zorro
Kconfig
Makefile