Files
android_kernel_samsung_msm8226/include/linux/msm_tsens.h
T
Siddartha Mohanadoss de952f7ff9 thermal: tsens8960: Add api to read max supported sensors
Provide api to report the maximum number of TSENS sensors
supported. Backport this from the 8974 TSENS driver
to support thermal monitor driver compilation.

Change-Id: I712ccd8169eb3df0f1e83189aea1dd98180c3e7d
Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>
2013-04-09 14:21:58 -07:00

51 lines
1.3 KiB
C

/*
* Copyright (c) 2011-2013, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
* only version 2 as published by the Free Software Foundation.
*
* 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.
*/
/*
* Qualcomm TSENS Header file
*
*/
#ifndef __MSM_TSENS_H
#define __MSM_TSENS_H
enum platform_type {
MSM_8660 = 0,
MSM_8960,
MDM_9615,
APQ_8064,
MSM_TYPE
};
#define TSENS_MAX_SENSORS 11
struct tsens_platform_data {
int slope[TSENS_MAX_SENSORS];
int tsens_factor;
uint32_t tsens_num_sensor;
enum platform_type hw_type;
};
struct tsens_device {
uint32_t sensor_num;
};
int32_t tsens_get_temp(struct tsens_device *dev, unsigned long *temp);
int msm_tsens_early_init(struct tsens_platform_data *pdata);
#if defined(CONFIG_THERMAL_TSENS8974) || defined(CONFIG_THERMAL_TSENS8960)
int tsens_get_max_sensor_num(uint32_t *tsens_num_sensors);
#else
static inline int tsens_get_max_sensor_num(uint32_t *tsens_num_sensors)
{ return -ENXIO; }
#endif
#endif /*MSM_TSENS_H */