#define EXYNOS_TMU_REG_TRIMINFO1 0x4
#define EXYNOS_TMU_REG_TRIMINFO2 0x8
#define EXYNOS_TMU_REG_CONTROL 0x20
+#define EXYNOS_TMU_REG_CONTROL1 0x24
#define EXYNOS_TMU_REG_STATUS 0x28
#define EXYNOS_TMU_REG_CURRENT_TEMP1_0 0x40
#define EXYNOS_TMU_REG_CURRENT_TEMP4_2 0x44
#define EXYNOS_TMU_CLK_SENSE_ON_MASK (0xffff)
#define EXYNOS_TMU_TEM1456X_SENSE_VALUE (0x0A28)
+#define EXYNOS_TMU_NUM_PROBE_SHIFT (16)
+#define EXYNOS_TMU_NUM_PROBE_MASK (0x7)
+
#define TOTAL_SENSORS 8
static bool suspended;
{
struct exynos_tmu_data *data = platform_get_drvdata(pdev);
struct thermal_zone_device *tz = data->tzd;
- unsigned int con, interrupt_en, trim_info, trim_info1, trim_info2;
+ unsigned int con, con1, interrupt_en, trim_info, trim_info1, trim_info2;
unsigned int t_buf_vref_sel, t_buf_slope_sel;
int i;
u32 avg_con, avg_sel;
writel(con, data->base + EXYNOS_TMU_REG_CONTROL);
con = 0;
+ con1 = readl(data->base + EXYNOS_TMU_REG_CONTROL1);
+ con1 &= ~(EXYNOS_TMU_NUM_PROBE_MASK << EXYNOS_TMU_NUM_PROBE_SHIFT);
+ con1 |= (data->num_probe << EXYNOS_TMU_NUM_PROBE_SHIFT);
+ writel(con1, data->base + EXYNOS_TMU_REG_CONTROL1);
+
trim_info = readl(data->base + EXYNOS_TMU_REG_TRIMINFO);
trim_info1 = readl(data->base + EXYNOS_TMU_REG_TRIMINFO1);
trim_info2 = readl(data->base + EXYNOS_TMU_REG_TRIMINFO2);
goto err_sensor;
}
+ data->num_probe = (readl(data->base + EXYNOS_TMU_REG_CONTROL1) >> EXYNOS_TMU_NUM_PROBE_SHIFT)
+ & EXYNOS_TMU_NUM_PROBE_MASK;
+
ret = exynos_tmu_initialize(pdev);
if (ret) {
dev_err(&pdev->dev, "Failed to initialize TMU\n");
* @lock: lock to implement synchronization.
* @temp_error1: fused value of the first point trim.
* @temp_error2: fused value of the second point trim.
+ * @num_probe: number of probe for TMU_CONTROL1 SFR setting.
* @regulator: pointer to the TMU regulator structure.
* @reg_conf: pointer to structure to register with core thermal.
* @ntrip: number of supported trip points.
struct thermal_cooling_device *cool_dev;
struct list_head node;
u32 sensors;
+ int num_probe;
int num_of_sensors;
struct sensor_info *sensor_info;
int sensing_mode;