mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-12-03 09:59:44 +00:00
886d36efdb
This should use the provided U_BOOT_DRIVER() macro so that the driver gets
added to the appropriate linker list. Fix it.
Signed-off-by: Simon Glass <sjg@chromium.org>
Fixes: 7c9dcfed50
("pinctrl: meson: rework gx pmx function")
Reported-by: Tom Rini <trini@konsulko.com>
Tested-by: Tom Rini <trini@konsulko.com> on libretech-cc
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
48 lines
1 KiB
C
48 lines
1 KiB
C
/* SPDX-License-Identifier: GPL-2.0+ */
|
|
/*
|
|
* Copyright (C) 2014 Beniamino Galvani <b.galvani@gmail.com>
|
|
* Copyright (C) 2017 Jerome Brunet <jbrunet@baylibre.com>
|
|
*/
|
|
|
|
#ifndef __PINCTRL_MESON_GX_H__
|
|
#define __PINCTRL_MESON_GX_H__
|
|
|
|
#include "pinctrl-meson.h"
|
|
|
|
struct meson_gx_pmx_data {
|
|
bool is_gpio;
|
|
unsigned int reg;
|
|
unsigned int bit;
|
|
};
|
|
|
|
#define PMX_DATA(r, b, g) \
|
|
{ \
|
|
.reg = r, \
|
|
.bit = b, \
|
|
.is_gpio = g, \
|
|
}
|
|
|
|
#define GROUP(grp, r, b) \
|
|
{ \
|
|
.name = #grp, \
|
|
.pins = grp ## _pins, \
|
|
.num_pins = ARRAY_SIZE(grp ## _pins), \
|
|
.data = (const struct meson_gx_pmx_data[]){ \
|
|
PMX_DATA(r, b, false), \
|
|
}, \
|
|
}
|
|
|
|
#define GPIO_GROUP(gpio, b) \
|
|
{ \
|
|
.name = #gpio, \
|
|
.pins = (const unsigned int[]){ PIN(gpio, b) }, \
|
|
.num_pins = 1, \
|
|
.data = (const struct meson_gx_pmx_data[]){ \
|
|
PMX_DATA(0, 0, true), \
|
|
}, \
|
|
}
|
|
|
|
extern const struct pinctrl_ops meson_gx_pinctrl_ops;
|
|
extern U_BOOT_DRIVER(meson_gx_gpio_driver);
|
|
|
|
#endif /* __PINCTRL_MESON_GX_H__ */
|