Skip to content

Commit e36c31f

Browse files
Louis Morhetbentiss
authored andcommitted
HID: mcp2221: fix report layout for gpio get
The documentation of the component (section 3.1.12 GET GPIO VALUES) describes the hid report structure with two fields per gpio: its value, followed by its direction. However, the driver describes it with a wrong order: direction followed by value. Fix the structure representing the report answered by the chip to the GET GPIO VALUES command. Fixes commit 567b8e9 ("HID: mcp2221: Fix GPIO output handling") Signed-off-by: Louis Morhet <[email protected]> Link: https://lore.kernel.org/r/945967fbab56d53f9630ad3844b64734f8c3107e.1680602387.git.lmorhet@kalrayinc.com Signed-off-by: Benjamin Tissoires <[email protected]>
1 parent de46644 commit e36c31f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/hid/hid-mcp2221.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,8 @@ struct mcp_get_gpio {
7979
u8 cmd;
8080
u8 dummy;
8181
struct {
82-
u8 direction;
8382
u8 value;
83+
u8 direction;
8484
} gpio[MCP_NGPIO];
8585
} __packed;
8686

0 commit comments

Comments
 (0)