pinctrl: imx: Push imx_pinctrl_ops into drivers and staticize

Move imx_pinctrl_ops into drivers and staticize. This is preparatory
patch for follow up pinctrl drivers which will not use this variant
of imx_pinctrl_ops content. This should not change size, as most of
the deployments compiled in one pinctrl driver anyway. No functional
change.

Signed-off-by: Marek Vasut <marex@denx.de>
This commit is contained in:
Marek Vasut
2025-01-24 15:50:50 +01:00
committed by Fabio Estevam
parent 24b575bc4f
commit a27409be4d
12 changed files with 43 additions and 7 deletions

View File

@@ -18,7 +18,7 @@
DECLARE_GLOBAL_DATA_PTR;
static int imx_pinctrl_set_state(struct udevice *dev, struct udevice *config)
int imx_pinctrl_set_state(struct udevice *dev, struct udevice *config)
{
struct imx_pinctrl_priv *priv = dev_get_priv(dev);
struct imx_pinctrl_soc_info *info = priv->info;
@@ -194,10 +194,6 @@ static int imx_pinctrl_set_state(struct udevice *dev, struct udevice *config)
return 0;
}
const struct pinctrl_ops imx_pinctrl_ops = {
.set_state = imx_pinctrl_set_state,
};
int imx_pinctrl_probe(struct udevice *dev,
struct imx_pinctrl_soc_info *info)
{

View File

@@ -28,8 +28,6 @@ struct imx_pinctrl_priv {
struct imx_pinctrl_soc_info *info;
};
extern const struct pinctrl_ops imx_pinctrl_ops;
#define IMX_NO_PAD_CTL 0x80000000 /* no pin config need */
#define IMX_PAD_SION 0x40000000 /* set SION */
@@ -54,6 +52,8 @@ int imx_pinctrl_probe(struct udevice *dev, struct imx_pinctrl_soc_info *info);
int imx_pinctrl_remove(struct udevice *dev);
int imx_pinctrl_set_state(struct udevice *dev, struct udevice *config);
#ifdef CONFIG_PINCTRL_IMX_SCU
int imx_pinctrl_scu_conf_pins(struct imx_pinctrl_soc_info *info,
u32 *pin_data, int npins);

View File

@@ -31,6 +31,10 @@ static const struct udevice_id imx5_pinctrl_match[] = {
{ /* sentinel */ }
};
static const struct pinctrl_ops imx_pinctrl_ops = {
.set_state = imx_pinctrl_set_state,
};
U_BOOT_DRIVER(imx5_pinctrl) = {
.name = "imx5-pinctrl",
.id = UCLASS_PINCTRL,

View File

@@ -40,6 +40,10 @@ static const struct udevice_id imx6_pinctrl_match[] = {
{ /* sentinel */ }
};
static const struct pinctrl_ops imx_pinctrl_ops = {
.set_state = imx_pinctrl_set_state,
};
U_BOOT_DRIVER(fsl_imx6q_iomuxc) = {
.name = "fsl_imx6q_iomuxc",
.id = UCLASS_PINCTRL,

View File

@@ -28,6 +28,10 @@ static const struct udevice_id imx7_pinctrl_match[] = {
{ /* sentinel */ }
};
static const struct pinctrl_ops imx_pinctrl_ops = {
.set_state = imx_pinctrl_set_state,
};
U_BOOT_DRIVER(imx7_pinctrl) = {
.name = "imx7-pinctrl",
.id = UCLASS_PINCTRL,

View File

@@ -32,6 +32,10 @@ static const struct udevice_id imx7ulp_pinctrl_match[] = {
{ /* sentinel */ }
};
static const struct pinctrl_ops imx_pinctrl_ops = {
.set_state = imx_pinctrl_set_state,
};
U_BOOT_DRIVER(imx7ulp_pinctrl) = {
.name = "imx7ulp-pinctrl",
.id = UCLASS_PINCTRL,

View File

@@ -29,6 +29,10 @@ static const struct udevice_id imx8_pinctrl_match[] = {
{ /* sentinel */ }
};
static const struct pinctrl_ops imx_pinctrl_ops = {
.set_state = imx_pinctrl_set_state,
};
U_BOOT_DRIVER(imx8_pinctrl) = {
.name = "imx8_pinctrl",
.id = UCLASS_PINCTRL,

View File

@@ -26,6 +26,10 @@ static const struct udevice_id imx8m_pinctrl_match[] = {
{ /* sentinel */ }
};
static const struct pinctrl_ops imx_pinctrl_ops = {
.set_state = imx_pinctrl_set_state,
};
U_BOOT_DRIVER(imx8mq_pinctrl) = {
.name = "imx8mq-pinctrl",
.id = UCLASS_PINCTRL,

View File

@@ -31,6 +31,10 @@ static const struct udevice_id imx8ulp_pinctrl_match[] = {
{ /* sentinel */ }
};
static const struct pinctrl_ops imx_pinctrl_ops = {
.set_state = imx_pinctrl_set_state,
};
U_BOOT_DRIVER(imx8ulp_pinctrl) = {
.name = "imx8ulp-pinctrl",
.id = UCLASS_PINCTRL,

View File

@@ -26,6 +26,10 @@ static const struct udevice_id imx93_pinctrl_match[] = {
{ /* sentinel */ }
};
static const struct pinctrl_ops imx_pinctrl_ops = {
.set_state = imx_pinctrl_set_state,
};
U_BOOT_DRIVER(imx93_pinctrl) = {
.name = "imx93-pinctrl",
.id = UCLASS_PINCTRL,

View File

@@ -27,6 +27,10 @@ static const struct udevice_id imxrt_pinctrl_match[] = {
{ /* sentinel */ }
};
static const struct pinctrl_ops imx_pinctrl_ops = {
.set_state = imx_pinctrl_set_state,
};
U_BOOT_DRIVER(imxrt_pinctrl) = {
.name = "imxrt-pinctrl",
.id = UCLASS_PINCTRL,

View File

@@ -27,6 +27,10 @@ static const struct udevice_id vf610_pinctrl_match[] = {
{ /* sentinel */ }
};
static const struct pinctrl_ops imx_pinctrl_ops = {
.set_state = imx_pinctrl_set_state,
};
U_BOOT_DRIVER(vf610_pinctrl) = {
.name = "vf610-pinctrl",
.id = UCLASS_PINCTRL,