All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: Adam Ford <aford173@gmail.com>
Cc: Linux-OMAP <linux-omap@vger.kernel.org>,
	Adam Ford-BE <aford@beaconembedded.com>,
	Russell King <linux@armlinux.org.uk>,
	Eduardo Valentin <edubezval@gmail.com>,
	Keerthy <j-keerthy@ti.com>, Zhang Rui <rui.zhang@intel.com>,
	Daniel Lezcano <daniel.lezcano@linaro.org>,
	Amit Kucheria <amitk@kernel.org>,
	arm-soc <linux-arm-kernel@lists.infradead.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	linux-pm@vger.kernel.org
Subject: Re: [PATCH 1/2] thermal: ti-soc-thermal: Enable addition power management
Date: Wed, 19 Aug 2020 15:54:17 +0300	[thread overview]
Message-ID: <20200819125417.GG2994@atomide.com> (raw)
In-Reply-To: <CAHCN7xKBzRfByvdYBPS=uWF2QvECAOf5zGZE0-pxjJ6A2-d95g@mail.gmail.com>

* Adam Ford <aford173@gmail.com> [200819 12:21]:
> On Tue, Aug 18, 2020 at 11:58 PM Tony Lindgren <tony@atomide.com> wrote:
> >
> > * Adam Ford <aford173@gmail.com> [200818 15:46]:
> > > @@ -1153,6 +1166,38 @@ static int ti_bandgap_suspend(struct device *dev)
> > >       return err;
> > >  }
> > >
> > > +static int bandgap_omap_cpu_notifier(struct notifier_block *nb,
> > > +                               unsigned long cmd, void *v)
> > > +{
> > > +     struct ti_bandgap *bgp;
> > > +
> > > +     bgp = container_of(nb, struct ti_bandgap, nb);
> > > +
> > > +     spin_lock(&bgp->lock);
> > > +     switch (cmd) {
> > > +     case CPU_CLUSTER_PM_ENTER:
> > > +             if (bgp->is_suspended)
> > > +                     break;
> > > +             ti_bandgap_save_ctxt(bgp);
> > > +             ti_bandgap_power(bgp, false);
> > > +             if (TI_BANDGAP_HAS(bgp, CLK_CTRL))
> > > +                     clk_disable(bgp->fclock);
> > > +             break;
> > > +     case CPU_CLUSTER_PM_ENTER_FAILED:
> > > +     case CPU_CLUSTER_PM_EXIT:
> > > +             if (bgp->is_suspended)
> > > +                     break;
> > > +             if (TI_BANDGAP_HAS(bgp, CLK_CTRL))
> > > +                     clk_enable(bgp->fclock);
> > > +             ti_bandgap_power(bgp, true);
> > > +             ti_bandgap_restore_ctxt(bgp);
> > > +             break;
> > > +     }
> > > +     spin_unlock(&bgp->lock);
> > > +
> > > +     return NOTIFY_OK;
> > > +}
> >
> > Hmm to me it looks like is_suspended is not used right now?
> > I guess you want to set it in ti_bandgap_suspend() and clear
> > it in ti_bandgap_resume()?
> >
> > Otherwise looks good to me, I can't test the power consumption
> > right now though so you may want to check it to make sure
> > device still hits off mode during idle.
> 
> I have a V2.  Do you want me to re-post 2/2 with V2 as no change, or
> should I just submit this patch alone?

Up to you, might make it easier for other folks to follow if the
whole series is reposted.

Regards,

Tony

WARNING: multiple messages have this Message-ID (diff)
From: Tony Lindgren <tony@atomide.com>
To: Adam Ford <aford173@gmail.com>
Cc: Amit Kucheria <amitk@kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	linux-pm@vger.kernel.org, Keerthy <j-keerthy@ti.com>,
	Daniel Lezcano <daniel.lezcano@linaro.org>,
	Adam Ford-BE <aford@beaconembedded.com>,
	Russell King <linux@armlinux.org.uk>,
	Eduardo Valentin <edubezval@gmail.com>,
	Zhang Rui <rui.zhang@intel.com>,
	Linux-OMAP <linux-omap@vger.kernel.org>,
	arm-soc <linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH 1/2] thermal: ti-soc-thermal: Enable addition power management
