Add parameters to nct1008_pdata:
- suspend_ext_limit_hi/_lo: limits of allowed
temperature during suspend, outside of which an
interrupt is triggered
- suspend_with_wakeup: function pointer to check for
desired NCT suspend type. For Tegra, this function
returns true if suspend mode is LP1.
Currently this functionality is only added to Pluto.
Bug
1261915
Change-Id: I190721a42ee1e06961368f5c6f7274aa182fd49d
Signed-off-by: Daniel Solomon <daniels@nvidia.com>
Reviewed-on: http://git-master/r/216366
(cherry picked from commit
8edbfe81583505ff51687573088615e69d469585)
Reviewed-on: http://git-master/r/226449
Reviewed-by: Mrutyunjay Sawant <msawant@nvidia.com>
Tested-by: Mrutyunjay Sawant <msawant@nvidia.com>
#include <linux/input/max77665-haptic.h>
#include <linux/power/max17042_battery.h>
#include <linux/nct1008.h>
+#include <linux/io.h>
#include <linux/interrupt.h>
#include <mach/edp.h>
#include <mach/gpio-tegra.h>
#include "devices.h"
#include "tegra-board-id.h"
#include "dvfs.h"
+#include "pm.h"
#define NTC_10K_TGAIN 0xE6A2
#define NTC_10K_TOFF 0x2694
.hysteresis = 5000,
},
},
+
+#ifdef CONFIG_TEGRA_LP1_LOW_COREVOLTAGE
+ .suspend_ext_limit_hi = 25000,
+ .suspend_ext_limit_lo = 20000,
+ .suspend_with_wakeup = tegra_is_lp1_suspend_mode,
+#endif
};
static struct i2c_board_info pluto_i2c4_nct1008_board_info[] = {
writel(0, pmc + PMC_SCRATCH41);
}
+#ifdef CONFIG_TEGRA_LP1_LOW_COREVOLTAGE
+int tegra_is_lp1_suspend_mode(void)
+{
+ return (current_suspend_mode == TEGRA_SUSPEND_LP1);
+}
+#endif
+
static int tegra_common_suspend(void)
{
void __iomem *mc = IO_ADDRESS(TEGRA_MC_BASE);
void tegra_mc_clk_prepare(void);
void tegra_mc_clk_finish(void);
int tegra_suspend_dram(enum tegra_suspend_mode mode, unsigned int flags);
+#ifdef CONFIG_TEGRA_LP1_LOW_COREVOLTAGE
+int tegra_is_lp1_suspend_mode(void);
+#endif
#ifdef CONFIG_ARCH_TEGRA_14x_SOC
#define FLOW_CTRL_CLUSTER_CONTROL \