Commit 03e859d3 authored by Eduardo Valentin's avatar Eduardo Valentin Committed by Greg Kroah-Hartman

staging: ti-soc-thermal: rename symbols to use better prefix

As this driver has been renamed to cope with the chips it
is supposed to support, this patch also changes the symbol
names to use a proper prefix, so it is not suggestive that
this driver supports only OMAP devices.

Cc: Santosh Shilimkar <santosh.shilimkar@ti.com>
Cc: Benoit <b-cousson@ti.com>
Cc: Nishanth Menon <nm@ti.com>
Cc: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarEduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 097ca6a3
......@@ -66,17 +66,17 @@ omap4430_adc_to_temp[OMAP4430_ADC_END_VALUE - OMAP4430_ADC_START_VALUE + 1] = {
};
/* OMAP4430 data */
const struct omap_bandgap_data omap4430_data = {
.features = OMAP_BANDGAP_FEATURE_MODE_CONFIG |
OMAP_BANDGAP_FEATURE_CLK_CTRL |
OMAP_BANDGAP_FEATURE_POWER_SWITCH,
const struct ti_bandgap_data omap4430_data = {
.features = TI_BANDGAP_FEATURE_MODE_CONFIG |
TI_BANDGAP_FEATURE_CLK_CTRL |
TI_BANDGAP_FEATURE_POWER_SWITCH,
.fclock_name = "bandgap_fclk",
.div_ck_name = "bandgap_fclk",
.conv_table = omap4430_adc_to_temp,
.adc_start_val = OMAP4430_ADC_START_VALUE,
.adc_end_val = OMAP4430_ADC_END_VALUE,
.expose_sensor = omap_thermal_expose_sensor,
.remove_sensor = omap_thermal_remove_sensor,
.expose_sensor = ti_thermal_expose_sensor,
.remove_sensor = ti_thermal_remove_sensor,
.sensors = {
{
.registers = &omap4430_mpu_temp_sensor_registers,
......@@ -86,8 +86,8 @@ const struct omap_bandgap_data omap4430_data = {
.constant = 20000,
.slope_pcb = 0,
.constant_pcb = 20000,
.register_cooling = omap_thermal_register_cpu_cooling,
.unregister_cooling = omap_thermal_unregister_cpu_cooling,
.register_cooling = ti_thermal_register_cpu_cooling,
.unregister_cooling = ti_thermal_unregister_cpu_cooling,
},
},
.sensor_count = 1,
......@@ -201,21 +201,21 @@ omap4460_adc_to_temp[OMAP4460_ADC_END_VALUE - OMAP4460_ADC_START_VALUE + 1] = {
};
/* OMAP4460 data */
const struct omap_bandgap_data omap4460_data = {
.features = OMAP_BANDGAP_FEATURE_TSHUT |
OMAP_BANDGAP_FEATURE_TSHUT_CONFIG |
OMAP_BANDGAP_FEATURE_TALERT |
OMAP_BANDGAP_FEATURE_MODE_CONFIG |
OMAP_BANDGAP_FEATURE_POWER_SWITCH |
OMAP_BANDGAP_FEATURE_CLK_CTRL |
OMAP_BANDGAP_FEATURE_COUNTER,
const struct ti_bandgap_data omap4460_data = {
.features = TI_BANDGAP_FEATURE_TSHUT |
TI_BANDGAP_FEATURE_TSHUT_CONFIG |
TI_BANDGAP_FEATURE_TALERT |
TI_BANDGAP_FEATURE_MODE_CONFIG |
TI_BANDGAP_FEATURE_POWER_SWITCH |
TI_BANDGAP_FEATURE_CLK_CTRL |
TI_BANDGAP_FEATURE_COUNTER,
.fclock_name = "bandgap_ts_fclk",
.div_ck_name = "div_ts_ck",
.conv_table = omap4460_adc_to_temp,
.adc_start_val = OMAP4460_ADC_START_VALUE,
.adc_end_val = OMAP4460_ADC_END_VALUE,
.expose_sensor = omap_thermal_expose_sensor,
.remove_sensor = omap_thermal_remove_sensor,
.expose_sensor = ti_thermal_expose_sensor,
.remove_sensor = ti_thermal_remove_sensor,
.sensors = {
{
.registers = &omap4460_mpu_temp_sensor_registers,
......@@ -225,29 +225,29 @@ const struct omap_bandgap_data omap4460_data = {
.constant = OMAP_GRADIENT_CONST_4460,
.slope_pcb = OMAP_GRADIENT_SLOPE_W_PCB_4460,
.constant_pcb = OMAP_GRADIENT_CONST_W_PCB_4460,
.register_cooling = omap_thermal_register_cpu_cooling,
.unregister_cooling = omap_thermal_unregister_cpu_cooling,
.register_cooling = ti_thermal_register_cpu_cooling,
.unregister_cooling = ti_thermal_unregister_cpu_cooling,
},
},
.sensor_count = 1,
};
/* OMAP4470 data */
const struct omap_bandgap_data omap4470_data = {
.features = OMAP_BANDGAP_FEATURE_TSHUT |
OMAP_BANDGAP_FEATURE_TSHUT_CONFIG |
OMAP_BANDGAP_FEATURE_TALERT |
OMAP_BANDGAP_FEATURE_MODE_CONFIG |
OMAP_BANDGAP_FEATURE_POWER_SWITCH |
OMAP_BANDGAP_FEATURE_CLK_CTRL |
OMAP_BANDGAP_FEATURE_COUNTER,
const struct ti_bandgap_data omap4470_data = {
.features = TI_BANDGAP_FEATURE_TSHUT |
TI_BANDGAP_FEATURE_TSHUT_CONFIG |
TI_BANDGAP_FEATURE_TALERT |
TI_BANDGAP_FEATURE_MODE_CONFIG |
TI_BANDGAP_FEATURE_POWER_SWITCH |
TI_BANDGAP_FEATURE_CLK_CTRL |
TI_BANDGAP_FEATURE_COUNTER,
.fclock_name = "bandgap_ts_fclk",
.div_ck_name = "div_ts_ck",
.conv_table = omap4460_adc_to_temp,
.adc_start_val = OMAP4460_ADC_START_VALUE,
.adc_end_val = OMAP4460_ADC_END_VALUE,
.expose_sensor = omap_thermal_expose_sensor,
.remove_sensor = omap_thermal_remove_sensor,
.expose_sensor = ti_thermal_expose_sensor,
.remove_sensor = ti_thermal_remove_sensor,
.sensors = {
{
.registers = &omap4460_mpu_temp_sensor_registers,
......@@ -257,8 +257,8 @@ const struct omap_bandgap_data omap4470_data = {
.constant = OMAP_GRADIENT_CONST_4470,
.slope_pcb = OMAP_GRADIENT_SLOPE_W_PCB_4470,
.constant_pcb = OMAP_GRADIENT_CONST_W_PCB_4470,
.register_cooling = omap_thermal_register_cpu_cooling,
.unregister_cooling = omap_thermal_unregister_cpu_cooling,
.register_cooling = ti_thermal_register_cpu_cooling,
.unregister_cooling = ti_thermal_unregister_cpu_cooling,
},
},
.sensor_count = 1,
......
......@@ -312,24 +312,24 @@ omap5430_adc_to_temp[
/* OMAP54xx ES2.0 data */
/* TODO : Need to update the slope/constant for ES2.0 silicon */
const struct omap_bandgap_data omap5430_data = {
.features = OMAP_BANDGAP_FEATURE_TSHUT_CONFIG |
OMAP_BANDGAP_FEATURE_FREEZE_BIT |
OMAP_BANDGAP_FEATURE_TALERT,
const struct ti_bandgap_data omap5430_data = {
.features = TI_BANDGAP_FEATURE_TSHUT_CONFIG |
TI_BANDGAP_FEATURE_FREEZE_BIT |
TI_BANDGAP_FEATURE_TALERT,
.fclock_name = "l3instr_ts_gclk_div",
.div_ck_name = "l3instr_ts_gclk_div",
.conv_table = omap5430_adc_to_temp,
.adc_start_val = OMAP5430_ADC_START_VALUE,
.adc_end_val = OMAP5430_ADC_END_VALUE,
.expose_sensor = omap_thermal_expose_sensor,
.remove_sensor = omap_thermal_remove_sensor,
.expose_sensor = ti_thermal_expose_sensor,
.remove_sensor = ti_thermal_remove_sensor,
.sensors = {
{
.registers = &omap5430_mpu_temp_sensor_registers,
.ts_data = &omap5430_mpu_temp_sensor_data,
.domain = "cpu",
.register_cooling = omap_thermal_register_cpu_cooling,
.unregister_cooling = omap_thermal_unregister_cpu_cooling,
.register_cooling = ti_thermal_register_cpu_cooling,
.unregister_cooling = ti_thermal_unregister_cpu_cooling,
.slope = OMAP_GRADIENT_SLOPE_5430_CPU,
.constant = OMAP_GRADIENT_CONST_5430_CPU,
.slope_pcb = OMAP_GRADIENT_SLOPE_W_PCB_5430_CPU,
......
This diff is collapsed.
This diff is collapsed.
......@@ -60,47 +60,45 @@
/* helper macros */
/**
* omap_thermal_get_trip_value - returns trip temperature based on index
* ti_thermal_get_trip_value - returns trip temperature based on index
* @i: trip index
*/
#define omap_thermal_get_trip_value(i) \
#define ti_thermal_get_trip_value(i) \
(OMAP_TRIP_HOT + ((i) * OMAP_TRIP_STEP))
/**
* omap_thermal_is_valid_trip - check for trip index
* ti_thermal_is_valid_trip - check for trip index
* @i: trip index
*/
#define omap_thermal_is_valid_trip(trip) \
#define ti_thermal_is_valid_trip(trip) \
((trip) >= 0 && (trip) < OMAP_TRIP_NUMBER)
#ifdef CONFIG_TI_THERMAL
int omap_thermal_expose_sensor(struct omap_bandgap *bgp, int id,
char *domain);
int omap_thermal_remove_sensor(struct omap_bandgap *bgp, int id);
int omap_thermal_register_cpu_cooling(struct omap_bandgap *bgp, int id);
int omap_thermal_unregister_cpu_cooling(struct omap_bandgap *bgp, int id);
int ti_thermal_expose_sensor(struct ti_bandgap *bgp, int id, char *domain);
int ti_thermal_remove_sensor(struct ti_bandgap *bgp, int id);
int ti_thermal_register_cpu_cooling(struct ti_bandgap *bgp, int id);
int ti_thermal_unregister_cpu_cooling(struct ti_bandgap *bgp, int id);
#else
static inline
int omap_thermal_expose_sensor(struct omap_bandgap *bgp, int id,
char *domain)
int ti_thermal_expose_sensor(struct ti_bandgap *bgp, int id, char *domain)
{
return 0;
}
static inline
int omap_thermal_remove_sensor(struct omap_bandgap *bgp, int id)
int ti_thermal_remove_sensor(struct ti_bandgap *bgp, int id)
{
return 0;
}
static inline
int omap_thermal_register_cpu_cooling(struct omap_bandgap *bgp, int id)
int ti_thermal_register_cpu_cooling(struct ti_bandgap *bgp, int id)
{
return 0;
}
static inline
int omap_thermal_unregister_cpu_cooling(struct omap_bandgap *bgp, int id)
int ti_thermal_unregister_cpu_cooling(struct ti_bandgap *bgp, int id)
{
return 0;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment