Re: [PATCH] USB:Serial:pl2303:Add new Pull-UP Mode to support PL2303HXD(TYPE_HX)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jan 17, 2019 at 06:19:56AM +0000, Yeh.Charles [葉榮鑫] wrote:
> Hi Johan,
>   Please refer to https://electronics.stackexchange.com/questions/28091/push-pull-open-drain-pull-up-pull-down

Thanks, I know that bit.

I still need a proper commit message describing why the change is
needed. You provide some more information below, but it's still not
enough for a proper commit message it seems.

What pins are you changing the properties off here? The UART pins or
some GPIOs. Please explain in more details what this is used for.

And the magic constants needs to go away in favour of defines.

>   " Your are also enabling this for all current devices " <<--No, it
>   needs to use addition schematic design.

I meant that you are enabling this new code for all device types
unconditionally yet you say it's only needed for HXD.

>     It needs special PCB and special PL2303HXD, and then enable Pull-up mode..
> 
>    " special PL2303HXD ": Prolific will release a custom-made
>    PL2303HXD OTP( 6.5V ) writer to customer. The OTP writer will
>    record a "Data:0x08" at "Address: 0x09".

Ok, that's another piece to the pussle, thanks. Remember to include it
in the commit message too.

> pl2303_startup function:
> pl2303_vendor_read(serial, 0x8484, buf);
> pl2303_vendor_write(serial, 0x0404, 0);
> pl2303_vendor_read(serial, 0x8484, buf);
> pl2303_vendor_read(serial, 0x8383, buf);
> 
> pl2303_vendor_read(serial, 0x8484, buf);
> pl2303_vendor_write(serial, 0x0404, 1);
> pl2303_vendor_read(serial, 0x8484, buf);
> pl2303_vendor_read(serial, 0x8383, buf);
> 
> 
> pl2303_set_termios function:
> pl2303_vendor_read(serial, 0x8484, buf);
> pl2303_vendor_write(serial, 0x0404, TYPE_HX_PULLUP_MODE_REG);
> pl2303_vendor_read(serial, 0x8484, buf);
> pl2303_vendor_read(serial, 0x8383, buf);
> 
> You can see the same code in "pl2303_startup" function, it can be
> found from v.2.4.31 and above Linux kernel.

It's not really the same code is it? First of all it's only run at
probe, not at every set_termios call; why did you add it there?

Second, the current code appears to read from address 0 and 1, not
address 9.

> So you want me to also change pl2303_startup function ?

If you could clean up that code with proper defines and a comment about
what is going on, that would be great.

Thanks,
Johan



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux