summaryrefslogtreecommitdiff
path: root/drivers/hwmon
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/hwmon')
-rw-r--r--drivers/hwmon/tegra-tsensor.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/drivers/hwmon/tegra-tsensor.c b/drivers/hwmon/tegra-tsensor.c
index c28733f51e8c..025be5426b92 100644
--- a/drivers/hwmon/tegra-tsensor.c
+++ b/drivers/hwmon/tegra-tsensor.c
@@ -1615,16 +1615,22 @@ static int __devinit tegra_tsensor_probe(struct platform_device *pdev)
goto err5;
}
+ /* fuse revisions less than TSENSOR_FUSE_REVISION_DECIMAL_REV1
+ bypass tsensor driver init */
/* tsensor active instance decided based on fuse revision */
err = tegra_fuse_get_revision(&reg);
if (err)
goto err6;
- /* instance 1 is used for fuse revision 8 till 20 */
- /* instance 0 is used for fuse revision 21 onwards */
- if ((reg & 0xf) >= TSENSOR_FUSE_REVISION_DECIMAL_REV1)
- tsensor_index = 1;
- else if ((reg & 0xf) >= TSENSOR_FUSE_REVISION_DECIMAL_REV2)
+ /* check for higher revision done first */
+ /* instance 0 is used for fuse revision
+ TSENSOR_FUSE_REVISION_DECIMAL_REV2 onwards */
+ if (reg >= TSENSOR_FUSE_REVISION_DECIMAL_REV2)
tsensor_index = 0;
+ /* instance 1 is used for fuse revision
+ TSENSOR_FUSE_REVISION_DECIMAL_REV1 till
+ TSENSOR_FUSE_REVISION_DECIMAL_REV2 */
+ else if (reg >= TSENSOR_FUSE_REVISION_DECIMAL_REV1)
+ tsensor_index = 1;
pr_info("tsensor active instance=%d\n", tsensor_index);
/* tegra tsensor - setup and init */