mirror of
https://github.com/brain-hackers/u-boot-brain
synced 2024-09-27 23:20:26 +09:00
pinctrl: meson-axg-pmx: fix gpio request
The AXG pmx driver gpio request offset needs the pin base to have the correct pin number. Signed-off-by: Neil Armstrong <narmstrong@baylibre.com> Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
This commit is contained in:
parent
adbff64af7
commit
0f6bef4a95
@ -165,7 +165,10 @@ const struct pinctrl_ops meson_axg_pinctrl_ops = {
|
|||||||
static int meson_axg_gpio_request(struct udevice *dev,
|
static int meson_axg_gpio_request(struct udevice *dev,
|
||||||
unsigned int offset, const char *label)
|
unsigned int offset, const char *label)
|
||||||
{
|
{
|
||||||
return meson_axg_pmx_update_function(dev->parent, offset, 0);
|
struct meson_pinctrl *priv = dev_get_priv(dev->parent);
|
||||||
|
|
||||||
|
return meson_axg_pmx_update_function(dev->parent,
|
||||||
|
offset + priv->data->pin_base, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static const struct dm_gpio_ops meson_axg_gpio_ops = {
|
static const struct dm_gpio_ops meson_axg_gpio_ops = {
|
||||||
|
Loading…
Reference in New Issue
Block a user