Permalink
Browse files

Separation cpu state monitor driver

  • Loading branch information...
1 parent 743dd30 commit 12559987a523cda7afb23774ee8cf6812f85ad20 @lvchaqiu committed Oct 16, 2012
Showing 314 changed files with 81 additions and 51 deletions.
View
No changes.
View
0 Makefile 100644 → 100755
No changes.
View
0 README.md 100644 → 100755
No changes.
View
0 arch/arm/Kconfig 100644 → 100755
No changes.
View
0 arch/arm/common/ram_console_dev.c 100644 → 100755
No changes.
View
0 arch/arm/include/asm/dma-iommu.h 100644 → 100755
No changes.
View
0 arch/arm/include/asm/rwsem.h 100644 → 100755
No changes.
View
0 arch/arm/include/asm/watchpoint.h 100644 → 100755
No changes.
View
0 arch/arm/kernel/topology.c 100644 → 100755
No changes.
View
No changes.
View
0 arch/arm/kernel/watchpoint.c 100644 → 100755
No changes.
@@ -98,7 +98,14 @@ config MX_SERIAL_TYPE
select EXYNOS4_DEV_PPMU
help
Enable Meizu M030/M031/M032 Platform support
-
+
+config MX_CPUIDLE_LEDS
+ bool
+ select LEDS_GPIO_REGISTER
+ select LEDS_TRIGGERS
+ help
+ Enable extenal function to moniter cpu running status
+
choice
prompt "EXYNOS5210 core type"
depends on CPU_EXYNOS5210
@@ -651,7 +658,7 @@ config MACH_M032
select S5P_DEV_USB_SWITCH
select EXYNOS4_SETUP_I2C2
select EXYNOS4_SETUP_I2C4
- select LEDS_GPIO_REGISTER
+ select MX_CPUIDLE_LEDS
help
Machine support for Meizu M032/M031 SmartPhone based on EXYNOS4x12
@@ -125,6 +125,7 @@ obj-$(CONFIG_MX_SERIAL_TYPE) += mx_fb.o mx_camera.o mx_cma.o mx_tsp.o mx_mshci.
obj-$(CONFIG_MX_SERIAL_TYPE) += mx_factory.o mx_debug.o
obj-$(CONFIG_LEDS_GPIO_REGISTER) += mx_leds.o
+obj-$(CONFIG_MX_CPUIDLE_LEDS) += mx_idle_leds.o
obj-$(CONFIG_MX_DEV_JACK) += mx_jack.o
obj-$(CONFIG_TOUCH_BOOSTER) += mx_ts_booster.o
obj-$(CONFIG_CPUPOWER) += mx_cpu_power.o
View
No changes.
View
No changes.
@@ -15,7 +15,6 @@
#include <linux/suspend.h>
#include <linux/platform_device.h>
#include <linux/gpio.h>
-#include <linux/leds.h>
#include <asm/proc-fns.h>
#include <asm/tlbflush.h>
@@ -67,11 +66,6 @@ struct check_device_op {
enum hc_type type;
};
-#ifdef CONFIG_LEDS_TRIGGERS
-DEFINE_LED_TRIGGER(didle_led_trigger);
-DEFINE_LED_TRIGGER(idle_led_trigger[4]);
-#endif
-
#ifdef CONFIG_MX_SERIAL_TYPE
#define CPUDILE_ENABLE_MASK (ENABLE_LPA | ENABLE_AFTR)
#define M032_CPUDILE_ENABLE_MASK (ENABLE_LPA)
@@ -803,15 +797,11 @@ static int __maybe_unused exynos4_enter_lowpower(struct cpuidle_device *dev,
enter_mode = exynos4_check_entermode();
switch (enter_mode) {
case S5P_CHECK_DIDLE:
- led_trigger_event(didle_led_trigger, LED_FULL);
idle_time = exynos4_enter_core0_aftr(dev, new_state);
- led_trigger_event(didle_led_trigger, LED_OFF);
break;
case S5P_CHECK_LPA:
bt_uart_rts_ctrl(1);
- led_trigger_event(didle_led_trigger, LED_FULL);
idle_time = exynos4_enter_core0_lpa(dev, new_state);
- led_trigger_event(didle_led_trigger, LED_OFF);
bt_uart_rts_ctrl(0);
break;
default:
@@ -906,29 +896,6 @@ static void __init exynos4_core_down_clk(void)
#define exynos4_core_down_clk() do { } while (0)
#endif
-#ifdef CONFIG_LEDS_TRIGGERS
-static int exynos4_leds_idle_notifier(struct notifier_block *nb, unsigned long val,
- void *data)
-{
- int cpuid = smp_processor_id();
-
- switch (val) {
- case IDLE_START:
- led_trigger_event(idle_led_trigger[cpuid], LED_OFF);
- break;
- case IDLE_END:
- led_trigger_event(idle_led_trigger[cpuid], LED_FULL);
- break;
- }
-
- return 0;
-}
-
-static struct notifier_block exynos4_leds_idle_nb = {
- .notifier_call = exynos4_leds_idle_notifier,
-};
-#endif
-
static int __init exynos4_init_cpuidle(void)
{
int i, max_cpuidle_state, cpu_id, ret;
@@ -1034,22 +1001,6 @@ static int __init exynos4_init_cpuidle(void)
outer_clean_range(virt_to_phys(l2x0_save), ARRAY_SIZE(l2x0_save));
outer_clean_range(virt_to_phys(scu_save), ARRAY_SIZE(scu_save));
-#ifdef CONFIG_LEDS_TRIGGERS
- do {
- static char trig_name[4][16];
- static char trig_didle[8];
- int i;
- for (i = 0; i<ARRAY_SIZE(trig_name); i++) {
- snprintf(trig_name[i], sizeof(trig_name[i]), "cpu%d-idle", i);
- led_trigger_register_simple(trig_name[i], &idle_led_trigger[i]);
- }
- idle_notifier_register(&exynos4_leds_idle_nb);
-
- snprintf(trig_didle, sizeof(trig_didle), "didle");
- led_trigger_register_simple(trig_didle, &didle_led_trigger);
- } while(0);
-#endif
-
return 0;
}
device_initcall(exynos4_init_cpuidle);
View
No changes.
View
No changes.
View
0 arch/arm/mach-exynos/dev-ppmu.c 100644 → 100755
No changes.
View
0 arch/arm/mach-exynos/dev-tmu.c 100644 → 100755
No changes.
View
No changes.
View
No changes.
View
0 arch/arm/mach-exynos/gpio-m030.c 100644 → 100755
No changes.
View
0 arch/arm/mach-exynos/gpio-m032.c 100644 → 100755
No changes.
View
No changes.
View
No changes.
View
No changes.
No changes.
View
No changes.
View
No changes.
View
No changes.
View
No changes.
View
No changes.
View
No changes.
View
0 arch/arm/mach-exynos/mach-m030.c 100644 → 100755
No changes.
View
No changes.
View
0 arch/arm/mach-exynos/mx_debug.c 100644 → 100755
No changes.
View
No changes.
@@ -0,0 +1,71 @@
+/*
+ * mx_idle_leds.c - Moniter cpu running state for mx by leds
+ *
+ * Copyright (C) 2012 Meizu Technology Co.Ltd, Zhuhai, China
+ * Author: lvcha qiu <lvcha@meizu.com>
+ *
+ * This program is not provided / owned by Maxim Integrated Products.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ */
+
+#include <linux/init.h>
+#include <linux/cpu.h>
+#include <linux/leds.h>
+
+DEFINE_LED_TRIGGER(idle_led_trigger[CONFIG_NR_CPUS]);
+
+static int mx_leds_idle_notifier(struct notifier_block *nb, unsigned long val,
+ void *data)
+{
+ int cpuid = smp_processor_id();
+
+ switch (val) {
+ case IDLE_START:
+ led_trigger_event(idle_led_trigger[cpuid], LED_OFF);
+ break;
+ case IDLE_END:
+ led_trigger_event(idle_led_trigger[cpuid], LED_FULL);
+ break;
+ }
+
+ return 0;
+}
+
+static struct notifier_block mx_leds_idle_nb = {
+ .notifier_call = mx_leds_idle_notifier,
+};
+
+static int __init mx_cpuidle_leds(void)
+{
+ static char trig_name[CONFIG_NR_CPUS][16];
+ int i;
+
+ for (i = 0; i<num_possible_cpus(); i++) {
+ snprintf(trig_name[i], sizeof(trig_name[i]), "cpu%d-idle", i);
+ led_trigger_register_simple(trig_name[i], &idle_led_trigger[i]);
+ }
+
+ idle_notifier_register(&mx_leds_idle_nb);
+
+ return 0;
+}
+
+device_initcall(mx_cpuidle_leds);
+
+MODULE_DESCRIPTION("Mx cpu idle moniter");
+MODULE_AUTHOR("lvcha qiu <lvcha@meizu.com>");
+MODULE_LICENSE("GPLV2");
View
0 arch/arm/mach-exynos/mx_jack.c 100644 → 100755
No changes.
View
No changes.
View
0 arch/arm/mach-exynos/ublox-gps.c 100644 → 100755
No changes.
View
0 arch/arm/mach-exynos/usb-detect.c 100644 → 100755
No changes.
View
0 arch/arm/plat-s5p/dev-rotator.c 100644 → 100755
No changes.
View
No changes.
View
0 arch/um/scripts/Makefile.rules 100644 → 100755
No changes.
View
0 arch/x86/include/asm/unistd_32.h 100644 → 100755
No changes.
View
0 arch/x86/include/asm/unistd_64.h 100644 → 100755
No changes.
View
0 drivers/base/performance.c 100644 → 100755
No changes.
View
0 drivers/cpufreq/Kconfig.exynos 100644 → 100755
No changes.
View
0 drivers/cpufreq/cpufreq-4210.c 100644 → 100755
No changes.
View
0 drivers/cpufreq/cpufreq-4x12.c 100644 → 100755
No changes.
View
0 drivers/cpufreq/cpufreq-5250.c 100644 → 100755
No changes.
View
No changes.
View
0 drivers/cpufreq/exynos-cpufreq.c 100644 → 100755
No changes.
View
0 drivers/gpu/arm/Kconfig 100644 → 100755
No changes.
View
0 drivers/gpu/arm/Makefile 100644 → 100755
No changes.
View
0 drivers/gpu/arm/mali/Kconfig 100644 → 100755
No changes.
View
0 drivers/gpu/arm/mali/Makefile 100644 → 100755
No changes.
View
No changes.
View
No changes.
View
No changes.
View
No changes.
View
No changes.
View
No changes.
View
No changes.
View
No changes.
View
No changes.
No changes.
No changes.
View
No changes.
View
No changes.
View
No changes.
View
No changes.
View
No changes.
View
No changes.
View
No changes.
View
No changes.
View
No changes.
No changes.
No changes.
View
No changes.
View
No changes.
View
No changes.
No changes.
No changes.
No changes.
View
No changes.
No changes.
No changes.
View
No changes.
View
No changes.
View
No changes.
View
No changes.
View
No changes.
View
No changes.
View
No changes.
View
No changes.
View
No changes.
View
No changes.
View
No changes.
View
No changes.
View
No changes.
No changes.
No changes.
No changes.
No changes.
View
No changes.
View
No changes.
View
No changes.
No changes.
No changes.
No changes.
View
No changes.
View
No changes.
View
No changes.
View
No changes.
View
No changes.
View
No changes.
View
No changes.
View
No changes.
No changes.
View
No changes.
View
No changes.
View
No changes.
View
No changes.
View
No changes.
View
No changes.
View
No changes.
View
No changes.
View
No changes.
View
No changes.
View
No changes.
View
No changes.
View
No changes.
View
No changes.
View
No changes.
View
No changes.
View
No changes.
View
No changes.
View
No changes.
View
No changes.
View
No changes.
View
No changes.
No changes.
View
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
View
No changes.
View
No changes.
No changes.
No changes.
No changes.
No changes.
View
0 drivers/gpu/arm/ump/Kconfig 100644 → 100755
No changes.
View
0 drivers/gpu/arm/ump/Makefile 100644 → 100755
No changes.
View
No changes.
View
0 drivers/gpu/arm/ump/arch/config.h 100644 → 100755
No changes.
View
No changes.
View
No changes.
View
No changes.
No changes.
No changes.
No changes.
View
No changes.
View
No changes.
View
No changes.
View
No changes.
View
No changes.
View
No changes.
No changes.
No changes.
View
No changes.
No changes.
View
No changes.
View
No changes.
View
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
View
No changes.
View
No changes.
View
No changes.
View
No changes.
View
No changes.
View
No changes.
View
No changes.
View
No changes.
View
0 drivers/gpu/arm/ump/readme.txt 100644 → 100755
No changes.
View
0 drivers/iommu/Kconfig 100644 → 100755
No changes.
View
0 drivers/iommu/Makefile 100644 → 100755
No changes.
View
0 drivers/iommu/exynos-iommu.c 100644 → 100755
No changes.
View
0 drivers/iommu/iommu.c 100644 → 100755
No changes.
View
0 drivers/leds/leds-bu26507.c 100644 → 100755
No changes.
View
0 drivers/leds/leds-max77665.c 100644 → 100755
No changes.
View
0 drivers/leds/leds-max8997.c 100644 → 100755
No changes.
View
No changes.
View
No changes.
View
No changes.
View
No changes.
View
No changes.
View
No changes.
View
No changes.
View
No changes.
View
No changes.
View
No changes.
View
No changes.
View
No changes.
View
No changes.
View
No changes.
View
No changes.
View
No changes.
View
No changes.
View
No changes.
View
0 drivers/mfd/bu26507gul.c 100644 → 100755
No changes.
View
0 drivers/mfd/max77665-irq.c 100644 → 100755
No changes.
View
0 drivers/mfd/max77665.c 100644 → 100755
No changes.
View
0 drivers/misc/max77665_haptic.c 100644 → 100755
No changes.
View
0 drivers/misc/mx_gp2ap.c 100644 → 100755
No changes.
View
0 drivers/misc/mx_jacks.c 100644 → 100755
No changes.
View
0 drivers/motor/Kconfig 100644 → 100755
No changes.
View
0 drivers/motor/Makefile 100644 → 100755
No changes.
View
0 drivers/motor/max77665_haptic.c 100644 → 100755
No changes.
View
0 drivers/motor/max8997_haptic.c 100644 → 100755
No changes.
View
0 drivers/mxphone/Kconfig 100644 → 100755
No changes.
View
0 drivers/mxphone/Makefile 100644 → 100755
No changes.
View
0 drivers/mxphone/mx_acm.c 100644 → 100755
No changes.
View
0 drivers/mxphone/mx_acm.h 100644 → 100755
No changes.
View
0 drivers/mxphone/mx_modem.c 100644 → 100755
No changes.
View
0 drivers/mxphone/mx_modem.h 100644 → 100755
No changes.
View
0 drivers/mxphone/mx_net.c 100644 → 100755
No changes.
View
0 drivers/mxphone/mx_smd.c 100644 → 100755
No changes.
View
0 drivers/mxphone/mx_smd.h 100644 → 100755
No changes.
View
0 drivers/mxphone/mx_tty.c 100644 → 100755
No changes.
View
0 drivers/mxphone/mx_tty.h 100644 → 100755
No changes.
View
No changes.
No changes.
No changes.
View
No changes.
View
0 drivers/power/bq27541_battery.c 100644 → 100755
No changes.
View
0 drivers/power/m030_battery.c 100644 → 100755
No changes.
View
0 drivers/power/max8997_charger.c 100644 → 100755
No changes.
View
0 drivers/regulator/max77665.c 100644 → 100755
No changes.
View
0 drivers/rtc/rtc-max8997.c 100644 → 100755
No changes.
View
0 drivers/staging/cpupower/Kconfig 100644 → 100755
No changes.
View
0 drivers/staging/cpupower/Makefile 100644 → 100755
No changes.
View
No changes.
View
0 drivers/switch/switch_gpio.c 100644 → 100755
No changes.
View
0 drivers/thermal/cpu_cooling.c 100644 → 100755
No changes.
View
0 drivers/thermal/exynos4_tmu.c 100644 → 100755
No changes.
View
0 drivers/thermal/exynos_thermal.c 100644 → 100755
No changes.
View
0 drivers/video/samsung/mx_logo.h 100644 → 100755
No changes.
View
No changes.
View
No changes.
View
No changes.
View
No changes.
View
No changes.
View
No changes.
View
No changes.
View
0 drivers/watchdog/watchdog_core.c 100644 → 100755
No changes.
View
0 drivers/watchdog/watchdog_dev.c 100644 → 100755
No changes.
View
0 drivers/watchdog/watchdog_dev.h 100644 → 100755
No changes.
View
No changes.
View
No changes.
View
0 fs/proc/inform.c 100644 → 100755
No changes.
View
0 fs/proc/uboot_version.c 100644 → 100755
No changes.
View
0 include/linux/a1028_param.h 100644 → 100755
No changes.
View
0 include/linux/a1028_soc.h 100644 → 100755
No changes.
View
0 include/linux/autotest/core.h 100644 → 100755
No changes.
View
0 include/linux/bq27541-private.h 100644 → 100755
No changes.
View
0 include/linux/bq27541.h 100644 → 100755
No changes.
View
0 include/linux/cpu_cooling.h 100644 → 100755
No changes.
View
0 include/linux/devfreq-exynos4.h 100644 → 100755
No changes.
View
0 include/linux/exynos-cpufreq.h 100644 → 100755
No changes.
View
0 include/linux/exynos_thermal.h 100644 → 100755
No changes.
View
0 include/linux/memcopy.h 100644 → 100755
No changes.
View
No changes.
View
0 include/linux/mfd/bu26507.h 100644 → 100755
No changes.
View
No changes.
View
0 include/linux/mfd/max77665.h 100644 → 100755
No changes.
View
0 include/linux/mfd/max8997-m030.h 100644 → 100755
No changes.
View
No changes.
View
0 include/linux/mhl.h 100644 → 100755
No changes.
View
0 include/linux/mx_gp2ap.h 100644 → 100755
No changes.
View
0 include/linux/mx_jack.h 100644 → 100755
No changes.
View
0 include/linux/performance.h 100644 → 100755
No changes.
View
No changes.
View
No changes.
View
0 include/linux/power/cpupower.h 100644 → 100755
No changes.
View
No changes.
View
0 include/linux/sii_9244_driver.h 100644 → 100755
No changes.
View
0 include/linux/timed_output.h 100644 → 100755
No changes.
View
0 kernel/autotest/Kconfig 100644 → 100755
No changes.
Oops, something went wrong.

0 comments on commit 1255998

Please sign in to comment.