All of lore.kernel.org
 help / color / mirror / Atom feed
From: Caesar Wang <wxt@rock-chips.com>
To: Rocky Hao <rocky.hao@rock-chips.com>,
	rui.zhang@intel.com, edubezval@gmail.com, heiko@sntech.de,
	robh+dt@kernel.org, mark.rutland@arm.com,
	catalin.marinas@arm.com, will.deacon@arm.com
Cc: huangtao@rock-chips.com, devicetree@vger.kernel.org,
	linux-pm@vger.kernel.org, shawn.lin@rock-chips.com,
	linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.org,
	cl@rock-chips.com, william.wu@rock-chips.com,
	jay.xu@rock-chips.com, xxx@rock-chips.com,
	linux-arm-kernel@lists.infradead.org, wxt@rock-chips.com
Subject: Re: [PATCH v2 2/5] thermal: rockchip: Support the RK3328 SOC in thermal driver
Date: Fri, 11 Aug 2017 14:32:13 +0800	[thread overview]
Message-ID: <04068b8a-e5e1-ab73-8b7a-4b4f7137e491@rock-chips.com> (raw)
In-Reply-To: <1501833976-1100-3-git-send-email-rocky.hao@rock-chips.com>

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

锟斤拷 2017锟斤拷08锟斤拷04锟斤拷 16:06, Rocky Hao 写锟斤拷:
> RK3328 SOC has one Temperature Sensor for CPU.
>
> Signed-off-by: Rocky Hao <rocky.hao@rock-chips.com>

Reviewed-by: Caesar Wang <wxt@rock-chips.com>

