From: Louis Morhet Date: Tue, 4 Apr 2023 12:15:14 +0000 (+0200) Subject: HID: mcp2221: fix report layout for gpio get X-Git-Tag: v6.6.7~2987^2~3^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e36c31f8cac54d6d900d270078d6b33de74e1b0a;p=platform%2Fkernel%2Flinux-starfive.git 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 567b8e9fed8a ("HID: mcp2221: Fix GPIO output handling") Signed-off-by: Louis Morhet Link: https://lore.kernel.org/r/945967fbab56d53f9630ad3844b64734f8c3107e.1680602387.git.lmorhet@kalrayinc.com Signed-off-by: Benjamin Tissoires --- diff --git a/drivers/hid/hid-mcp2221.c b/drivers/hid/hid-mcp2221.c index f74a977..fa20ed4 100644 --- a/drivers/hid/hid-mcp2221.c +++ b/drivers/hid/hid-mcp2221.c @@ -79,8 +79,8 @@ struct mcp_get_gpio { u8 cmd; u8 dummy; struct { - u8 direction; u8 value; + u8 direction; } gpio[MCP_NGPIO]; } __packed;