Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1340546
| From | Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH V4 1/4] mfd: f81504-core: Add Fintek F81504/508/512 PCIE-to-UART/GPIO core support |
| Date | 2016-02-23 12:10 +0100 |
| Message-ID | <r5j0S-4sa-7@gated-at.bofh.it> (permalink) |
| References | <r5eNz-1oL-3@gated-at.bofh.it> <r5eNA-1oL-15@gated-at.bofh.it> |
| Organization | Intel Finland Oy |
On Tue, 2016-02-23 at 14:30 +0800, Peter Hung wrote:
> The Fintek F81504/508/512 had implemented the basic serial port
> function in
> 8250_pci.c. We try to implement high baudrate & GPIOLIB with a spilt
> file
> 8250_f81504.c, but it seems too complex to add GPIOLIB.
[...]
> --- a/drivers/mfd/Kconfig
> +++ b/drivers/mfd/Kconfig
> @@ -345,6 +345,18 @@ config HTC_I2CPLD
> This device provides input and output GPIOs through an I2C
> interface to one or more sub-chips.
>
> +config MFD_FINTEK_F81504_CORE
> + tristate "Fintek F81504/508/512 PCIE-to-UART/GPIO MFD
> support"
> + depends on PCI
> + select MFD_CORE
> + default SERIAL_8250
SERIAL_8250_PCI ?
> +static bool f81504_is_gpio(unsigned int idx, u8 gpio_en)
> +{
> + unsigned int i;
> +
> + /* Find every port to check is multi-function port */
> + for (i = 0; i < ARRAY_SIZE(fintek_gpio_mapping); i++) {
> + if (fintek_gpio_mapping[i] != idx || !(gpio_en &
> BIT(i)))
> + continue;
> +
> + /*
> + * This port is multi-function and enabled as gpio
> mode.
> + * So we'll not configure it as serial port.
> + */
> + return true;
Perhaps
if (fintek_gpio_mapping[i] == idx && (gpio_en & BIT(i)))
return true;
?
> + }
> +
> + return false;
> +}
--
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Intel Finland Oy
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH V4 0/4] Transform Fintek PCIE driver from 8250 to MFD Peter Hung <hpeter@gmail.com> - 2016-02-23 07:40 +0100
[PATCH V4 4/4] serial: 8250_pci: Remove Fintek F81504/508/512 UART driver Peter Hung <hpeter@gmail.com> - 2016-02-23 07:40 +0100
[PATCH V4 1/4] mfd: f81504-core: Add Fintek F81504/508/512 PCIE-to-UART/GPIO core support Peter Hung <hpeter@gmail.com> - 2016-02-23 07:40 +0100
Re: [PATCH V4 1/4] mfd: f81504-core: Add Fintek F81504/508/512 PCIE-to-UART/GPIO core support Andy Shevchenko <andriy.shevchenko@linux.intel.com> - 2016-02-23 12:10 +0100
Re: [PATCH V4 1/4] mfd: f81504-core: Add Fintek F81504/508/512 PCIE-to-UART/GPIO core support Peter Hung <hpeter@gmail.com> - 2016-03-02 08:40 +0100
[PATCH V4 3/4] 8250: 8250_f81504: Add Fintek F81504/508/512 PCIE-to-UART/GPIO UART support Peter Hung <hpeter@gmail.com> - 2016-02-23 07:40 +0100
csiph-web