> ---
> Change in v2:
> - remove gerrit Change-Id
>
>   drivers/thermal/rockchip_thermal.c | 65 ++++++++++++++++++++++++++++++++++++++
>   1 file changed, 65 insertions(+)
>
> diff --git a/drivers/thermal/rockchip_thermal.c b/drivers/thermal/rockchip_thermal.c
> index 4c7796512453..206035139110 100644
> --- a/drivers/thermal/rockchip_thermal.c
> +++ b/drivers/thermal/rockchip_thermal.c
> @@ -320,6 +320,44 @@ struct tsadc_table {
>   	{0, 125000},
>   };
>   
> +static const struct tsadc_table rk3328_code_table[] = {
> +	{0, -40000},
> +	{296, -40000},
> +	{304, -35000},
> +	{313, -30000},
> +	{331, -20000},
> +	{340, -15000},
> +	{349, -10000},
> +	{359, -5000},
> +	{368, 0},
> +	{378, 5000},
> +	{388, 10000},
> +	{398, 15000},
> +	{408, 20000},
> +	{418, 25000},
> +	{429, 30000},
> +	{440, 35000},
> +	{451, 40000},
> +	{462, 45000},
> +	{473, 50000},
> +	{485, 55000},
> +	{496, 60000},
> +	{508, 65000},
> +	{521, 70000},
> +	{533, 75000},
> +	{546, 80000},
> +	{559, 85000},
> +	{572, 90000},
> +	{586, 95000},
> +	{600, 100000},
> +	{614, 105000},
> +	{629, 110000},
> +	{644, 115000},
> +	{659, 120000},
> +	{675, 125000},
> +	{TSADCV2_DATA_MASK, 125000},
> +};
> +
>   static const struct tsadc_table rk3368_code_table[] = {
>   	{0, -40000},
>   	{106, -40000},
> @@ -790,6 +828,29 @@ static void rk_tsadcv2_tshut_mode(int chn, void __iomem *regs,
>   	},
>   };
>   
> +static const struct rockchip_tsadc_chip rk3328_tsadc_data = {
> +	.chn_id[SENSOR_CPU] = 0, /* cpu sensor is channel 0 */
> +	.chn_num = 1, /* one channels for tsadc */
> +
> +	.tshut_mode = TSHUT_MODE_CRU, /* default TSHUT via CRU */
> +	.tshut_temp = 95000,
> +
> +	.initialize = rk_tsadcv2_initialize,
> +	.irq_ack = rk_tsadcv3_irq_ack,
> +	.control = rk_tsadcv3_control,
> +	.get_temp = rk_tsadcv2_get_temp,
> +	.set_alarm_temp = rk_tsadcv2_alarm_temp,
> +	.set_tshut_temp = rk_tsadcv2_tshut_temp,
> +	.set_tshut_mode = rk_tsadcv2_tshut_mode,
> +
> +	.table = {
> +		.id = rk3328_code_table,
> +		.length = ARRAY_SIZE(rk3328_code_table),
> +		.data_mask = TSADCV2_DATA_MASK,
> +		.mode = ADC_INCREMENT,
> +	},
> +};
> +
>   static const struct rockchip_tsadc_chip rk3366_tsadc_data = {
>   	.chn_id[SENSOR_CPU] = 0, /* cpu sensor is channel 0 */
>   	.chn_id[SENSOR_GPU] = 1, /* gpu sensor is channel 1 */
> @@ -875,6 +936,10 @@ static void rk_tsadcv2_tshut_mode(int chn, void __iomem *regs,
>   		.data = (void *)&rk3288_tsadc_data,
>   	},
>   	{
> +		.compatible = "rockchip,rk3328-tsadc",
> +		.data = (void *)&rk3328_tsadc_data,
> +	},
> +	{
>   		.compatible = "rockchip,rk3366-tsadc",
>   		.data = (void *)&rk3366_tsadc_data,
>   	},


[-- Attachment #2: Type: text/html, Size: 3341 bytes --]

  reply	other threads:[~2017-08-11  6:32 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-04  8:06 [PATCH v2 0/5] thermal: rockchip: add tsadc support in thermal driver and IPA thermal control for rk3328 in dts Rocky Hao
2017-08-04  8:06 ` Rocky Hao
2017-08-04  8:06 ` Rocky Hao
2017-08-04  8:06 ` [PATCH v2 1/5] dt-bindings: rockchip-thermal: Support the RK3328 SoC compatible Rocky Hao
2017-08-04  8:06   ` Rocky Hao
2017-08-10 17:49   ` Rob Herring
2017-08-10 17:49     ` Rob Herring
2017-08-11  1:08     ` rocky.hao
2017-08-11  1:08       ` rocky.hao
2017-08-04  8:06 ` [PATCH v2 2/5] thermal: rockchip: Support the RK3328 SOC in thermal driver Rocky Hao
2017-08-04  8:06   ` Rocky Hao
2017-08-11  6:32   ` Caesar Wang [this message]
2017-08-04  8:06 ` [PATCH v2 3/5] arm64: dts: rockchip: add tsadc node for rk3328 SoC Rocky Hao
2017-08-04  8:06   ` Rocky Hao
2017-08-04  8:06   ` Rocky Hao
2017-08-11  6:38   ` Caesar Wang
2017-08-11  6:38     ` Caesar Wang
2017-08-11  9:45     ` rocky.hao
2017-08-11  9:45       ` rocky.hao
2017-08-11  9:47       ` Heiko Stuebner
2017-08-11  9:47         ` Heiko Stuebner
2017-08-11 15:18   ` Heiko Stuebner
2017-08-11 15:18     ` Heiko Stuebner
2017-08-04  8:06 ` [PATCH v2 4/5] arm64: dts: rockchip: add thermal nodes " Rocky Hao
2017-08-04  8:06   ` Rocky Hao
2017-08-11  6:44   ` Caesar Wang
2017-08-11  6:44     ` Caesar Wang
2017-08-11  9:46     ` rocky.hao
2017-08-11  9:46       ` rocky.hao
2017-08-11  9:48       ` Heiko Stuebner
2017-08-11  9:48         ` Heiko Stuebner
2017-08-11  9:48         ` Heiko Stuebner
2017-08-11 15:19   ` Heiko Stuebner
2017-08-11 15:19     ` Heiko Stuebner
2017-08-11 15:19     ` Heiko Stuebner
2017-08-04  8:09 ` [PATCH v2 5/5] arm64: dts: rockchip: Enable tsadc module on RK3328 eavluation board Rocky Hao
2017-08-04  8:09   ` Rocky Hao
2017-08-04  8:09   ` Rocky Hao
2017-08-11 15:19   ` Heiko Stuebner
2017-08-11 15:19     ` Heiko Stuebner
2017-08-11  4:51 ` [PATCH v2 0/5] thermal: rockchip: add tsadc support in thermal driver and IPA thermal control for rk3328 in dts Zhang Rui
2017-08-11  4:51   ` Zhang Rui
2017-08-11  4:51   ` Zhang Rui
2017-08-11  6:22   ` rocky.hao
2017-08-11  6:22     ` rocky.hao
2017-08-11  6:27   ` Heiko Stuebner
2017-08-11  6:27     ` Heiko Stuebner
2017-08-11  8:01     ` Zhang Rui
2017-08-11  8:01       ` Zhang Rui

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=04068b8a-e5e1-ab73-8b7a-4b4f7137e491@rock-chips.com \
    --to=wxt@rock-chips.com \
    --cc=catalin.marinas@arm.com \
    --cc=cl@rock-chips.com \
    --cc=devicetree@vger.kernel.org \
    --cc=edubezval@gmail.com \
    --cc=heiko@sntech.de \
    --cc=huangtao@rock-chips.com \
    --cc=jay.xu@rock-chips.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=mark.rutland@arm.com \
    --cc=robh+dt@kernel.org \
    --cc=rocky.hao@rock-chips.com \
    --cc=rui.zhang@intel.com \
    --cc=shawn.lin@rock-chips.com \
    --cc=will.deacon@arm.com \
    --cc=william.wu@rock-chips.com \
    --cc=xxx@rock-chips.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.