Re: [PATCH] usb:serial: Add Fintek F81532/534 driver

2016-05-30 Thread Peter Hung
Hi, Ji-Ze Hong (Peter Hong) 於 2016/5/31 上午 09:33 寫道: This driver is for Fintek F81532/F81534 USB to Serial Ports IC. Sorry, I forgot to change the mail title for "PATCH V9". I'll resend a patch with title "PATCH V9". Thanks -- With Best Regards, Peter Hung -- To unsubs

[PATCH V8 1/1] usb:serial: Add Fintek F81532/534 driver

2016-01-27 Thread Peter Hung
iver loaded. Please reference https://bitbucket.org/hpeter/fintek-general/src/ with f81534/tools to get user-space tool to change F81532/534 setting. Please use it carefully. Signed-off-by: Peter Hung <hpeter+linux_ker...@gmail.com> --- Changelog: v8 1. Remove driver mode GPIOL

[PATCH V7 1/1] usb:serial: Add Fintek F81532/534 driver

2015-12-01 Thread Peter Hung
nged. Please reference https://bitbucket.org/hpeter/fintek-general/src/ with f81534/tools to get set_gpio.c & set_mode.c to change F81532/534 setting. Please use it carefully. Signed-off-by: Peter Hung <hpeter+linux_ker...@gmail.com> --- Changelog: v7 1. Make all gpiolib functi

Re: [PATCH V6 1/1] usb:serial: Add Fintek F81532/534 driver

2015-11-04 Thread Peter Hung
Hi Peter Hung 於 2015/11/3 上午 11:51 寫道: > This driver is for Fintek F81532/F81534 USB to Serial Ports IC. > Changelog: > v6 > 1. Re-implement the write()/resume() function. Due to this device cant be > suitable with generic write(), we'll do the submit write URB when

Re: [PATCH V6 1/1] usb:serial: Add Fintek F81532/534 driver

