Unverified Commit eeda0b71 authored by Arnd Bergmann's avatar Arnd Bergmann
Browse files

Merge tag 'at91-fixes-6.4' of...

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: default avatarArnd Bergmann <arnd@arndb.de>
parents 44b5814f 6b0db163
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -792,7 +792,7 @@
};

&shdwc {
	atmel,shdwc-debouncer = <976>;
	debounce-delay-us = <976>;
	status = "okay";

	input@0 {
+9 −11
Original line number Diff line number Diff line
@@ -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,7 +437,8 @@ 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().
@@ -447,7 +446,6 @@ static int at91_pm_config_quirks(bool suspend)
		put_device(eth->dev);
		eth->dev = NULL;
	}
	}

	return ret;
}