diff options
author | Alex Frid <afrid@nvidia.com> | 2011-05-24 19:07:22 -0700 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2011-11-30 21:43:05 -0800 |
commit | f4e8c4bba59ed4ffc370ff1ca44fb9a465f99c85 (patch) | |
tree | 3f8dc9d1a35303b043f09f5992a9247471e74ae0 /drivers/misc | |
parent | 42a9d5b4270c579f292d61b079f02cfd4dfafbbd (diff) |
misc: nct1008: set edp zone on driver initialization
Original-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>
Rebase-Id: Rd50d38c5de1e7bbca21184751a47700ed3a14e6c
Diffstat (limited to 'drivers/misc')
-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: |