Re: R: R: R: [PATCH v1] serial: 8250_fintek: Print Fintek chip name

2020-12-15 Thread Ji-Ze Hong (Peter Hong)
Hi, Flavio Suligoi 於 2020/12/15 下午 11:06 寫道: we produce some x86 boards with multistandard RS232/422/485 ports and, to have this feature, in some of these boards, we use a Fintek uart or superIO. So this additional info "extra_name" can be useful for a quick check if the serial ports are

Re: [PATCH v1] serial: 8250_fintek: Print Fintek chip name

2020-12-14 Thread Ji-Ze Hong (Peter Hong)
Hi, Greg Kroah-Hartman 於 2020/12/14 下午 09:42 寫道: pdata->pid = chip; + + pr_info("%s%s%s Fintek %s\n", + uart->port.dev ? dev_name(uart->port.dev) : "", + uart->port.dev ? ": " : "", + uart->port.name, + chip_name); Drivers,

Re: [PATCH 1/1] driver core: Fix unbalance probe_count in really_probe()

2020-06-03 Thread Ji-Ze Hong (Peter Hong)
Hi Geert, Geert Uytterhoeven 於 2020/6/3 下午 03:13 寫道: Hi Ji-Ze, If devres_head is not empty, you have a serious problem on your system, as those resources may be in an unknown state (e.g. freed but still in use). While I had missed the probe_count imbalance when implementing the original

[PATCH 1/1] driver core: Fix unbalance probe_count in really_probe()

2020-06-03 Thread Ji-Ze Hong (Peter Hong)
? sigprocmask+0x6f/Oxa0 __64_sys_reboot+0xle/0x20 do_syscall_64+0x57/0xlb0 Fixes: 7c35e699c88b ("driver core: Print device when resources present in really_probe()") Signed-off-by: Ji-Ze Hong (Peter Hong) --- drivers/base/dd.c | 3 ++- 1 file changed, 2 insert

[PATCH V1 1/1] serial: 8250_fintek: Add F81966 Support

2020-05-27 Thread Ji-Ze Hong (Peter Hong)
: IRQ_MODE1 Level/Low: IRQ_MODE0:0, IRQ_MODE1:0 Edge/High: IRQ_MODE0:1, IRQ_MODE1:0 Signed-off-by: Ji-Ze Hong (Peter Hong) Cc: Ji-Ze Hong (Peter Hong) --- drivers/tty/serial/8250/8250_fintek.c | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/drivers/tty

[PATCH V2 4/7] USB: serial: f81232: Add F81534A support

2019-09-22 Thread Ji-Ze Hong (Peter Hong)
][Data.][LSR] Signed-off-by: Ji-Ze Hong (Peter Hong) --- drivers/usb/serial/f81232.c | 131 ++-- 1 file changed, 127 insertions(+), 4 deletions(-) diff --git a/drivers/usb/serial/f81232.c b/drivers/usb/serial/f81232.c index e4db0aec9af0..36a17aedc2ae 100644

[PATCH V2 7/7] USB: serial: f81232: Add gpiolib to GPIO device

2019-09-22 Thread Ji-Ze Hong (Peter Hong)
The Fintek F81534A series contains 3 GPIOs per UART and The max GPIOs is 12x3 = 36 GPIOs and this patch will implements GPIO device as a gpiochip to control all GPIO pins even transforms to transceiver pins. Signed-off-by: Ji-Ze Hong (Peter Hong) --- drivers/usb/serial/f81232.c | 249

[PATCH V2 3/7] USB: serial: f81232: Use devm_kzalloc

2019-09-22 Thread Ji-Ze Hong (Peter Hong)
Use devm_kzalloc() to replace kzalloc(). Signed-off-by: Ji-Ze Hong (Peter Hong) --- drivers/usb/serial/f81232.c | 13 + 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/drivers/usb/serial/f81232.c b/drivers/usb/serial/f81232.c index b42b3738a768..e4db0aec9af0 100644

[PATCH V2 1/7] USB: serial: f81232: Extract LSR handler

2019-09-22 Thread Ji-Ze Hong (Peter Hong)
Extract LSR handler to function. Signed-off-by: Ji-Ze Hong (Peter Hong) --- drivers/usb/serial/f81232.c | 53 + 1 file changed, 30 insertions(+), 23 deletions(-) diff --git a/drivers/usb/serial/f81232.c b/drivers/usb/serial/f81232.c index 43fa1f0716b7

[PATCH V2 0/7] Add Fintek F81534A series usb-to-serial driver

2019-09-22 Thread Ji-Ze Hong (Peter Hong)
layout change: F81232: [LSR(1Byte)+DATA(1Byte)][LSR(1Byte)+DATA(1Byte)]... F81534A:[LEN][Data.][LSR] We'll try to do some code refacting before add F81534A series. Ji-Ze Hong (Peter Hong) (7): USB: serial: f81232: Extract LSR handler USB: serial: f81232

[PATCH V2 6/7] USB: serial: f81232: Add generator for F81534A

2019-09-22 Thread Ji-Ze Hong (Peter Hong)
116h) to enable all available serial ports. Signed-off-by: Ji-Ze Hong (Peter Hong) --- drivers/usb/serial/f81232.c | 135 +++- 1 file changed, 134 insertions(+), 1 deletion(-) diff --git a/drivers/usb/serial/f81232.c b/drivers/usb/serial/f81232.c index 01cb5a5e

[PATCH V2 5/7] USB: serial: f81232: Set F81534A serial port with RS232 mode

2019-09-22 Thread Ji-Ze Hong (Peter Hong)
function publicly to control Tranceiver privately use. We'll default set to 0/0/1 for control transceiver to RS232 mode. Otherwise, If the serial port is not active, the 3 pins is in GPIO mode and controlled by global GPIO device with VID/PID: 2c42/16f8. Signed-off-by: Ji-Ze Hong (Peter Hong

[PATCH V2 2/7] USB: serial: f81232: Add tx_empty function

