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

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

Re: [PATCH V4 1/4] mfd: f81504-core: Add Fintek F81504/508/512 PCIE-to-UART/GPIO core support

2016-03-01 Thread Peter Hung
Hi Andy, Andy Shevchenko 於 2016/2/23 下午 07:05 寫道: On Tue, 2016-02-23 at 14:30 +0800, Peter Hung wrote: +config MFD_FINTEK_F81504_CORE +tristate "Fintek F81504/508/512 PCIE-to-UART/GPIO MFD support" +depends on PCI +select MFD_CORE +default S

Re: [PATCH V4 1/4] mfd: f81504-core: Add Fintek F81504/508/512 PCIE-to-UART/GPIO core support

2016-03-01 Thread Peter Hung
Hi Andy, Andy Shevchenko 於 2016/2/23 下午 07:05 寫道: On Tue, 2016-02-23 at 14:30 +0800, Peter Hung wrote: +config MFD_FINTEK_F81504_CORE +tristate "Fintek F81504/508/512 PCIE-to-UART/GPIO MFD support" +depends on PCI +select MFD_CORE +default S

[PATCH V4 0/4] Transform Fintek PCIE driver from 8250 to MFD

2016-02-22 Thread Peter Hung
3. drivers/tty/serial/8250/8250_f81504.c V1: 1. Split F81504/508/512 from 8250_pci.c to 8250_fintek_pci.c. Alan & Andy recommend me to rewrite as MFD architecture. Peter Hung (4): mfd: f81504-core: Add Fintek F81504/508/512 PCIE-to-UART/GPIO core support gpio: gpio-f81504

[PATCH V4 0/4] Transform Fintek PCIE driver from 8250 to MFD

2016-02-22 Thread Peter Hung
3. drivers/tty/serial/8250/8250_f81504.c V1: 1. Split F81504/508/512 from 8250_pci.c to 8250_fintek_pci.c. Alan & Andy recommend me to rewrite as MFD architecture. Peter Hung (4): mfd: f81504-core: Add Fintek F81504/508/512 PCIE-to-UART/GPIO core support gpio: gpio-f81504

[PATCH V4 3/4] 8250: 8250_f81504: Add Fintek F81504/508/512 PCIE-to-UART/GPIO UART support

2016-02-22 Thread Peter Hung
driven high when TX, otherwise low Suggested-by: One Thousand Gnomes <gno...@lxorguk.ukuu.org.uk> Suggested-by: Andy Shevchenko <andriy.shevche...@linux.intel.com> Signed-off-by: Peter Hung <hpeter+linux_ker...@gmail.com> --- drivers/tty/serial/8250/8

[PATCH V4 2/4] gpio: gpio-f81504: Add Fintek F81504/508/512 PCIE-to-UART/GPIO GPIOLIB support

2016-02-22 Thread Peter Hung
- Push Pull In this driver, we only implements open drain mode. IO space: (IO base + 0~5): GPIO-0x~5x in/out value (bitwise) Suggested-by: One Thousand Gnomes <gno...@lxorguk.ukuu.org.uk> Suggested-by: Andy Shevchenko <andriy.shevche...@linux.intel.com> Signed-off-by: Peter

[PATCH V4 4/4] serial: 8250_pci: Remove Fintek F81504/508/512 UART driver

2016-02-22 Thread Peter Hung
-by: Paul Gortmaker <paul.gortma...@windriver.com> Suggested-by: Andy Shevchenko <andriy.shevche...@linux.intel.com> Signed-off-by: Peter Hung <hpeter+linux_ker...@gmail.com> --- drivers/tty/serial/8250/8250_pci.c | 206 + 1 file changed, 5

[PATCH V4 3/4] 8250: 8250_f81504: Add Fintek F81504/508/512 PCIE-to-UART/GPIO UART support

2016-02-22 Thread Peter Hung
driven high when TX, otherwise low Suggested-by: One Thousand Gnomes Suggested-by: Andy Shevchenko Signed-off-by: Peter Hung --- drivers/tty/serial/8250/8250_f81504.c | 250 ++ drivers/tty/serial/8250/Kconfig | 10 ++ drivers/tty/serial/8250/Makefile

[PATCH V4 2/4] gpio: gpio-f81504: Add Fintek F81504/508/512 PCIE-to-UART/GPIO GPIOLIB support

2016-02-22 Thread Peter Hung
- Push Pull In this driver, we only implements open drain mode. IO space: (IO base + 0~5): GPIO-0x~5x in/out value (bitwise) Suggested-by: One Thousand Gnomes Suggested-by: Andy Shevchenko Signed-off-by: Peter Hung --- drivers/gpio/Kconfig | 10 ++ drivers/gpio/Makefile

