Re: [PATCH] gpio: bcm281xx: Fix parameter name for GPIO_CONTROL macro

From: Linus Walleij
Date: Thu Jan 23 2014 - 03:20:26 EST


On Wed, Jan 22, 2014 at 1:10 AM, Markus Mayer <markus.mayer@xxxxxxxxxx> 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@xxxxxxxxxx>
> Reviewed-by: Tim Kryger <tim.kryger@xxxxxxxxxx>
(...)
> +/* 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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/