AT91 fixes for 6.4

It contains:
 - fix imbalanced reference counter for ethernet devices; without it
   system hangs after consecutive suspend/resume cycles;
 - fix debounce delay property for shutdown controller; the initial DT
   property is not what the driver expects.
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQTsZ8eserC1pmhwqDmejrg/N2X7/QUCZHXQCQAKCRCejrg/N2X7
 /USYAP0ZZsxsFtaxYEj+ZpkOOM5QjUKmxRBF5EKpvT6Y18x1yAD/em5J/Qwe7k+T
 QxnajMvdb91RwupjZp9kGSJjU9BJfAg=
 =kXQQ
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmR+AYsACgkQYKtH/8kJ
 Uid8ug/+M395NCIOKaOuWeRcJKW5yk6wWCxQiL57zB+2aKEQR8p55bBsRQNuMD0i
 lOFirJk5oAOh5Vv6Pe3Xu1b8WpKCf/td6UuWj0CM2T6WFrZbLYqJIg7wwqS+p7Oj
 4FjkTmIReKSDLcnhruLL8sbeuFwXwIj33xQLBOoRPVcFcxo74+MKIfHW9pxnDyoK
 wwXNORvhQjNpvwwb6gsr4pgcOEbGGOte7VjQ5EEI8Ov92RRxnwRr/T6qoUbn2Fv8
 Nu05FtZ3du66cGEW/Ma6UkttSwCAax6DoOycPoSAbQcxFkiUFMI+zfDlVnhyyYvt
 bmeEgbZqEXp5Db2Ic89gGaWnqAeS6mXwY9WG4kmQoRxRanDfd9eT2n3/KO6EyF5P
 gevbL5XnqRHH7B2VkSJOVQUoLvrv931Vg8qIY6gsuWIYTsrA1u+VZ5/LygFLUR2I
 dlf35dSgF18naFXk1DMu4bdXJ2HtmbjnrUgGIbXPYG/zxBajMdrC6O5OVWO9lWmK
 /EmPU12JhjpPQNrPiJulADx18QinEuAmmbAEtuJoK2of6+MQlWTwmDOx4kmorYeT
 hzW0jj6q/wE3VmNgO7kZ3SitIa7zYLb5QUAKJaj72rtRFjKevSOi3RtpK8+5Cs/O
 Tbv4UpkQ5elxT6eh3GN+M0oEIn6ERgvcJ6zUmV6zLVESVykrvas=
 =s5VF
 -----END PGP SIGNATURE-----

Merge tag 'at91-fixes-6.4' of https://git.kernel.org/pub/scm/linux/kernel/git/at91/linux into arm/fixes

AT91 fixes for 6.4

It contains:
- fix imbalanced reference counter for ethernet devices; without it
  system hangs after consecutive suspend/resume cycles;
- fix debounce delay property for shutdown controller; the initial DT
  property is not what the driver expects.

* tag 'at91-fixes-6.4' of https://git.kernel.org/pub/scm/linux/kernel/git/at91/linux:
  ARM: dts: at91: sama7g5ek: fix debounce delay property for shdwc
  ARM: at91: pm: fix imbalanced reference counter for ethernet devices

Link: https://lore.kernel.org/r/20230530105930.11621-1-claudiu.beznea@microchip.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
This commit is contained in:
Arnd Bergmann 2023-06-05 17:38:51 +02:00
commit eeda0b71a7
2 changed files with 10 additions and 12 deletions

View File

@ -792,7 +792,7 @@ &sdmmc2 {
};
&shdwc {
atmel,shdwc-debouncer = <976>;
debounce-delay-us = <976>;
status = "okay";
input@0 {

View File

@ -334,16 +334,14 @@ static bool at91_pm_eth_quirk_is_valid(struct at91_pm_quirk_eth *eth)
pdev = of_find_device_by_node(eth->np);
if (!pdev)
return false;
/* put_device(eth->dev) is called at the end of suspend. */
eth->dev = &pdev->dev;
}
/* No quirks if device isn't a wakeup source. */
if (!device_may_wakeup(eth->dev)) {
put_device(eth->dev);
if (!device_may_wakeup(eth->dev))
return false;
}
/* put_device(eth->dev) is called at the end of suspend. */
return true;
}
@ -439,14 +437,14 @@ static int at91_pm_config_quirks(bool suspend)
pr_err("AT91: PM: failed to enable %s clocks\n",
j == AT91_PM_G_ETH ? "geth" : "eth");
}
} else {
/*
* Release the reference to eth->dev taken in
* at91_pm_eth_quirk_is_valid().
*/
put_device(eth->dev);
eth->dev = NULL;
}
/*
* Release the reference to eth->dev taken in
* at91_pm_eth_quirk_is_valid().
*/
put_device(eth->dev);
eth->dev = NULL;
}
return ret;