2019-09-22 Thread Ji-Ze Hong (Peter Hong)
Add tx_empty() function for F81232. Signed-off-by: Ji-Ze Hong (Peter Hong) --- drivers/usb/serial/f81232.c | 18 ++ 1 file changed, 18 insertions(+) diff --git a/drivers/usb/serial/f81232.c b/drivers/usb/serial/f81232.c index c07d376c743d..b42b3738a768 100644 --- a/drivers/usb

Re: [PATCH V1 3/6] USB: serial: f81232: Add generator for F81534A

2019-09-01 Thread Ji-Ze Hong (Peter Hong)
Hi Johan, Johan Hovold 於 2019/8/28 下午 11:02 寫道: On Thu, Jun 06, 2019 at 10:54:13AM +0800, Ji-Ze Hong (Peter Hong) wrote: The Fintek F81534A series is contains 1 HUB / 1 GPIO device / n UARTs, but the UART is default disable and need enabled by GPIO device(2c42/16F8). When F81534A plug to host

Re: [PATCH V1 1/1] serial: 8250_pci: Add F81504A series Support

2019-08-22 Thread Ji-Ze Hong (Peter Hong)
Hi, Greg KH 於 2019/8/23 上午 05:15 寫道: Andy Shevchenko 於 2019/8/16 下午 07:26 寫道: We have 8250_fintek. Isn't it a right place to add these? The 8250_fintek implements PNP device with id PNP0501. Should I also implements PCIe device in this file? Does it use the same logic? If so, that makes

Re: [PATCH V1 1/1] serial: 8250_pci: Add F81504A series Support

2019-08-18 Thread Ji-Ze Hong (Peter Hong)
Hi, Andy Shevchenko 於 2019/8/16 下午 07:26 寫道: On Fri, Aug 16, 2019 at 01:27:29PM +0800, Ji-Ze Hong (Peter Hong) wrote: Fintek F81504A/508A/512A is PCIE to 4/8/12 UARTs device. It's support IO/MMIO/PCIE conf to access all functions. The old F81504/508/512 is only support IO. We have

[PATCH V1 1/1] serial: 8250_pci: Add F81504A series Support

2019-08-15 Thread Ji-Ze Hong (Peter Hong)
Fintek F81504A/508A/512A is PCIE to 4/8/12 UARTs device. It's support IO/MMIO/PCIE conf to access all functions. The old F81504/508/512 is only support IO. Signed-off-by: Ji-Ze Hong (Peter Hong) --- drivers/tty/serial/8250/8250_pci.c | 121 + 1 file changed

Re: [PATCH V2 1/1] can: sja1000: f81601: add Fintek F81601 support

2019-07-23 Thread Ji-Ze Hong (Peter Hong)
Hi, Saeed Mahameed 於 2019/7/24 上午 05:38 寫道: On Mon, 2019-07-22 at 14:22 +0800, Ji-Ze Hong (Peter Hong) wrote: This patch add support for Fintek PCIE to 2 CAN controller support Signed-off-by: Ji-Ze Hong (Peter Hong) --- Changelog: v2: 1: Fix comment on the spinlock with write

[PATCH V3 1/1] can: sja1000: f81601: add Fintek F81601 support

2019-07-23 Thread Ji-Ze Hong (Peter Hong)
This patch add support for Fintek PCIE to 2 CAN controller support Signed-off-by: Ji-Ze Hong (Peter Hong) --- v3: 1: Fix module parameter "internal_clk" default from 1 to true. 2: Remove non-usable pcim_iounmap(). v2: 1: Fix comment on the spinlock with wr

Re: [PATCH V2 1/1] can: sja1000: f81601: add Fintek F81601 support

2019-07-22 Thread Ji-Ze Hong (Peter Hong)
Hi Marc, Marc Kleine-Budde 於 2019/7/22 下午 04:15 寫道: On 7/22/19 8:22 AM, Ji-Ze Hong (Peter Hong) wrote: >> +/* Probe F81601 based device for the SJA1000 chips and register each + * available CAN channel to SJA1000 Socket-CAN subsystem. + */ +static int f81601_pci_add_card(struct pci_dev

[PATCH V2 1/1] can: sja1000: f81601: add Fintek F81601 support

2019-07-22 Thread Ji-Ze Hong (Peter Hong)
This patch add support for Fintek PCIE to 2 CAN controller support Signed-off-by: Ji-Ze Hong (Peter Hong) --- Changelog: v2: 1: Fix comment on the spinlock with write access. 2: Use ARRAY_SIZE instead of F81601_PCI_MAX_CHAN. 3: Check the strap pin outside the loop

[RESEND PATCH V1] can: sja1000: f81601: add Fintek F81601 support

2019-06-10 Thread Ji-Ze Hong (Peter Hong)
This patch add support for Fintek PCIE to 2 CAN controller support Signed-off-by: Ji-Ze Hong (Peter Hong) --- drivers/net/can/sja1000/Kconfig | 8 ++ drivers/net/can/sja1000/Makefile | 1 + drivers/net/can/sja1000/f81601.c | 223 +++ 3 files changed, 232

[PATCH V1 2/6] USB: serial: f81232: Force F81534A with RS232 mode

2019-06-05 Thread Ji-Ze Hong (Peter Hong)
Force F81534A series UARTs with RS232 mode in port_probe(). Signed-off-by: Ji-Ze Hong (Peter Hong) --- drivers/usb/serial/f81232.c | 15 +++ 1 file changed, 15 insertions(+) diff --git a/drivers/usb/serial/f81232.c b/drivers/usb/serial/f81232.c index 84efcc66aa56..75dfc0b9ef30

[PATCH V1 5/6] USB: serial: f81232: Use devm_kzalloc

2019-06-05 Thread Ji-Ze Hong (Peter Hong)
Use devm_kzalloc() to replace kzalloc(). Signed-off-by: Ji-Ze Hong (Peter Hong) --- drivers/usb/serial/f81232.c | 13 + 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/drivers/usb/serial/f81232.c b/drivers/usb/serial/f81232.c index 7d1ec8f9d168..708d85c7d822 100644

[PATCH V1 6/6] USB: serial: f81232: Add gpiolib to GPIO device

2019-06-05 Thread Ji-Ze Hong (Peter Hong)
The Fintek F81534A series contains 3 GPIOs per UART and The max GPIOs is 12x3 = 36 GPIOs. Signed-off-by: Ji-Ze Hong (Peter Hong) --- drivers/usb/serial/f81232.c | 210 1 file changed, 210 insertions(+) diff --git a/drivers/usb/serial/f81232.c b

[PATCH V1 1/6] USB: serial: f81232: Add F81534A support

2019-06-05 Thread Ji-Ze Hong (Peter Hong)
)]... F81534A:[LEN][Data.][LSR] Signed-off-by: Ji-Ze Hong (Peter Hong) --- drivers/usb/serial/f81232.c | 153 +--- 1 file changed, 144 insertions(+), 9 deletions(-) diff --git a/drivers/usb/serial/f81232.c b/drivers/usb/serial/f81232.c index

