lkml.org 
[lkml]   [2014]   [Jan]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] gpio: bcm281xx: Fix parameter name for GPIO_CONTROL macro
From
On Wed, Jan 22, 2014 at 1:10 AM, Markus Mayer <markus.mayer@linaro.org> wrote:

> The GPIO_CONTROL macro returns the control register offset when given a
> GPIO number.
>
> Update the argument name in the macro to reflect that it takes in a
> GPIO number and not a bank.
>
> Signed-off-by: Markus Mayer <markus.mayer@linaro.org>
> Reviewed-by: Tim Kryger <tim.kryger@linaro.org>
(...)
> +/* There is a GPIO control register for each GPIO */
> +#define GPIO_CONTROL(gpio) (0x00000100 + ((gpio) << 2))

Technically I prefer naming this parameter "offset" rather than
"gpio" as it is the offset of a GPIO line in *this* very GPIO
HW block rather than a GPIO number from the global
GPIO number space.

But it's no big deal, so patch applied.

Yours,
Linus Walleij


\
 
 \ /
  Last update: 2014-01-23 10:01    [W:0.025 / U:0.424 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site