usb:serial:pl2303: add GPIOs interface on PL2303
Subsystems (2)
PATCH v4 1/1 usb:serial:pl2303: add GPIOs interface on PL2303
PL2303HX has two GPIOs, this patch add interface for it.
---
Changes v3-v4:
1: fix missing static for gpio_dir_mask and gpio_value_mask
2: reduce unneeded compile macro defined suggested by [email protected] 3: use true instead of 1 corrected by Linus Walleij
4: ignore return value of gpiochip_remove suggested by Linus Walleij 5: fix multi gpio_chips registered by pl2303 can't be distinguished in kernel space.
Give different labels to different gpio_chips is good for diagnostic, and we could identify per gpio_chip registered by pl2303 by try different lable name then detect its parent device.
drivers/usb/serial/Kconfig | 10 +++ drivers/usb/serial/pl2303.c | 163 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 173 insertions(+)
drivers/usb/serial/Kconfig +10 -0
@@ -516,6 +516,16 @@ config USB_SERIAL_PL2303 To compile this driver as a module, choose M here: the module will be called pl2303. +config USB_SERIAL_PL2303_GPIO + bool "USB Prolific 2303 Single Port GPIOs support" + depends on USB_SERIAL_PL2303 && GPIOLIB + ---help--- + Say Y here if you want to use the GPIOs on PL2303 USB Serial single port + adapter from Prolific. + + It support 2 GPIOs on PL2303HX currently, + if unsure, say N. + config USB_SERIAL_OTI6858 tristate "USB Ours Technology Inc. OTi-6858 USB To RS232 Bridge Controller" help
drivers/usb/serial/pl2303.c +163 -0
196 lines not on this page · raw message
Signature · 1 line
1.8.5.5.dirty
Quoted 10 lines · Wang YanQing
PL2303HX has two GPIOs, this patch add interface for it.
Signed-off-by Wang YanQing <[email protected]>---
Changes v3-v4:
1: fix missing static forgpio_dir_maskandgpio_value_mask
2: reduce unneeded compile macro defined suggested by [email protected] 3: use true instead of 1 corrected by Linus Walleij
4: ignore return value ofgpiochip_removesuggested by Linus Walleij 5: fix multigpio_chipsregistered by pl2303 can't be distinguished in kernel space.
This is OK with me now,
Yours,
Linus Walleij