power: add is_support_pwr_ctrl function. [2/2]
authorNanxin Qin <nanxin.qin@amlogic.com>
Tue, 9 Apr 2019 14:34:05 +0000 (22:34 +0800)
committerTao Zeng <tao.zeng@amlogic.com>
Fri, 12 Apr 2019 09:09:58 +0000 (02:09 -0700)
PD#SWPL-5261

Problem:
bringup sm1 and tm2.

Solution:
add is_support_pwr_ctrl function.

Verify:
U212 and AC200

Change-Id: I7f392ea8f23ce6f4e610b98bdcc39c4fcc2e6444
Signed-off-by: Nanxin Qin <nanxin.qin@amlogic.com>
drivers/amlogic/power/power_ctrl.c
include/linux/amlogic/power_ctrl.h

index ad0b784..d7f64d7 100644 (file)
@@ -37,6 +37,12 @@ struct power_ctrl {
 struct power_ctrl ctrl;
 static bool probe_done;
 
+bool is_support_power_ctrl(void)
+{
+       return probe_done;
+}
+EXPORT_SYMBOL(is_support_power_ctrl);
+
 int power_ctrl_sleep(bool power_on, unsigned int shift)
 {
        unsigned int val;
index f0ab611..3a09e58 100644 (file)
@@ -20,6 +20,7 @@
 #include <linux/types.h>
 
 #ifdef CONFIG_AMLOGIC_POWER
+bool is_support_power_ctrl(void);
 int power_ctrl_sleep(bool power_on, unsigned int shift);
 int power_ctrl_sleep_mask(bool power_on,
                          unsigned int mask_val, unsigned int shift);