Linux Serial subsystem development
 help / color / mirror / Atom feed
From: One Thousand Gnomes <gnomes@lxorguk.ukuu.org.uk>
To: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Cc: Andy Shevchenko <andy.shevchenko@gmail.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Jiri Slaby <jslaby@suse.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-serial@vger.kernel.org" <linux-serial@vger.kernel.org>
Subject: Re: [PATCH v3] serial: 8250: add gpio support to exar
Date: Sun, 20 Dec 2015 17:28:51 +0000	[thread overview]
Message-ID: <20151220172851.1b560da8@lxorguk.ukuu.org.uk> (raw)
In-Reply-To: <20151220171104.GA8471@sudip-laptop>

> > 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 a file? is it like:
> 
> #ifdef SERIAL_8250_EXAR_GPIO
> #include "8250_gpio.c"
> #endif
> 
> or should it be:
> 
> #ifdef SERIAL_8250_EXAR_GPIO
> 
> all c code
> 
> #endif

Neither of the above. Take a look how other parts of the kernel combine
multiple files into a single module. It's supported by the
Kconfig/Makefile system, and they will get linked together as a single
binary while being separate sources.

For an example look at drivers/tty/ipwireless



Alan

  reply	other threads:[~2015-12-20 17:28 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-20 13:24 [PATCH v3] serial: 8250: add gpio support to exar Sudip Mukherjee
2015-12-20 14:18 ` Andy Shevchenko
2015-12-20 14:47   ` Sudip Mukherjee
2015-12-20 15:05     ` Andy Shevchenko
2015-12-20 16:41     ` One Thousand Gnomes
2015-12-20 17:11       ` Sudip Mukherjee
2015-12-20 17:28         ` One Thousand Gnomes [this message]
2015-12-20 16:43 ` One Thousand Gnomes
2015-12-20 17:28   ` Sudip Mukherjee
2015-12-20 17:42     ` One Thousand Gnomes
2015-12-21 15:19       ` Sudip Mukherjee
2015-12-21 18:28         ` Andy Shevchenko
2015-12-22  4:27           ` Sudip Mukherjee
2015-12-22  9:58             ` Andy Shevchenko
2015-12-22 10:08               ` Sudip Mukherjee
2015-12-22 10:15                 ` Andy Shevchenko
2015-12-22 10:37                   ` Sudip Mukherjee
2015-12-20 17:46     ` Andy Shevchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20151220172851.1b560da8@lxorguk.ukuu.org.uk \
    --to=gnomes@lxorguk.ukuu.org.uk \
    --cc=andy.shevchenko@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jslaby@suse.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=sudipm.mukherjee@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox