Skip to content

Commit

Permalink
pinctrl: Fix gpio/pin mapping for Meson8b
Browse files Browse the repository at this point in the history
The num_pins field in the struct meson_domain_data must include also the
missing pins in the Meson8b SoC, otherwise the GPIO <-> pin mapping is
broken on this platform. Avoid also the dinamic allocation for GPIOs.

Signed-off-by: Carlo Caione <carlo@endlessm.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
  • Loading branch information
Carlo Caione authored and Linus Walleij committed May 19, 2015
1 parent 75e9143 commit 984cffd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion drivers/pinctrl/meson/pinctrl-meson.c
Original file line number Diff line number Diff line change
Expand Up @@ -569,7 +569,7 @@ static int meson_gpiolib_register(struct meson_pinctrl *pc)
domain->chip.direction_output = meson_gpio_direction_output;
domain->chip.get = meson_gpio_get;
domain->chip.set = meson_gpio_set;
domain->chip.base = -1;
domain->chip.base = domain->data->pin_base;
domain->chip.ngpio = domain->data->num_pins;
domain->chip.can_sleep = false;
domain->chip.of_node = domain->of_node;
Expand Down
4 changes: 2 additions & 2 deletions drivers/pinctrl/meson/pinctrl-meson8b.c
Original file line number Diff line number Diff line change
Expand Up @@ -876,13 +876,13 @@ static struct meson_domain_data meson8b_domain_data[] = {
.banks = meson8b_banks,
.num_banks = ARRAY_SIZE(meson8b_banks),
.pin_base = 0,
.num_pins = 83,
.num_pins = 130,
},
{
.name = "ao-bank",
.banks = meson8b_ao_banks,
.num_banks = ARRAY_SIZE(meson8b_ao_banks),
.pin_base = 83,
.pin_base = 130,
.num_pins = 16,
},
};
Expand Down

0 comments on commit 984cffd

Please sign in to comment.