Update degree of low temperature protection
authorTracy Yi <tracy-yi@ti.com>
Tue, 5 Jun 2018 01:30:35 +0000 (09:30 +0800)
committerTracy Yi <tracy-yi@ti.com>
Tue, 5 Jun 2018 01:41:38 +0000 (09:41 +0800)
Signed-off-by: Tracy Yi <tracy-yi@ti.com>
tas2557-regmap.c

index 7aed6d3cba9417e79228b2aaf63e0ed1d8a466dd..a48eca2017d7477467165ef283f8e42e0e85f7ba 100755 (executable)
@@ -589,8 +589,8 @@ static void timer_work_routine(struct work_struct *work)
                if (!(pTAS2557->mnDieTvReadCounter % LOW_TEMPERATURE_COUNTER)) {
                        nAvg /= LOW_TEMPERATURE_COUNTER;
                        dev_dbg(pTAS2557->dev, "check : avg=%d\n", nAvg);
-                       if ((nAvg & 0x80000000) != 0) {
-                               /* if Die temperature is below ZERO */
+                       if (nAvg < -6) {
+                               /* if Die temperature is below -6 degree C */
                                if (pTAS2557->mnDevCurrentGain != LOW_TEMPERATURE_GAIN) {
                                        nResult = tas2557_set_DAC_gain(pTAS2557, LOW_TEMPERATURE_GAIN);
                                        if (nResult < 0)