[alsa-devel] [PATCH 2/2] sound: soc: wm8903: Cut gpio_base data

Linus Walleij linus.walleij at linaro.org
Wed Sep 19 01:51:23 CEST 2018


On Tue, Sep 18, 2018 at 12:52 PM Mark Brown <broonie at kernel.org> wrote:
> On Tue, Sep 18, 2018 at 12:12:33PM -0700, Linus Walleij wrote:
> > This variable is only used inside the file, and we should
> > never hard-code the GPIO base, so delete this.
>
> Adding the Cirrus people again...

Sorry about all beginners mistakes :/

> hard coding the GPIO base is needed
> for board file based systems if they're using GPIO numbers isn't it?

It is needed if there are board files hardcoding GPIOs referencing
the global number range on this specific gpiochip.

Since there are no boards defining platform data (hence patch 1)
I assume all users are using device tree and thus dynamic
GPIO number assignment, so this can go.

Even if new board files are added they should use machine
descriptor tables for referencing the individual GPIO chip and
offset. In this case by the label "wm8903" and local offset.

Yours,
Linus Walleij


More information about the Alsa-devel mailing list