MichaelZaidman / hid-ft260

FTDI FT260 Linux kernel driver
GNU General Public License v2.0
23 stars 6 forks source link

Fix incorrectly inverted gpio direction #13

Closed dddaniel closed 1 year ago

dddaniel commented 1 year ago

The gpio_chip api callback get_direction expects 0 for OUT and 1 for IN, but the FT260 chip has this the other way around. This causes the gpio directions in the sysfs to be incorrectly inverted.

That commit fixes the issue by inverting the value returned by the FT260

MichaelZaidman commented 1 year ago

Thanks, @dddaniel for catching it! Merged.

I will include your commit in the next version of the HID: ft260: add GPIO support patch set https://patchwork.kernel.org/project/linux-input/patch/20230211115752.26276-2-michael.zaidman@gmail.com/

Michael