gpio fixes for v6.12-rc3

- fix clock handle leak in probe() error path in gpio-aspeed
 - add a dummy register read to ensure the write actually completed
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEFp3rbAvDxGAT0sefEacuoBRx13IFAmcJfM0ACgkQEacuoBRx
 13Kz1hAAxyykhUUtdaYuJB3CtEHNM4kbCX+Ke8KVQgniaZmB97JwPzGeCnuteNQD
 RP9YdokhHO7j8oXZEoyFxqpvxROsZvWKJKw4dNqJuifKJufy82j5Xj8F6rclGopx
 hfkridBr1m8OBJCpg9YUp6YLkClFtzn/fhOMSItHT7WmmM8mxlmAV1nOYdq0nEWh
 oD8u3r3YN13WcTUcVbWBKMg0uHF+bvGdvI/N93LDpzDcyGSptzLpep+oODSEDEb5
 xyV1GMNdislO5QHqs9GpbkVuWabv4o+56mSxLvyz3fo2BskT+qMZ0fF9DB2zuHfW
 AvBmcS6+NGFnJRhA5xg3c+x9ZuTENKoITNjInwM6CAbPc7YwzVgcB+du3N2S0J/K
 wy2j0zOV0E9RWXUI+tz/Gz0m3B3Vd9q2TabgLwoD1N3KJ5kmshP/bi6aJI9WDyDF
 /Rl2CLNkSdNYBc7Q7JEgjioMDtlCiUoGH8JJWjBtNDhbsihApBS8eybOPuSF4K9i
 74L6mUFO4xKDbnRPw9c2Bm1Cui+zue+E0DW2lrQlURYXrouof6KZCvRxYtJwM17Z
 ib3q0WAy1KGvy4HmGiP/SBrg1KtWTuRNmzu7ZxXJJoMD+Kc5eFvdDth8nLQ+Ytl9
 bsW2C/ScWnVVVsAUyWFGMSy1FRZ9XAxPO8IEg8jata6lK0NqN5Q=
 =o9yV
 -----END PGP SIGNATURE-----

Merge tag 'gpio-fixes-for-v6.12-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux

Pull gpio fixes from Bartosz Golaszewski:

 - fix clock handle leak in probe() error path in gpio-aspeed

 - add a dummy register read to ensure the write actually completed

* tag 'gpio-fixes-for-v6.12-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux:
  gpio: aspeed: Use devm_clk api to manage clock source
  gpio: aspeed: Add the flush write to ensure the write complete.
This commit is contained in:
Linus Torvalds 2024-10-11 15:42:26 -07:00
commit 547fc3225a

View File

@ -406,6 +406,8 @@ static void __aspeed_gpio_set(struct gpio_chip *gc, unsigned int offset,
gpio->dcache[GPIO_BANK(offset)] = reg;
iowrite32(reg, addr);
/* Flush write */
ioread32(addr);
}
static void aspeed_gpio_set(struct gpio_chip *gc, unsigned int offset,
@ -1191,7 +1193,7 @@ static int __init aspeed_gpio_probe(struct platform_device *pdev)
if (!gpio_id)
return -EINVAL;
gpio->clk = of_clk_get(pdev->dev.of_node, 0);
gpio->clk = devm_clk_get_enabled(&pdev->dev, NULL);
if (IS_ERR(gpio->clk)) {
dev_warn(&pdev->dev,
"Failed to get clock from devicetree, debouncing disabled\n");