[PATCH V1 3/6] USB: serial: f81232: Add generator for F81534A

2019-06-05 Thread Ji-Ze Hong (Peter Hong)
timeout. (F81534A_CTRL_RETRY * F81534A_CTRL_TIMER) Signed-off-by: Ji-Ze Hong (Peter Hong) --- drivers/usb/serial/f81232.c | 356 +++- 1 file changed, 355 insertions(+), 1 deletion(-) diff --git a/drivers/usb/serial/f81232.c b/drivers/usb/serial/f81232

[PATCH V1 4/6] USB: serial: f81232: Add tx_empty function

2019-06-05 Thread Ji-Ze Hong (Peter Hong)
Add tx_empty() function for F81232 & F81534A series. Signed-off-by: Ji-Ze Hong (Peter Hong) --- drivers/usb/serial/f81232.c | 19 +++ 1 file changed, 19 insertions(+) diff --git a/drivers/usb/serial/f81232.c b/drivers/usb/serial/f81232.c index e9470fb0d691..7d1ec8f9d168 10

[PATCH V1 0/6] USB: serial: f81232: Add F81534A support

2019-06-05 Thread Ji-Ze Hong (Peter Hong)
ache) 2. up to 3MBits baudrate. 3. 3x GPIOs per port to control transceiver. 4. UART devices need enabled by GPIO device register. Ji-Ze Hong (Peter Hong) (6): USB: serial: f81232: Add F81534A support USB: serial: f81232: Force F81534A with RS232 mode USB: serial: f81232:

[PATCH V6 1/3] USB: serial: f81232: clear overrun flag

2019-04-03 Thread Ji-Ze Hong (Peter Hong)
when overrun and flush the worker on close() & suspend(). Cc: Oliver Neukum Signed-off-by: Ji-Ze Hong (Peter Hong) --- V6: 1: Add deferred_lsr_work_needed to re-trigger when f81232_resume() v5: 1: Source code base revert to v3 and remove all v4 changes. 2: Add se

Re: [RESEND PATCH V3 1/3] USB: serial: f81232: clear overrun flag

