misc: nct : configure nct local hi/lo temp also
Bibek Basu [Thu, 3 Apr 2014 04:26:30 +0000 (09:26 +0530)]
configure nct local hi/lo temp also so
that action is taken if there is an increase
in local temp

Bug 1490524

Change-Id: I3186ff3ade97e7655c5c7494efa7c51b6946de5d
Signed-off-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-on: http://git-master/r/391649
Reviewed-by: Matthew Pedro <mapedro@nvidia.com>
Tested-by: Matthew Pedro <mapedro@nvidia.com>

drivers/misc/nct1008.c

index e4fe1f7..21db7cd 100644 (file)
@@ -639,6 +639,10 @@ static int nct1008_thermal_set_limits(struct nct1008_data *data,
                                EXT_TEMP_LO_LIMIT_HI_BYTE_WR, value);
                if (err)
                        return err;
+               err = nct1008_write_reg(data->client,
+                               LOCAL_TEMP_LO_LIMIT_WR, value);
+               if (err)
+                       return err;
 
                data->current_lo_limit = lo_limit;
        }
@@ -650,6 +654,10 @@ static int nct1008_thermal_set_limits(struct nct1008_data *data,
                                EXT_TEMP_HI_LIMIT_HI_BYTE_WR, value);
                if (err)
                        return err;
+               err = nct1008_write_reg(data->client,
+                               LOCAL_TEMP_HI_LIMIT_WR, value);
+               if (err)
+                       return err;
 
                data->current_hi_limit = hi_limit;
        }