ARM: tegra11: common: Add cmdline to detect Pike
Ankita Garg [Thu, 19 Sep 2013 17:55:24 +0000 (10:55 -0700)]
Add the kernel commandline parameter "pike" to detect
the presence of the Pike module

Bug 1312065

Change-Id: I66a1d8ad8a17eb71ef63cd627e56dee3ea5b479b
Signed-off-by: Ankita Garg <ankitag@nvidia.com>
Reviewed-on: http://git-master/r/276778
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Tested-by: Bharat Nihalani <bnihalani@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User

arch/arm/mach-tegra/board.h
arch/arm/mach-tegra/common.c

index d0f55ca..33cabe6 100644 (file)
@@ -198,6 +198,7 @@ void tegra_get_leftspeaker_board_info(struct board_info *bi);
 int tegra_get_board_panel_id(void);
 
 int get_core_edp(void);
+bool is_pike_supported(void);
 enum panel_type get_panel_type(void);
 int tegra_get_usb_port_owner_info(void);
 int tegra_get_modem_id(void);
index 3be9cd1..0048ca3 100644 (file)
@@ -147,6 +147,7 @@ static int board_panel_type;
 static enum power_supply_type pow_supply_type = POWER_SUPPLY_TYPE_MAINS;
 static int pwr_i2c_clk = 400;
 static u8 power_config;
+static bool pike_supported;
 
 atomic_t __maybe_unused sd_brightness = ATOMIC_INIT(255);
 EXPORT_SYMBOL(sd_brightness);
@@ -969,6 +970,21 @@ static int __init tegra_pmu_core_edp(char *options)
 }
 early_param("core_edp_mv", tegra_pmu_core_edp);
 
+bool is_pike_supported(void)
+{
+       return pike_supported;
+}
+static int __init tegra_pike_support(char *options)
+{
+       char *p = options;
+       int pike_val = memparse(p, &p);
+
+       if (pike_val == 1)
+               pike_supported = true;
+       return 0;
+}
+early_param("pike", tegra_pike_support);
+
 int get_maximum_cpu_current_supported(void)
 {
        return max_cpu_current;