2015-11-04 Thread Peter Hung
Hi, Oliver Neukum 於 2015/11/4 下午 04:38 寫道: On Wed, 2015-11-04 at 16:19 +0800, Peter Hung wrote: Hi Oliver Neukum 於 2015/11/3 下午 06:03 寫道: On Tue, 2015-11-03 at 11:51 +0800, Peter Hung wrote: + for (i = 0; i < F81534_NUM_PORT; ++i) + atomic_set(_priv->port_active

Re: [PATCH V6 1/1] usb:serial: Add Fintek F81532/534 driver

2015-11-04 Thread Peter Hung
Hi Andy Shevchenko 於 2015/11/3 下午 05:45 寫道: On Tue, Nov 3, 2015 at 5:51 AM, Peter Hung <hpe...@gmail.com> wrote: + *Please reference https://bitbucket.org/hpeter/fintek-general/src/ + *with f81534/tools to get set_gpio.c & set_mode.c. Please use it + *carefully. Would

Re: [PATCH V6 1/1] usb:serial: Add Fintek F81532/534 driver

2015-11-04 Thread Peter Hung
Hi Oliver Neukum 於 2015/11/3 下午 06:03 寫道: On Tue, 2015-11-03 at 11:51 +0800, Peter Hung wrote: +static int f81534_attach(struct usb_serial *serial) +{ + struct f81534_serial_private *serial_priv = NULL; + int status; + int i; + int offset; + uintptr_t setting_idx

[PATCH V6 1/1] usb:serial: Add Fintek F81532/534 driver

2015-11-02 Thread Peter Hung
nged. Please reference https://bitbucket.org/hpeter/fintek-general/src/ with f81534/tools to get set_gpio.c & set_mode.c to change F81532/534 setting. Please use it carefully. Signed-off-by: Peter Hung <hpeter+linux_ker...@gmail.com> --- Changelog: v6 1. Re-implement the write()/res

Re: [PATCH V5 1/1] usb:serial add Fintek F81532/534 driver

2015-10-21 Thread Peter Hung
Hi Johan, Johan Hovold 於 2015/9/14 下午 09:33 寫道: On Tue, Jul 21, 2015 at 09:58:19AM +0800, Peter Hung wrote: 4. RS422 Mode 1. The RTS mode is dont care. 2. Set M2/M1/M0 as 0/0/0 I don't think all gpios should be exported for these ports if they have special

Re: [PATCH V5 1/1] usb:serial add Fintek F81532/534 driver

2015-09-17 Thread Peter Hung
Johan Hovold 於 2015/9/14 下午 09:33 寫道: > On Tue, Jul 21, 2015 at 09:58:19AM +0800, Peter Hung wrote: >> This driver is for Fintek F81532/F81534 USB to Serial Ports IC. >> > So as I mentioned above, always accept data if there's room in the fifo. > Then kick of a write ur

[PATCH V5 1/1] usb:serial add Fintek F81532/534 driver

2015-07-20 Thread Peter Hung
re-submit it to correct subsystem 2. Remove all custom ioctl commands Signed-off-by: Peter Hung hpeter+linux_ker...@gmail.com --- drivers/usb/serial/Kconfig | 10 + drivers/usb/serial/Makefile |1 + drivers/usb/serial/f81534.c | 3279 +++ 3 files

Re: [PATCH V4 1/1] usb:serial:f81534 add F81532/534 driver

2015-07-15 Thread Peter Hung
with newer patch. -- With Best Regards, Peter Hung -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

[PATCH V4 1/1] usb:serial:f81534 add F81532/534 driver

2015-07-13 Thread Peter Hung
numbers to make it meaningful 3. Make more comments as document in source code. v2 1. v1 version submit to staging tree, but Greg KH advised me to cleanup source code re-submit it to correct subsystem 2. Remove all custom ioctl commands Signed-off-by: Peter Hung hpeter

Re: [PATCH V3 1/1] usb:serial:f81534 add F81532/534 driver

2015-07-10 Thread Peter Hung
Hi Johan, Peter Hung 於 2015/7/9 上午 11:15 寫道: This driver is for Fintek F81532/F81534 USB to Serial Ports IC. Please pending for the driver, I found a problem with prepare_write_buffer(). The driver submit write block size != real tx send size. It's will ok on transmitting small mount data

[PATCH V3 1/1] usb:serial:f81534 add F81532/534 driver

2015-07-08 Thread Peter Hung
, but Greg KH advised me to cleanup source code re-submit it to correct subsystem 2. Remove all custom ioctl commands Signed-off-by: Peter Hung hpeter+linux_ker...@gmail.com --- drivers/usb/serial/Kconfig | 10 + drivers/usb/serial/Makefile |1 + drivers/usb/serial/f81534.c | 3316

Re: [PATCH V2 1/1] usb:serial:f81534 Add F81532/534 Driver

2015-06-24 Thread Peter Hung
Hello Johan, Peter Hung 於 2015/6/15 上午 09:54 寫道: This driver is for Fintek F81532/F81534 USB to Serial Ports IC. Features: 1. F81534 is 1-to-4 F81532 is 1-to-2 serial ports IC 2. Support Baudrate from B50 to B150 (excluding B100). 3. The RTS signal can be transformed

[PATCH V2 1/1] usb:serial:f81534 Add F81532/534 Driver

2015-06-14 Thread Peter Hung
subsystem 2. Remove all custom ioctl commands If had any question, Please send email to hpeter+linux_ker...@gmail.com peter_h...@fintek.com.tw Signed-off-by: Peter Hung hpeter+linux_ker...@gmail.com --- drivers/usb/serial/Kconfig | 10 + drivers/usb/serial/Makefile |1 + drivers/usb/serial

Re: [PATCH 1/1] staging:f81534 Add F81532/534 Driver

2015-06-11 Thread Peter Hung
Greg KH 於 2015/6/12 下午 12:33 寫道: Why not just do the work now to clean up the file and get it merged properly? Why put this in staging at all? I'll clear up the file and resend it to usb-serial subsystem mail list. Thanks for your advices. -- With Best Regards, Peter Hung -- To unsubscribe

[PATCH 1/1] staging:f81534 Add F81532/534 Driver

2015-06-11 Thread Peter Hung
-off-by: Peter Hung hpeter+linux_ker...@gmail.com --- drivers/staging/Kconfig |2 + drivers/staging/Makefile|1 + drivers/staging/f81534/Kconfig | 10 + drivers/staging/f81534/Makefile |1 + drivers/staging/f81534/Readme |9 + drivers/staging/f81534/TODO | 12

Re: [PATCH V9 02/10] USB: f81232: implement RX bulk-in EP

2015-03-31 Thread Peter Hung
Hello, Thanks for your kindly support and code review. It's my honor to work with you :D Johan Hovold 於 2015/3/28 上午 12:17 寫道: I'll apply the whole series now. Thanks again for fixing up this driver! Johan -- With Best Regards, Peter Hung -- To unsubscribe from this list: send the line

Re: [PATCH V8 02/10] USB: f81232: implement RX bulk-in EP

2015-03-16 Thread Peter Hung
Hello, Johan Hovold 於 2015/3/16 下午 04:52 寫道: On Mon, Mar 16, 2015 at 10:53:38AM +0800, Peter Hung wrote: To avoid confusing to user, I'll keep it without warning message. Yes, skip the warning, but could you a short comment about this (e.g. the 1-byte packet on open) before you do the size

Re: [PATCH V8 04/10] USB: f81232: implement read IIR/MSR with endpoint

2015-03-16 Thread Peter Hung
Hello, Johan Hovold 於 2015/3/16 下午 04:55 寫道: On Mon, Mar 16, 2015 at 11:08:29AM +0800, Peter Hung wrote: Could you rewrite this as if (status 0) status = usb_translate_errors(status); else status = 0; In my definition the return value of set

Re: [PATCH 0/2] serial: 8250_pci: Fintek products patches

2015-03-15 Thread Peter Hung
Hello, Greg KH 於 2015/3/15 下午 05:25 寫道: Why did you cc: the linux-usb@vger mailing list on these? Don't you mean linux-serial@vger? Sorry for my fault. Should I resend it with correct mail-list with V2 ?? or just send this series patches ? Thanks -- With Best Regards, Peter Hung

Re: [PATCH V8 02/10] USB: f81232: implement RX bulk-in EP

2015-03-15 Thread Peter Hung
Hello, Johan Hovold 於 2015/3/14 下午 07:48 寫道: On Thu, Feb 26, 2015 at 06:02:08PM +0800, Peter Hung wrote: - if (!urb-actual_length) + if ((urb-actual_length 2) || (urb-actual_length % 2)) return; Not parsing short data (e.g. not divisible by 2) is OK I guess. You

Re: [PATCH V8 04/10] USB: f81232: implement read IIR/MSR with endpoint

2015-03-15 Thread Peter Hung
Hello, Johan Hovold 於 2015/3/14 下午 08:02 寫道: On Thu, Feb 26, 2015 at 06:02:10PM +0800, Peter Hung wrote: + if (status != sizeof(*val)) { + dev_err(port-dev, %s failed status: %d\n, __func__, status); + + if (status == 0) + status = -EIO

[PATCH 2/2] serial: 8250_pci: port failed after wakeup from S3

2015-03-12 Thread Peter Hung
() and set it to pci_serial_quirks .init section. It's will re-init this device when system wakeup from pciserial_resume_ports(). Signed-off-by: Peter Hung hpeter+linux_ker...@gmail.com --- drivers/tty/serial/8250/8250_pci.c | 114 - 1 file changed, 50 insertions

[PATCH 0/2] serial: 8250_pci: Fintek products patches

2015-03-12 Thread Peter Hung
will re-init this device when system wakeup from pciserial_resume_ports(). Peter Hung (2): serial: 8250_pci: remove non-used var for F81504 serial: 8250_pci: port failed after wakeup from S3 drivers/tty/serial/8250/8250_pci.c | 121 +++-- 1 file changed, 50

[PATCH 1/2] serial: 8250_pci: remove non-used var for F81504

2015-03-12 Thread Peter Hung
Remove pci_fintek_setup() non-used var with calculation ciobase Signed-off-by: Peter Hung hpeter+linux_ker...@gmail.com --- drivers/tty/serial/8250/8250_pci.c | 11 ++- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/drivers/tty/serial/8250/8250_pci.c b/drivers/tty/serial

Re: [PATCH V8 00/10] USB: f81232: V8 patches

2015-03-04 Thread Peter Hung
Hello, Peter Hung 於 2015/2/26 下午 06:02 寫道: This series patch V8 is changed from V7 as following: 1. The V7 MSR strange delta value is checked with locking problem. We changed f81232_set_mctrl() f81232_read_msr() lock mechanism, the old version is only locked with variable protection

[PATCH V8 03/10] USB: f81232: change lock mechanism

2015-02-26 Thread Peter Hung
-by: Peter Hung hpeter+linux_ker...@gmail.com --- drivers/usb/serial/f81232.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/usb/serial/f81232.c b/drivers/usb/serial/f81232.c index 25b1a47..cf5b902 100644 --- a/drivers/usb/serial/f81232.c +++ b/drivers/usb

[PATCH V8 02/10] USB: f81232: implement RX bulk-in EP

2015-02-26 Thread Peter Hung
The F81232 bulk-in is RX data + LSR channel, data format is [LSR+Data][LSR+Data]. , We had implemented in f81232_process_read_urb(). Signed-off-by: Peter Hung hpeter+linux_ker...@gmail.com --- drivers/usb/serial/f81232.c | 71 +++-- 1 file changed, 37

[PATCH V8 00/10] USB: f81232: V8 patches

2015-02-26 Thread Peter Hung
. (patch: 05/10) 6. fix MSR status bits changed but delta bits is 0 will cause read serial port malfunctional with update port status. (patch: 08/10) 7. Add MSR change statistic when MSR has been read. (patch: 09/10) 8. clarify a lot of code about Johan suggested. Peter Hung (10): USB: f81232

[PATCH V8 08/10] USB: f81232: clarify f81232_ioctl() and fix

2015-02-26 Thread Peter Hung
We extract TIOCGSERIAL section in f81232_ioctl() to f81232_get_serial_info() to make it clarify. Also we fix device type from 16654 to 16550A, and set it's baud_base to 115200 (1.8432MHz/16). Signed-off-by: Peter Hung hpeter+linux_ker...@gmail.com --- drivers/usb/serial/f81232.c | 30

[PATCH V8 09/10] USB: f81232: cleanup non-used define

2015-02-26 Thread Peter Hung
We remove non-used define in this patch to avoid wrong usage. Signed-off-by: Peter Hung hpeter+linux_ker...@gmail.com --- drivers/usb/serial/f81232.c | 14 -- 1 file changed, 14 deletions(-) diff --git a/drivers/usb/serial/f81232.c b/drivers/usb/serial/f81232.c index 21f2342

[PATCH V8 10/10] USB: f81232: modify/add author

2015-02-26 Thread Peter Hung
Add me to co-author and fix no '' in greg kh's email Signed-off-by: Peter Hung hpeter+linux_ker...@gmail.com --- drivers/usb/serial/f81232.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/usb/serial/f81232.c b/drivers/usb/serial/f81232.c index 0b7b69a..65d5cf6

[PATCH V8 01/10] USB: f81232: rename private struct member name

2015-02-26 Thread Peter Hung
Change private struct member name from line_status to modem_status. It will store MSR for some functions used Signed-off-by: Peter Hung hpeter+linux_ker...@gmail.com --- drivers/usb/serial/f81232.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/usb/serial

[PATCH V8 04/10] USB: f81232: implement read IIR/MSR with endpoint

2015-02-26 Thread Peter Hung
The interrupt endpoint will report current IIR. If we got IIR with MSR changed , We will do read MSR with interrupt_work worker to do f81232_read_msr() function. Signed-off-by: Peter Hung hpeter+linux_ker...@gmail.com --- drivers/usb/serial/f81232.c | 126

[PATCH V8 06/10] USB: f81232: implement port enable/disable method

2015-02-26 Thread Peter Hung
We put FCR/IER initial step to f81232_port_enable()/f81232_port_disable(). When port is open, it set MSR interrupt on. Otherwise set it off. Signed-off-by: Peter Hung hpeter+linux_ker...@gmail.com --- drivers/usb/serial/f81232.c | 49 + 1 file changed

[PATCH V8 05/10] USB: f81232: implement MCR/MSR function

2015-02-26 Thread Peter Hung
This patch implement relative MCR/MSR function, such like tiocmget()/tiocmset()/dtr_rts()/carrier_raised() original f81232_carrier_raised() compared with wrong value UART_DCD. It's should compared with UART_MSR_DCD. Signed-off-by: Peter Hung hpeter+linux_ker...@gmail.com --- drivers/usb/serial

[PATCH V8 07/10] USB: f81232: implement set_termios()

2015-02-26 Thread Peter Hung
with u8, it's will make failed with baudrate lower than 600 (115200/300=384). We had changed divisor to int type. Signed-off-by: Peter Hung hpeter+linux_ker...@gmail.com --- drivers/usb/serial/f81232.c | 112 ++-- 1 file changed, 108 insertions(+), 4

[PATCH V7 11/11] USB: f81232: modify/add author

2015-02-24 Thread Peter Hung
Add me to co-author and fix no '' in greg kh's email Signed-off-by: Peter Hung hpeter+linux_ker...@gmail.com --- drivers/usb/serial/f81232.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/usb/serial/f81232.c b/drivers/usb/serial/f81232.c index ee9a2a2..23f0a17

[PATCH V7 00/11] USB: f81232: V7 patches

2015-02-24 Thread Peter Hung
change statistic when MSR has been read. (patch: 09/10) 8. clarify a lot of code about Johan suggested. Peter Hung (11): USB: f81232: rename private struct member name USB: f81232: add preparatory functions USB: f81232: implement RX bulk-in EP USB: f81232: change lock mechanism USB

[PATCH V7 05/11] USB: f81232: implement read IIR/MSR with endpoint

2015-02-24 Thread Peter Hung
/DSR state 3. ioctl(fd, TIOCMSET, data) to unset RTS or DTR 4. ioctl(fd, TIOCMGET, data) to read CTS or DCD/DSR state Signed-off-by: Peter Hung hpeter+linux_ker...@gmail.com --- drivers/usb/serial/f81232.c | 106 1 file changed, 98 insertions(+), 8

[PATCH V7 04/11] USB: f81232: change lock mechanism

2015-02-24 Thread Peter Hung
-by: Peter Hung hpeter+linux_ker...@gmail.com --- drivers/usb/serial/f81232.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/usb/serial/f81232.c b/drivers/usb/serial/f81232.c index 419e2d6..bf072fe 100644 --- a/drivers/usb/serial/f81232.c +++ b/drivers/usb

[PATCH V7 06/11] USB: f81232: implement MCR/MSR function

2015-02-24 Thread Peter Hung
This patch implement relative MCR/MSR function, such like tiocmget()/tiocmset()/dtr_rts()/carrier_raised() original f81232_carrier_raised() compared with wrong value UART_DCD. It's should compared with UART_MSR_DCD. Signed-off-by: Peter Hung hpeter+linux_ker...@gmail.com --- drivers/usb/serial

[PATCH V7 07/11] USB: f81232: implement port_enable function

2015-02-24 Thread Peter Hung
We put FCR/IER initial step to f81232_port_enable(). When port is open, it set MSR interrupt on. Otherwise set it off. Signed-off-by: Peter Hung hpeter+linux_ker...@gmail.com --- drivers/usb/serial/f81232.c | 39 +++ 1 file changed, 39 insertions(+) diff

[PATCH V7 08/11] USB: f81232: implement set_termios()

2015-02-24 Thread Peter Hung
-by: Peter Hung hpeter+linux_ker...@gmail.com --- drivers/usb/serial/f81232.c | 106 ++-- 1 file changed, 102 insertions(+), 4 deletions(-) diff --git a/drivers/usb/serial/f81232.c b/drivers/usb/serial/f81232.c index f5c9060..0c96b9a 100644 --- a/drivers/usb/serial

[PATCH V7 01/11] USB: f81232: rename private struct member name

2015-02-24 Thread Peter Hung
Change private struct member name from line_status to modem_status. It will store MSR for some functions used Signed-off-by: Peter Hung hpeter+linux_ker...@gmail.com --- drivers/usb/serial/f81232.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/usb/serial

[PATCH V7 02/11] USB: f81232: add preparatory functions

2015-02-24 Thread Peter Hung
-by: Peter Hung hpeter+linux_ker...@gmail.com --- drivers/usb/serial/f81232.c | 79 + 1 file changed, 79 insertions(+) diff --git a/drivers/usb/serial/f81232.c b/drivers/usb/serial/f81232.c index 669a2f2..1f29b95 100644 --- a/drivers/usb/serial/f81232.c +++ b

[PATCH V7 03/11] USB: f81232: implement RX bulk-in EP

2015-02-24 Thread Peter Hung
The F81232 bulk-in is RX data + LSR channel, data format is [LSR+Data][LSR+Data]. , We had implemented in f81232_process_read_urb(). Signed-off-by: Peter Hung hpeter+linux_ker...@gmail.com --- drivers/usb/serial/f81232.c | 69 +++-- 1 file changed, 36

[PATCH V7 09/11] USB: f81232: clarify f81232_ioctl() and fix

2015-02-24 Thread Peter Hung
We extract TIOCGSERIAL section in f81232_ioctl() to f81232_get_serial_info() to make it clarify. Also we fix device type from 16654 to 16550A, and set it's baud_base to 115200 (1.8432MHz/16). Signed-off-by: Peter Hung hpeter+linux_ker...@gmail.com --- drivers/usb/serial/f81232.c | 30

[PATCH V7 10/11] USB: f81232: cleanup non-used define

2015-02-24 Thread Peter Hung
We remove non-used define in this patch to avoid wrong usage. Signed-off-by: Peter Hung hpeter+linux_ker...@gmail.com --- drivers/usb/serial/f81232.c | 14 -- 1 file changed, 14 deletions(-) diff --git a/drivers/usb/serial/f81232.c b/drivers/usb/serial/f81232.c index 3b0da70

Re: [PATCH V6 08/10] USB: f81232: fix read MSR strange value

2015-02-23 Thread Peter Hung
and not related to the locking issues I pointed at in my comments to tiocmset? Johan Thank for your review. I'll apply all suggestions to next v7 patch. -- With Best Regards, Peter Hung -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord

Re: [PATCH V6 03/10] USB: f81232: implement RX bulk-in ep

2015-02-16 Thread Peter Hung
is almost smarter than we are. Thanks for your hint. I'll remove it with next patch. -- With Best Regards, Peter Hung -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo

[PATCH V6 08/10] USB: f81232: fix read MSR strange value

2015-02-16 Thread Peter Hung
. ioctl(fd, TIOCMSET, data) to unset RTS or DTR 4. ioctl(fd, TIOCMGET, data) to read CTS or DCD/DSR state Signed-off-by: Peter Hung hpeter+linux_ker...@gmail.com --- drivers/usb/serial/f81232.c | 23 +-- 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/drivers/usb

[PATCH V6 03/10] USB: f81232: implement RX bulk-in ep

2015-02-16 Thread Peter Hung
The F81232 bulk-in is RX data + LSR channel, data format is [LSR+Data][LSR+Data]. , We had reimplemented in this patch. Signed-off-by: Peter Hung hpeter+linux_ker...@gmail.com --- drivers/usb/serial/f81232.c | 68 +++-- 1 file changed, 35 insertions

[PATCH V6 01/10] USB: f81232: rename private struct member name

2015-02-16 Thread Peter Hung
Change private struct member name from line_status to modem_status. It will store MSR for some functions used Signed-off-by: Peter Hung hpeter+linux_ker...@gmail.com --- drivers/usb/serial/f81232.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/usb/serial

[PATCH V6 00/10] USB: f81232: V6 patches

2015-02-16 Thread Peter Hung
dev_err() in some function is to help us easily point out error position, so we still decide to remain it. Thanks for reading. Peter Hung (10): USB: f81232: rename private struct member name USB: f81232: implement read IIR/MSR with endpoint USB: f81232: implement RX bulk-in ep USB

[PATCH V6 02/10] USB: f81232: implement read IIR/MSR with endpoint

2015-02-16 Thread Peter Hung
The interrupt Endpoint will report current IIR. If we got IIR with MSR Changed , We will do read MSR with interrupt_work worker to do f81232_read_msr() func. Signed-off-by: Peter Hung hpeter+linux_ker...@gmail.com --- drivers/usb/serial/f81232.c | 109

[PATCH V6 10/10] USB: f81232: modify/add author

2015-02-16 Thread Peter Hung
Add me to co-author and fix no '' in greg kh's email Signed-off-by: Peter Hung hpeter+linux_ker...@gmail.com --- drivers/usb/serial/f81232.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/usb/serial/f81232.c b/drivers/usb/serial/f81232.c index 5134a19..5e35859

[PATCH V6 04/10] USB: f81232: implement set_termios

2015-02-16 Thread Peter Hung
The original driver had do not any h/w change in driver. This patch implements with configure H/W for baud/parity/word length/stop bits functional. Some init step extract to f81232_port_init(), called once with open(). And refine baudrate setting to f81232_set_baudrate() Signed-off-by: Peter

[PATCH V6 09/10] USB: f81232: implement delta change for MSR count

2015-02-16 Thread Peter Hung
We implement delta change for MSR counting. This patch is referenced from ftdi_sio.c Signed-off-by: Peter Hung hpeter+linux_ker...@gmail.com --- drivers/usb/serial/f81232.c | 27 ++- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/drivers/usb/serial/f81232

[PATCH V6 05/10] USB: f81232: implement MCR/MSR function

2015-02-16 Thread Peter Hung
This patch implement relative MCR/MSR function, such like tiocmget()/tiocmset()/dtr_rts(). The f81232_set_mctrl() replace set_control_lines() to do MCR control so we clean-up the set_control_lines() function. Signed-off-by: Peter Hung hpeter+linux_ker...@gmail.com --- drivers/usb/serial/f81232

[PATCH V6 06/10] USB: f81232: clarify f81232_ioctl and fix

2015-02-16 Thread Peter Hung
We extract TIOCGSERIAL section in f81232_ioctl() to f81232_get_serial_info() to make it clarify. Also we fix device type from 16654 to 16550A, and set it's baud_base to 115200 (1.8432MHz/16) Signed-off-by: Peter Hung hpeter+linux_ker...@gmail.com --- drivers/usb/serial/f81232.c | 30

[PATCH V6 07/10] USB: f81232: fix error in f81232_carrier_raised()

2015-02-16 Thread Peter Hung
It's should compared with UART_MSR_DCD, not UART_DCD. also we clean-up some non-used define to avoid impropriety use. Signed-off-by: Peter Hung hpeter+linux_ker...@gmail.com --- drivers/usb/serial/f81232.c | 16 +--- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git

Re: [PATCH V5 6/8] USB: f81232: clarify f81232_ioctl()

2015-02-09 Thread Peter Hung
Regards, Peter Hung -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH V5 6/8] USB: f81232: clarify f81232_ioctl()

2015-02-08 Thread Peter Hung
for this patch, sorry for it. -- With Best Regards, Peter Hung -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

[PATCH V5 8/8] USB: f81232: modify/add author

2015-02-06 Thread Peter Hung
Add me to co-author and fix no '' in greg kh's email Signed-off-by: Peter Hung hpeter+linux_ker...@gmail.com --- drivers/usb/serial/f81232.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/usb/serial/f81232.c b/drivers/usb/serial/f81232.c index 07abf0c..8799b66

[PATCH V5 6/8] USB: f81232: clarify f81232_ioctl()

2015-02-06 Thread Peter Hung
We extract TIOCGSERIAL section in f81232_ioctl() to f81232_get_serial_info() to make it clarify The f81232_set_mctrl() replace set_control_lines() to do MCR control so we clean-up the set_control_lines() function. Signed-off-by: Peter Hung hpeter+linux_ker...@gmail.com --- drivers/usb/serial

[PATCH V5 3/8] USB: f81232: implement RX bulk-in ep

2015-02-06 Thread Peter Hung
The F81232 bulk-in is RX data + LSR channel, data format is [LSR+Data][LSR+Data]. , We had reimplemented in this patch. Signed-off-by: Peter Hung hpeter+linux_ker...@gmail.com --- drivers/usb/serial/f81232.c | 68 +++-- 1 file changed, 35 insertions

[PATCH V5 4/8] USB: f81232: implement set_termios

2015-02-06 Thread Peter Hung
The original driver had do not any h/w change in driver. This patch implements with configure H/W for baud/parity/word length/stop bits functional. Some init step extract to f81232_port_init(), called once with open(). And refine baudrate setting to f81232_set_baudrate() Signed-off-by: Peter

[PATCH V5 2/8] USB: f81232: implement read IIR/MSR with endpoint

2015-02-06 Thread Peter Hung
The interrupt Endpoint will report current IIR. If we got IIR with MSR Changed , We will do read MSR with interrupt_work worker to do f81232_read_msr() func. Signed-off-by: Peter Hung hpeter+linux_ker...@gmail.com --- drivers/usb/serial/f81232.c | 109

[PATCH V5 7/8] USB: f81232: fix error in f81232_carrier_raised()

2015-02-06 Thread Peter Hung
It's should compared with UART_MSR_DCD, not UART_DCD. also we clean-up some non-used define to avoid impropriety use. Signed-off-by: Peter Hung hpeter+linux_ker...@gmail.com --- drivers/usb/serial/f81232.c | 16 +--- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git

[PATCH V5 5/8] USB: f81232: implement MCR/MSR function

2015-02-06 Thread Peter Hung
This patch implement relative MCR/MSR function, such like tiocmget()/tiocmset()/dtr_rts(). The f81232_set_mctrl() replace set_control_lines() to do MCR control so we clean-up the set_control_lines() function. Signed-off-by: Peter Hung hpeter+linux_ker...@gmail.com --- drivers/usb/serial/f81232

[PATCH V5 1/8] USB: f81232: Rename private struct member name

2015-02-06 Thread Peter Hung
Change private struct member name from line_status to modem_status. It will store MSR for some functions used Signed-off-by: Peter Hung hpeter+linux_ker...@gmail.com --- drivers/usb/serial/f81232.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/usb/serial

[PATCH V5 0/8] USB: f81534: v5 patch

2015-02-06 Thread Peter Hung
in tiocmget() because the IIR with MSR change maybe delay received. 4. process_read_urb() add process of Break/FrameError/ParityError. 5. clarify a lot of code about Johan suggested. Peter Hung (8): USB: f81232: Rename private struct member name USB: f81232: implement read IIR/MSR with endpoint

[PATCH v4 5/7] usb: serial: implement set_termios for F81232

2015-01-29 Thread Peter Hung
The original driver had do not any h/w change in driver. This patch implements with configure H/W for baud/parity/word length/stop bits functional. Signed-off-by: Peter Hung hpeter+linux_ker...@gmail.com --- drivers/usb/serial/f81232.c | 144 +--- 1 file

[PATCH v4 6/7] usb: serial: implement MCR/MSR function for F81232

2015-01-29 Thread Peter Hung
This patch implement relative MCR/MSR function, such like tiocmget()/tiocmset()/dtr_rts(). The update_mctrl() replace set_control_lines() to do MCR control so we clean-up the set_control_lines() function. Signed-off-by: Peter Hung hpeter+linux_ker...@gmail.com --- drivers/usb/serial/f81232.c

[PATCH v4 3/7] usb: serial: implement read IIR/MSR ep for F81232

2015-01-29 Thread Peter Hung
The F81232 interrupt ep will continuously report IIR register value. We had implement the interrupt callback to read IIR, If noticed with MSR change, we will call worker to read MSR later. Signed-off-by: Peter Hung hpeter+linux_ker...@gmail.com --- drivers/usb/serial/f81232.c | 114

[PATCH v4 4/7] usb: serial: reimplement RX bulk-in ep for F81232

2015-01-29 Thread Peter Hung
The F81232 bulk-in is RX data channel. Data format is [LSR+Data][LSR+Data]. , We had reimplemented in this patch. Signed-off-by: Peter Hung hpeter+linux_ker...@gmail.com --- drivers/usb/serial/f81232.c | 47 +++-- 1 file changed, 15 insertions(+), 32

[PATCH v4 7/7] usb: serial: modify ioctl TIOCGSERIAL for F81232

2015-01-29 Thread Peter Hung
Set correct product type from 16654 to 16550A and fix the ioctl TIOCGSERIAL return struct values. Signed-off-by: Peter Hung hpeter+linux_ker...@gmail.com --- drivers/usb/serial/f81232.c | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/drivers/usb/serial/f81232.c

[PATCH v4 1/7] usb: serial: modify bulk-in/out size for F81232

2015-01-29 Thread Peter Hung
The F81232 real bulk-in/out ep buffer size is 64Bytes Signed-off-by: Peter Hung hpeter+linux_ker...@gmail.com --- drivers/usb/serial/f81232.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/serial/f81232.c b/drivers/usb/serial/f81232.c index c5dc233..4f42e9d

[PATCH v4 2/7] usb: serial: modify author for F81232

2015-01-29 Thread Peter Hung
add co-author and fix no '' in greg kh's email Signed-off-by: Peter Hung hpeter+linux_ker...@gmail.com --- drivers/usb/serial/f81232.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/usb/serial/f81232.c b/drivers/usb/serial/f81232.c index 4f42e9d..9ef9775 100644

Re: [PATCH v3 5/5] usb: serial: implement CMSPAR for F81232

2015-01-28 Thread Peter Hung
with more attention. Thanks for your advice. Sergei Shtylyov 於 2015/1/28 下午 08:31 寫道: Hello. On 1/28/2015 8:58 AM, Peter Hung wrote: This patch implement CMSPAR in set_termios, and fix some warnning from checkpatch.pl Please don't try to do 2 unrelated things in one patch. Signed-off

Re: [PATCH v3 1/5] usb: serial: add register map for F81232

2015-01-28 Thread Peter Hung
change it with more meaningful and logical patchset and resend it. Thanks for your patient and advice. Johan Hovold 於 2015/1/29 上午 01:55 寫道: On Wed, Jan 28, 2015 at 01:57:56PM +0800, Peter Hung wrote: Add register map for F81232. and add some function to operating this device. etc

[PATCH v3 4/5] usb: serial: remove unused function for F81232

2015-01-27 Thread Peter Hung
remove unused function set_control_lines() Signed-off-by: Peter Hung hpeter+linux_ker...@gmail.com --- drivers/usb/serial/f81232.c | 7 --- 1 file changed, 7 deletions(-) diff --git a/drivers/usb/serial/f81232.c b/drivers/usb/serial/f81232.c index 9a54f56..11a236b 100644 --- a/drivers/usb

[PATCH v3 5/5] usb: serial: implement CMSPAR for F81232

2015-01-27 Thread Peter Hung
This patch implement CMSPAR in set_termios, and fix some warnning from checkpatch.pl Signed-off-by: Peter Hung hpeter+linux_ker...@gmail.com --- drivers/usb/serial/f81232.c | 21 +++-- 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/drivers/usb/serial/f81232.c b

[PATCH v3 2/5] usb: serial: fix callback wrong process for F81232

2015-01-27 Thread Peter Hung
Our int callback will return IIR, not LSR, and bulk-in callback will return [LSR+Data][LSR+Data], so need to rewrite it Signed-off-by: Peter Hung hpeter+linux_ker...@gmail.com --- drivers/usb/serial/f81232.c | 82 + 1 file changed, 39 insertions(+), 43

[PATCH v3 1/5] usb: serial: add register map for F81232

2015-01-27 Thread Peter Hung
Add register map for F81232. and add some function to operating this device. etc. f81232_get_register()/f81232_set_register() to work with USB control point. and worker f81232_int_work_wq() to read MSR when IIR acquired. Signed-off-by: Peter Hung hpeter+linux_ker...@gmail.com --- drivers/usb

[PATCH v3 3/5] usb: serial: implement function for F81232

2015-01-27 Thread Peter Hung
This patch implement the following function: set_termios, tiocmset, tiocmget, dtr_rts Signed-off-by: Peter Hung hpeter+linux_ker...@gmail.com --- drivers/usb/serial/f81232.c | 103 1 file changed, 84 insertions(+), 19 deletions(-) diff --git

Re: [PATCH v2 3/4] usb: serial: implement function for F81232

2015-01-21 Thread Peter Hung
Hello, I'll do it later depend on this series patchs to be accpeted or rejected. Thanks for your advice One Thousand Gnomes 於 2015/1/21 下午 10:41 寫道: + if (cflag PARENB) { + if (cflag PARODD) + new_lcr |= UART_LCR_PARITY; /* odd */ +

[PATCH v2 2/4] usb: serial: fix callback wrong process for F81232

2015-01-21 Thread Peter Hung
Our int callback will return IIR, not LSR, and bulk-in callback will return [LSR+Data][LSR+Data], so need to rewrite it Signed-off-by: Peter Hung hpeter+linux_ker...@gmail.com --- drivers/usb/serial/f81232.c | 82 + 1 file changed, 39 insertions(+), 43

[PATCH v2 4/4] usb: serial: remove unused function for F81232

2015-01-21 Thread Peter Hung
remove unused function set_line_control Signed-off-by: Peter Hung hpeter+linux_ker...@gmail.com --- drivers/usb/serial/f81232.c | 7 --- 1 file changed, 7 deletions(-) diff --git a/drivers/usb/serial/f81232.c b/drivers/usb/serial/f81232.c index 9a54f56..11a236b 100644 --- a/drivers/usb

[PATCH v2 3/4] usb: serial: implement function for F81232

2015-01-21 Thread Peter Hung
This patch implement the following function: set_termios, tiocmset, tiocmget, dtr_rts Signed-off-by: Peter Hung hpeter+linux_ker...@gmail.com --- drivers/usb/serial/f81232.c | 103 1 file changed, 84 insertions(+), 19 deletions(-) mode change 100644

[PATCH v2 1/4] usb: serial: add register map for F81232

2015-01-21 Thread Peter Hung
Add register map for F81232. and add some function to operating this device. etc. f81232_get_register()/f81232_set_register() to work with USB control point. and worker f81232_int_work_wq() to read MSR when IIR acquired. Signed-off-by: Peter Hung hpeter+linux_ker...@gmail.com --- drivers/usb

[PATCH 1/1] usb: serial: Fintek F81232 driver improvement

2015-01-18 Thread Peter Hung
The original driver completed with TX function, but RX/MSR/MCR/LSR is not workable with this driver. So we rewrite it to make this device workable. This patch is tested with PassMark BurnInTest with Cycle-to-115200 + MCR/MSR check for 15mins checked with Suspend-To-RAM/DISK Signed-off-by: Peter