From: Amjad Ouled-Ameur <aouledameur@baylibre.com>
To: AngeloGioacchino Del Regno
<angelogioacchino.delregno@collabora.com>,
matthias.bgg@gmail.com
Cc: rafael@kernel.org, fparent@baylibre.com, amitk@kernel.org,
daniel.lezcano@linaro.org, devicetree@vger.kernel.org,
krzysztof.kozlowski+dt@linaro.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org,
linux-pm@vger.kernel.org, robh+dt@kernel.org,
rui.zhang@intel.com, Markus Schneider-Pargmann <msp@baylibre.com>
Subject: Re: [PATCH v2 3/4] thermal: mediatek: control buffer enablement tweaks
Date: Fri, 26 Aug 2022 16:05:54 +0200 [thread overview]
Message-ID: <cf60d0a7-2dec-a6c7-879f-ab4812a1e034@baylibre.com> (raw)
In-Reply-To: <a143dfcd-7a6a-49ff-6bed-4ffdb0fa1c4a@collabora.com>
Hi Angelo,
On 7/21/22 10:11, AngeloGioacchino Del Regno wrote:
> Il 20/07/22 20:18, Amjad Ouled-Ameur ha scritto:
>> From: Markus Schneider-Pargmann <msp@baylibre.com>
>>
>> Add logic in order to be able to turn on the control buffer on MT8365.
>> This change now allows to have control buffer support for
>> MTK_THERMAL_V1,
>> and it allows to define the register offset, and mask used to enable it.
>>
>> Signed-off-by: Markus Schneider-Pargmann <msp@baylibre.com>
>> Signed-off-by: Fabien Parent <fparent@baylibre.com>
>> Reviewed-by: Amjad Ouled-Ameur <aouledameur@baylibre.com>
>> Tested-by: Amjad Ouled-Ameur <aouledameur@baylibre.com>
>> ---
>> drivers/thermal/mtk_thermal.c | 23 +++++++++++++++++------
>> 1 file changed, 17 insertions(+), 6 deletions(-)
>>
>> diff --git a/drivers/thermal/mtk_thermal.c
>> b/drivers/thermal/mtk_thermal.c
>> index 216eb0d61c5b..1dc276f8c4f1 100644
>> --- a/drivers/thermal/mtk_thermal.c
>> +++ b/drivers/thermal/mtk_thermal.c
>> @@ -283,6 +283,9 @@ struct mtk_thermal_data {
>> bool need_switch_bank;
>> struct thermal_bank_cfg bank_data[MAX_NUM_ZONES];
>> enum mtk_thermal_version version;
>> + u32 apmixed_buffer_ctl_reg;
>> + u32 apmixed_buffer_ctl_mask;
>> + u32 apmixed_buffer_ctl_set;
>> };
>> struct mtk_thermal {
>> @@ -578,6 +581,9 @@ static const struct mtk_thermal_data
>> mt7622_thermal_data = {
>> .adcpnp = mt7622_adcpnp,
>> .sensor_mux_values = mt7622_mux_values,
>> .version = MTK_THERMAL_V2,
>> + .apmixed_buffer_ctl_reg = APMIXED_SYS_TS_CON1,
>> + .apmixed_buffer_ctl_mask = ~0x37,
>
> This is effectively GENMASK(31, 6) | BIT(3) :-)
>
>> + .apmixed_buffer_ctl_set = 0x1,
>
> ...and this is BIT(0)
>
Thank you for the catch, will update them appropriately.
>> }; >
>> /*
>> @@ -1031,14 +1037,18 @@ static const struct of_device_id
>> mtk_thermal_of_match[] = {
>> };
>> MODULE_DEVICE_TABLE(of, mtk_thermal_of_match);
>> -static void mtk_thermal_turn_on_buffer(void __iomem *apmixed_base)
>> +static void mtk_thermal_turn_on_buffer(struct mtk_thermal *mt,
>> + void __iomem *apmixed_base)
>> {
>> int tmp;
>
> Since you're practically restructuring this function, please fix this
> wrong
> variable type, as this should be a u32.
>
Sure agreed.
Thank you Angelo for the review.
Regards,
Amjad
> Regards,
> Angelo
next prev parent reply other threads:[~2022-08-26 14:06 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-20 18:18 [PATCH v2 0/4] thermal: mediatek: Add support for MT8365 SoC Amjad Ouled-Ameur
2022-07-20 18:18 ` [PATCH v2 1/4] dt-bindings: thermal: mediatek: add binding documentation " Amjad Ouled-Ameur
2022-07-21 8:20 ` AngeloGioacchino Del Regno
2022-07-21 8:57 ` Matthias Brugger
2022-08-26 14:02 ` Amjad Ouled-Ameur
2022-07-20 18:18 ` [PATCH v2 2/4] thermal: mediatek: add support " Amjad Ouled-Ameur
2022-07-21 8:15 ` AngeloGioacchino Del Regno
2022-07-21 16:37 ` Krzysztof Kozlowski
2022-08-26 14:02 ` Amjad Ouled-Ameur
2022-07-20 18:18 ` [PATCH v2 3/4] thermal: mediatek: control buffer enablement tweaks Amjad Ouled-Ameur
2022-07-21 8:11 ` AngeloGioacchino Del Regno
2022-08-26 14:05 ` Amjad Ouled-Ameur [this message]
2022-07-21 8:57 ` Matthias Brugger
2022-07-20 18:18 ` [PATCH v2 4/4] thermal: mediatek: add another get_temp ops for thermal sensors Amjad Ouled-Ameur
2022-07-20 18:54 ` Christophe JAILLET
2022-08-26 14:12 ` Amjad Ouled-Ameur
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=cf60d0a7-2dec-a6c7-879f-ab4812a1e034@baylibre.com \
--to=aouledameur@baylibre.com \
--cc=amitk@kernel.org \
--cc=angelogioacchino.delregno@collabora.com \
--cc=daniel.lezcano@linaro.org \
--cc=devicetree@vger.kernel.org \
--cc=fparent@baylibre.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-pm@vger.kernel.org \
--cc=matthias.bgg@gmail.com \
--cc=msp@baylibre.com \
--cc=rafael@kernel.org \
--cc=robh+dt@kernel.org \
--cc=rui.zhang@intel.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;
as well as URLs for NNTP newsgroup(s).