From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andy Shevchenko Subject: Re: [PATCH 0/3] 8250: Split Fintek PCIE to UART to independent file Date: Tue, 19 Jan 2016 15:21:24 +0200 Message-ID: <1453209684.2521.115.camel@linux.intel.com> References: <1453171266-15874-1-git-send-email-hpeter+linux_kernel@gmail.com> <20160119035649.GA1696@windriver.com> <569DF7C3.5050306@gmail.com> <20160119123327.3b519062@lxorguk.ukuu.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20160119123327.3b519062@lxorguk.ukuu.org.uk> Sender: linux-kernel-owner@vger.kernel.org To: One Thousand Gnomes , Peter Hung Cc: Paul Gortmaker , gregkh@linuxfoundation.org, jslaby@suse.com, heikki.krogerus@linux.intel.com, peter@hurleysoftware.com, soeren.grunewald@desy.de, udknight@gmail.com, adam.lee@canonical.com, arnd@arndb.de, yamada.masahiro@socionext.com, mans@mansr.com, scottwood@freescale.com, paul.burton@imgtec.com, matthias.bgg@gmail.com, manabian@gmail.com, peter.ujfalusi@ti.com, linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, peter_hong@fintek.com.tw, Peter Hung List-Id: linux-serial@vger.kernel.org On Tue, 2016-01-19 at 12:33 +0000, One Thousand Gnomes wrote: > > The architecture of 8250_pci.c is good for PCIE device with 8250 > > compatible serial ports. We want to implement all functions of > > F81504/508/512, but it'll make 8250_pci.c bloated and complex if we > > implement GPIOLIB in 8250_pci.c > > Your device is multi-function. Create an MFD driver for it. Make the > 8250 driver bind to the MFD, and provide your own baud rate methods > within the standard 8250 layer Ouch, somehow I missed this one! Peter, Alan's suggestion is really worth to try. > > Implement the GPIO lines in a GPIO driver that also binds to the MFD > and > lives in drivers/gpio > > All the needed pieces already exist to implement it cleanly this way > without duplicating a ton of code. > > Alan -- Andy Shevchenko Intel Finland Oy