linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: srinivas pandruvada <srinivas.pandruvada@linux.intel.com>
To: Daniel Lezcano <daniel.lezcano@linaro.org>,
	"Rafael J. Wysocki" <rafael@kernel.org>
Cc: Linux PM <linux-pm@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Jonathan Cameron <Jonathan.Cameron@huawei.com>,
	William Breathitt Gray <vilhelm.gray@gmail.com>,
	Viktor Rosendahl <Viktor.Rosendahl@bmw.de>,
	Sasha Levin <sashal@kernel.org>,
	Colin Ian King <colin.king@intel.com>,
	"Zhang, Rui" <rui.zhang@intel.com>
Subject: Re: [PATCH] tools/lib/thermal: Add a thermal library
Date: Fri, 04 Feb 2022 15:04:00 -0800	[thread overview]
Message-ID: <4b97ea9a45476698a439aebca4ebcc881892e201.camel@linux.intel.com> (raw)
In-Reply-To: <c610f361-14b5-6c64-ff28-7ae0442aed71@linaro.org>

On Fri, 2022-02-04 at 23:16 +0100, Daniel Lezcano wrote:
> 
> Hi Srinivas,
> 
> On 04/02/2022 20:32, srinivas pandruvada wrote:
> > On Fri, 2022-02-04 at 18:11 +0100, Rafael J. Wysocki wrote:
> > > CC Rui and Srinivas
> > > 
> > > On Fri, Feb 4, 2022 at 5:15 PM Daniel Lezcano
> > > <daniel.lezcano@linaro.org> wrote:
> > > > 
> > > > The thermal framework implements a netlink notification
> > > > mechanism
> > > > to
> > > > be used by the userspace to have a thermal configuration
> > > > discovery,
> > > > trip point changes or violation, cooling device changes
> > > > notifications,
> > > > etc...
> > > > 
> > > > This library provides a level of abstraction for the thermal
> > > > netlink
> > > > notification allowing the userspace to connect to the
> > > > notification
> > > > mechanism more easily. The library is callback oriented.
> > > > 
> > > > As it is the very first iteration, the API may be subject to
> > > > changes. For this reason, the documentation will be provided
> > > > after
> > > > those are stabilized.
> > > 
> > > So shouldn't this be an RFC?
> > > 
> > > Also, I would prefer documentation to be provided or at least
> > > some
> > > intended usage examples to be given.
> > > 
> > > > Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
> > > > ---
> > > >   tools/Makefile                           |  14 +-
> > > >   tools/include/uapi/linux/thermal.h       |  91 ++++++
> > This is duplicating the file at include/uapi/linux. I know this is
> > done
> > for other tools also. In my use I am copying and using symbolic
> > link.
> 
> Why copy and symbolic link ? Should it be create a symbolic link only
> ?
Correct, symbolic only by making change in Makefile:

$(OUTPUT)include/linux/thermal.h:
../../../../include/uapi/linux/thermal.h
	mkdir -p $(OUTPUT)include/linux 2>&1 || true
	ln -sf $(CURDIR)/../../../../include/uapi/linux/thermal.h $@

Thanks,
Srinivas

> 
> > BTW I have potential usage of netlink targeted for next release in
> > linux tools.
> > 
> > https://github.com/spandruvada/linux-kernel/blob/intel-sst/tools/power/x86/intel-speed-select/hfi-events.c
> > 
> > I can replace with libthermal calls once ready. I will check the
> > code
> > below next week.
> 
> Great, thanks!
> 
> In attachment a test file as an example of the library usage.
> 
> 


      reply	other threads:[~2022-02-04 23:04 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-04 16:15 [PATCH] tools/lib/thermal: Add a thermal library Daniel Lezcano
2022-02-04 17:11 ` Rafael J. Wysocki
2022-02-04 18:13   ` Daniel Lezcano
2022-02-04 19:32   ` srinivas pandruvada
2022-02-04 22:16     ` Daniel Lezcano
2022-02-04 23:04       ` srinivas pandruvada [this message]

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=4b97ea9a45476698a439aebca4ebcc881892e201.camel@linux.intel.com \
    --to=srinivas.pandruvada@linux.intel.com \
    --cc=Jonathan.Cameron@huawei.com \
    --cc=Viktor.Rosendahl@bmw.de \
    --cc=colin.king@intel.com \
    --cc=daniel.lezcano@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rafael@kernel.org \
    --cc=rui.zhang@intel.com \
    --cc=sashal@kernel.org \
    --cc=vilhelm.gray@gmail.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).