[PATCH V4 4/4] serial: 8250_pci: Remove Fintek F81504/508/512 UART driver

2016-02-22 Thread Peter Hung
-by: Paul Gortmaker Suggested-by: Andy Shevchenko Signed-off-by: Peter Hung --- drivers/tty/serial/8250/8250_pci.c | 206 + 1 file changed, 5 insertions(+), 201 deletions(-) diff --git a/drivers/tty/serial/8250/8250_pci.c b/drivers/tty/serial/8250/8250_pci.c

[PATCH V4 1/4] mfd: f81504-core: Add Fintek F81504/508/512 PCIE-to-UART/GPIO core support

2016-02-22 Thread Peter Hung
or UART9 / GPIO3 bit4: UART10 pin out for UART10 / GPIO4 bit5: UART11 pin out for UART11 / GPIO5 bit6~7: Reserve Suggested-by: One Thousand Gnomes <gno...@lxorguk.ukuu.org.uk> Suggested-by: Andy Shevchenko <andriy.shevche...@linux.intel.com> Signed-off-by: Peter Hu

[PATCH V4 1/4] mfd: f81504-core: Add Fintek F81504/508/512 PCIE-to-UART/GPIO core support

2016-02-22 Thread Peter Hung
or UART9 / GPIO3 bit4: UART10 pin out for UART10 / GPIO4 bit5: UART11 pin out for UART11 / GPIO5 bit6~7: Reserve Suggested-by: One Thousand Gnomes Suggested-by: Andy Shevchenko Signed-off-by: Peter Hung --- drivers/mfd/Kconfig| 12 ++ drivers/mfd/Makefile

Re: [PATCH V3 2/4] gpio: gpio-f81504: Add Fintek F81504/508/512 PCIE-to-UART/GPIO GPIOLIB support

2016-02-17 Thread Peter Hung
Hi Linus, Linus Walleij 於 2016/2/16 下午 11:22 寫道: On Tue, Feb 16, 2016 at 7:55 AM, Peter Hung <hpe...@gmail.com> wrote: Suggested-by: One Thousand Gnomes <gno...@lxorguk.ukuu.org.uk> Suggested-by: Andy Shevchenko <andriy.shevche...@linux.intel.com> Signed-off-by: Peter Hung

Re: [PATCH V3 2/4] gpio: gpio-f81504: Add Fintek F81504/508/512 PCIE-to-UART/GPIO GPIOLIB support

2016-02-17 Thread Peter Hung
Hi Linus, Linus Walleij 於 2016/2/16 下午 11:22 寫道: On Tue, Feb 16, 2016 at 7:55 AM, Peter Hung wrote: Suggested-by: One Thousand Gnomes Suggested-by: Andy Shevchenko Signed-off-by: Peter Hung Acked-by: Linus Walleij It's fine with me if this is queued in MFD, serial or whatever tree

Re: [PATCH V3 3/4] 8250: 8250_f81504: Add Fintek F81504/508/512 PCIE-to-UART/GPIO UART support

