mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Wangtao (Kevin, Kirin)" <kevin.wangtao@hisilicon.com>
To: Daniel Lezcano <daniel.lezcano@linaro.org>, <rui.zhang@intel.com>,
	<edubezval@gmail.com>, <robh+dt@kernel.org>,
	<mark.rutland@arm.com>, <xuwei5@hisilicon.com>,
	<catalin.marinas@arm.com>, <will.deacon@arm.com>
Cc: <leo.yan@linaro.org>, <kevin.wangtao@linaro.org>,
	<linux-pm@vger.kernel.org>, <devicetree@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>,
	<sunzhaosheng@hisilicon.com>, <gengyanping@hisilicon.com>
Subject: Re: [PATCH v4 1/3] dt-bindings: Document the hi3660 thermal sensor bindings
Date: Mon, 4 Sep 2017 14:39:04 +0800	[thread overview]
Message-ID: <38fdf052-97be-1b54-5e7d-9dd0bc11e9b4@hisilicon.com> (raw)
In-Reply-To: <d56428a6-ef27-4424-3ce5-4610fef3ac15@linaro.org>



在 2017/9/1 2:24, Daniel Lezcano 写道:
> On 29/08/2017 10:17, Tao Wang wrote:
>> From: Tao Wang <kevin.wangtao@linaro.org>
>>
>> This adds documentation of device tree bindings for the
>> thermal sensor controller of hi3660 SoC.
>>
>> Signed-off-by: Tao Wang <kevin.wangtao@linaro.org>
>> ---
>>   .../devicetree/bindings/thermal/hisi-tsensor.txt   | 37 ++++++++++++++++++++++
>>   1 file changed, 37 insertions(+)
>>   create mode 100644 Documentation/devicetree/bindings/thermal/hisi-tsensor.txt
>>
>> diff --git a/Documentation/devicetree/bindings/thermal/hisi-tsensor.txt b/Documentation/devicetree/bindings/thermal/hisi-tsensor.txt
>> new file mode 100644
>> index 0000000..4643dbe
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/thermal/hisi-tsensor.txt
>> @@ -0,0 +1,37 @@
>> +* Temperature Sensor on hisilicon SoC
>> +
>> +Hisilicon SoC supplies temperature sensor feature, each CPU cluster and G3D
>> +area contains a temperture sensor. The temperture sensor produces an output
>> +value which has a linear relationship with the temperture of the area.
>> +
> 
> s/temperture/temperature/
THX
> 
>> +for Hi3660,
>> +sensor0 monitors the temperture of A53;
>> +sensor1 monitors the temperture of A72;
>> +sensor2 monitors the temperture of GPU;
>> +sensor3 is a virtual sensor, which produces the maximum value of all sensors;
>> +sensor4 is a virtual sensor, which produces the average value of all sensors.
> 
> I don't think we need to escribe the virtual sensors in the DT bindings.
I just want to let user know the sensor id of virtual sensor, I also define it in header file, so the header file is enough?
> 
>> +** Required properties :
>> +- compatible: "hisilicon,thermal-tsensor".
>> +- reg: physical reg address of thermal sensor and length of memory mapped
>> +  region.
>> +- hisi,tsensors: number of hardware tsensors
>> +- hisi,coef:	An array of integers (one signed cell) containing
>> +		coefficients to turn adc value to temperture.
>> +- hisi,adc-range: adc value range, minimum value is followed by maximum value.
>> +- #thermal-sensor-cells: Should be 1. See ./thermal.txt for a description.
>> +
>> +Example :
>> +Hi3660:
>> +tsensor: tsensor@fff30000 {
>> +	compatible = "hisilicon,hi3660-tsensor";
>> +	#address-cells = <2>;
>> +	#size-cells = <2>;
>> +	reg = <0x0 0xfff3001c 0x0 0x4>,
>> +		<0x0 0xfff3005c 0x0 0x4>,
>> +		<0x0 0xfff3009c 0x0 0x4>;
>> +	hisi,tsensors = <HISI_MAX_TSENSORS>;
>> +	hisi,coef = <165000 (-40000)>;
>> +	hisi,adc-range = <0x74 0x39A>;
> 
> Do we really need max sensors, coef and adc range to be specified in the DT?
> 
> Can't we assume the hi3660-tsensor has 3 sensors, and hard-code the
> coef, adc, in the driver itself?
My purpose is to make the driver be compitable with our future platform.
> 
> Can't this binding be merged with the hisilicon-thermal.txt?
> 
> Thanks.
> 
>    -- Daniel
> 
> 

  reply	other threads:[~2017-09-04  6:39 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-20  3:40 [PATCH " Tao Wang
2017-06-20  3:40 ` [PATCH 2/3] thermal: hisilicon: add thermal sensor driver for Hi3660 Tao Wang
2017-06-20 10:31   ` Wei Xu
2017-06-21  2:21     ` Wangtao (Kevin, Kirin)
2017-06-21  2:29   ` Leo Yan
2017-06-20  3:40 ` [PATCH 3/3] arm64: dts: register Hi3660's thermal sensor Tao Wang
     [not found]   ` <CAFGCpxwmN3jAZn2chK+QQ-YKg7TwWJOTHSi1VzwcSQ7Mm3gQng@mail.gmail.com>
2017-06-20  8:32     ` Wangtao (Kevin, Kirin)
2017-06-21  1:58       ` Guodong Xu
2017-06-22  3:42   ` [Patch v2 1/3] dt-bindings: Document the hi3660 thermal sensor bindings Tao Wang
2017-06-22  3:42     ` [Patch v2 2/3] thermal: hisilicon: add thermal sensor driver for Hi3660 Tao Wang
2017-07-01  3:04       ` Eduardo Valentin
2017-07-04 11:24         ` Wangtao (Kevin, Kirin)
2017-06-22  3:42     ` [Patch v2 3/3] arm64: dts: register Hi3660's thermal sensor Tao Wang
2017-07-01  3:06       ` Eduardo Valentin
2017-07-04 10:50         ` 答复: " Wangtao (Kevin, Kirin)
2017-07-01  3:05     ` [Patch v2 1/3] dt-bindings: Document the hi3660 thermal sensor bindings Eduardo Valentin
2017-07-04 11:03       ` Wangtao (Kevin, Kirin)
2017-08-10  8:32     ` [PATCH v3 0/3] thermal: add thermal sensor driver for Hi3660 Tao Wang
2017-08-10  8:32       ` [PATCH v3 1/3] dt-bindings: Document the hi3660 thermal sensor bindings Tao Wang
2017-08-17 15:10         ` Rob Herring
2017-08-21  2:17           ` Wangtao (Kevin, Kirin)
2017-08-29  8:17             ` [PATCH v4 0/3] thermal: add thermal sensor driver for Hi3660 Tao Wang
2017-08-29  8:17               ` [PATCH v4 1/3] dt-bindings: Document the hi3660 thermal sensor bindings Tao Wang
2017-08-31 18:24                 ` Daniel Lezcano
2017-09-04  6:39                   ` Wangtao (Kevin, Kirin) [this message]
2017-09-04 10:36                     ` Daniel Lezcano
2017-08-29  8:17               ` [PATCH v4 2/3] thermal: hisilicon: add thermal sensor driver for Hi3660 Tao Wang
2017-08-31 21:17                 ` Daniel Lezcano
2017-09-04  7:56                   ` Wangtao (Kevin, Kirin)
2017-09-04 11:06                     ` Daniel Lezcano
2017-09-04 15:06                       ` Leo Yan
2017-09-05  7:56                         ` Wangtao (Kevin, Kirin)
2017-08-29  8:17               ` [PATCH v4 3/3] arm64: dts: register Hi3660's thermal sensor Tao Wang
2017-08-31 21:13                 ` Daniel Lezcano
2017-09-04  8:11                   ` Wangtao (Kevin, Kirin)
2017-08-10  8:32       ` [PATCH v3 2/3] thermal: hisilicon: add thermal sensor driver for Hi3660 Tao Wang
2017-08-10  8:32       ` [PATCH v3 3/3] arm64: dts: register Hi3660's thermal sensor Tao Wang
2017-06-20 10:27 ` [PATCH 1/3] dt-bindings: Document the hi3660 thermal sensor bindings Wei Xu
2017-06-21  2:10   ` Wangtao (Kevin, Kirin)

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=38fdf052-97be-1b54-5e7d-9dd0bc11e9b4@hisilicon.com \
    --to=kevin.wangtao@hisilicon.com \
    --cc=catalin.marinas@arm.com \
    --cc=daniel.lezcano@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=edubezval@gmail.com \
    --cc=gengyanping@hisilicon.com \
    --cc=kevin.wangtao@linaro.org \
    --cc=leo.yan@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=robh+dt@kernel.org \
    --cc=rui.zhang@intel.com \
    --cc=sunzhaosheng@hisilicon.com \
    --cc=will.deacon@arm.com \
    --cc=xuwei5@hisilicon.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

all inboxes | Powered by JetHome®