diff options
author | Alex Frid <afrid@nvidia.com> | 2011-05-24 19:07:22 -0700 |
---|---|---|
committer | Niket Sirsi <nsirsi@nvidia.com> | 2011-05-27 15:43:28 -0700 |
commit | 5fc17afa5ecc181304950db89c0d06ab295e620f (patch) | |
tree | 84eb208f0c6ccd91c2505c716d772366f906b82e | |
parent | 7c9bb73a350a8a3fc781bfa5b6c298dfad5c870f (diff) |
misc: nct1008: set edp zone on driver initialization
Change-Id: I2f578aee6dea911ebbe63cdcb5c9a7ddfcdf2264
Reviewed-on: http://git-master/r/32862
Tested-by: Aleksandr Frid <afrid@nvidia.com>
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>
Reviewed-by: Diwakar Tundlam <dtundlam@nvidia.com>
Reviewed-by: Scott Williams <scwilliams@nvidia.com>
-rw-r--r-- | drivers/misc/nct1008.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/misc/nct1008.c b/drivers/misc/nct1008.c index 53b176639d21..034fa59ae489 100644 --- a/drivers/misc/nct1008.c +++ b/drivers/misc/nct1008.c @@ -681,6 +681,7 @@ static int __devinit nct1008_probe(struct i2c_client *client, { struct nct1008_data *data; int err; + u8 temperature; data = kzalloc(sizeof(struct nct1008_data), GFP_KERNEL); @@ -710,6 +711,13 @@ static int __devinit nct1008_probe(struct i2c_client *client, nct1008_enable(client); /* sensor is running */ + err = nct1008_get_temp(&data->client->dev, &temperature); + if (err) { + pr_err("%s: get temp fail(%d)", __func__, err); + return 0; /*do not fail init on the 1st read */ + } + + tegra_edp_update_thermal_zone(temperature); return 0; error: |