From: Leonard Crestez <leonard.crestez@nxp.com>
To: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
Cc: Dong Aisheng <aisheng.dong@nxp.com>, Bai Ping <ping.bai@nxp.com>,
Shawn Guo <shawnguo@kernel.org>, Zhang Rui <rui.zhang@intel.com>,
Eduardo Valentin <edubezval@gmail.com>,
linux-pm@vger.kernel.org, kernel@pengutronix.de
Subject: Re: [PATCH 1/4] thermal: imx: Use better parameter names than "val"
Date: Tue, 28 Nov 2017 15:20:43 +0200 [thread overview]
Message-ID: <1511875243.20123.41.camel@nxp.com> (raw)
In-Reply-To: <20171127195038.k3ntwdqmdibfooi7@pengutronix.de>
On Mon, 2017-11-27 at 20:50 +0100, Uwe Kleine-König wrote:
> On Mon, Nov 27, 2017 at 08:39:31PM +0200, Leonard Crestez wrote:
> > On Tue, 2017-11-21 at 21:02 +0100, Uwe Kleine-König wrote:
> > >
> > > The values passed to imx_init_calib() and imx_init_temp_grade() are
> > > read from specific OCOTP values. Use their names (in lower case) as
> > > parameter name instead of "val" to make the code easier to understand.
> > >
> > > -static void imx_init_temp_grade(struct platform_device *pdev, u32 val)
> > > +static void imx_init_temp_grade(struct platform_device *pdev, u32 ocotp_mem0)
> > On imx7 (thermal not currently supported in upstream) the temperature
> > grade is in OCOTP_TESTER3. So using a more generic parameter name here
> > would be preferable or this would have to be changed again later.
> Then I suggest to change the semantic and make this:
>
> imx_init_temp_grade(struct platform_device *pdev, u32 grade)
>
> and let the caller do the bit shift and masking.
That would work. It just so happens that the grade is stored in the
same bits.
It might be better to deal with this when adding imx7 thermal support
instead.
> Does the same problem exist for ocotp_ana1?
No, not that I know of.
next prev parent reply other threads:[~2017-11-28 13:20 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-21 20:02 [PATCH 0/4] thermal: imx: cleanup and new formula Uwe Kleine-König
2017-11-21 20:02 ` [PATCH 1/4] thermal: imx: Use better parameter names than "val" Uwe Kleine-König
2017-11-27 18:39 ` Leonard Crestez
2017-11-27 19:50 ` Uwe Kleine-König
2017-11-28 13:20 ` Leonard Crestez [this message]
2017-11-21 20:02 ` [PATCH 2/4] thermal: imx: improve comments describing algorithm for temp calculation Uwe Kleine-König
2017-11-27 18:39 ` Leonard Crestez
2017-11-27 19:52 ` Uwe Kleine-König
2017-11-21 20:02 ` [PATCH 3/4] thermal: imx: use consistent style to write temperatures Uwe Kleine-König
2017-11-27 18:40 ` Leonard Crestez
2017-11-27 19:45 ` Uwe Kleine-König
2017-11-21 20:02 ` [PATCH 4/4] thermal: imx: update to new formula according to NXP AN5215 Uwe Kleine-König
2017-11-27 18:41 ` Leonard Crestez
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=1511875243.20123.41.camel@nxp.com \
--to=leonard.crestez@nxp.com \
--cc=aisheng.dong@nxp.com \
--cc=edubezval@gmail.com \
--cc=kernel@pengutronix.de \
--cc=linux-pm@vger.kernel.org \
--cc=ping.bai@nxp.com \
--cc=rui.zhang@intel.com \
--cc=shawnguo@kernel.org \
--cc=u.kleine-koenig@pengutronix.de \
/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).