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

From: Wang YanQing
Date: Thu Aug 07 2014 - 15:11:01 EST


On Tue, Aug 05, 2014 at 03:54:08PM +0200, Johan Hovold wrote:
> > > I noticed that setting direction to output and setting the gpio high has
> > > no effect on the read-back value (i.e. I still read back 0) for my
> > > pl2303hx (note that my device has no easily accessible gpios so I
> > > haven't verified the actual state of the output pin).
> > >
> > > What happens on your system? Is the read-back value still 0, even when
> > > the GPIO output is actually high? Should we return the cached value in
> > > this case?
> >
> > If i set direction to output, then I could control gpio high and low
> > by set 1 or 0, and the read-back value is 1 or 0 according to high and
> > low(I test high and low by oscillscope)
> >
> > I test it with my pl2303hx with only two gpios.
> >
> > Could you use usbmon to see whether the traffic is right according
> > to comment in struct pl2303_gpio?
>
> The traffic appears correct judging from the debug output (which I
> trust). Output-enable is reflected in register 0x81, but the value
> isn't.
>
> What is the lsusb -v output for your device?

Bus 001 Device 005: ID 067b:2303 Prolific Technology, Inc. PL2303 Serial Port.

It is strange your device doesn't work, I verify the control method by
analyze usbmon output from linux host which has VirtualBox running
gpio test program, but I don't have right to distribute the gpio test
program I think, so I can't help you to figure out why it doesn't work
for your device.

> I suggest you just set the label to pl2303 until we have a valid
> use-case that requires something more elaborate.

Ok, but pl2303-gpio maybe a better name?

Thanks.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/