[PATCH 18/42] meson: Correct driver declaration for meson_axg_gpio

Neil Armstrong neil.armstrong at linaro.org
Wed Jun 12 11:38:08 CEST 2024


On 11/06/2024 22:01, Simon Glass wrote:
> This should use the driver macros so that the driver appears in the
> linker list. Fix this.
> 
> Fixes: 8587839f19d ("pinctrl: meson: add axg support")
> 
> Signed-off-by: Simon Glass <sjg at chromium.org>
> ---
> 
>   drivers/pinctrl/meson/pinctrl-meson-axg-pmx.c | 2 +-
>   drivers/pinctrl/meson/pinctrl-meson-axg.c     | 4 ++--
>   drivers/pinctrl/meson/pinctrl-meson-axg.h     | 2 +-
>   drivers/pinctrl/meson/pinctrl-meson-g12a.c    | 4 ++--
>   4 files changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/pinctrl/meson/pinctrl-meson-axg-pmx.c b/drivers/pinctrl/meson/pinctrl-meson-axg-pmx.c
> index 52c726cf038..15ebd574ef1 100644
> --- a/drivers/pinctrl/meson/pinctrl-meson-axg-pmx.c
> +++ b/drivers/pinctrl/meson/pinctrl-meson-axg-pmx.c
> @@ -179,7 +179,7 @@ static const struct dm_gpio_ops meson_axg_gpio_ops = {
>   	.direction_output = meson_gpio_direction_output,
>   };
>   
> -const struct driver meson_axg_gpio_driver = {
> +U_BOOT_DRIVER(meson_axg_gpio) = {
>   	.name	= "meson-axg-gpio",
>   	.id	= UCLASS_GPIO,
>   	.probe	= meson_gpio_probe,
> diff --git a/drivers/pinctrl/meson/pinctrl-meson-axg.c b/drivers/pinctrl/meson/pinctrl-meson-axg.c
> index 94e09cd3f8a..ed3f92b2d75 100644
> --- a/drivers/pinctrl/meson/pinctrl-meson-axg.c
> +++ b/drivers/pinctrl/meson/pinctrl-meson-axg.c
> @@ -939,7 +939,7 @@ struct meson_pinctrl_data meson_axg_periphs_pinctrl_data = {
>   	.num_groups	= ARRAY_SIZE(meson_axg_periphs_groups),
>   	.num_funcs	= ARRAY_SIZE(meson_axg_periphs_functions),
>   	.num_banks	= ARRAY_SIZE(meson_axg_periphs_banks),
> -	.gpio_driver	= &meson_axg_gpio_driver,
> +	.gpio_driver	= DM_DRIVER_REF(meson_axg_gpio),
>   	.pmx_data	= &meson_axg_periphs_pmx_banks_data,
>   };
>   
> @@ -953,7 +953,7 @@ struct meson_pinctrl_data meson_axg_aobus_pinctrl_data = {
>   	.num_groups	= ARRAY_SIZE(meson_axg_aobus_groups),
>   	.num_funcs	= ARRAY_SIZE(meson_axg_aobus_functions),
>   	.num_banks	= ARRAY_SIZE(meson_axg_aobus_banks),
> -	.gpio_driver	= &meson_axg_gpio_driver,
> +	.gpio_driver	= DM_DRIVER_REF(meson_axg_gpio),
>   	.pmx_data	= &meson_axg_aobus_pmx_banks_data,
>   };
>   
> diff --git a/drivers/pinctrl/meson/pinctrl-meson-axg.h b/drivers/pinctrl/meson/pinctrl-meson-axg.h
> index c8d2b3af036..a6581bab500 100644
> --- a/drivers/pinctrl/meson/pinctrl-meson-axg.h
> +++ b/drivers/pinctrl/meson/pinctrl-meson-axg.h
> @@ -61,6 +61,6 @@ struct meson_pmx_axg_data {
>   	}
>   
>   extern const struct pinctrl_ops meson_axg_pinctrl_ops;
> -extern const struct driver meson_axg_gpio_driver;
> +extern U_BOOT_DRIVER(meson_axg_gpio);
>   
>   #endif /* __PINCTRL_MESON_AXG_H__ */
> diff --git a/drivers/pinctrl/meson/pinctrl-meson-g12a.c b/drivers/pinctrl/meson/pinctrl-meson-g12a.c
> index 24f47f82558..67114df6824 100644
> --- a/drivers/pinctrl/meson/pinctrl-meson-g12a.c
> +++ b/drivers/pinctrl/meson/pinctrl-meson-g12a.c
> @@ -1253,7 +1253,7 @@ static struct meson_pinctrl_data meson_g12a_periphs_pinctrl_data = {
>   	.num_groups	= ARRAY_SIZE(meson_g12a_periphs_groups),
>   	.num_funcs	= ARRAY_SIZE(meson_g12a_periphs_functions),
>   	.num_banks	= ARRAY_SIZE(meson_g12a_periphs_banks),
> -	.gpio_driver	= &meson_axg_gpio_driver,
> +	.gpio_driver	= DM_DRIVER_REF(meson_axg_gpio),
>   	.pmx_data	= &meson_g12a_periphs_pmx_banks_data,
>   };
>   
> @@ -1267,7 +1267,7 @@ static struct meson_pinctrl_data meson_g12a_aobus_pinctrl_data = {
>   	.num_groups	= ARRAY_SIZE(meson_g12a_aobus_groups),
>   	.num_funcs	= ARRAY_SIZE(meson_g12a_aobus_functions),
>   	.num_banks	= ARRAY_SIZE(meson_g12a_aobus_banks),
> -	.gpio_driver	= &meson_axg_gpio_driver,
> +	.gpio_driver	= DM_DRIVER_REF(meson_axg_gpio),
>   	.pmx_data	= &meson_g12a_aobus_pmx_banks_data,
>   };
>   

Reviewed-by: Neil Armstrong <neil.armstrong at linaro.org>


More information about the U-Boot mailing list