Re: [PATCH v5] usb:serial:pl2303: add GPIOs interface on PL2303

2014-07-29 Thread Wang YanQing
On Fri, Jul 25, 2014 at 09:53:23PM +0200, Andreas Mohr wrote: > Hi, > > On Sat, Jul 26, 2014 at 01:35:23AM +0800, Wang YanQing wrote: > > > + It support 2 GPIOs on PL2303HX currently, > "supports" > Right! > > +static u8 gpio_dir_mask[GPIO_NUM] = {0x10, 0x20}; > > +static u8 gpio_value

Re: [PATCH v5] usb:serial:pl2303: add GPIOs interface on PL2303

2014-07-25 Thread Andreas Mohr
Hi, On Sat, Jul 26, 2014 at 01:35:23AM +0800, Wang YanQing wrote: > + It support 2 GPIOs on PL2303HX currently, "supports" > +static u8 gpio_dir_mask[GPIO_NUM] = {0x10, 0x20}; > +static u8 gpio_value_mask[GPIO_NUM] = {0x40, 0x80}; Those two should better be static const, too (sorry). Yo

[PATCH v5] usb:serial:pl2303: add GPIOs interface on PL2303

2014-07-25 Thread Wang YanQing
PL2303HX has two GPIOs, this patch add interface for it. Signed-off-by: Wang YanQing --- Changes v4-v5: 1: fix gpio_chip.lable been overwrited by template_chip. 2: use idr to manage minor instead of crude monotonous atomic increment. drivers/usb/serial/Kconfig | 10 +++ drivers/usb/serial