Re: [PATCH] gpiolib: Add support for Wolfson Microelectronics Arizonaclass devices

From: Linus Walleij
Date: Mon Jun 25 2012 - 15:13:56 EST


On Sat, Jun 23, 2012 at 8:29 PM, Mark Brown
<broonie@xxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote:

I'm uncertain when it comes to the semantics of these babies,
and can't really tell what's going on:

> +       return regmap_update_bits(arizona->regmap, ARIZONA_GPIO1_CTRL + offset,
> +                                 ARIZONA_GPN_DIR, ARIZONA_GPN_DIR);
(...)
> +       return regmap_update_bits(arizona->regmap, ARIZONA_GPIO1_CTRL + offset,
> +                                 ARIZONA_GPN_DIR | ARIZONA_GPN_LVL, value);
(...)
> +       regmap_update_bits(arizona->regmap, ARIZONA_GPIO1_CTRL + offset,
> +                          ARIZONA_GPN_LVL, value);

I'm guessing that regmap is caching, selectively updating volatile
regs and marshalling the writes in the background.

The rest looks simple and flawless, and of course I trust that you're
doing the right thing with regmap anyway so:
Acked-by: Linus Walleij <linus.walleij@xxxxxxxxxx>

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/