mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-08-30 11:03:07 -04:00
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:
committed by
Linus Walleij
parent
3f263f7636
commit
900b49e603
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
1486
drivers/pinctrl/airoha/pinctrl-an7581.c
Normal file
1486
drivers/pinctrl/airoha/pinctrl-an7581.c
Normal file
File diff suppressed because it is too large
Load Diff
1476
drivers/pinctrl/airoha/pinctrl-an7583.c
Normal file
1476
drivers/pinctrl/airoha/pinctrl-an7583.c
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user