linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Linus Walleij <linus.walleij@linaro.org>,
	Lars-Peter Clausen <lars@metafoo.de>,
	Mika Westerberg <mika.westerberg@linux.intel.com>,
	linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] gpio: add gpio_add_lookup_tables() to add several tables at once
Date: Wed, 02 Aug 2017 15:06:10 +0300	[thread overview]
Message-ID: <1501675570.29303.353.camel@linux.intel.com> (raw)
In-Reply-To: <20170801192418.GE28401@dtor-ws>

On Tue, 2017-08-01 at 12:24 -0700, Dmitry Torokhov wrote:
> On Wed, Jul 26, 2017 at 01:21:37PM +0300, Andy Shevchenko wrote:
> > On Tue, 2017-07-25 at 13:58 -0700, Dmitry Torokhov wrote:
> > > When converting legacy board to use gpiod API() there migt be
> > > several
> > > lookup tables in board file, let's provide a way to register them
> > > all
> > > at
> > > once.
> > 
> > Looking into the code which is using several GPIO look up tables I
> > noticed that the pattern often something like
> > 
> > 
> > gpiod_add_lookup_table(x_tbl);
> > platform_device_register(x_dev);
> > 
> > ...
> > 
> > gpiod_add_lookup_table(y_tbl);
> > platform_device_register(y_dev);
> > 
> > which looks also logical.
> > 
> > So, I have no strong opinion here, though it would be nice to have
> > an
> > example where it makes sense.
> 
> Here is an example. It actually does not have multiple GPIO tables,
> but
> it allows to keep the structure of init sequence for the board, which
> relies on having series of arrays conditionally populated with devices
> and other data that need to be registered.

I see your point. Okay, no objections from me.

Please, add a stub for !GPIOLIB case.

After addressing it, 

Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

-- 
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Intel Finland Oy

  reply	other threads:[~2017-08-02 12:09 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-25 20:58 [PATCH] gpio: add gpio_add_lookup_tables() to add several tables at once Dmitry Torokhov
2017-07-26 10:21 ` Andy Shevchenko
2017-08-01 19:24   ` Dmitry Torokhov
2017-08-02 12:06     ` Andy Shevchenko [this message]
2017-08-07 12:18       ` Linus Walleij
2017-08-02  8:38 ` Mika Westerberg

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=1501675570.29303.353.camel@linux.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=lars@metafoo.de \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mika.westerberg@linux.intel.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;
as well as URLs for NNTP newsgroup(s).