Skip to content

Commit 0b46b04

Browse files
committed
Merge tag 'pinctrl-v6.14-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl
Pull pin control fixes from Linus Walleij: - Fix the regmap settings for bcm281xx, this was missing the stride - NULL check for the Nuvoton npcm8xx devm_kasprintf() - Enable the Spacemit pin controller by default in the SoC config. The SoC will not boot without it so this one is pretty much required * tag 'pinctrl-v6.14-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: pinctrl: spacemit: enable config option pinctrl: nuvoton: npcm8xx: Add NULL check in npcm8xx_gpio_fw pinctrl: bcm281xx: Fix incorrect regmap max_registers value
2 parents 4d872d5 + 7ff4fab commit 0b46b04

File tree

5 files changed

+8
-3
lines changed

5 files changed

+8
-3
lines changed

arch/riscv/Kconfig.socs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ config ARCH_SOPHGO
2626

2727
config ARCH_SPACEMIT
2828
bool "SpacemiT SoCs"
29+
select PINCTRL
2930
help
3031
This enables support for SpacemiT SoC platform hardware.
3132

drivers/pinctrl/bcm/pinctrl-bcm281xx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -974,7 +974,7 @@ static const struct regmap_config bcm281xx_pinctrl_regmap_config = {
974974
.reg_bits = 32,
975975
.reg_stride = 4,
976976
.val_bits = 32,
977-
.max_register = BCM281XX_PIN_VC_CAM3_SDA,
977+
.max_register = BCM281XX_PIN_VC_CAM3_SDA * 4,
978978
};
979979

980980
static int bcm281xx_pinctrl_get_groups_count(struct pinctrl_dev *pctldev)

drivers/pinctrl/nuvoton/pinctrl-npcm8xx.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2374,6 +2374,9 @@ static int npcm8xx_gpio_fw(struct npcm8xx_pinctrl *pctrl)
23742374
pctrl->gpio_bank[id].gc.parent = dev;
23752375
pctrl->gpio_bank[id].gc.fwnode = child;
23762376
pctrl->gpio_bank[id].gc.label = devm_kasprintf(dev, GFP_KERNEL, "%pfw", child);
2377+
if (pctrl->gpio_bank[id].gc.label == NULL)
2378+
return -ENOMEM;
2379+
23772380
pctrl->gpio_bank[id].gc.dbg_show = npcmgpio_dbg_show;
23782381
pctrl->gpio_bank[id].direction_input = pctrl->gpio_bank[id].gc.direction_input;
23792382
pctrl->gpio_bank[id].gc.direction_input = npcmgpio_direction_input;

drivers/pinctrl/spacemit/Kconfig

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@
44
#
55

66
config PINCTRL_SPACEMIT_K1
7-
tristate "SpacemiT K1 SoC Pinctrl driver"
7+
bool "SpacemiT K1 SoC Pinctrl driver"
88
depends on ARCH_SPACEMIT || COMPILE_TEST
99
depends on OF
10+
default y
1011
select GENERIC_PINCTRL_GROUPS
1112
select GENERIC_PINMUX_FUNCTIONS
1213
select GENERIC_PINCONF

drivers/pinctrl/spacemit/pinctrl-k1.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1044,7 +1044,7 @@ static struct platform_driver k1_pinctrl_driver = {
10441044
.of_match_table = k1_pinctrl_ids,
10451045
},
10461046
};
1047-
module_platform_driver(k1_pinctrl_driver);
1047+
builtin_platform_driver(k1_pinctrl_driver);
10481048

10491049
MODULE_AUTHOR("Yixun Lan <dlan@gentoo.org>");
10501050
MODULE_DESCRIPTION("Pinctrl driver for the SpacemiT K1 SoC");

0 commit comments

Comments
 (0)