[lkml]   [2013]   [Dec]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH v3] gpio: better lookup method for platform GPIOs
On Tue, Dec 3, 2013 at 4:20 AM, Alexandre Courbot <> wrote:

> Change the format of the platform GPIO lookup tables to make them less
> confusing and improve lookup efficiency.
> The previous format was a single linked-list that required to compare
> the device name and function ID of every single GPIO defined for each
> lookup. Switch that to a list of per-device tables, so that the lookup
> can be done in two steps, omitting the GPIOs that are not relevant for a
> particular device.
> The matching rules are now defined as follows:
> - The device name must match *exactly*, and can be NULL for GPIOs not
> assigned to a particular device,
> - If the function ID in the lookup table is NULL, the con_id argument of
> gpiod_get() will not be used for lookup. However, if it is defined, it
> must match exactly.
> - The index must always match.
> Signed-off-by: Alexandre Courbot <>
> Acked-by: Mika Westerberg <>
> Reviewed-by: Andy Shevchenko <>
> ---
> Changes since v2:
> - Removed size member of the gpiod_lookup_table struct (thanks Heikki!)
> - Added Andy's reviewed-by

OK looks good, however I must get my fixes stack to Torvalds
and pull -rc3 back in before I can apply this, it seems, as
it builds upon pending fixes.

Linus Walleij

 \ /
  Last update: 2013-12-03 13:21    [W:0.074 / U:0.716 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site