Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit eebd1fda authored by Thierry Reding's avatar Thierry Reding Committed by Stephen Warren
Browse files

ARM: tegra: powergate: Don't error out if new state == old state



Don't treat it as an error if a partition is already in the same power
state when a user wants to power it on or off. This allows code to
proceed if no state change is required.

Signed-off-by: default avatarThierry Reding <thierry.reding@avionic-design.de>
Signed-off-by: default avatarStephen Warren <swarren@nvidia.com>
parent 99f69fea
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -76,7 +76,7 @@ static int tegra_powergate_set(int id, bool new_state)


	if (status == new_state) {
	if (status == new_state) {
		spin_unlock_irqrestore(&tegra_powergate_lock, flags);
		spin_unlock_irqrestore(&tegra_powergate_lock, flags);
		return -EINVAL;
		return 0;
	}
	}


	pmc_write(PWRGATE_TOGGLE_START | id, PWRGATE_TOGGLE);
	pmc_write(PWRGATE_TOGGLE_START | id, PWRGATE_TOGGLE);