2016-02-17 Thread Peter Hung
Hi Andy, Andy Shevchenko 於 2016/2/16 下午 05:11 寫道: On Tue, 2016-02-16 at 14:55 +0800, Peter Hung wrote: +static u32 baudrate_table[] = { 150, 1152000, 921600 }; +static u8 clock_table[] = { F81504_CLKSEL_24_MHZ, F81504_CLKSEL_18DOT46_MHZ

Re: [PATCH V3 3/4] 8250: 8250_f81504: Add Fintek F81504/508/512 PCIE-to-UART/GPIO UART support

2016-02-17 Thread Peter Hung
Hi Andy, Andy Shevchenko 於 2016/2/16 下午 05:11 寫道: On Tue, 2016-02-16 at 14:55 +0800, Peter Hung wrote: +static u32 baudrate_table[] = { 150, 1152000, 921600 }; +static u8 clock_table[] = { F81504_CLKSEL_24_MHZ, F81504_CLKSEL_18DOT46_MHZ

Re: [PATCH V2 2/4] gpio: gpio-f81504: Add Fintek F81504/508/512 PCIE-to-UART/GPIO GPIOLIB support

2016-02-15 Thread Peter Hung
Hi Linus, Linus Walleij 於 2016/2/10 下午 05:08 寫道: On Thu, Jan 28, 2016 at 10:20 AM, Peter Hung <hpe...@gmail.com> wrote: +#include +#include Drivers should just #include ok. +static struct f81504_gpio_chip *gpio_to_f81504_chip(struct gpio_chip *chip) +{ + return container_o

Re: [PATCH V2 2/4] gpio: gpio-f81504: Add Fintek F81504/508/512 PCIE-to-UART/GPIO GPIOLIB support

2016-02-15 Thread Peter Hung
Hi Linus, Linus Walleij 於 2016/2/10 下午 05:08 寫道: On Thu, Jan 28, 2016 at 10:20 AM, Peter Hung wrote: +#include +#include Drivers should just #include ok. +static struct f81504_gpio_chip *gpio_to_f81504_chip(struct gpio_chip *chip) +{ + return container_of(chip, struct

[PATCH V3 2/4] gpio: gpio-f81504: Add Fintek F81504/508/512 PCIE-to-UART/GPIO GPIOLIB support

2016-02-15 Thread Peter Hung
- Push Pull In this driver, we only implements open drain mode. IO space: (IO base + 0~5): GPIO-0x~5x in/out value (bitwise) Suggested-by: One Thousand Gnomes <gno...@lxorguk.ukuu.org.uk> Suggested-by: Andy Shevchenko <andriy.shevche...@linux.intel.com> Signed-off-by: Peter

[PATCH V3 2/4] gpio: gpio-f81504: Add Fintek F81504/508/512 PCIE-to-UART/GPIO GPIOLIB support

2016-02-15 Thread Peter Hung
- Push Pull In this driver, we only implements open drain mode. IO space: (IO base + 0~5): GPIO-0x~5x in/out value (bitwise) Suggested-by: One Thousand Gnomes Suggested-by: Andy Shevchenko Signed-off-by: Peter Hung --- drivers/gpio/Kconfig | 10 ++ drivers/gpio/Makefile

[PATCH V3 1/4] mfd: f81504-core: Add Fintek F81504/508/512 PCIE-to-UART/GPIO core support

2016-02-15 Thread Peter Hung
or UART9 / GPIO3 bit4: UART10 pin out for UART10 / GPIO4 bit5: UART11 pin out for UART11 / GPIO5 bit6~7: Reserve Suggested-by: One Thousand Gnomes <gno...@lxorguk.ukuu.org.uk> Suggested-by: Andy Shevchenko <andriy.shevche...@linux.intel.com> Signed-off-by: Peter Hu

[PATCH V3 1/4] mfd: f81504-core: Add Fintek F81504/508/512 PCIE-to-UART/GPIO core support

2016-02-15 Thread Peter Hung
or UART9 / GPIO3 bit4: UART10 pin out for UART10 / GPIO4 bit5: UART11 pin out for UART11 / GPIO5 bit6~7: Reserve Suggested-by: One Thousand Gnomes Suggested-by: Andy Shevchenko Signed-off-by: Peter Hung --- drivers/mfd/Kconfig| 12 ++ drivers/mfd/Makefile

[PATCH V3 3/4] 8250: 8250_f81504: Add Fintek F81504/508/512 PCIE-to-UART/GPIO UART support

2016-02-15 Thread Peter Hung
driven high when TX, otherwise low Suggested-by: One Thousand Gnomes <gno...@lxorguk.ukuu.org.uk> Suggested-by: Andy Shevchenko <andriy.shevche...@linux.intel.com> Signed-off-by: Peter Hung <hpeter+linux_ker...@gmail.com> --- drivers/tty/serial/8250/8

[PATCH V3 3/4] 8250: 8250_f81504: Add Fintek F81504/508/512 PCIE-to-UART/GPIO UART support

2016-02-15 Thread Peter Hung
driven high when TX, otherwise low Suggested-by: One Thousand Gnomes Suggested-by: Andy Shevchenko Signed-off-by: Peter Hung --- drivers/tty/serial/8250/8250_f81504.c | 254 ++ drivers/tty/serial/8250/Kconfig | 11 ++ drivers/tty/serial/8250/Makefile

[PATCH V3 4/4] serial: 8250_pci: Remove Fintek F81504/508/512 UART driver

2016-02-15 Thread Peter Hung
-by: Paul Gortmaker <paul.gortma...@windriver.com> Suggested-by: Andy Shevchenko <andriy.shevche...@linux.intel.com> Signed-off-by: Peter Hung <hpeter+linux_ker...@gmail.com> --- drivers/tty/serial/8250/8250_pci.c | 206 + 1 file changed, 5

[PATCH V3 4/4] serial: 8250_pci: Remove Fintek F81504/508/512 UART driver

2016-02-15 Thread Peter Hung
-by: Paul Gortmaker Suggested-by: Andy Shevchenko Signed-off-by: Peter Hung --- drivers/tty/serial/8250/8250_pci.c | 206 + 1 file changed, 5 insertions(+), 201 deletions(-) diff --git a/drivers/tty/serial/8250/8250_pci.c b/drivers/tty/serial/8250/8250_pci.c

[PATCH V3 0/4] Transform Fintek PCIE driver from 8250 to MFD

2016-02-15 Thread Peter Hung
rial/8250/8250_f81504.c V1: 1. Split F81504/508/512 from 8250_pci.c to 8250_fintek_pci.c. Alan & Andy recommend me to rewrite as MFD architecture. Peter Hung (4): mfd: f81504-core: Add Fintek F81504/508/512 PCIE-to-UART/GPIO core support gpio: gpio-f81504: Add Fintek F81504

[PATCH V3 0/4] Transform Fintek PCIE driver from 8250 to MFD

2016-02-15 Thread Peter Hung
rial/8250/8250_f81504.c V1: 1. Split F81504/508/512 from 8250_pci.c to 8250_fintek_pci.c. Alan & Andy recommend me to rewrite as MFD architecture. Peter Hung (4): mfd: f81504-core: Add Fintek F81504/508/512 PCIE-to-UART/GPIO core support gpio: gpio-f81504: Add Fintek F81504

Re: [PATCH V2 4/4] serial: 8250_pci: Remove Fintek F81504/508/512 UART driver

2016-01-31 Thread Peter Hung
Hi Andy, Andy Shevchenko 於 2016/1/29 下午 08:40 寫道: On Fri, 2016-01-29 at 16:20 +0800, Peter Hung wrote: Hi Andy, Andy Shevchenko 於 2016/1/28 下午 08:04 寫道: On Thu, 2016-01-28 at 17:20 +0800, Peter Hung wrote: - /* Fintek PCI serial cards */ - { PCI_DEVICE(0x1c29, 0x1104

Re: [PATCH V2 1/4] mfd: f81504-core: Add Fintek F81504/508/512 PCIE-to-UART/GPIO core support

2016-01-31 Thread Peter Hung
Hi Andy, Andy Shevchenko 於 2016/1/29 下午 09:41 寫道: On Fri, 2016-01-29 at 13:50 +0800, Peter Hung wrote: Andy Shevchenko 於 2016/1/28 下午 07:55 寫道: I would suggest to rearrange definition block here (and in the rest of the functions in entire series) to somehow follow the following pattern 1

Re: [PATCH V2 1/4] mfd: f81504-core: Add Fintek F81504/508/512 PCIE-to-UART/GPIO core support

2016-01-31 Thread Peter Hung
Hi Andy, Andy Shevchenko 於 2016/1/29 下午 09:41 寫道: On Fri, 2016-01-29 at 13:50 +0800, Peter Hung wrote: Andy Shevchenko 於 2016/1/28 下午 07:55 寫道: I would suggest to rearrange definition block here (and in the rest of the functions in entire series) to somehow follow the following pattern 1

Re: [PATCH V2 4/4] serial: 8250_pci: Remove Fintek F81504/508/512 UART driver

2016-01-31 Thread Peter Hung
Hi Andy, Andy Shevchenko 於 2016/1/29 下午 08:40 寫道: On Fri, 2016-01-29 at 16:20 +0800, Peter Hung wrote: Hi Andy, Andy Shevchenko 於 2016/1/28 下午 08:04 寫道: On Thu, 2016-01-28 at 17:20 +0800, Peter Hung wrote: - /* Fintek PCI serial cards */ - { PCI_DEVICE(0x1c29, 0x1104

Re: [PATCH V2 4/4] serial: 8250_pci: Remove Fintek F81504/508/512 UART driver

2016-01-29 Thread Peter Hung
Hi Andy, Andy Shevchenko 於 2016/1/28 下午 08:04 寫道: On Thu, 2016-01-28 at 17:20 +0800, Peter Hung wrote: - /* Fintek PCI serial cards */ - { PCI_DEVICE(0x1c29, 0x1104), .driver_data = pbn_fintek_4 }, - { PCI_DEVICE(0x1c29, 0x1108), .driver_data = pbn_fintek_8

Re: [PATCH V2 2/4] gpio: gpio-f81504: Add Fintek F81504/508/512 PCIE-to-UART/GPIO GPIOLIB support

2016-01-29 Thread Peter Hung
Hi Andy, Andy Shevchenko 於 2016/1/28 下午 08:03 寫道: On Thu, 2016-01-28 at 17:20 +0800, Peter Hung wrote: + /* set output data */ + tmp = inb(priv->gpio_ioaddr + gc->idx); ioread8 is a bit better since it automatically works with IO space and MMIO. But if you are certa

Re: [PATCH V2 2/4] gpio: gpio-f81504: Add Fintek F81504/508/512 PCIE-to-UART/GPIO GPIOLIB support

2016-01-29 Thread Peter Hung
Hi Andy, Andy Shevchenko 於 2016/1/28 下午 08:03 寫道: On Thu, 2016-01-28 at 17:20 +0800, Peter Hung wrote: + /* set output data */ + tmp = inb(priv->gpio_ioaddr + gc->idx); ioread8 is a bit better since it automatically works with IO space and MMIO. But if you are certa

Re: [PATCH V2 4/4] serial: 8250_pci: Remove Fintek F81504/508/512 UART driver

2016-01-29 Thread Peter Hung
Hi Andy, Andy Shevchenko 於 2016/1/28 下午 08:04 寫道: On Thu, 2016-01-28 at 17:20 +0800, Peter Hung wrote: - /* Fintek PCI serial cards */ - { PCI_DEVICE(0x1c29, 0x1104), .driver_data = pbn_fintek_4 }, - { PCI_DEVICE(0x1c29, 0x1108), .driver_data = pbn_fintek_8

Re: [PATCH V2 1/4] mfd: f81504-core: Add Fintek F81504/508/512 PCIE-to-UART/GPIO core support

2016-01-28 Thread Peter Hung
= f81504_remove, + .driver = { + .pm = _pm_ops, + .owner = THIS_MODULE, kbuild already complained about. ok diff --git a/include/linux/mfd/f81504.h b/include/linux/mfd/f81504.h new file mode 100644 index 000..13bd0ae --- /dev/null +++ b/include/linux/mfd/f81504.h @@ -0,0 +1,52 @@ +#ifndef __F81504_H__ __MFD_F… ok Thanks for your advices -- With Best Regards, Peter Hung

Re: [PATCH V2 1/4] mfd: f81504-core: Add Fintek F81504/508/512 PCIE-to-UART/GPIO core support

2016-01-28 Thread Peter Hung
0x1c, _data[2]); Take these from the pci device itself. On some non PC platforms the values in the pci bar may be remapped by bridges and not give you the true answer. pci_resource_start(dev, barnumber) Thanks for point this out, I'll rewrite here with pci_resource_start(). -- With Best

[PATCH V2 4/4] serial: 8250_pci: Remove Fintek F81504/508/512 UART driver

2016-01-28 Thread Peter Hung
/GPIO UART support mfd: f81504-core: Add Fintek F81504/508/512 PCIE-to-UART/GPIO core support We must remove F81504/508/512 support in 8250_pci.c and migrate to f81504-core/8250_f81504 to enable MFD support. Suggested-by: Paul Gortmaker Signed-off-by: Peter Hung --- drivers/tty/serial/8250

[PATCH V2 3/4] 8250: 8250_f81504: Add Fintek F81504/508/512 PCIE-to-UART/GPIO UART support

2016-01-28 Thread Peter Hung
driven high when TX, otherwise low Suggested-by: One Thousand Gnomes Suggested-by: Andy Shevchenko Signed-off-by: Peter Hung --- drivers/tty/serial/8250/8250_f81504.c | 254 ++ drivers/tty/serial/8250/Kconfig | 11 ++ drivers/tty/serial/8250/Makefile

[PATCH V2 1/4] mfd: f81504-core: Add Fintek F81504/508/512 PCIE-to-UART/GPIO core support

2016-01-28 Thread Peter Hung
or UART9 / GPIO3 bit4: UART10 pin out for UART10 / GPIO4 bit5: UART11 pin out for UART11 / GPIO5 bit6~7: Reserve Suggested-by: One Thousand Gnomes Suggested-by: Andy Shevchenko Signed-off-by: Peter Hung --- drivers/mfd/Kconfig| 11 ++ drivers/mfd/Makefile

[PATCH V2 2/4] gpio: gpio-f81504: Add Fintek F81504/508/512 PCIE-to-UART/GPIO GPIOLIB support

2016-01-28 Thread Peter Hung
- Push Pull In this driver, we only implements open drain mode. IO space: (IO base + 0~5): GPIO-0x~5x in/out value (bitwise) Suggested-by: One Thousand Gnomes Suggested-by: Andy Shevchenko Signed-off-by: Peter Hung --- drivers/gpio/Kconfig | 10 ++ drivers/gpio/Makefile

[PATCH V2 0/4] Transform Fintek PCIE driver from 8250 to MFD

2016-01-28 Thread Peter Hung
lied patches 1~3. After apply patch 4, the device will control by F81504 MFD core driver. Peter Hung (4): mfd: f81504-core: Add Fintek F81504/508/512 PCIE-to-UART/GPIO core support gpio: gpio-f81504: Add Fintek F81504/508/512 PCIE-to-UART/GPIO GPIOLIB support 8250: 8250_f81504: Add Fintek F8

[PATCH V2 0/4] Transform Fintek PCIE driver from 8250 to MFD

2016-01-28 Thread Peter Hung
lied patches 1~3. After apply patch 4, the device will control by F81504 MFD core driver. Peter Hung (4): mfd: f81504-core: Add Fintek F81504/508/512 PCIE-to-UART/GPIO core support gpio: gpio-f81504: Add Fintek F81504/508/512 PCIE-to-UART/GPIO GPIOLIB support 8250: 8250_f81504: Add Fintek F8

[PATCH V2 2/4] gpio: gpio-f81504: Add Fintek F81504/508/512 PCIE-to-UART/GPIO GPIOLIB support

2016-01-28 Thread Peter Hung
- Push Pull In this driver, we only implements open drain mode. IO space: (IO base + 0~5): GPIO-0x~5x in/out value (bitwise) Suggested-by: One Thousand Gnomes <gno...@lxorguk.ukuu.org.uk> Suggested-by: Andy Shevchenko <andriy.shevche...@linux.intel.com> Signed-off-by: Peter

[PATCH V2 1/4] mfd: f81504-core: Add Fintek F81504/508/512 PCIE-to-UART/GPIO core support

2016-01-28 Thread Peter Hung
or UART9 / GPIO3 bit4: UART10 pin out for UART10 / GPIO4 bit5: UART11 pin out for UART11 / GPIO5 bit6~7: Reserve Suggested-by: One Thousand Gnomes <gno...@lxorguk.ukuu.org.uk> Suggested-by: Andy Shevchenko <andriy.shevche...@linux.intel.com> Signed-off-by: Peter Hu

[PATCH V2 3/4] 8250: 8250_f81504: Add Fintek F81504/508/512 PCIE-to-UART/GPIO UART support

2016-01-28 Thread Peter Hung
driven high when TX, otherwise low Suggested-by: One Thousand Gnomes <gno...@lxorguk.ukuu.org.uk> Suggested-by: Andy Shevchenko <andriy.shevche...@linux.intel.com> Signed-off-by: Peter Hung <hpeter+linux_ker...@gmail.com> --- drivers/tty/serial/8250/8

[PATCH V2 4/4] serial: 8250_pci: Remove Fintek F81504/508/512 UART driver

2016-01-28 Thread Peter Hung
/GPIO UART support mfd: f81504-core: Add Fintek F81504/508/512 PCIE-to-UART/GPIO core support We must remove F81504/508/512 support in 8250_pci.c and migrate to f81504-core/8250_f81504 to enable MFD support. Suggested-by: Paul Gortmaker <paul.gortma...@windriver.com> Signed-off-by: Pete

Re: [PATCH V2 1/4] mfd: f81504-core: Add Fintek F81504/508/512 PCIE-to-UART/GPIO core support

2016-01-28 Thread Peter Hung
0x1c, _data[2]); Take these from the pci device itself. On some non PC platforms the values in the pci bar may be remapped by bridges and not give you the true answer. pci_resource_start(dev, barnumber) Thanks for point this out, I'll rewrite here with pci_resource_start(). -- With Best

Re: [PATCH V2 1/4] mfd: f81504-core: Add Fintek F81504/508/512 PCIE-to-UART/GPIO core support

2016-01-28 Thread Peter Hung
= f81504_remove, + .driver = { + .pm = _pm_ops, + .owner = THIS_MODULE, kbuild already complained about. ok diff --git a/include/linux/mfd/f81504.h b/include/linux/mfd/f81504.h new file mode 100644 index 000..13bd0ae --- /dev/null +++ b/include/linux/mfd/f81504.h @@ -0,0 +1,52 @@ +#ifndef __F81504_H__ __MFD_F… ok Thanks for your advices -- With Best Regards, Peter Hung

[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 --- Changelog: v8 1. Remove driver mode GPIOLIB & RS485 control support, th

[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

Re: [PATCH V2 1/1] gpio-f7188x: Add F81866 GPIO supports

2016-01-22 Thread Peter Hung
Hi Simon, Simon Guinot 於 2016/1/22 下午 04:58 寫道: On Fri, Jan 22, 2016 at 03:23:33PM +0800, Peter Hung wrote: Acked-by: Simon Guinot Thanks, Should I resend patch V3 to add Acked-by? -- With Best Regards, Peter Hung

Re: [PATCH V2 1/1] gpio-f7188x: Add F81866 GPIO supports

2016-01-22 Thread Peter Hung
Hi Simon, Simon Guinot 於 2016/1/22 下午 04:58 寫道: On Fri, Jan 22, 2016 at 03:23:33PM +0800, Peter Hung wrote: Acked-by: Simon Guinot <simon.gui...@sequanux.org> Thanks, Should I resend patch V3 to add Acked-by? -- With Best Regards, Peter Hung

[PATCH V2 1/1] gpio-f7188x: Add F81866 GPIO supports

2016-01-21 Thread Peter Hung
the address of GPIO8x. GPIO address is below: GPIO0x based: 0xf0 GPIO1x based: 0xe0 GPIO2x based: 0xd0 GPIO3x based: 0xc0 GPIO4x based: 0xb0 GPIO5x based: 0xa0 GPIO6x based: 0x90 GPIO7x based: 0x80 GPIO8x based: 0x88 <-- not 0x70. Signed-off-by: Peter H

[PATCH V2 0/1] gpio-f7188x: Add F81866 GPIO supports

2016-01-21 Thread Peter Hung
add F81866 and second is a filter to find enabled GPIO. But Simon say some mainboard maybe configure the SuperIO with wrong setting. So the V2 patch only implements F81866 GPIO control method the same with F7188x. Peter Hung (1): gpio-f7188x: Add F81866 GPIO supports driv

[PATCH V2 1/1] gpio-f7188x: Add F81866 GPIO supports

2016-01-21 Thread Peter Hung
the address of GPIO8x. GPIO address is below: GPIO0x based: 0xf0 GPIO1x based: 0xe0 GPIO2x based: 0xd0 GPIO3x based: 0xc0 GPIO4x based: 0xb0 GPIO5x based: 0xa0 GPIO6x based: 0x90 GPIO7x based: 0x80 GPIO8x based: 0x88 <-- not 0x70. Signed-off-by: Peter H

[PATCH V2 0/1] gpio-f7188x: Add F81866 GPIO supports

2016-01-21 Thread Peter Hung
add F81866 and second is a filter to find enabled GPIO. But Simon say some mainboard maybe configure the SuperIO with wrong setting. So the V2 patch only implements F81866 GPIO control method the same with F7188x. Peter Hung (1): gpio-f7188x: Add F81866 GPIO supports driv

Re: [PATCH RESEND 1/1] serial: 8250_pci: Fix real serial port count for F81504/508/512

2015-12-27 Thread Peter Hung
and implements GPIOLIB? Thanks -- With Best Regards, Peter Hung -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://w

Re: [PATCH RESEND 1/1] serial: 8250_pci: Fix real serial port count for F81504/508/512

2015-12-27 Thread Peter Hung
and implements GPIOLIB? Thanks -- With Best Regards, Peter Hung -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://w

Re: [PATCH RESEND 1/1] serial: 8250_pci: Fix real serial port count for F81504/508/512

2015-12-14 Thread Peter Hung
Hello, Andy Shevchenko 於 2015/12/13 上午 09:08 寫道: On Tue, Dec 1, 2015 at 8:54 AM, Peter Hung wrote: First of all, maybe you can consider to split this part of the driver to separate one? (Like we did for 8250_mid.c). It seems 8250_pci is too bloated. But it's just an idea, maybe for future

Re: [PATCH RESEND 1/1] serial: 8250_pci: Fix real serial port count for F81504/508/512

2015-12-14 Thread Peter Hung
Hello, Andy Shevchenko 於 2015/12/13 上午 09:08 寫道: On Tue, Dec 1, 2015 at 8:54 AM, Peter Hung <hpe...@gmail.com> wrote: First of all, maybe you can consider to split this part of the driver to separate one? (Like we did for 8250_mid.c). It seems 8250_pci is too bloated. But it's just a

[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 --- Changelog: v7 1. Make all gpiolib function with #ifdef CONFIG_GPIOLIB marco block.

[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

[PATCH RESEND 1/1] serial: 8250_pci: Fix real serial port count for F81504/508/512

2015-11-30 Thread Peter Hung
508: Max for 8 serial ports. UART2/3 is multi-function. 8/9/10/11 is GPIO only F81512: Max for 12 serial ports. UART2/3/8/9/10/11 is multi-function. Signed-off-by: Peter Hung --- drivers/tty/serial/8250/8250_pci.c | 114 +++-- 1 file chan

[PATCH 1/1] serial: 8250_pci: Fix real serial port count for F81504/508/512

2015-11-30 Thread Peter Hung
508: Max for 8 serial ports. UART2/3 is multi-function. 8/9/10/11 is GPIO only F81512: Max for 12 serial ports. UART2/3/8/9/10/11 is multi-function. Signed-off-by: Peter Hung --- drivers/tty/serial/8250/8250_pci.c | 114 +++-- 1 file chan

[PATCH 1/1] serial: 8250_pci: Fix real serial port count for F81504/508/512

2015-11-30 Thread Peter Hung
508: Max for 8 serial ports. UART2/3 is multi-function. 8/9/10/11 is GPIO only F81512: Max for 12 serial ports. UART2/3/8/9/10/11 is multi-function. Signed-off-by: Peter Hung <hpeter+linux_ker...@gmail.com> --- drivers/tty/serial/8250/82

[PATCH RESEND 1/1] serial: 8250_pci: Fix real serial port count for F81504/508/512

2015-11-30 Thread Peter Hung
508: Max for 8 serial ports. UART2/3 is multi-function. 8/9/10/11 is GPIO only F81512: Max for 12 serial ports. UART2/3/8/9/10/11 is multi-function. Signed-off-by: Peter Hung <hpeter+linux_ker...@gmail.com> --- drivers/tty/serial/8250/82

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 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 it be good to have this u

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

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 --- Changelog: v6 1. Re-implement the write()/resume() function. Due to this dev

[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-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

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 1/1] serial: 8250_pci: fix mode after S3/S4 resume for F81504/508/512

2015-08-05 Thread Peter Hung
when the parameter rs485 is NULL. Signed-off-by: Peter Hung --- drivers/tty/serial/8250/8250_pci.c | 25 + 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/drivers/tty/serial/8250/8250_pci.c b/drivers/tty/serial/8250/8250_pci.c index e12e911..68042dd 100644

[PATCH 1/1] serial: 8250_pci: fix mode after S3/S4 resume for F81504/508/512

2015-08-05 Thread Peter Hung
when the parameter rs485 is NULL. Signed-off-by: Peter Hung hpeter+linux_ker...@gmail.com --- drivers/tty/serial/8250/8250_pci.c | 25 + 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/drivers/tty/serial/8250/8250_pci.c b/drivers/tty/serial/8250/8250_pci.c

[PATCH V2 1/1] serial: 8250_pci: add RS485 for F81504/508/512

2015-07-27 Thread Peter Hung
igh, tx mode with RTS logic low. If user set to SER_RS485_ENABLED(default), we should set reg with 0x31. if SER_RS485_ENABLED | SER_RS485_RTS_ON_SEND will set reg to 0x11. Signed-off-by: Peter Hung --- drivers/tty/serial/8250/8250_pci.c | 61 ++ 1

Re: [PATCH 1/1] serial: 8250_pci: add RS485 for F81504/508/512

2015-07-27 Thread Peter Hung
| SER_RS485_RTS_AFTER_SEND set and nothing else (or be completely zeroed if SER_RS485_ENABLED was not set). Thanks for your advice, I'll fix it and re-send patch -- With Best Regards, Peter Hung -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of

Re: [PATCH 1/1] serial: 8250_pci: add RS485 for F81504/508/512

2015-07-27 Thread Peter Hung
| SER_RS485_RTS_AFTER_SEND set and nothing else (or be completely zeroed if SER_RS485_ENABLED was not set). Thanks for your advice, I'll fix it and re-send patch -- With Best Regards, Peter Hung -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message

[PATCH V2 1/1] serial: 8250_pci: add RS485 for F81504/508/512

2015-07-27 Thread Peter Hung
with RTS logic low. If user set to SER_RS485_ENABLED(default), we should set reg with 0x31. if SER_RS485_ENABLED | SER_RS485_RTS_ON_SEND will set reg to 0x11. Signed-off-by: Peter Hung hpeter+linux_ker...@gmail.com --- drivers/tty/serial/8250/8250_pci.c | 61

[PATCH 1/1] serial: 8250_pci: add RS485 for F81504/508/512

2015-07-23 Thread Peter Hung
. RTS is controlled by H/W, RTS high with idle & RX, low with TX. When it set with 0x31, it's configured with RS485 mode. RTS is controlled by H/W, RTS low with idle & RX, high with TX. We will force 0x01 on pci_fintek_setup(). Signed-off-by: Peter Hung --- drivers/tty/serial/8250/8250_pc

[PATCH 1/1] serial: 8250_pci: add RS485 for F81504/508/512

2015-07-23 Thread Peter Hung
. RTS is controlled by H/W, RTS high with idle RX, low with TX. When it set with 0x31, it's configured with RS485 mode. RTS is controlled by H/W, RTS low with idle RX, high with TX. We will force 0x01 on pci_fintek_setup(). Signed-off-by: Peter Hung hpeter+linux_ker...@gmail.com --- drivers/tty

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

2015-07-20 Thread Peter Hung
. 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 --- drivers/usb/serial/Kconfig | 10 + drivers/usb/serial/Makefile |1 + drivers/usb/serial/f81534.c | 3279 +++

[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
fix with newer patch. -- With Best Regards, Peter Hung -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

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-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

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

2015-07-13 Thread Peter Hung
subsystem callback function. 2. Use more defines to replece magic 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 subsyste

[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 moun

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

  1   2   3   4   >