lkml.org 
[lkml]   [2015]   [Feb]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH 3/3] gpio: pxa: add PXA1928 gpio type support
From
On Tue, Jan 27, 2015 at 5:46 AM, Rob Herring <robh@kernel.org> wrote:

> Add support for PXA1928 GPIOs. The PXA1928 adds a 6th bank from previous
> generations.
>
> Signed-off-by: Jing Xiang <jxiang@marvell.com>
> Signed-off-by: Xiangzhan Meng <mengxzh@marvell.com>
> [robh: ported to 3.19 from vendor kernel]
> Signed-off-by: Rob Herring <robh@kernel.org>
> Cc: Linus Walleij <linus.walleij@linaro.org>
> Cc: Alexandre Courbot <gnurou@gmail.com>

Patch applied...

> -#define BANK_OFF(n) (((n) < 3) ? (n) << 2 : 0x100 + (((n) - 3) << 2))
> +#define BANK_OFF(n) (((n) < 3) ? (n) << 2 : ((n) > 5 ? 0x200 : 0x100) \
> + + (((n) % 3) << 2))

While this is a bit convoluted.

Someone care to send a patch converting it to something like a
parseable static inline?

Yours,
Linus Walleij


\
 
 \ /
  Last update: 2015-02-03 14:01    [W:0.063 / U:0.236 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site