All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andy.shevchenko@gmail.com>
To: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Cc: 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>,
	One Thousand Gnomes <gnomes@lxorguk.ukuu.org.uk>
Subject: Re: [PATCH v3] serial: 8250: add gpio support to exar
Date: Sun, 20 Dec 2015 17:05:54 +0200	[thread overview]
Message-ID: <CAHp75VcuUrpmfEHcNqtgOkOT3wf52KnF4=R0JF80+2X2AVhMNQ@mail.gmail.com> (raw)
In-Reply-To: <20151220144722.GA26499@sudip-pc>

On Sun, Dec 20, 2015 at 4:47 PM, Sudip Mukherjee
<sudipm.mukherjee@gmail.com> 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
>> <sudipm.mukherjee@gmail.com> 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.


>> > +err_destroy:
>> > +       mutex_unlock(&exar_mtx);
>> > +       mutex_destroy(&exar_gpio->lock);
>> > +err_unmap:
>> > +       iounmap(p);
>>
>> pci_iounmap?
>
> I thought about pci_iounmap but I saw that most of the code in
> 8250_pci.c is using iounmap, so i went in favor of the majority.
> Will change it.

Okay, let maintainers speak about it,

>> > +static void __exit exar_gpio_exit(void)
>> > +{
>> > +}
>> > +
>> > +module_exit(exar_gpio_exit);
>> > +
>> > +static int __init exar_gpio_init(void)
>> > +{
>> > +       return 0;
>> > +}
>> > +
>> > +module_init(exar_gpio_init);
>> > +
>>
>> Useless for now. You are using it as a library.
>
> Main doubt here. If I do not give the module_init() and module_exit()
> then what entry do i keep in the Kconfig?

I don't see any problem. It's already somehow classical approach in
the drivers when core part is represented as a library (one example
comes immediately to my mind is drivers/dma/dw/core.c, I think you may
find much more in the kernel sources).

> In this v3, it is kept as
> tristate. Should that be bool then?

No, why?


-- 
With Best Regards,
Andy Shevchenko

  reply	other threads:[~2015-12-20 15:05 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 [this message]
2015-12-20 16:41     ` One Thousand Gnomes
2015-12-20 17:11       ` Sudip Mukherjee
2015-12-20 17:28         ` One Thousand Gnomes
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='CAHp75VcuUrpmfEHcNqtgOkOT3wf52KnF4=R0JF80+2X2AVhMNQ@mail.gmail.com' \
    --to=andy.shevchenko@gmail.com \
    --cc=gnomes@lxorguk.ukuu.org.uk \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.