From: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: Alexandre Courbot <gnurou@gmail.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Jiri Slaby <jslaby@suse.com>,
Andy Shevchenko <andy.shevchenko@gmail.com>,
One Thousand Gnomes <gnomes@lxorguk.ukuu.org.uk>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-serial@vger.kernel.org" <linux-serial@vger.kernel.org>,
"linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>
Subject: Re: [PATCH v7 1/3] gpio: exar: add gpio for exar cards
Date: Mon, 09 Jan 2017 21:18:20 +0000 [thread overview]
Message-ID: <5873FE1C.8060407@gmail.com> (raw)
In-Reply-To: <CACRpkdaBJteocVSUazhz0zYtXeBKSVekEkxGfpDNAoqN04A77Q@mail.gmail.com>
On Monday 09 January 2017 10:35 AM, Linus Walleij wrote:
> On Sun, Jan 8, 2017 at 12:57 AM, 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 the gpio specific code.
>>
>> Signed-off-by: Sudip Mukherjee <sudip.mukherjee@codethink.co.uk>
>
> Will I be able to merge this independently to the GPIO trees
> once we are done with review? (Looks like so...)
Yes, there should not be any dependency on the tty.
>
>> +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
>
> Is this really useful?
no, initially I used pr_*, but then that was converted to dev_*.
>
>> +#include <linux/device.h>
>> +#include <linux/gpio.h>
>
> No use:
> #include <linux/gpio/driver.h>
> ONLY
>
>> +static LIST_HEAD(exar_list);
>> +static DEFINE_MUTEX(exar_list_mtx);
>> +DEFINE_IDA(ida_index);
>
> What is this? A local list? I can understand the IDA index but in
> general, follow the state container pattern instead:
> Documentation/driver-model/design-patterns.txt
The local list is not doing anything now, after I have moved to using
ida. But I will need the ida_index here to have the device number incase
of multiple devices.
regards
sudip
next prev parent reply other threads:[~2017-01-09 21:18 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-07 23:57 [PATCH v7 0/3] add gpio support to exar Sudip Mukherjee
2017-01-07 23:57 ` [PATCH v7 1/3] gpio: exar: add gpio for exar cards Sudip Mukherjee
2017-01-09 10:35 ` Linus Walleij
2017-01-09 21:18 ` Sudip Mukherjee [this message]
2017-01-07 23:57 ` [PATCH v7 2/3] serial: exar: split out the exar code from 8250_pci Sudip Mukherjee
2017-01-08 1:02 ` Andy Shevchenko
2017-01-08 11:11 ` Sudip Mukherjee
2017-01-07 23:57 ` [PATCH v7 3/3] serial: 8250_pci: remove exar code Sudip Mukherjee
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=5873FE1C.8060407@gmail.com \
--to=sudipm.mukherjee@gmail.com \
--cc=andy.shevchenko@gmail.com \
--cc=gnomes@lxorguk.ukuu.org.uk \
--cc=gnurou@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=jslaby@suse.com \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).