[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <5873FE1C.8060407@gmail.com>
Date: Mon, 09 Jan 2017 21:18:20 +0000
From: Sudip Mukherjee <sudipm.mukherjee@...il.com>
To: Linus Walleij <linus.walleij@...aro.org>
CC: Alexandre Courbot <gnurou@...il.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Jiri Slaby <jslaby@...e.com>,
Andy Shevchenko <andy.shevchenko@...il.com>,
One Thousand Gnomes <gnomes@...rguk.ukuu.org.uk>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-serial@...r.kernel.org" <linux-serial@...r.kernel.org>,
"linux-gpio@...r.kernel.org" <linux-gpio@...r.kernel.org>
Subject: Re: [PATCH v7 1/3] gpio: exar: add gpio for exar cards
On Monday 09 January 2017 10:35 AM, Linus Walleij wrote:
> On Sun, Jan 8, 2017 at 12:57 AM, Sudip Mukherjee
> <sudipm.mukherjee@...il.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@...ethink.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
Powered by blists - more mailing lists