Re: [PATCH v3] serial: 8250: add gpio support to exar

2015-12-22 Thread Sudip Mukherjee
On Tue, Dec 22, 2015 at 12:15:18PM +0200, Andy Shevchenko wrote: > On Tue, Dec 22, 2015 at 12:08 PM, Sudip Mukherjee > wrote: > > On Tue, Dec 22, 2015 at 11:58:17AM +0200, Andy Shevchenko wrote: > > >> > The only downside is > >> > that the module gets loaded even if the device is not there. > >>

Re: [PATCH v3] serial: 8250: add gpio support to exar

2015-12-22 Thread Andy Shevchenko
On Tue, Dec 22, 2015 at 12:08 PM, Sudip Mukherjee wrote: > On Tue, Dec 22, 2015 at 11:58:17AM +0200, Andy Shevchenko wrote: >> > The only downside is >> > that the module gets loaded even if the device is not there. >> >> How is that? > > Alan explained that in https://lkml.org/lkml/2015/12/20/10

Re: [PATCH v3] serial: 8250: add gpio support to exar

2015-12-22 Thread Sudip Mukherjee
On Tue, Dec 22, 2015 at 11:58:17AM +0200, Andy Shevchenko wrote: > On Tue, Dec 22, 2015 at 6:27 AM, Sudip Mukherjee > wrote: > > On Mon, Dec 21, 2015 at 08:28:51PM +0200, Andy Shevchenko wrote: > >> On Mon, Dec 21, 2015 at 5:19 PM, Sudip Mukherjee > >> wrote: > >> > > >> There are at least two a

Re: [PATCH v3] serial: 8250: add gpio support to exar

2015-12-22 Thread Andy Shevchenko
On Tue, Dec 22, 2015 at 6:27 AM, Sudip Mukherjee wrote: > On Mon, Dec 21, 2015 at 08:28:51PM +0200, Andy Shevchenko wrote: >> On Mon, Dec 21, 2015 at 5:19 PM, Sudip Mukherjee >> wrote: >> >> There are at least two approaches: >> - use 8250_pci, etc as a library (see example: 8250_mid.c) >> - f

Re: [PATCH v3] serial: 8250: add gpio support to exar

2015-12-21 Thread Sudip Mukherjee
On Mon, Dec 21, 2015 at 08:28:51PM +0200, Andy Shevchenko wrote: > On Mon, Dec 21, 2015 at 5:19 PM, Sudip Mukherjee > wrote: > > > diff --git a/drivers/tty/serial/8250/Kconfig > > b/drivers/tty/serial/8250/Kconfig > > index 6412f14..ec3d287 100644 > > --- a/drivers/tty/serial/8250/Kconfig > > ++

Re: [PATCH v3] serial: 8250: add gpio support to exar

2015-12-21 Thread Andy Shevchenko
On Mon, Dec 21, 2015 at 5:19 PM, Sudip Mukherjee wrote: > diff --git a/drivers/tty/serial/8250/Kconfig b/drivers/tty/serial/8250/Kconfig > index 6412f14..ec3d287 100644 > --- a/drivers/tty/serial/8250/Kconfig > +++ b/drivers/tty/serial/8250/Kconfig > @@ -378,3 +378,11 @@ config SERIAL_8250_MID >

Re: [PATCH v3] serial: 8250: add gpio support to exar

2015-12-21 Thread Sudip Mukherjee
On Sun, Dec 20, 2015 at 05:42:08PM +, One Thousand Gnomes wrote: > > So then should I rewrite it as MFD or should it be like the way you > > suggested in the other mail to have it as bool in the Kconfig and combine > > the file with 8250_pci.c when the symbol is selected? > > Yes although I'm

Re: [PATCH v3] serial: 8250: add gpio support to exar

2015-12-20 Thread Andy Shevchenko
On Sun, Dec 20, 2015 at 7:28 PM, Sudip Mukherjee wrote: > On Sun, Dec 20, 2015 at 04:43:53PM +, One Thousand Gnomes wrote: >> > v3: Alan commented on v2, few things like NULL check, name of the gpio >> > chip, >> > moving some more code into the gpio code. He also commented on it being >> > a