Date: Wed, 19 Aug 2020 15:54:17 +0300	[thread overview]
Message-ID: <20200819125417.GG2994@atomide.com> (raw)
In-Reply-To: <CAHCN7xKBzRfByvdYBPS=uWF2QvECAOf5zGZE0-pxjJ6A2-d95g@mail.gmail.com>

* Adam Ford <aford173@gmail.com> [200819 12:21]:
> On Tue, Aug 18, 2020 at 11:58 PM Tony Lindgren <tony@atomide.com> wrote:
> >
> > * Adam Ford <aford173@gmail.com> [200818 15:46]:
> > > @@ -1153,6 +1166,38 @@ static int ti_bandgap_suspend(struct device *dev)
> > >       return err;
> > >  }
> > >
> > > +static int bandgap_omap_cpu_notifier(struct notifier_block *nb,
> > > +                               unsigned long cmd, void *v)
> > > +{
> > > +     struct ti_bandgap *bgp;
> > > +
> > > +     bgp = container_of(nb, struct ti_bandgap, nb);
> > > +
> > > +     spin_lock(&bgp->lock);
> > > +     switch (cmd) {
> > > +     case CPU_CLUSTER_PM_ENTER:
> > > +             if (bgp->is_suspended)
> > > +                     break;
> > > +             ti_bandgap_save_ctxt(bgp);
> > > +             ti_bandgap_power(bgp, false);
> > > +             if (TI_BANDGAP_HAS(bgp, CLK_CTRL))
> > > +                     clk_disable(bgp->fclock);
> > > +             break;
> > > +     case CPU_CLUSTER_PM_ENTER_FAILED:
> > > +     case CPU_CLUSTER_PM_EXIT:
> > > +             if (bgp->is_suspended)
> > > +                     break;
> > > +             if (TI_BANDGAP_HAS(bgp, CLK_CTRL))
> > > +                     clk_enable(bgp->fclock);
> > > +             ti_bandgap_power(bgp, true);
> > > +             ti_bandgap_restore_ctxt(bgp);
> > > +             break;
> > > +     }
> > > +     spin_unlock(&bgp->lock);
> > > +
> > > +     return NOTIFY_OK;
> > > +}
> >
> > Hmm to me it looks like is_suspended is not used right now?
> > I guess you want to set it in ti_bandgap_suspend() and clear
> > it in ti_bandgap_resume()?
> >
> > Otherwise looks good to me, I can't test the power consumption
> > right now though so you may want to check it to make sure
> > device still hits off mode during idle.
> 
> I have a V2.  Do you want me to re-post 2/2 with V2 as no change, or
> should I just submit this patch alone?

Up to you, might make it easier for other folks to follow if the
whole series is reposted.

Regards,

Tony

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2020-08-19 12:53 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-18 15:46 [PATCH 1/2] thermal: ti-soc-thermal: Enable addition power management Adam Ford
2020-08-18 15:46 ` Adam Ford
2020-08-18 15:46 ` [PATCH 2/2] ARM: omap2plus_defconfig: Enable OMAP3_THERMAL Adam Ford
2020-08-18 15:46   ` Adam Ford
2020-08-18 19:49 ` [PATCH 1/2] thermal: ti-soc-thermal: Enable addition power management kernel test robot
2020-08-18 19:49   ` kernel test robot
2020-08-18 20:01 ` kernel test robot
2020-08-18 20:01   ` kernel test robot
2020-08-19  4:59 ` Tony Lindgren
2020-08-19  4:59   ` Tony Lindgren
2020-08-19 12:21   ` Adam Ford
2020-08-19 12:21     ` Adam Ford
2020-08-19 12:54     ` Tony Lindgren [this message]
2020-08-19 12:54       ` Tony Lindgren
  -- strict thread matches above, loose matches on Subject: below --
2020-09-11 12:31 Adam Ford
2020-09-11 12:31 ` Adam Ford
2020-10-08 20:59 ` Adam Ford
2020-10-08 20:59   ` Adam Ford
2020-10-08 23:23 ` Daniel Lezcano
2020-10-08 23:23   ` Daniel Lezcano

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=20200819125417.GG2994@atomide.com \
    --to=tony@atomide.com \
    --cc=aford173@gmail.com \
    --cc=aford@beaconembedded.com \
    --cc=amitk@kernel.org \
    --cc=daniel.lezcano@linaro.org \
    --cc=edubezval@gmail.com \
    --cc=j-keerthy@ti.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --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.