summaryrefslogtreecommitdiff
path: root/arch/arm/mach-tegra
diff options
context:
space:
mode:
authorJoshua Primero <jprimero@nvidia.com>2011-12-16 11:09:50 -0800
committerVarun Wadekar <vwadekar@nvidia.com>2011-12-22 11:30:54 +0530
commitb0874e7b76b2ea6e9d60c39028aa27cabad74f46 (patch)
tree8f8cf1e160e75f6ce43f98d7f48534365dbb6547 /arch/arm/mach-tegra
parentd040ac1e4c0ee288945d1e557de3d9642e788779 (diff)
arm: tegra: thermal: Added name per therm device
Added name paramater per therm device so that is easy to tell which therm device is being used from sysfs Change-Id: I58488b4c50ac6dc58dc00e270b613458f61a9fd6 Signed-off-by: Joshua Primero <jprimero@nvidia.com> Reviewed-on: http://git-master/r/70929 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Diwakar Tundlam <dtundlam@nvidia.com>
Diffstat (limited to 'arch/arm/mach-tegra')
-rw-r--r--arch/arm/mach-tegra/board-cardhu-sensors.c1
-rw-r--r--arch/arm/mach-tegra/board-enterprise-sensors.c1
-rw-r--r--arch/arm/mach-tegra/include/mach/thermal.h1
-rw-r--r--arch/arm/mach-tegra/tegra3_thermal.c2
-rw-r--r--arch/arm/mach-tegra/tegra3_tsensor.c1
5 files changed, 5 insertions, 1 deletions
diff --git a/arch/arm/mach-tegra/board-cardhu-sensors.c b/arch/arm/mach-tegra/board-cardhu-sensors.c
index e8c3b3326942..7f3484a8f68b 100644
--- a/arch/arm/mach-tegra/board-cardhu-sensors.c
+++ b/arch/arm/mach-tegra/board-cardhu-sensors.c
@@ -572,6 +572,7 @@ static void nct1008_probe_callback(struct nct1008_data *data)
return;
}
+ thermal_device->name = "nct1008";
thermal_device->data = data;
thermal_device->offset = TDIODE_OFFSET;
thermal_device->get_temp = nct_get_temp;
diff --git a/arch/arm/mach-tegra/board-enterprise-sensors.c b/arch/arm/mach-tegra/board-enterprise-sensors.c
index 14c5260596fb..889348d4a1c6 100644
--- a/arch/arm/mach-tegra/board-enterprise-sensors.c
+++ b/arch/arm/mach-tegra/board-enterprise-sensors.c
@@ -94,6 +94,7 @@ static void nct1008_probe_callback(struct nct1008_data *data)
return;
}
+ thermal_device->name = "nct1008";
thermal_device->data = data;
thermal_device->offset = TDIODE_OFFSET;
thermal_device->get_temp = nct_get_temp;
diff --git a/arch/arm/mach-tegra/include/mach/thermal.h b/arch/arm/mach-tegra/include/mach/thermal.h
index 714b63370b06..b46dcb865f77 100644
--- a/arch/arm/mach-tegra/include/mach/thermal.h
+++ b/arch/arm/mach-tegra/include/mach/thermal.h
@@ -36,6 +36,7 @@ struct tegra_thermal_data {
};
struct tegra_thermal_device {
+ char *name;
void *data;
long offset;
int (*get_temp) (void *, long *);
diff --git a/arch/arm/mach-tegra/tegra3_thermal.c b/arch/arm/mach-tegra/tegra3_thermal.c
index 8d310ccd841c..16bf6551c5e9 100644
--- a/arch/arm/mach-tegra/tegra3_thermal.c
+++ b/arch/arm/mach-tegra/tegra3_thermal.c
@@ -291,7 +291,7 @@ int tegra_thermal_set_device(struct tegra_thermal_device *device)
thermal_state.device = device;
#ifdef CONFIG_TEGRA_THERMAL_SYSFS
- thz = thermal_zone_device_register("thermal",
+ thz = thermal_zone_device_register(thermal_state.device->name,
1, /* trips */
&thermal_state,
&tegra_thermal_zone_ops,
diff --git a/arch/arm/mach-tegra/tegra3_tsensor.c b/arch/arm/mach-tegra/tegra3_tsensor.c
index a5160733fd2f..9e027c8652b9 100644
--- a/arch/arm/mach-tegra/tegra3_tsensor.c
+++ b/arch/arm/mach-tegra/tegra3_tsensor.c
@@ -98,6 +98,7 @@ static void tegra3_tsensor_probe_callback(struct tegra_tsensor_data *data)
return;
}
+ thermal_device->name = "tsensor";
thermal_device->data = data;
thermal_device->offset = TSENSOR_OFFSET;
thermal_device->get_temp = tsensor_get_temp;