]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/commitdiff
regulator: max8973: prints when junction temp warning appear
authorLaxman Dewangan <ldewangan@nvidia.com>
Tue, 7 Jul 2015 06:48:22 +0000 (12:18 +0530)
committerLaxman Dewangan <ldewangan@nvidia.com>
Wed, 15 Jul 2015 13:38:10 +0000 (06:38 -0700)
When device generate interrupt due to junction temp cross to
threshold level, print the message to log the information.

bug 1602622

Change-Id: I811c92082b6106898f1775ccadce9def9ad0c6d3
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
(cherry picked from commit 7652021ee874fbb89d39b3ce03c539e53983203c)
Reviewed-on: http://git-master/r/769640

drivers/regulator/max8973-regulator.c

index 3542e8653a92cf84d8258b522f962bd530c9e4e6..a3b03b98750b1beada801010969568136f52db9a 100644 (file)
@@ -522,6 +522,7 @@ static int max8973_thermal_read_temp(void *data, long *temp)
                *temp = mchip->junction_temp_warning + 1000;
        else
                *temp = MAX77621_NORMAL_OPERATING_TEMP;
+
        return 0;
 }
 
@@ -529,6 +530,7 @@ static irqreturn_t max8973_thermal_irq(int irq, void *data)
 {
        struct max8973_chip *mchip = data;
 
+       dev_info(mchip->dev, "Junction Temp warning occurred\n");
        thermal_zone_device_update(mchip->tz_device);
        return IRQ_HANDLED;
 }