pinctrl: airoha: split driver on shared code and SoC specific drivers

Split combined an7581/an7583 source file on a
 * shared pinctrl code (pinctrl-airoha.c)
 * an7581 specific pinctrl driver (pinctrl-an7581.c)
 * an7583 specific pinctrl driver (pinctrl-an7583.c)

Ininialization code was adapted a bit to work properly for shared
and SoC specific cases.

Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu>
Signed-off-by: Linus Walleij <linusw@kernel.org>
This commit is contained in:
Mikhail Kshevetskiy
2026-08-07 01:06:03 +03:00
committed by Linus Walleij
parent 3f263f7636
commit 900b49e603
6 changed files with 2999 additions and 2374 deletions

View File

@@ -3,9 +3,9 @@ menu "Airoha pinctrl drivers"
depends on ARCH_AIROHA || COMPILE_TEST
config PINCTRL_AIROHA
tristate "Airoha EN7581 pin control"
tristate "Airoha pin control"
depends on OF
depends on ARM64 || COMPILE_TEST
depends on ARCH_AIROHA || COMPILE_TEST
select PINMUX
select GENERIC_PINCONF
select GENERIC_PINCTRL_GROUPS
@@ -13,8 +13,26 @@ config PINCTRL_AIROHA
select GPIOLIB
select GPIOLIB_IRQCHIP
select REGMAP_MMIO
imply PINCTRL_AIROHA_AN7581
imply PINCTRL_AIROHA_AN7583
help
Shared pin controller and gpio driver code for different
Airoha SoCs.
config PINCTRL_AIROHA_AN7581
tristate "AN7581 pinctrl"
depends on ARM64 || COMPILE_TEST
depends on PINCTRL_AIROHA
help
Say yes here to support pin controller and gpio driver
on Airoha EN7581 SoC.
on Airoha AN7581, AN7566, AN7551 and other compatible SoCs.
config PINCTRL_AIROHA_AN7583
tristate "AN7583 pinctrl"
depends on ARM64 || COMPILE_TEST
depends on PINCTRL_AIROHA
help
Say yes here to support pin controller and gpio driver
on Airoha AN7583, AN7553, AN7567 and other compatible SoCs.
endmenu

View File

@@ -1,3 +1,8 @@
# SPDX-License-Identifier: GPL-2.0
# shared code
obj-$(CONFIG_PINCTRL_AIROHA) += pinctrl-airoha.o
# SoC drivers
obj-$(CONFIG_PINCTRL_AIROHA_AN7581) += pinctrl-an7581.o
obj-$(CONFIG_PINCTRL_AIROHA_AN7583) += pinctrl-an7583.o

View File

@@ -130,6 +130,8 @@ struct airoha_pinctrl {
};
struct airoha_pinctrl_match_data {
const char *pinctrl_name;
struct module *pinctrl_owner;
const struct pinctrl_pin_desc *pins;
const unsigned int num_pins;
const struct pingroup *grps;
@@ -139,4 +141,6 @@ struct airoha_pinctrl_match_data {
const struct airoha_pinctrl_confs_info confs_info[AIROHA_PINCTRL_CONFS_MAX];
};
int airoha_pinctrl_probe(struct platform_device *pdev);
#endif

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff