All of lore.kernel.org
 help / color / mirror / Atom feed
From: amit kachhap <amit.kachhap@gmail.com>
To: Joe Perches <joe@perches.com>
Cc: linux-pm@lists.linux-foundation.org, linux-pm@vger.kernel.org,
	Zhang Rui <rui.zhang@intel.com>,
	linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/5 RESEND] thermal: exynos: Miscellaneous fixes to support falling threshold interrupt
Date: Tue, 8 Jan 2013 20:30:55 -0800	[thread overview]
Message-ID: <CADGdYn4CeWB5zHuHrfSLYsyOCA_zcSgm9LHTwtei1zAhfmDJNQ@mail.gmail.com> (raw)
In-Reply-To: <1357516522.4940.8.camel@joe-AO722>

Hi Joe,

Thanks for the review. Will re-post with your suggestion,

On Sun, Jan 6, 2013 at 3:55 PM, Joe Perches <joe@perches.com> wrote:
> On Sun, 2013-01-06 at 15:50 -0800, Amit Daniel Kachhap wrote:
>> Below fixes are done to support falling threshold interrupt,
>> * Falling interrupt status macro corrected according to exynos5 data sheet.
>> * The get trend function modified to calculate trip temperature correctly.
>> * The clearing of interrupt status in the isr is now done after handling
>>   the event that caused the interrupt.
> []
>> diff --git a/drivers/thermal/exynos_thermal.c b/drivers/thermal/exynos_thermal.c
> []
>> @@ -373,12 +373,19 @@ static int exynos_get_temp(struct thermal_zone_device *thermal,
>>  static int exynos_get_trend(struct thermal_zone_device *thermal,
>>                       int trip, enum thermal_trend *trend)
>>  {
>> -     if (thermal->temperature >= trip)
>> +     int ret = 0;
Yes agreed. Will modify it.
>
> Unnecessary initialization
>
>> +     unsigned long trip_temp;
>> +
>> +     ret = exynos_get_trip_temp(thermal, trip, &trip_temp);
>> +     if (ret < 0)
>> +             return ret;
>> +
>> +     if (thermal->temperature >= trip_temp)
>>               *trend = THERMAL_TREND_RAISING;
>>       else
>>               *trend = THERMAL_TREND_DROPPING;
>
> THERMAL_TREND_STABLE ?
Only 2 trend is sufficient. It is stable for some time as the falling
threshold interrupt is some units below the trip temp.
>
>>
>> -     return 0;
>> +     return ret;
Ok agreed
>
> return 0 is clearer.
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2013-01-09  4:30 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-26 13:47 [PATCH V2 0/3] thermal: Add support for interrupt based notification to thermal layer Amit Daniel Kachhap
2012-11-26 13:47 ` [PATCH V2 1/3] Thermal: exynos: Add support for temperature falling interrupt Amit Daniel Kachhap
2012-11-26 13:47 ` [PATCH V2 2/3] thermal: exynos: Miscellaneous fixes to support falling threshold interrupt Amit Daniel Kachhap
2013-01-06 23:50   ` [PATCH 2/5 RESEND] " Amit Daniel Kachhap
2013-01-06 23:55     ` Joe Perches
2013-01-09  4:30       ` amit kachhap [this message]
2013-01-17  1:42         ` [PATCH V3 2/3] " Amit Daniel Kachhap
2013-01-20 12:53           ` Shubhrajyoti Datta
2012-11-26 13:47 ` [PATCH V2 3/3] thermal: exynos: Use the new thermal trend type for quick cooling action Amit Daniel Kachhap
2013-01-06 23:57 ` [PATCH V2 0/3] thermal: Add support for interrupt based notification to thermal layer amit daniel kachhap
2013-01-17 17:47   ` amit daniel kachhap
2013-01-22  1:32     ` Kukjin Kim

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CADGdYn4CeWB5zHuHrfSLYsyOCA_zcSgm9LHTwtei1zAhfmDJNQ@mail.gmail.com \
    --to=amit.kachhap@gmail.com \
    --cc=joe@perches.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@lists.linux-foundation.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=rui.zhang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.