2019-04-01 Thread Ji-Ze Hong (Peter Hong)
Oliver Neukum 於 2019/4/1 下午 04:34 寫道: On Mo, 2019-04-01 at 14:00 +0800, Ji-Ze Hong (Peter Hong) wrote: Hi, I am afraid there is a race condiion in this code. @@ -315,6 +318,7 @@ static void f81232_process_read_urb(struct urb *urb) if (lsr & UART_LS

[PATCH V3 3/3] USB: serial: f81232: implement break control

2019-03-29 Thread Ji-Ze Hong (Peter Hong)
Implement Fintek F81232 break on/off with LCR register. It's the same with 16550A LCR register layout. Signed-off-by: Ji-Ze Hong (Peter Hong) --- drivers/usb/serial/f81232.c | 29 +++-- 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/drivers/usb/serial

[PATCH V2 2/2] watchdog: f71808e_wdt: fix F81866 bit operation

2019-03-27 Thread Ji-Ze Hong (Peter Hong)
Fix error bit operation in watchdog_start() Fixes: 14b24a88a3660 ("watchdog: f71808e_wdt: Add F81866 support") Signed-off-by: Ji-Ze Hong (Peter Hong) --- drivers/watchdog/f71808e_wdt.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/driver

[PATCH V2 1/2] watchdog: f71808e_wdt: separate declaration and assignment

2019-03-27 Thread Ji-Ze Hong (Peter Hong)
Separate declaration and assignment in watchdog_start() Signed-off-by: Ji-Ze Hong (Peter Hong) --- drivers/watchdog/f71808e_wdt.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/watchdog/f71808e_wdt.c b/drivers/watchdog/f71808e_wdt.c index 9a1c761258ce

Re: [PATCH V1 1/1] watchdog: f71808e_wdt: fix F81866 bit operation

2019-03-25 Thread Ji-Ze Hong (Peter Hong)
Guenter Roeck 於 2019/3/22 下午 09:06 寫道: On 3/21/19 8:36 PM, Ji-Ze Hong (Peter Hong) wrote: Fix error bit operation in watchdog_start() Hmm ... does that mean it never worked ? Did you test it this time ? Sorry for lacking test procedure. I had only test the functional (reset) , not to test

[PATCH V1 1/1] watchdog: f71808e_wdt: fix F81866 bit operation

2019-03-21 Thread Ji-Ze Hong (Peter Hong)
Fix error bit operation in watchdog_start() Signed-off-by: Ji-Ze Hong (Peter Hong) --- drivers/watchdog/f71808e_wdt.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/watchdog/f71808e_wdt.c b/drivers/watchdog/f71808e_wdt.c index 9a1c761258ce..9129485732c7

Re: [PATCH 3/5] USB: serial: f81232: enable remote wakeup via RX/RI pin

2018-02-08 Thread Ji-Ze Hong (Peter Hong)
Hi Johan, Johan Hovold 於 2018/2/4 上午 09:46 寫道: On Thu, Feb 01, 2018 at 11:13:01AM +0800, Ji-Ze Hong (Peter Hong) wrote: Our USB-To-Serial support RI/ RX remote wakeup by Modem, Fax or other peripherals and we had tested it by following procedure with device_set_wakeup_enable() enabled: 1

Re: [PATCH 3/5] USB: serial: f81232: enable remote wakeup via RX/RI pin

2018-02-08 Thread Ji-Ze Hong (Peter Hong)
Hi Johan, Johan Hovold 於 2018/2/4 上午 09:46 寫道: On Thu, Feb 01, 2018 at 11:13:01AM +0800, Ji-Ze Hong (Peter Hong) wrote: Our USB-To-Serial support RI/ RX remote wakeup by Modem, Fax or other peripherals and we had tested it by following procedure with device_set_wakeup_enable() enabled: 1

Re: [PATCH 5/5] USB: serial: f81232: fix bulk_in/out size

2018-01-31 Thread Ji-Ze Hong (Peter Hong)
Hi Johan, Johan Hovold 於 2018/1/30 下午 12:11 寫道: On Mon, Jan 22, 2018 at 03:58:47PM +0800, Ji-Ze Hong (Peter Hong) wrote: diff --git a/drivers/usb/serial/f81232.c b/drivers/usb/serial/f81232.c index a054f69446fd..f3ee537d643c 100644 --- a/drivers/usb/serial/f81232.c +++ b/drivers/usb/serial

Re: [PATCH 5/5] USB: serial: f81232: fix bulk_in/out size

2018-01-31 Thread Ji-Ze Hong (Peter Hong)
Hi Johan, Johan Hovold 於 2018/1/30 下午 12:11 寫道: On Mon, Jan 22, 2018 at 03:58:47PM +0800, Ji-Ze Hong (Peter Hong) wrote: diff --git a/drivers/usb/serial/f81232.c b/drivers/usb/serial/f81232.c index a054f69446fd..f3ee537d643c 100644 --- a/drivers/usb/serial/f81232.c +++ b/drivers/usb/serial

Re: [PATCH 3/5] USB: serial: f81232: enable remote wakeup via RX/RI pin

2018-01-31 Thread Ji-Ze Hong (Peter Hong)
Hi Johan, Johan Hovold 於 2018/1/30 上午 11:57 寫道: On Mon, Jan 22, 2018 at 03:58:45PM +0800, Ji-Ze Hong (Peter Hong) wrote: The F81232 can do remote wakeup via RX/RI pin with pulse. This patch will use device_set_wakeup_enable to enable this feature. This is a policy decision that should

Re: [PATCH 3/5] USB: serial: f81232: enable remote wakeup via RX/RI pin

2018-01-31 Thread Ji-Ze Hong (Peter Hong)
Hi Johan, Johan Hovold 於 2018/1/30 上午 11:57 寫道: On Mon, Jan 22, 2018 at 03:58:45PM +0800, Ji-Ze Hong (Peter Hong) wrote: The F81232 can do remote wakeup via RX/RI pin with pulse. This patch will use device_set_wakeup_enable to enable this feature. This is a policy decision that should

Re: [PATCH 2/5] USB: serial: f81232: add high baud rate support

2018-01-22 Thread Ji-Ze Hong (Peter Hong)
Hi Andy, Andy Shevchenko 於 2018/1/22 下午 10:55 寫道: On Mon, Jan 22, 2018 at 9:58 AM, Ji-Ze Hong (Peter Hong) <hpe...@gmail.com> wrote: The F81232 had 4 clocksource 1.846/18.46/14.77/24MHz and baud rates can be up to 1.5Mbits with 24MHz. F81232 Clock registers (106h) Bit1-0: Clock

Re: [PATCH 2/5] USB: serial: f81232: add high baud rate support

2018-01-22 Thread Ji-Ze Hong (Peter Hong)
Hi Andy, Andy Shevchenko 於 2018/1/22 下午 10:55 寫道: On Mon, Jan 22, 2018 at 9:58 AM, Ji-Ze Hong (Peter Hong) wrote: The F81232 had 4 clocksource 1.846/18.46/14.77/24MHz and baud rates can be up to 1.5Mbits with 24MHz. F81232 Clock registers (106h) Bit1-0: Clock source selector

Re: [PATCH 1/5] USB: serial: f81232: clear overrun flag

2018-01-22 Thread Ji-Ze Hong (Peter Hong)
Hi Oliver, Oliver Neukum 於 2018/1/22 下午 06:06 寫道: +static void f81232_lsr_worker(struct work_struct *work) +{ + struct f81232_private *priv; + struct usb_serial_port *port; + int status; + u8 tmp; + + priv = container_of(work, struct f81232_private, lsr_work); +

Re: [PATCH 1/5] USB: serial: f81232: clear overrun flag

2018-01-22 Thread Ji-Ze Hong (Peter Hong)
Hi Oliver, Oliver Neukum 於 2018/1/22 下午 06:06 寫道: +static void f81232_lsr_worker(struct work_struct *work) +{ + struct f81232_private *priv; + struct usb_serial_port *port; + int status; + u8 tmp; + + priv = container_of(work, struct f81232_private, lsr_work); +

[PATCH 1/5] USB: serial: f81232: clear overrun flag

2018-01-22 Thread Ji-Ze Hong (Peter Hong)
when OE. Signed-off-by: Ji-Ze Hong (Peter Hong) <hpeter+linux_ker...@gmail.com> --- drivers/usb/serial/f81232.c | 20 1 file changed, 20 insertions(+) diff --git a/drivers/usb/serial/f81232.c b/drivers/usb/serial/f81232.c index 96036f87b1de..46836041c50e 100644 --- a/drive

[PATCH 1/5] USB: serial: f81232: clear overrun flag

2018-01-22 Thread Ji-Ze Hong (Peter Hong)
when OE. Signed-off-by: Ji-Ze Hong (Peter Hong) --- drivers/usb/serial/f81232.c | 20 1 file changed, 20 insertions(+) diff --git a/drivers/usb/serial/f81232.c b/drivers/usb/serial/f81232.c index 96036f87b1de..46836041c50e 100644 --- a/drivers/usb/serial/f81232.c +++ b/drivers

[PATCH 3/5] USB: serial: f81232: enable remote wakeup via RX/RI pin

2018-01-22 Thread Ji-Ze Hong (Peter Hong)
The F81232 can do remote wakeup via RX/RI pin with pulse. This patch will use device_set_wakeup_enable to enable this feature. Signed-off-by: Ji-Ze Hong (Peter Hong) <hpeter+linux_ker...@gmail.com> --- drivers/usb/serial/f81232.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drive

[PATCH 3/5] USB: serial: f81232: enable remote wakeup via RX/RI pin

2018-01-22 Thread Ji-Ze Hong (Peter Hong)
The F81232 can do remote wakeup via RX/RI pin with pulse. This patch will use device_set_wakeup_enable to enable this feature. Signed-off-by: Ji-Ze Hong (Peter Hong) --- drivers/usb/serial/f81232.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/usb/serial/f81232.c b/drivers/usb

[PATCH 2/5] USB: serial: f81232: add high baud rate support

2018-01-21 Thread Ji-Ze Hong (Peter Hong)
: 14.77MHz. Signed-off-by: Ji-Ze Hong (Peter Hong) <hpeter+linux_ker...@gmail.com> --- drivers/usb/serial/f81232.c | 105 +++- 1 file changed, 94 insertions(+), 11 deletions(-) diff --git a/drivers/usb/serial/f81232.c b/drivers/usb/serial/f81232.c index 468360

[PATCH 5/5] USB: serial: f81232: fix bulk_in/out size

2018-01-21 Thread Ji-Ze Hong (Peter Hong)
Fix Fintek F81232 bulk_in/out size to 64/16 according to the spec. http://html.alldatasheet.com/html-pdf/406315/FINTEK/F81232/1762/8/F81232.html Signed-off-by: Ji-Ze Hong (Peter Hong) <hpeter+linux_ker...@gmail.com> --- drivers/usb/serial/f81232.c | 3 +-- 1 file changed, 1 insertion

[PATCH 4/5] USB: serial: f81232: implement break control

2018-01-21 Thread Ji-Ze Hong (Peter Hong)
Implement Fintek F81232 break on/off with LCR register. It's the same with 16550A LCR register layout. Signed-off-by: Ji-Ze Hong (Peter Hong) <hpeter+linux_ker...@gmail.com> --- drivers/usb/serial/f81232.c | 17 +++-- 1 file changed, 11 insertions(+), 6 deletions(-) diff

[PATCH 2/5] USB: serial: f81232: add high baud rate support

2018-01-21 Thread Ji-Ze Hong (Peter Hong)
: 14.77MHz. Signed-off-by: Ji-Ze Hong (Peter Hong) --- drivers/usb/serial/f81232.c | 105 +++- 1 file changed, 94 insertions(+), 11 deletions(-) diff --git a/drivers/usb/serial/f81232.c b/drivers/usb/serial/f81232.c index 46836041c50e..bdd7f337cd5f 100644

[PATCH 5/5] USB: serial: f81232: fix bulk_in/out size

2018-01-21 Thread Ji-Ze Hong (Peter Hong)
Fix Fintek F81232 bulk_in/out size to 64/16 according to the spec. http://html.alldatasheet.com/html-pdf/406315/FINTEK/F81232/1762/8/F81232.html Signed-off-by: Ji-Ze Hong (Peter Hong) --- drivers/usb/serial/f81232.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers

[PATCH 4/5] USB: serial: f81232: implement break control

2018-01-21 Thread Ji-Ze Hong (Peter Hong)
Implement Fintek F81232 break on/off with LCR register. It's the same with 16550A LCR register layout. Signed-off-by: Ji-Ze Hong (Peter Hong) --- drivers/usb/serial/f81232.c | 17 +++-- 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/drivers/usb/serial/f81232.c b

[PATCH V3 3/6] usb: serial: f81534: add output pin control

2018-01-10 Thread Ji-Ze Hong (Peter Hong)
, 1, 0. Signed-off-by: Ji-Ze Hong (Peter Hong) <hpeter+linux_ker...@gmail.com> --- V3: 1: change reg_mask type from u16 to u8. 2: change space around "{" & "}". V2: 1: Fix for space between brace. 2: Remain the old pin control method.

[PATCH V3 3/6] usb: serial: f81534: add output pin control

2018-01-10 Thread Ji-Ze Hong (Peter Hong)
, 1, 0. Signed-off-by: Ji-Ze Hong (Peter Hong) --- V3: 1: change reg_mask type from u16 to u8. 2: change space around "{" & "}". V2: 1: Fix for space between brace. 2: Remain the old pin control method. drivers/

[PATCH V3 2/6] usb: serial: f81534: add auto RTS direction support

2018-01-10 Thread Ji-Ze Hong (Peter Hong)
: Auto direction(RTS) control (RTS pin Low when TX) Bit5: Invert direction(RTS) when Bit4 enabled (RTS pin high when TX) Signed-off-by: Ji-Ze Hong (Peter Hong) <hpeter+linux_ker...@gmail.com> --- V3: 1: change some BIT() operation to GENMASK(). 2: change some dev_info() to d

[PATCH V3 2/6] usb: serial: f81534: add auto RTS direction support

2018-01-10 Thread Ji-Ze Hong (Peter Hong)
: Auto direction(RTS) control (RTS pin Low when TX) Bit5: Invert direction(RTS) when Bit4 enabled (RTS pin high when TX) Signed-off-by: Ji-Ze Hong (Peter Hong) --- V3: 1: change some BIT() operation to GENMASK(). 2: change some dev_info() to dev_dbg(). V2: 1: Read

[PATCH V3 5/6] usb: serial: f81534: add H/W disable port support

2018-01-10 Thread Ji-Ze Hong (Peter Hong)
with 60ms. It'll contain BREAK status in LSR. Signed-off-by: Ji-Ze Hong (Peter Hong) <hpeter+linux_ker...@gmail.com> --- V3: 1: Separate old patch into refacting and H/W disable patches. V2: 1: f81534_check_port_hw_disabled() change return type from int to bool.

[PATCH V3 5/6] usb: serial: f81534: add H/W disable port support

2018-01-10 Thread Ji-Ze Hong (Peter Hong)
with 60ms. It'll contain BREAK status in LSR. Signed-off-by: Ji-Ze Hong (Peter Hong) --- V3: 1: Separate old patch into refacting and H/W disable patches. V2: 1: f81534_check_port_hw_disabled() change return type from int to bool. 2: Add help function

[PATCH V3 4/6] usb: serial: f81534: refactoring calc_num_ports()

2018-01-10 Thread Ji-Ze Hong (Peter Hong)
In the original code, We'll read configuration in calc_num_ports() and read again in attach(). In fact, we can move all content from attach() to calc_num_ports() to simplify the code. Signed-off-by: Ji-Ze Hong (Peter Hong) <hpeter+linux_ker...@gmail.com> --- V3: 1: First intr

[PATCH V3 4/6] usb: serial: f81534: refactoring calc_num_ports()

2018-01-10 Thread Ji-Ze Hong (Peter Hong)
In the original code, We'll read configuration in calc_num_ports() and read again in attach(). In fact, we can move all content from attach() to calc_num_ports() to simplify the code. Signed-off-by: Ji-Ze Hong (Peter Hong) --- V3: 1: First introduced in this series patches. drivers/usb

[PATCH V3 1/6] usb: serial: f81534: add high baud rate support

2018-01-10 Thread Ji-Ze Hong (Peter Hong)
(always on) Bit2-1: Clock source selector 00: 1.846MHz. 01: 18.46MHz. 10: 24MHz. 11: 14.77MHz. Signed-off-by: Ji-Ze Hong (Peter Hong) <hpeter+linux_ker...@gmail.com> --- V3: 1: Separat

[PATCH V3 6/6] usb: serial: f81534: fix tx error on some baud rate

2018-01-10 Thread Ji-Ze Hong (Peter Hong)
-by: Ji-Ze Hong (Peter Hong) <hpeter+linux_ker...@gmail.com> --- V3: 1: had not noticeable changes. V2: 1: First introduced in this series patches. drivers/usb/serial/f81534.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/usb/serial/f815

[PATCH V3 1/6] usb: serial: f81534: add high baud rate support

2018-01-10 Thread Ji-Ze Hong (Peter Hong)
(always on) Bit2-1: Clock source selector 00: 1.846MHz. 01: 18.46MHz. 10: 24MHz. 11: 14.77MHz. Signed-off-by: Ji-Ze Hong (Peter Hong) --- V3: 1: Separate UART Enable bit from clock sources

[PATCH V3 6/6] usb: serial: f81534: fix tx error on some baud rate

2018-01-10 Thread Ji-Ze Hong (Peter Hong)
-by: Ji-Ze Hong (Peter Hong) --- V3: 1: had not noticeable changes. V2: 1: First introduced in this series patches. drivers/usb/serial/f81534.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/usb/serial/f81534.c b/drivers/usb/serial/f81534.c index

Re: [PATCH V2 1/5] usb: serial: f81534: add high baud rate support

2018-01-10 Thread Ji-Ze Hong (Peter Hong)
Hi Johan, Johan Hovold 於 2018/1/10 下午 04:49 寫道: Normally, the communication with F81534 ep0 will take less than 1 sec (even only some milliseconds), but It maybe take much long time with huge loading with UART functional. We had tested it on BurnInTest, 4 ports with 921600bps + MSR status

Re: [PATCH V2 1/5] usb: serial: f81534: add high baud rate support

2018-01-10 Thread Ji-Ze Hong (Peter Hong)
Hi Johan, Johan Hovold 於 2018/1/10 下午 04:49 寫道: Normally, the communication with F81534 ep0 will take less than 1 sec (even only some milliseconds), but It maybe take much long time with huge loading with UART functional. We had tested it on BurnInTest, 4 ports with 921600bps + MSR status

Re: [PATCH V2 5/5] usb: serial: f81534: fix tx error on some baud rate

2018-01-09 Thread Ji-Ze Hong (Peter Hong)
Hi Johan, Johan Hovold 於 2018/1/9 下午 07:32 寫道: On Thu, Jan 04, 2018 at 10:29:21AM +0800, Ji-Ze Hong (Peter Hong) wrote: + /* +* We'll make tx frame error when baud rate from 384~500kps. So we'll +* delay all tx data frame with 1bit. +*/ + port_priv

Re: [PATCH V2 5/5] usb: serial: f81534: fix tx error on some baud rate

2018-01-09 Thread Ji-Ze Hong (Peter Hong)
Hi Johan, Johan Hovold 於 2018/1/9 下午 07:32 寫道: On Thu, Jan 04, 2018 at 10:29:21AM +0800, Ji-Ze Hong (Peter Hong) wrote: + /* +* We'll make tx frame error when baud rate from 384~500kps. So we'll +* delay all tx data frame with 1bit. +*/ + port_priv

Re: [PATCH V2 1/5] usb: serial: f81534: add high baud rate support

2018-01-09 Thread Ji-Ze Hong (Peter Hong)
Hi Johan, Johan Hovold 於 2018/1/9 下午 07:08 寫道: On Thu, Jan 04, 2018 at 10:29:17AM +0800, Ji-Ze Hong (Peter Hong) wrote: The F81532/534 had 4 clocksource 1.846/18.46/14.77/24MHz and baud rates can be up to 1.5Mbits with 24MHz. This device may generate data overrun when baud rate setting

Re: [PATCH V2 1/5] usb: serial: f81534: add high baud rate support

2018-01-09 Thread Ji-Ze Hong (Peter Hong)
Hi Johan, Johan Hovold 於 2018/1/9 下午 07:08 寫道: On Thu, Jan 04, 2018 at 10:29:17AM +0800, Ji-Ze Hong (Peter Hong) wrote: The F81532/534 had 4 clocksource 1.846/18.46/14.77/24MHz and baud rates can be up to 1.5Mbits with 24MHz. This device may generate data overrun when baud rate setting

[PATCH V2 1/5] usb: serial: f81534: add high baud rate support

2018-01-03 Thread Ji-Ze Hong (Peter Hong)
(always on) Bit2-1: Clock source selector 00: 1.846MHz. 01: 18.46MHz. 10: 24MHz. 11: 14.77MHz. Signed-off-by: Ji-Ze Hong (Peter Hong) <hpeter+linux_ker...@gmail.com> --- v2: 1: Add

[PATCH V2 5/5] usb: serial: f81534: fix tx error on some baud rate

2018-01-03 Thread Ji-Ze Hong (Peter Hong)
-by: Ji-Ze Hong (Peter Hong) <hpeter+linux_ker...@gmail.com> --- V2: 1: First introduced in this series patches. drivers/usb/serial/f81534.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/usb/serial/f81534.c b/drivers/usb/serial/f81534.c index a4666171239a..513805

[PATCH V2 1/5] usb: serial: f81534: add high baud rate support

2018-01-03 Thread Ji-Ze Hong (Peter Hong)
(always on) Bit2-1: Clock source selector 00: 1.846MHz. 01: 18.46MHz. 10: 24MHz. 11: 14.77MHz. Signed-off-by: Ji-Ze Hong (Peter Hong) --- v2: 1: Add commit message for F81534_USB_TIMEOUT from

[PATCH V2 5/5] usb: serial: f81534: fix tx error on some baud rate

2018-01-03 Thread Ji-Ze Hong (Peter Hong)
-by: Ji-Ze Hong (Peter Hong) --- V2: 1: First introduced in this series patches. drivers/usb/serial/f81534.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/usb/serial/f81534.c b/drivers/usb/serial/f81534.c index a4666171239a..513805eeae6a 100644 --- a/drivers/usb/serial

[PATCH V2 3/5] usb: serial: f81534: add output pin control

2018-01-03 Thread Ji-Ze Hong (Peter Hong)
, 1, 0. Signed-off-by: Ji-Ze Hong (Peter Hong) <hpeter+linux_ker...@gmail.com> --- V2: 1: Fix for space between brace. 2: Remain the old pin control method. drivers/usb/serial/f81534.c | 67 - 1 file changed, 66 insertions(+), 1 de

[PATCH V2 3/5] usb: serial: f81534: add output pin control

2018-01-03 Thread Ji-Ze Hong (Peter Hong)
, 1, 0. Signed-off-by: Ji-Ze Hong (Peter Hong) --- V2: 1: Fix for space between brace. 2: Remain the old pin control method. drivers/usb/serial/f81534.c | 67 - 1 file changed, 66 insertions(+), 1 deletion(-) diff --git a/drivers/usb

[PATCH V2 4/5] usb: serial: f81534: add H/W disable port support

2018-01-03 Thread Ji-Ze Hong (Peter Hong)
with 60ms. It'll contain BREAK status in LSR. Signed-off-by: Ji-Ze Hong (Peter Hong) <hpeter+linux_ker...@gmail.com> --- V2: 1: f81534_check_port_hw_disabled() change return type from int to bool. 2: Add help function f81534_set_phy_port_re

[PATCH V2 4/5] usb: serial: f81534: add H/W disable port support

2018-01-03 Thread Ji-Ze Hong (Peter Hong)
with 60ms. It'll contain BREAK status in LSR. Signed-off-by: Ji-Ze Hong (Peter Hong) --- V2: 1: f81534_check_port_hw_disabled() change return type from int to bool. 2: Add help function f81534_set_phy_port_register() / f81534_get_phy_port_register

[PATCH V2 2/5] usb: serial: f81534: add auto RTS direction support

2018-01-03 Thread Ji-Ze Hong (Peter Hong)
: Auto direction(RTS) control (RTS pin Low when TX) Bit5: Invert direction(RTS) when Bit4 enabled (RTS pin high when TX) Signed-off-by: Ji-Ze Hong (Peter Hong) <hpeter+linux_ker...@gmail.com> --- V2: 1: Read the configure data from flash and save it to shadow clock re

[PATCH V2 2/5] usb: serial: f81534: add auto RTS direction support

2018-01-03 Thread Ji-Ze Hong (Peter Hong)
: Auto direction(RTS) control (RTS pin Low when TX) Bit5: Invert direction(RTS) when Bit4 enabled (RTS pin high when TX) Signed-off-by: Ji-Ze Hong (Peter Hong) --- V2: 1: Read the configure data from flash and save it to shadow clock register. drivers/usb/serial/f81534.c | 34

Re: [PATCH V1 3/4] usb: serial: f81534: add output pin control

2018-01-01 Thread Ji-Ze Hong (Peter Hong)
Hi Johan, In this code, I'm only read/write 3 registers of 0x2ae8, 0x2a90, 0x2a80, but some register will read/write more than once. Should I change the code from port_probe() to attach() and re-write it as: 1: read the 3 register 2: change them will 12 pin desire value

Re: [PATCH V1 3/4] usb: serial: f81534: add output pin control

2018-01-01 Thread Ji-Ze Hong (Peter Hong)
Hi Johan, In this code, I'm only read/write 3 registers of 0x2ae8, 0x2a90, 0x2a80, but some register will read/write more than once. Should I change the code from port_probe() to attach() and re-write it as: 1: read the 3 register 2: change them will 12 pin desire value

Re: [PATCH V1 3/4] usb: serial: f81534: add output pin control

2017-12-21 Thread Ji-Ze Hong (Peter Hong)
Hi Johan, Johan Hovold 於 2017/12/19 上午 12:06 寫道: On Thu, Nov 16, 2017 at 03:46:08PM +0800, Ji-Ze Hong (Peter Hong) wrote: +static int f81534_set_port_output_pin(struct usb_serial_port *port) +{ + struct f81534_serial_private *serial_priv; + struct f81534_port_private *port_priv

Re: [PATCH V1 3/4] usb: serial: f81534: add output pin control

2017-12-21 Thread Ji-Ze Hong (Peter Hong)
Hi Johan, Johan Hovold 於 2017/12/19 上午 12:06 寫道: On Thu, Nov 16, 2017 at 03:46:08PM +0800, Ji-Ze Hong (Peter Hong) wrote: +static int f81534_set_port_output_pin(struct usb_serial_port *port) +{ + struct f81534_serial_private *serial_priv; + struct f81534_port_private *port_priv

[PATCH V1 2/4] usb: serial: f81534: add auto RTS direction support

2017-11-15 Thread Ji-Ze Hong (Peter Hong)
: Auto direction(RTS) control (RTS pin Low when TX) Bit5: Invert direction(RTS) when Bit4 enabled (RTS pin high when TX) Signed-off-by: Ji-Ze Hong (Peter Hong) <hpeter+linux_ker...@gmail.com> --- drivers/usb/serial/f81534.c | 54 +++-- 1 file chang

[PATCH V1 2/4] usb: serial: f81534: add auto RTS direction support

2017-11-15 Thread Ji-Ze Hong (Peter Hong)
: Auto direction(RTS) control (RTS pin Low when TX) Bit5: Invert direction(RTS) when Bit4 enabled (RTS pin high when TX) Signed-off-by: Ji-Ze Hong (Peter Hong) --- drivers/usb/serial/f81534.c | 54 +++-- 1 file changed, 52 insertions(+), 2 deletions

[PATCH V1 4/4] usb: serial: f81534: add H/W disable port support

2017-11-15 Thread Ji-Ze Hong (Peter Hong)
with 60ms. It'll contain BREAK status in LSR. Signed-off-by: Ji-Ze Hong (Peter Hong) <hpeter+linux_ker...@gmail.com> --- drivers/usb/serial/f81534.c | 74 + 1 file changed, 74 insertions(+) diff --git a/drivers/usb/serial/f81534.c b/drive

[PATCH V1 4/4] usb: serial: f81534: add H/W disable port support

2017-11-15 Thread Ji-Ze Hong (Peter Hong)
with 60ms. It'll contain BREAK status in LSR. Signed-off-by: Ji-Ze Hong (Peter Hong) --- drivers/usb/serial/f81534.c | 74 + 1 file changed, 74 insertions(+) diff --git a/drivers/usb/serial/f81534.c b/drivers/usb/serial/f81534.c index 30b966d71ae8

[PATCH V1 1/4] usb: serial: f81534: add high baud rate support

2017-11-15 Thread Ji-Ze Hong (Peter Hong)
. 10: 24MHz. 11: 14.77MHz. Signed-off-by: Ji-Ze Hong (Peter Hong) <hpeter+linux_ker...@gmail.com> --- drivers/usb/serial/f81534.c | 84 - 1 file changed, 68 insertions(+), 16 deletions(-) diff --git a/drivers/usb/

[PATCH V1 1/4] usb: serial: f81534: add high baud rate support

2017-11-15 Thread Ji-Ze Hong (Peter Hong)
. 10: 24MHz. 11: 14.77MHz. Signed-off-by: Ji-Ze Hong (Peter Hong) --- drivers/usb/serial/f81534.c | 84 - 1 file changed, 68 insertions(+), 16 deletions(-) diff --git a/drivers/usb/serial/f81534.c b/drivers/usb/serial

[PATCH V1 3/4] usb: serial: f81534: add output pin control

2017-11-15 Thread Ji-Ze Hong (Peter Hong)
Port 3: M2: 0x2a90 bit3, M1: 0x2a90 bit2, M0/SD: 0x2a90 bit1 Signed-off-by: Ji-Ze Hong (Peter Hong) <hpeter+linux_ker...@gmail.com> --- drivers/usb/serial/f81534.c | 67 - 1 file changed, 66 insertions(+), 1 deletion(-) diff

[PATCH V1 3/4] usb: serial: f81534: add output pin control

2017-11-15 Thread Ji-Ze Hong (Peter Hong)
Port 3: M2: 0x2a90 bit3, M1: 0x2a90 bit2, M0/SD: 0x2a90 bit1 Signed-off-by: Ji-Ze Hong (Peter Hong) --- drivers/usb/serial/f81534.c | 67 - 1 file changed, 66 insertions(+), 1 deletion(-) diff --git a/drivers/usb/serial/f81534.c b

[PATCH V1 1/1] serial: 8250_fintek: Fix crash with baud rate B0

2017-11-07 Thread Ji-Ze Hong (Peter Hong)
l+ker...@agilox.net> Cc: Lukas Redlinger <rel+ker...@agilox.net> Signed-off-by: Ji-Ze Hong (Peter Hong) <hpeter+linux_ker...@gmail.com> --- drivers/tty/serial/8250/8250_fintek.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/drivers/tty/serial/8250/82

[PATCH V1 1/1] serial: 8250_fintek: Fix crash with baud rate B0

2017-11-07 Thread Ji-Ze Hong (Peter Hong)
Cc: Lukas Redlinger Signed-off-by: Ji-Ze Hong (Peter Hong) --- drivers/tty/serial/8250/8250_fintek.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/drivers/tty/serial/8250/8250_fintek.c b/drivers/tty/serial/8250/8250_fintek.c index c41cbb52f1fe..3d66c2c0d7ee 1006

[PATCH V1 1/1] serial: 8250_fintek: Fix finding base_port with activated SuperIO

2017-10-17 Thread Ji-Ze Hong (Peter Hong)
ted on iBASE MI802. Cc: sta...@vger.kernel.org Tested-by: Ji-Ze Hong (Peter Hong) <hpeter+linux_ker...@gmail.com> Signed-off-by: Ji-Ze Hong (Peter Hong) <hpeter+linux_ker...@gmail.com> --- drivers/tty/serial/8250/8250_fintek.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dri

[PATCH V1 1/1] serial: 8250_fintek: Fix finding base_port with activated SuperIO

2017-10-17 Thread Ji-Ze Hong (Peter Hong)
ted on iBASE MI802. Cc: sta...@vger.kernel.org Tested-by: Ji-Ze Hong (Peter Hong) Signed-off-by: Ji-Ze Hong (Peter Hong) --- drivers/tty/serial/8250/8250_fintek.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/tty/serial/8250/8250_fintek.c b/drivers/tty/serial/8250/8250_finte

  1   2   >