Commit e36c31f8 authored by Louis Morhet's avatar Louis Morhet Committed by Benjamin Tissoires

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 567b8e9f ("HID: mcp2221: Fix GPIO output handling")
Signed-off-by: default avatarLouis Morhet <lmorhet@kalrayinc.com>
Link: https://lore.kernel.org/r/945967fbab56d53f9630ad3844b64734f8c3107e.1680602387.git.lmorhet@kalrayinc.comSigned-off-by: default avatarBenjamin Tissoires <benjamin.tissoires@redhat.com>
parent de466448
......@@ -79,8 +79,8 @@ struct mcp_get_gpio {
u8 cmd;
u8 dummy;
struct {
u8 direction;
u8 value;
u8 direction;
} gpio[MCP_NGPIO];
} __packed;
......
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