rk3368: add /sys/pm_tsets/ support
authorXiao Feng <xf@rock-chips.com>
Wed, 14 Jan 2015 08:18:19 +0000 (16:18 +0800)
committerHuang, Tao <huangtao@rock-chips.com>
Wed, 14 Jan 2015 09:38:27 +0000 (17:38 +0800)
Signed-off-by: Xiao Feng <xf@rock-chips.com>
arch/arm/mach-rockchip/rk_pm_tests/clk_rate.c
arch/arm/mach-rockchip/rk_pm_tests/pvtm_test.c
arch/arm64/mach-rockchip/Makefile

index fb4cf44d66bbb5984288af7ff8a25d01b35f8cbb..8d5cfcd8cc80e9ddcd03d02bbea17559ae37ab25 100644 (file)
@@ -64,7 +64,8 @@ static int file_write(char *file_path, char *buf)
        mm_segment_t old_fs;
        loff_t offset = 0;
 
-       PM_DBG("%s: write %s %s size = %d\n", __func__, file_path, buf, strlen(buf));
+       PM_DBG("%s: write %s %s size = %d\n", __func__,
+              file_path, buf, (int)strlen(buf));
        file = filp_open(file_path, O_RDWR, 0);
 
        if (IS_ERR(file)) {
index beee2020ae8e5e3609b4efe539cccb60f3c7f629..8fa7ca080ddb13e02fc8a3971d08dd83604e83ea 100644 (file)
 #include <linux/regulator/consumer.h>
 #include <asm/cacheflush.h>
 
+#define PVTM_TEST 0
+
 extern int rockchip_tsadc_get_temp(int chn);
 extern void rk29_wdt_keepalive(void);
 extern u32 pvtm_get_value(u32 ch, u32 time_us);
 
+#if PVTM_TEST
 char *pvtm_buf;
 static const char pi_result[] = "3141592653589793238462643383279528841971693993751058209749445923078164062862089986280348253421170679821480865132823664709384469555822317253594081284811174502841270193852115559644622948954930381964428810975665933446128475648233786783165271201991456485669234634861045432664821339360726024914127372458706606315588174881520920962829254917153643678925903611330530548820466521384146951941511609433057273657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566438602139494639522473719070217986943702770539217176293176752384674818467669451320005681271452635608277857713427577896091736371787214684409012249534301465495853710579227968925892354201995611212902196864344181598136297747713099605187072113499999983729780499510597317328160963185";
 int calc_pi(void)
@@ -390,6 +393,7 @@ void scale_min_pvtm_fix_rate(void)
        } while (1);
 }
 
+#endif
 ssize_t pvtm_show(struct kobject *kobj, struct kobj_attribute *attr,
                  char *buf)
 {
@@ -410,8 +414,10 @@ ssize_t pvtm_store(struct kobject *kobj, struct kobj_attribute *attr,
 
 int pvtm_buf_init(void)
 {
+#if PVTM_TEST
        pvtm_buf = (char *)__get_free_pages(GFP_KERNEL, 8);
 
+#endif
        return 0;
 }
 fs_initcall(pvtm_buf_init);
index 48db687352625692ff1792691b78f2887d9ba9a8..5a165eb929b1143f6c2a6b5f28014079a4aafda7 100644 (file)
@@ -9,3 +9,4 @@ obj-$(CONFIG_DVFS) += ../../arm/mach-rockchip/dvfs.o
 obj-$(CONFIG_BLOCK_RKNAND) += ../../arm/mach-rockchip/rknandbase.o
 obj-$(CONFIG_RK_PL330_DMA_TEST) += ../../arm/mach-rockchip/dma_memcpy_test.o
 obj-$(CONFIG_RK_VCODEC) += ../../arm/mach-rockchip/vcodec_service.o
+obj-$(CONFIG_RK_PM_TESTS) += ../../arm/mach-rockchip/rk_pm_tests/