Re: [PATCH] USB: serial: pl2303: Modify the detection method of PL2303HXN (TYPE_HXN)

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

 



On Tue, Jun 21, 2022 at 12:41:39PM +0800, Charles Yeh wrote:
> > Ok, but the above could be handled with two entries or if needed we can
> > just check the major number (i.e. the MSB, 0x03)?
> 
> No , MSB:0x03 represents the HXN_GT (PL2303GT) version,
> but the current HXN version has multiple IC types,
> for example, the bcdDevice_MSB of HXN_GS uses 0x60.

That's precisely what I was referring to.
 
> HXN_GS: PL2303GS_R4 : idProduct : 0x23F3, bcdDevice: 0x0600
> HXN_GS: PL2303GS_R5 : idProduct : 0x23F3, bcdDevice: 0x0605
> HXN_GS: PL2303GS_R5+ : idProduct : 0x23A3, bcdDevice: 0x0605
> 
> The difference between R4 and R5 is that bcdDevice is a different set value.
> The difference between R5 and R5+ is that idProduct is a different set value.
> But PL2303GS_R4 / PL2303GS_R5 / PL2303GS_R5+ all represent HXN_GS chip.

Right.

> > So far I've gathered that
> >
> >         0x100   GC
> >         0x105   GC
> >         0x300   GT / TA
> >         0x305   GT
> >         0x405   GL
> >         0x500   GE / TB
> >         0x605   GS
> >
> > So it look like we could use the major version number.
> >
> > Anything more we need to add to the above list?
> 
> Currently there are HXN ICs on the market:
> PL2303GC : 0x0100 / 0x0105
> PL2303GT : 0x0300 / 0x0305
> PL2303GL : 0x0400 / 0x0405
> PL2303GE : 0x0500 / 0x0505
> PL2303GS : 0x0600 / 0x0605
> PL2303GR : 0x0700 / 0x0705

Thanks for filling in the blanks.

> I think it is not very good to add the above bcdDevice to the list.
> 
> Because the company's PM/Sales are still planning some HXN ICs
> (these ICs will be sold according to market behavior in the future,
> and there will be different bcdDevices: 0x0800 / 0x0805/ 0x0900 / 0x0905.....).
> so in the future Time, it will become to add different bcdDevice values
> from time to time, which will become the patch file is always updated.

That's no problem. We'd be happy to add support for any new types as
well.

It's much easier to get this right from the start than to try to
retrofit it when you realise that you need it (e.g. as we had to do with
the older types).

> In the current newest Linux driver program design,
> using bcdUSB (0x0100 / 0x0200) as a judgment.
> I hope that when bcdUSB==0x0200 is encountered,
> I only need to judge whether it is PL2303TA/PL2303TB chip,
> and the rest is to use HX_Status to judge whether it is HXN_TYPE chip.

I understand, and that would be enough to detect HXN, but not the
individual HXN types which is what I want to do.

> There is no need to use bcdDevice one by one to determine which HXN_TYPE
> (PL2303GC, PL2303GT....)
> 
> At present, if our customers need special functions or
> chip version control in HXN_TYPE IC ,
> we will provide special customized files or patch files

That's not a practice I would recommend, it's better that you add proper
support to the mainline driver so that all users can benefit.

I'm sure your customers would prefer to use a mainline driver as well.

> General customers only need to identify as HXN_TYPE on Linux OS.

I'm afraid I don't agree with that.

I'll prepare a patch that adds support for the missing HXN types.

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