linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
To: Antoine Tenart <atenart@kernel.org>,
	amitk@kernel.org, daniel.lezcano@linaro.org, rui.zhang@intel.com
Cc: linux-pm@vger.kernel.org
Subject: Re: [PATCH] thermal: int340x: fix tcc offset on resume
Date: Thu, 09 Sep 2021 00:30:17 -0700	[thread overview]
Message-ID: <2c1a37bcf8cd55c4f9ebb16c876148d9b5ecc78f.camel@linux.intel.com> (raw)
In-Reply-To: <163117137691.4442.5244464351443466921@kwain>

On Thu, 2021-09-09 at 09:09 +0200, Antoine Tenart wrote:
> Quoting Srinivas Pandruvada (2021-09-09 07:47:23)
> > 
> > We have to mark for stable. But It mayn't cleanly apply. So we have
> > to
> > submit for 5.12+ kernels.
> 
> If this can't be easily applied on stable kernels another approach
> could
> be to apply a simple fix (similar to the previous logic) for older
> kernels[1] and applying this patch only for 5.15+.
> 
> [1] Something like:
> 
>   -static unsigned int tcc_offset_save;
>   +static unsigned int tcc_offset_save = -1;
> 
>    int proc_thermal_resume(struct device *dev)
>    {
>           struct proc_thermal_device *proc_dev;
>   @@ -352,7 +371,9 @@ int proc_thermal_resume(struct device *dev)
>           proc_dev = dev_get_drvdata(dev);
>           proc_thermal_read_ppcc(proc_dev);
> 
>   -       tcc_offset_update(tcc_offset_save);
>   +       if (tcc_offset_save >= 0)
>   +               tcc_offset_update(tcc_offset_save);
> 
>           return 0;

This is a better approach. First submit this change with simple fix and
mark for stable and the other fix for 5.15 kernel.

Thanks,
Srinivas

>    }
> 
> Let me know if you prefer this approach.
> 
> Thanks,
> Antoine



  reply	other threads:[~2021-09-09  7:30 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-08 16:16 [PATCH] thermal: int340x: fix tcc offset on resume Antoine Tenart
2021-09-09  5:47 ` Srinivas Pandruvada
2021-09-09  7:09   ` Antoine Tenart
2021-09-09  7:30     ` Srinivas Pandruvada [this message]
2021-09-09  7:39       ` Antoine Tenart
2021-09-09  6:33 ` Zhang Rui

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=2c1a37bcf8cd55c4f9ebb16c876148d9b5ecc78f.camel@linux.intel.com \
    --to=srinivas.pandruvada@linux.intel.com \
    --cc=amitk@kernel.org \
    --cc=atenart@kernel.org \
    --cc=daniel.lezcano@linaro.org \
    --cc=linux-pm@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).