Skip to contentSkip to conversation

ARM: tegra: Export tegra_powergate_sequence_power_up()

PATCH Applied Thierry Reding 3 participants 5 messages Mar 28, 2013 – Mar 29, 2013 3 messages not in the archive

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 ARM: tegra: Export tegra_powergate_sequence_power_up()

This function can be used by drivers to enable power to the hardware blocks that they drive. Most of the drivers can be built as a module and therefore require this function to be exported.

---
 arch/arm/mach-tegra/powergate.c | 2 ++
 1 file changed, 2 insertions(+)
arch/arm/mach-tegra/powergate.c +2 -0
index c6bc8f8..c472bed 100644
@@ -22,6 +22,7 @@
 #include <linux/debugfs.h>
 #include <linux/delay.h>
 #include <linux/err.h>
+#include <linux/export.h>
 #include <linux/init.h>
 #include <linux/io.h>
 #include <linux/seq_file.h>
@@ -168,6 +169,7 @@ err_clk:
 err_power:
 	return ret;
 }
+EXPORT_SYMBOL(tegra_powergate_sequence_power_up);
 
 int tegra_cpu_powergate_id(int cpuid)
 {
Signature · 1 line
1.8.1.5
#2 lore raw

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

In reply to a message not in the archive

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.

---
 arch/arm/mach-tegra/powergate.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/mach-tegra/powergate.c +1 -1
index c472bed..af9067e 100644
@@ -76,7 +76,7 @@ static int tegra_powergate_set(int id, bool new_state)
 
 	if (status == new_state) {
 		spin_unlock_irqrestore(&tegra_powergate_lock, flags);
-		return -EINVAL;
+		return 0;
 	}
 
 	pmc_write(PWRGATE_TOGGLE_START | id, PWRGATE_TOGGLE);
Signature · 1 line
1.8.1.5
#4 lore raw

Re: [PATCH 2/2] ARM: tegra: powergate: Don't error out if new state == old state

In reply to a message not in the archive
Quoted 3 lines · Thierry Reding

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.

Joseph, I think you had argued specifically against making this change in the past. Are you OK with this?

#6 lore raw

Re: [PATCH 2/2] ARM: tegra: powergate: Don't error out if new state == old state

In reply to a message not in the archive
Quoted 7 lines · Stephen Warren
Quoted 3 lines · Thierry Reding

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.

Joseph, I think you had argued specifically against making this change in the past. Are you OK with this?

Oh, that is because I use the same function for CPU hot plug power control, and I need to know the power status when doing power control. But I moved all the CPU power control function into PMC driver. So I am OK with this change.

Thanks,
Joseph

#7 lore raw
In reply to a message not in the archive
Quoted 3 lines · Thierry Reding

This function can be used by drivers to enable power to the hardware blocks that they drive. Most of the drivers can be built as a module and therefore require this function to be exported.

I applied the series to Tegra's for-3.10/fixes branch.