All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thierry Reding <thierry.reding@gmail.com>
To: Wei Ni <wni@nvidia.com>
Cc: rui.zhang@intel.com, mikko.perttunen@kapsi.fi,
	swarren@wwwdotorg.org, linux-tegra@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH V1 02/10] thermal: tegra: combine sensor group-related data
Date: Wed, 13 Jan 2016 15:31:23 +0100	[thread overview]
Message-ID: <20160113143123.GB2588@ulmo> (raw)
In-Reply-To: <1452671929-32740-3-git-send-email-wni@nvidia.com>

[-- Attachment #1: Type: text/plain, Size: 1953 bytes --]

On Wed, Jan 13, 2016 at 03:58:41PM +0800, Wei Ni wrote:
> Combine sensor group-related data structures into struct
> tegra_tsensor_group. This provides a single location for
> sensor group data storage.
> More sensor group data will be added in subsequent patches.
> 
> Get rid of T124-specific PDIV/HOTSPOT hack.
> tegra-soctherm.c contained a hack to set the SENSOR_PDIV and
> SENSOR_HOTSPOT_OFFSET registers - it just did two writes of
> T124-specific opaque values.  Convert these into a form that can be
> substituted on a per-chip basis, and into structure fields that have
> at least some independent meaning.

This reads as two completely separate commit messages. Should the patch
be split up to separate out the two logical changes?

> diff --git a/drivers/thermal/tegra/tegra_soctherm.c b/drivers/thermal/tegra/tegra_soctherm.c
[...]
> +static struct tegra_tsensor_group tegra124_tsensor_group_cpu = {
[...]
> +};
> +
> +static struct tegra_tsensor_group tegra124_tsensor_group_gpu = {
[...]
> +};
> +
> +static struct tegra_tsensor_group tegra124_tsensor_group_pll = {
[...]
> +};
> +
> +static struct tegra_tsensor_group tegra124_tsensor_group_mem = {
[...]
> +};
> +
> +static struct tegra_tsensor_group *
> +tegra124_tsensor_groups[TEGRA124_SOCTHERM_SENSOR_NUM] = {
[...]
>  };

These look like they should all be static const.

> @@ -168,7 +268,7 @@ struct tegra_soctherm {
>  	struct clk *clock_soctherm;
>  	void __iomem *regs;
>  
> -	struct thermal_zone_device *thermctl_tzs[4];
> +	struct thermal_zone_device *thermctl_tzs[TEGRA124_SOCTHERM_SENSOR_NUM];
>  };

Does it make sense to use macros here for the number of zones? I suspect
that since you do parameterize the Tegra210 support that will be added
later on will have a different maximum number, in which case macros will
not work very well.

But perhaps I'll see how you solved that problem in a later patch.

Thierry

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  reply	other threads:[~2016-01-13 14:31 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-13  7:58 [PATCH V1 00/10] Add T210 support in tegra_soctherm Wei Ni
2016-01-13  7:58 ` Wei Ni
2016-01-13  7:58 ` [PATCH V1 01/10] thermal: tegra: move tegra thermal files into tegra directory Wei Ni
2016-01-13  7:58   ` Wei Ni
     [not found]   ` <1452671929-32740-2-git-send-email-wni-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2016-01-13 14:24     ` Thierry Reding
2016-01-13 14:24       ` Thierry Reding
2016-01-14  5:33       ` Wei Ni
2016-01-14  5:33         ` Wei Ni
2016-01-13  7:58 ` [PATCH V1 02/10] thermal: tegra: combine sensor group-related data Wei Ni
2016-01-13  7:58   ` Wei Ni
2016-01-13 14:31   ` Thierry Reding [this message]
2016-01-14  5:40     ` Wei Ni
2016-01-14  5:40       ` Wei Ni
2016-01-13  7:58 ` [PATCH V1 03/10] thermal: tegra: split tegra_soctherm driver Wei Ni
2016-01-13  7:58   ` Wei Ni
     [not found]   ` <1452671929-32740-4-git-send-email-wni-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2016-01-13 15:04     ` Thierry Reding
2016-01-13 15:04       ` Thierry Reding
2016-01-14  9:54       ` Wei Ni
2016-01-14  9:54         ` Wei Ni
2016-01-13  7:58 ` [PATCH V1 04/10] thermal: tegra: add T210-specific SOC_THERM driver Wei Ni
2016-01-13  7:58   ` Wei Ni
     [not found]   ` <1452671929-32740-5-git-send-email-wni-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2016-01-13 15:06     ` Thierry Reding
2016-01-13 15:06       ` Thierry Reding
2016-01-14 10:18       ` Wei Ni
2016-01-14 10:18         ` Wei Ni

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=20160113143123.GB2588@ulmo \
    --to=thierry.reding@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=mikko.perttunen@kapsi.fi \
    --cc=rui.zhang@intel.com \
    --cc=swarren@wwwdotorg.org \
    --cc=wni@nvidia.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.