This converts the vexpress-sysreg MFD driver to using the new generic GPIO interface but first fixes an issue with an unchecked return value of devm_gpiochio_add_data().
Lee: Please, create an immutable branch containing these commits after you pick them up, as I'd like to merge it into the GPIO tree and remove the legacy interface in this cycle.
Signed-off-by: Bartosz Golaszewski bartosz.golaszewski@linaro.org --- Bartosz Golaszewski (2): mfd: vexpress-sysreg: check the return value of devm_gpiochip_add_data() mfd: vexpress-sysreg: use new generic GPIO chip API
drivers/mfd/vexpress-sysreg.c | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) --- base-commit: 8f5ae30d69d7543eee0d70083daf4de8fe15d585 change-id: 20250728-gpio-mmio-mfd-conv-d27c2cfbccfe
Best regards,
From: Bartosz Golaszewski bartosz.golaszewski@linaro.org
Commit 974cc7b93441 ("mfd: vexpress: Define the device as MFD cells") removed the return value check from the call to gpiochip_add_data() (or rather gpiochip_add() back then and later converted to devres) with no explanation. This function however can still fail, so check the return value and bail-out if it does.
Cc: stable@vger.kernel.org Fixes: 974cc7b93441 ("mfd: vexpress: Define the device as MFD cells") Signed-off-by: Bartosz Golaszewski bartosz.golaszewski@linaro.org --- drivers/mfd/vexpress-sysreg.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/mfd/vexpress-sysreg.c b/drivers/mfd/vexpress-sysreg.c index fc2daffc4352cca763cefbf6e17bdd5242290198..77245c1e5d7df497fda2f6dd8cfb08b5fbcee719 100644 --- a/drivers/mfd/vexpress-sysreg.c +++ b/drivers/mfd/vexpress-sysreg.c @@ -99,6 +99,7 @@ static int vexpress_sysreg_probe(struct platform_device *pdev) struct resource *mem; void __iomem *base; struct gpio_chip *mmc_gpio_chip; + int ret;
mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); if (!mem) @@ -119,7 +120,10 @@ static int vexpress_sysreg_probe(struct platform_device *pdev) bgpio_init(mmc_gpio_chip, &pdev->dev, 0x4, base + SYS_MCI, NULL, NULL, NULL, NULL, 0); mmc_gpio_chip->ngpio = 2; - devm_gpiochip_add_data(&pdev->dev, mmc_gpio_chip, NULL); + + ret = devm_gpiochip_add_data(&pdev->dev, mmc_gpio_chip, NULL); + if (ret) + return ret;
return devm_mfd_add_devices(&pdev->dev, PLATFORM_DEVID_AUTO, vexpress_sysreg_cells,
On Mon, Aug 11, 2025 at 3:36 PM Bartosz Golaszewski brgl@bgdev.pl wrote:
From: Bartosz Golaszewski bartosz.golaszewski@linaro.org
Commit 974cc7b93441 ("mfd: vexpress: Define the device as MFD cells") removed the return value check from the call to gpiochip_add_data() (or rather gpiochip_add() back then and later converted to devres) with no explanation. This function however can still fail, so check the return value and bail-out if it does.
Cc: stable@vger.kernel.org Fixes: 974cc7b93441 ("mfd: vexpress: Define the device as MFD cells") Signed-off-by: Bartosz Golaszewski bartosz.golaszewski@linaro.org
Reviewed-by: Linus Walleij linus.walleij@linaro.org
Yours, Linus Walleij
On Mon, Aug 11, 2025 at 3:36 PM Bartosz Golaszewski brgl@bgdev.pl wrote:
This converts the vexpress-sysreg MFD driver to using the new generic GPIO interface but first fixes an issue with an unchecked return value of devm_gpiochio_add_data().
Lee: Please, create an immutable branch containing these commits after you pick them up, as I'd like to merge it into the GPIO tree and remove the legacy interface in this cycle.
Signed-off-by: Bartosz Golaszewski bartosz.golaszewski@linaro.org
Bartosz Golaszewski (2): mfd: vexpress-sysreg: check the return value of devm_gpiochip_add_data() mfd: vexpress-sysreg: use new generic GPIO chip API
drivers/mfd/vexpress-sysreg.c | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-)
base-commit: 8f5ae30d69d7543eee0d70083daf4de8fe15d585 change-id: 20250728-gpio-mmio-mfd-conv-d27c2cfbccfe
Best regards,
Bartosz Golaszewski bartosz.golaszewski@linaro.org
It's been almost a month, so gentle ping.
Bart
On Tue, Sep 02, 2025 at 11:28:49AM +0200, Bartosz Golaszewski wrote:
On Mon, Aug 11, 2025 at 3:36 PM Bartosz Golaszewski brgl@bgdev.pl wrote:
This converts the vexpress-sysreg MFD driver to using the new generic GPIO interface but first fixes an issue with an unchecked return value of devm_gpiochio_add_data().
Lee: Please, create an immutable branch containing these commits after you pick them up, as I'd like to merge it into the GPIO tree and remove the legacy interface in this cycle.
Signed-off-by: Bartosz Golaszewski bartosz.golaszewski@linaro.org
Bartosz Golaszewski (2): mfd: vexpress-sysreg: check the return value of devm_gpiochip_add_data() mfd: vexpress-sysreg: use new generic GPIO chip API
drivers/mfd/vexpress-sysreg.c | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-)
base-commit: 8f5ae30d69d7543eee0d70083daf4de8fe15d585 change-id: 20250728-gpio-mmio-mfd-conv-d27c2cfbccfe
Best regards,
Bartosz Golaszewski bartosz.golaszewski@linaro.org
It's been almost a month, so gentle ping.
Sorry for that, LGTM. FWIW:
Reviewed-by: Sudeep Holla sudeep.holla@arm.com
On Mon, 11 Aug 2025 15:36:15 +0200, Bartosz Golaszewski wrote:
This converts the vexpress-sysreg MFD driver to using the new generic GPIO interface but first fixes an issue with an unchecked return value of devm_gpiochio_add_data().
Lee: Please, create an immutable branch containing these commits after you pick them up, as I'd like to merge it into the GPIO tree and remove the legacy interface in this cycle.
[...]
Applied, thanks!
[1/2] mfd: vexpress-sysreg: check the return value of devm_gpiochip_add_data() commit: 14b2b50be20bd15236bc7d4c614ecb5d9410c3ec [2/2] mfd: vexpress-sysreg: use new generic GPIO chip API commit: 8080e2c6138e4c615c1e6bc1378ec042b6f9cd36
-- Lee Jones [李琼斯]
On Tue, Sep 2, 2025 at 12:10 PM Lee Jones lee@kernel.org wrote:
On Mon, 11 Aug 2025 15:36:15 +0200, Bartosz Golaszewski wrote:
This converts the vexpress-sysreg MFD driver to using the new generic GPIO interface but first fixes an issue with an unchecked return value of devm_gpiochio_add_data().
Lee: Please, create an immutable branch containing these commits after you pick them up, as I'd like to merge it into the GPIO tree and remove the legacy interface in this cycle.
[...]
Applied, thanks!
[1/2] mfd: vexpress-sysreg: check the return value of devm_gpiochip_add_data() commit: 14b2b50be20bd15236bc7d4c614ecb5d9410c3ec [2/2] mfd: vexpress-sysreg: use new generic GPIO chip API commit: 8080e2c6138e4c615c1e6bc1378ec042b6f9cd36
-- Lee Jones [李琼斯]
Thanks, you haven't pushed out the changes yet so maybe you're already on it but please don't forget to set up an immutable branch for merging back of these changes into the GPIO tree.
Bartosz
On Tue, 02 Sep 2025, Bartosz Golaszewski wrote:
On Tue, Sep 2, 2025 at 12:10 PM Lee Jones lee@kernel.org wrote:
On Mon, 11 Aug 2025 15:36:15 +0200, Bartosz Golaszewski wrote:
This converts the vexpress-sysreg MFD driver to using the new generic GPIO interface but first fixes an issue with an unchecked return value of devm_gpiochio_add_data().
Lee: Please, create an immutable branch containing these commits after you pick them up, as I'd like to merge it into the GPIO tree and remove the legacy interface in this cycle.
[...]
Applied, thanks!
[1/2] mfd: vexpress-sysreg: check the return value of devm_gpiochip_add_data() commit: 14b2b50be20bd15236bc7d4c614ecb5d9410c3ec [2/2] mfd: vexpress-sysreg: use new generic GPIO chip API commit: 8080e2c6138e4c615c1e6bc1378ec042b6f9cd36
-- Lee Jones [李琼斯]
Thanks, you haven't pushed out the changes yet so maybe you're already on it but please don't forget to set up an immutable branch for merging back of these changes into the GPIO tree.
No, I actually missed that. 2 secs.
Enjoy!
The following changes since commit 8f5ae30d69d7543eee0d70083daf4de8fe15d585:
Linux 6.17-rc1 (2025-08-10 19:41:16 +0300)
are available in the Git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.git ib-mfd-gpio-v6.18
for you to fetch changes up to b7fe89d2ea0dc9c823b103ad982f97a00d50e04c:
mfd: aat2870: Add GPIOLIB_LEGACY dependency (2025-09-03 09:08:48 +0100)
---------------------------------------------------------------- Immutable branch between MFD and GPIO due for the v6.18 merge window
---------------------------------------------------------------- Arnd Bergmann (2): mfd: si476x: Add GPIOLIB_LEGACY dependency mfd: aat2870: Add GPIOLIB_LEGACY dependency
drivers/mfd/Kconfig | 2 ++ sound/soc/codecs/Kconfig | 1 + 2 files changed, 3 insertions(+)
This time with the correct commits!
The following changes since commit 8f5ae30d69d7543eee0d70083daf4de8fe15d585:
Linux 6.17-rc1 (2025-08-10 19:41:16 +0300)
are available in the Git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.git ib-mfd-gpio-v6.18
for you to fetch changes up to 9b33bbc084accb4ebde3c6888758b31e3bdf1c57:
mfd: vexpress-sysreg: Use new generic GPIO chip API (2025-09-03 12:45:33 +0100)
---------------------------------------------------------------- Immutable branch between MFD and GPIO due for the v6.18 merge window
---------------------------------------------------------------- Bartosz Golaszewski (2): mfd: vexpress-sysreg: Check the return value of devm_gpiochip_add_data() mfd: vexpress-sysreg: Use new generic GPIO chip API
drivers/mfd/vexpress-sysreg.c | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-)
On Wed, Sep 3, 2025 at 2:55 PM Lee Jones lee@kernel.org wrote:
This time with the correct commits!
The following changes since commit 8f5ae30d69d7543eee0d70083daf4de8fe15d585:
Linux 6.17-rc1 (2025-08-10 19:41:16 +0300)
are available in the Git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.git ib-mfd-gpio-v6.18
for you to fetch changes up to 9b33bbc084accb4ebde3c6888758b31e3bdf1c57:
mfd: vexpress-sysreg: Use new generic GPIO chip API (2025-09-03 12:45:33 +0100)
Immutable branch between MFD and GPIO due for the v6.18 merge window
Bartosz Golaszewski (2): mfd: vexpress-sysreg: Check the return value of devm_gpiochip_add_data() mfd: vexpress-sysreg: Use new generic GPIO chip API
drivers/mfd/vexpress-sysreg.c | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-)
-- Lee Jones [李琼斯]
Thanks! Pulled.
Bartosz
linux-stable-mirror@lists.linaro.org