* [PATCH 0/3] pinctrl: pic32: allow driver to be compiled with COMPILE_TEST
@ 2026-02-22 23:33 Brian Masney
2026-02-22 23:33 ` [PATCH 1/3] pinctrl: pic32: change all cases of bare 'unsigned' to 'unsigned int' Brian Masney
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: Brian Masney @ 2026-02-22 23:33 UTC (permalink / raw)
To: Linus Walleij, Bartosz Golaszewski, Joshua Henderson
Cc: linux-gpio, linux-kernel, Brian Masney
While migrating a pic32 clk driver off of a legacy API, I mistakenly
broke one of the drivers, and the issue could have been caught with a
simple compile test. Now that the dependent patches have been merged
into Linus's tree via the MIPS tree, we can now enable COMPILE_TEST
for all of pic32 drivers in this subsystem.
While changes are being made to this driver, let's also fix any
outstanding checkpatch.pl errors with this driver.
Signed-off-by: Brian Masney <bmasney@redhat.com>
---
Brian Masney (3):
pinctrl: pic32: change all cases of bare 'unsigned' to 'unsigned int'
pinctrl: pic32: use consistent spacing around '+'
pinctrl: pic32: allow driver to be compiled with COMPILE_TEST
drivers/pinctrl/Kconfig | 2 +-
drivers/pinctrl/pinctrl-pic32.c | 42 ++++++++++++++++++++---------------------
2 files changed, 22 insertions(+), 22 deletions(-)
---
base-commit: 6de23f81a5e08be8fbf5e8d7e9febc72a5b5f27f
change-id: 20260222-pinctrl-pic32-dcb7051a882b
Best regards,
--
Brian Masney <bmasney@redhat.com>
^ permalink raw reply [flat|nested] 6+ messages in thread* [PATCH 1/3] pinctrl: pic32: change all cases of bare 'unsigned' to 'unsigned int' 2026-02-22 23:33 [PATCH 0/3] pinctrl: pic32: allow driver to be compiled with COMPILE_TEST Brian Masney @ 2026-02-22 23:33 ` Brian Masney 2026-02-22 23:33 ` [PATCH 2/3] pinctrl: pic32: use consistent spacing around '+' Brian Masney ` (3 subsequent siblings) 4 siblings, 0 replies; 6+ messages in thread From: Brian Masney @ 2026-02-22 23:33 UTC (permalink / raw) To: Linus Walleij, Bartosz Golaszewski, Joshua Henderson Cc: linux-gpio, linux-kernel, Brian Masney Address the following warning from checkpatch.pl: WARNING: Prefer 'unsigned int' to bare use of 'unsigned' Fixes: 2ba384e6c3810 ("pinctrl: pinctrl-pic32: Add PIC32 pin control driver") Signed-off-by: Brian Masney <bmasney@redhat.com> --- drivers/pinctrl/pinctrl-pic32.c | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/drivers/pinctrl/pinctrl-pic32.c b/drivers/pinctrl/pinctrl-pic32.c index 16bbbcf7206288df5f91870e6233970582f7ef80..e97727a799d5f8a7f2ea76886af5174c863d8ae6 100644 --- a/drivers/pinctrl/pinctrl-pic32.c +++ b/drivers/pinctrl/pinctrl-pic32.c @@ -1696,7 +1696,7 @@ static inline struct pic32_gpio_bank *irqd_to_bank(struct irq_data *d) } static inline struct pic32_gpio_bank *pctl_to_bank(struct pic32_pinctrl *pctl, - unsigned pin) + unsigned int pin) { return &pctl->gpio_banks[pin / PINS_PER_BANK]; } @@ -1709,7 +1709,7 @@ static int pic32_pinctrl_get_groups_count(struct pinctrl_dev *pctldev) } static const char *pic32_pinctrl_get_group_name(struct pinctrl_dev *pctldev, - unsigned group) + unsigned int group) { struct pic32_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); @@ -1717,9 +1717,9 @@ static const char *pic32_pinctrl_get_group_name(struct pinctrl_dev *pctldev, } static int pic32_pinctrl_get_group_pins(struct pinctrl_dev *pctldev, - unsigned group, - const unsigned **pins, - unsigned *num_pins) + unsigned int group, + const unsigned int **pins, + unsigned int *num_pins) { struct pic32_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); @@ -1745,7 +1745,7 @@ static int pic32_pinmux_get_functions_count(struct pinctrl_dev *pctldev) } static const char * -pic32_pinmux_get_function_name(struct pinctrl_dev *pctldev, unsigned func) +pic32_pinmux_get_function_name(struct pinctrl_dev *pctldev, unsigned int func) { struct pic32_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); @@ -1753,9 +1753,9 @@ pic32_pinmux_get_function_name(struct pinctrl_dev *pctldev, unsigned func) } static int pic32_pinmux_get_function_groups(struct pinctrl_dev *pctldev, - unsigned func, + unsigned int func, const char * const **groups, - unsigned * const num_groups) + unsigned int * const num_groups) { struct pic32_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); @@ -1766,7 +1766,7 @@ static int pic32_pinmux_get_function_groups(struct pinctrl_dev *pctldev, } static int pic32_pinmux_enable(struct pinctrl_dev *pctldev, - unsigned func, unsigned group) + unsigned int func, unsigned int group) { struct pic32_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); const struct pic32_pin_group *pg = &pctl->groups[group]; @@ -1795,7 +1795,7 @@ static int pic32_pinmux_enable(struct pinctrl_dev *pctldev, static int pic32_gpio_request_enable(struct pinctrl_dev *pctldev, struct pinctrl_gpio_range *range, - unsigned offset) + unsigned int offset) { struct pic32_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); struct pic32_gpio_bank *bank = gpiochip_get_data(range->gc); @@ -1810,7 +1810,7 @@ static int pic32_gpio_request_enable(struct pinctrl_dev *pctldev, } static int pic32_gpio_direction_input(struct gpio_chip *chip, - unsigned offset) + unsigned int offset) { struct pic32_gpio_bank *bank = gpiochip_get_data(chip); u32 mask = BIT(offset); @@ -1820,7 +1820,7 @@ static int pic32_gpio_direction_input(struct gpio_chip *chip, return 0; } -static int pic32_gpio_get(struct gpio_chip *chip, unsigned offset) +static int pic32_gpio_get(struct gpio_chip *chip, unsigned int offset) { struct pic32_gpio_bank *bank = gpiochip_get_data(chip); @@ -1842,7 +1842,7 @@ static int pic32_gpio_set(struct gpio_chip *chip, unsigned int offset, } static int pic32_gpio_direction_output(struct gpio_chip *chip, - unsigned offset, int value) + unsigned int offset, int value) { struct pic32_gpio_bank *bank = gpiochip_get_data(chip); u32 mask = BIT(offset); @@ -1855,7 +1855,7 @@ static int pic32_gpio_direction_output(struct gpio_chip *chip, static int pic32_gpio_set_direction(struct pinctrl_dev *pctldev, struct pinctrl_gpio_range *range, - unsigned offset, bool input) + unsigned int offset, bool input) { struct gpio_chip *chip = range->gc; @@ -1876,12 +1876,12 @@ static const struct pinmux_ops pic32_pinmux_ops = { .gpio_set_direction = pic32_gpio_set_direction, }; -static int pic32_pinconf_get(struct pinctrl_dev *pctldev, unsigned pin, +static int pic32_pinconf_get(struct pinctrl_dev *pctldev, unsigned int pin, unsigned long *config) { struct pic32_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); struct pic32_gpio_bank *bank = pctl_to_bank(pctl, pin); - unsigned param = pinconf_to_config_param(*config); + unsigned int param = pinconf_to_config_param(*config); u32 mask = BIT(pin - bank->gpio_chip.base); u32 arg; @@ -1917,12 +1917,12 @@ static int pic32_pinconf_get(struct pinctrl_dev *pctldev, unsigned pin, return 0; } -static int pic32_pinconf_set(struct pinctrl_dev *pctldev, unsigned pin, - unsigned long *configs, unsigned num_configs) +static int pic32_pinconf_set(struct pinctrl_dev *pctldev, unsigned int pin, + unsigned long *configs, unsigned int num_configs) { struct pic32_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); struct pic32_gpio_bank *bank = pctl_to_bank(pctl, pin); - unsigned param; + unsigned int param; u32 arg; unsigned int i; u32 offset = pin - bank->gpio_chip.base; @@ -1987,7 +1987,7 @@ static struct pinctrl_desc pic32_pinctrl_desc = { .owner = THIS_MODULE, }; -static int pic32_gpio_get_direction(struct gpio_chip *chip, unsigned offset) +static int pic32_gpio_get_direction(struct gpio_chip *chip, unsigned int offset) { struct pic32_gpio_bank *bank = gpiochip_get_data(chip); -- 2.53.0 ^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 2/3] pinctrl: pic32: use consistent spacing around '+' 2026-02-22 23:33 [PATCH 0/3] pinctrl: pic32: allow driver to be compiled with COMPILE_TEST Brian Masney 2026-02-22 23:33 ` [PATCH 1/3] pinctrl: pic32: change all cases of bare 'unsigned' to 'unsigned int' Brian Masney @ 2026-02-22 23:33 ` Brian Masney 2026-02-22 23:33 ` [PATCH 3/3] pinctrl: pic32: allow driver to be compiled with COMPILE_TEST Brian Masney ` (2 subsequent siblings) 4 siblings, 0 replies; 6+ messages in thread From: Brian Masney @ 2026-02-22 23:33 UTC (permalink / raw) To: Linus Walleij, Bartosz Golaszewski, Joshua Henderson Cc: linux-gpio, linux-kernel, Brian Masney Address the following warning from checkpatch.pl: ERROR: need consistent spacing around '+' (ctx:WxV) Fixes: 2ba384e6c3810 ("pinctrl: pinctrl-pic32: Add PIC32 pin control driver") Signed-off-by: Brian Masney <bmasney@redhat.com> --- drivers/pinctrl/pinctrl-pic32.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pinctrl/pinctrl-pic32.c b/drivers/pinctrl/pinctrl-pic32.c index e97727a799d5f8a7f2ea76886af5174c863d8ae6..eb438c9d96673a7708d5681d2072bac30fcba010 100644 --- a/drivers/pinctrl/pinctrl-pic32.c +++ b/drivers/pinctrl/pinctrl-pic32.c @@ -1938,7 +1938,7 @@ static int pic32_pinconf_set(struct pinctrl_dev *pctldev, unsigned int pin, switch (param) { case PIN_CONFIG_BIAS_PULL_UP: dev_dbg(pctl->dev, " pullup\n"); - writel(mask, bank->reg_base +PIC32_SET(CNPU_REG)); + writel(mask, bank->reg_base + PIC32_SET(CNPU_REG)); break; case PIN_CONFIG_BIAS_PULL_DOWN: dev_dbg(pctl->dev, " pulldown\n"); -- 2.53.0 ^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 3/3] pinctrl: pic32: allow driver to be compiled with COMPILE_TEST 2026-02-22 23:33 [PATCH 0/3] pinctrl: pic32: allow driver to be compiled with COMPILE_TEST Brian Masney 2026-02-22 23:33 ` [PATCH 1/3] pinctrl: pic32: change all cases of bare 'unsigned' to 'unsigned int' Brian Masney 2026-02-22 23:33 ` [PATCH 2/3] pinctrl: pic32: use consistent spacing around '+' Brian Masney @ 2026-02-22 23:33 ` Brian Masney 2026-02-23 9:50 ` [PATCH 0/3] " Bartosz Golaszewski 2026-02-24 9:25 ` Linus Walleij 4 siblings, 0 replies; 6+ messages in thread From: Brian Masney @ 2026-02-22 23:33 UTC (permalink / raw) To: Linus Walleij, Bartosz Golaszewski, Joshua Henderson Cc: linux-gpio, linux-kernel, Brian Masney This driver currently only supports builds against a PIC32 target. Now that commit b8694faa1a0f ("pinctrl: pic32: update include to use pic32.h from platform_data") is merged, it's possible to compile this driver on other architectures. To avoid future breakage of this driver in the future, let's update the Kconfig so that it can be built with COMPILE_TEST enabled on all architectures. Signed-off-by: Brian Masney <bmasney@redhat.com> --- drivers/pinctrl/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pinctrl/Kconfig b/drivers/pinctrl/Kconfig index afecd9407f5354f5b92223f8cd80d2f7a08f8e7d..1965d4fb461d93cb486e80864cee61fc5acc9ab4 100644 --- a/drivers/pinctrl/Kconfig +++ b/drivers/pinctrl/Kconfig @@ -478,7 +478,7 @@ config PINCTRL_PEF2256 config PINCTRL_PIC32 bool "Microchip PIC32 pin controller driver" depends on OF - depends on MACH_PIC32 + depends on MACH_PIC32 || COMPILE_TEST select PINMUX select GENERIC_PINCONF select GPIOLIB_IRQCHIP -- 2.53.0 ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 0/3] pinctrl: pic32: allow driver to be compiled with COMPILE_TEST 2026-02-22 23:33 [PATCH 0/3] pinctrl: pic32: allow driver to be compiled with COMPILE_TEST Brian Masney ` (2 preceding siblings ...) 2026-02-22 23:33 ` [PATCH 3/3] pinctrl: pic32: allow driver to be compiled with COMPILE_TEST Brian Masney @ 2026-02-23 9:50 ` Bartosz Golaszewski 2026-02-24 9:25 ` Linus Walleij 4 siblings, 0 replies; 6+ messages in thread From: Bartosz Golaszewski @ 2026-02-23 9:50 UTC (permalink / raw) To: Brian Masney Cc: linux-gpio, linux-kernel, Linus Walleij, Bartosz Golaszewski, Joshua Henderson On Mon, 23 Feb 2026 00:33:28 +0100, Brian Masney <bmasney@redhat.com> said: > While migrating a pic32 clk driver off of a legacy API, I mistakenly > broke one of the drivers, and the issue could have been caught with a > simple compile test. Now that the dependent patches have been merged > into Linus's tree via the MIPS tree, we can now enable COMPILE_TEST > for all of pic32 drivers in this subsystem. > > While changes are being made to this driver, let's also fix any > outstanding checkpatch.pl errors with this driver. > > Signed-off-by: Brian Masney <bmasney@redhat.com> > --- > Brian Masney (3): > pinctrl: pic32: change all cases of bare 'unsigned' to 'unsigned int' > pinctrl: pic32: use consistent spacing around '+' > pinctrl: pic32: allow driver to be compiled with COMPILE_TEST > > drivers/pinctrl/Kconfig | 2 +- > drivers/pinctrl/pinctrl-pic32.c | 42 ++++++++++++++++++++--------------------- > 2 files changed, 22 insertions(+), 22 deletions(-) > --- > base-commit: 6de23f81a5e08be8fbf5e8d7e9febc72a5b5f27f > change-id: 20260222-pinctrl-pic32-dcb7051a882b > > Best regards, > -- > Brian Masney <bmasney@redhat.com> > > Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com> ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 0/3] pinctrl: pic32: allow driver to be compiled with COMPILE_TEST 2026-02-22 23:33 [PATCH 0/3] pinctrl: pic32: allow driver to be compiled with COMPILE_TEST Brian Masney ` (3 preceding siblings ...) 2026-02-23 9:50 ` [PATCH 0/3] " Bartosz Golaszewski @ 2026-02-24 9:25 ` Linus Walleij 4 siblings, 0 replies; 6+ messages in thread From: Linus Walleij @ 2026-02-24 9:25 UTC (permalink / raw) To: Brian Masney Cc: Bartosz Golaszewski, Joshua Henderson, linux-gpio, linux-kernel On Mon, Feb 23, 2026 at 12:33 AM Brian Masney <bmasney@redhat.com> wrote: > While migrating a pic32 clk driver off of a legacy API, I mistakenly > broke one of the drivers, and the issue could have been caught with a > simple compile test. Now that the dependent patches have been merged > into Linus's tree via the MIPS tree, we can now enable COMPILE_TEST > for all of pic32 drivers in this subsystem. > > While changes are being made to this driver, let's also fix any > outstanding checkpatch.pl errors with this driver. > > Signed-off-by: Brian Masney <bmasney@redhat.com> Thanks Brian, going the extra mile as always! Patches applied for v7.1. Yours, Linus Walleij ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2026-02-24 9:26 UTC | newest] Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2026-02-22 23:33 [PATCH 0/3] pinctrl: pic32: allow driver to be compiled with COMPILE_TEST Brian Masney 2026-02-22 23:33 ` [PATCH 1/3] pinctrl: pic32: change all cases of bare 'unsigned' to 'unsigned int' Brian Masney 2026-02-22 23:33 ` [PATCH 2/3] pinctrl: pic32: use consistent spacing around '+' Brian Masney 2026-02-22 23:33 ` [PATCH 3/3] pinctrl: pic32: allow driver to be compiled with COMPILE_TEST Brian Masney 2026-02-23 9:50 ` [PATCH 0/3] " Bartosz Golaszewski 2026-02-24 9:25 ` Linus Walleij
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®