linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: rafal@milecki.pl (Rafał Miłecki)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/2] thermal: add brcmstb AVS TMON driver
Date: Tue, 06 Jun 2017 14:27:48 +0200	[thread overview]
Message-ID: <fdccd1ebb4ec0eb4f675168bdcb15fe4@milecki.pl> (raw)
In-Reply-To: <20170605210930.65432-3-code@mmayer.net>

On 2017-06-05 23:09, Markus Mayer wrote:
> --- /dev/null
> +++ b/drivers/thermal/broadcom/brcmstb_thermal.c
> @@ -0,0 +1,361 @@
> +/*
> + * Broadcom STB AVS TMON thermal sensor driver
> + *
> + * Copyright (c) 2015-2017 Broadcom
> + *
> + * This software is licensed under the terms of the GNU General Public
> + * License version 2, as published by the Free Software Foundation, 
> and
> + * may be copied, distributed, and modified under those terms.
> + *
> + * This program is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
> + * GNU General Public License for more details.
> + *
> + */

The headers says GPL v2 but it doesn't match MODULE_LICENSE. Please be
consistent.


> +/* Convert a HW code to a temperature reading (millidegree celsius) */
> +static inline int avs_tmon_code_to_temp(u32 code)
> +{
> +	return (410040 - (int)((code & 0x3FF) * 487));
> +}

I got similar hardcoded values and Eduardo told me to move them to the 
DT.
See discussion in: https://patchwork.kernel.org/patch/9642119/

Hint: thermal_zone_get_offset + thermal_zone_get_slope

  parent reply	other threads:[~2017-06-06 12:27 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-05 21:09 [PATCH 0/2] thermal: add brcmstb AVS TMON driver Markus Mayer
2017-06-05 21:09 ` [PATCH 1/2] Documentation: devicetree: add binding for Broadcom STB AVS TMON Markus Mayer
2017-06-06 12:21   ` Rafał Miłecki
2017-06-06 17:07     ` Markus Mayer
2017-06-05 21:09 ` [PATCH 2/2] thermal: add brcmstb AVS TMON driver Markus Mayer
2017-06-06  7:50   ` [PATCH] thermal: fix platform_no_drv_owner.cocci warnings kbuild test robot
2017-06-06  7:50   ` [PATCH 2/2] thermal: add brcmstb AVS TMON driver kbuild test robot
2017-06-06 12:27   ` Rafał Miłecki [this message]
2017-06-09 23:07     ` Markus Mayer

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=fdccd1ebb4ec0eb4f675168bdcb15fe4@milecki.pl \
    --to=rafal@milecki.pl \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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).