瀏覽代碼

usb: host: max3421-hcd: fix mask of IO control register

GPIO control register is divided into IOPINS1 and IOPINS2.
And low 4-bit of register is controls output.

So, this patch fixes wrong mask of GPIO output.

Signed-off-by: Jaewon Kim <jaewon02.kim@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jaewon Kim 9 年之前
父節點
當前提交
59b71f774f
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      drivers/usb/host/max3421-hcd.c

+ 1 - 1
drivers/usb/host/max3421-hcd.c

@@ -1675,7 +1675,7 @@ max3421_gpout_set_value(struct usb_hcd *hcd, u8 pin_number, u8 value)
 	if (pin_number > 7)
 	if (pin_number > 7)
 		return;
 		return;
 
 
-	mask = 1u << pin_number;
+	mask = 1u << (pin_number % 4);
 	idx = pin_number / 4;
 	idx = pin_number / 4;
 
 
 	if (value)
 	if (value)