Re: [PATCH v3] serial: 8250: add gpio support to exar

2015-12-20 Thread One Thousand Gnomes
> So then should I rewrite it as MFD or should it be like the way you > suggested in the other mail to have it as bool in the Kconfig and combine > the file with 8250_pci.c when the symbol is selected? Yes although I'm really not sure which is the best approach of the two. Alan -- To unsubscribe

Re: [PATCH v3] serial: 8250: add gpio support to exar

2015-12-20 Thread Sudip Mukherjee
On Sun, Dec 20, 2015 at 04:43:53PM +, One Thousand Gnomes wrote: > > v3: Alan commented on v2, few things like NULL check, name of the gpio chip, > > moving some more code into the gpio code. He also commented on it being > > a separate module, but since this will not be needed by someone who i

Re: [PATCH v3] serial: 8250: add gpio support to exar

2015-12-20 Thread One Thousand Gnomes
> > If you are linking it into the driver you don't need the module_init/exit > > gpio_init/exit methods. Your Kconfig becomes a bool and you combine the > > file into the driver based upon that bool. > > But isn't it better to have the gpio code separete from the 8250 code? > But how do i combine

Re: [PATCH v3] serial: 8250: add gpio support to exar

2015-12-20 Thread Sudip Mukherjee
On Sun, Dec 20, 2015 at 04:41:31PM +, One Thousand Gnomes wrote: > On Sun, 20 Dec 2015 20:17:22 +0530 > Sudip Mukherjee wrote: > > > On Sun, Dec 20, 2015 at 04:18:17PM +0200, Andy Shevchenko wrote: > > > On Sun, Dec 20, 2015 at 3:24 PM, Sudip Mukherjee > > > wrote: > > > > Exar XR17V352/354/

Re: [PATCH v3] serial: 8250: add gpio support to exar

2015-12-20 Thread One Thousand Gnomes
> v3: Alan commented on v2, few things like NULL check, name of the gpio chip, > moving some more code into the gpio code. He also commented on it being > a separate module, but since this will not be needed by someone who is not > using Exar chip, and even those who are using, some of them may not

Re: [PATCH v3] serial: 8250: add gpio support to exar

2015-12-20 Thread One Thousand Gnomes
On Sun, 20 Dec 2015 20:17:22 +0530 Sudip Mukherjee wrote: > On Sun, Dec 20, 2015 at 04:18:17PM +0200, Andy Shevchenko wrote: > > On Sun, Dec 20, 2015 at 3:24 PM, Sudip Mukherjee > > wrote: > > > Exar XR17V352/354/358 chips have 16 multi-purpose inputs/outputs which > > > can be controlled using

Re: [PATCH v3] serial: 8250: add gpio support to exar

2015-12-20 Thread Andy Shevchenko
On Sun, Dec 20, 2015 at 4:47 PM, Sudip Mukherjee wrote: > On Sun, Dec 20, 2015 at 04:18:17PM +0200, Andy Shevchenko wrote: >> On Sun, Dec 20, 2015 at 3:24 PM, Sudip Mukherjee >> wrote: >> > Exar XR17V352/354/358 chips have 16 multi-purpose inputs/outputs which >> > can be controlled using gpio in

Re: [PATCH v3] serial: 8250: add gpio support to exar

2015-12-20 Thread Sudip Mukherjee
On Sun, Dec 20, 2015 at 04:18:17PM +0200, Andy Shevchenko wrote: > On Sun, Dec 20, 2015 at 3:24 PM, Sudip Mukherjee > wrote: > > Exar XR17V352/354/358 chips have 16 multi-purpose inputs/outputs which > > can be controlled using gpio interface. > > Add support to use these pins and select GPIO_SYSF

Re: [PATCH v3] serial: 8250: add gpio support to exar

2015-12-20 Thread Andy Shevchenko
On Sun, Dec 20, 2015 at 3:24 PM, Sudip Mukherjee wrote: > Exar XR17V352/354/358 chips have 16 multi-purpose inputs/outputs which > can be controlled using gpio interface. > Add support to use these pins and select GPIO_SYSFS also so that these > pins can be used from the userspace through sysfs. >