public inbox for linux-pm@vger.kernel.org
 help / color / mirror / Atom feed
From: Tudor Ambarus <tudor.ambarus@linaro.org>
To: "Krzysztof Kozlowski" <krzk@kernel.org>,
	"Rafael J. Wysocki" <rafael@kernel.org>,
	"Zhang Rui" <rui.zhang@intel.com>,
	"Lukasz Luba" <lukasz.luba@arm.com>,
	"Rob Herring" <robh@kernel.org>,
	"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
	"Conor Dooley" <conor+dt@kernel.org>,
	"Alim Akhtar" <alim.akhtar@samsung.com>,
	"Bartlomiej Zolnierkiewicz" <bzolnier@gmail.com>,
	"Kees Cook" <kees@kernel.org>,
	"Gustavo A. R. Silva" <gustavoars@kernel.org>,
	"Peter Griffin" <peter.griffin@linaro.org>,
	"André Draszik" <andre.draszik@linaro.org>,
	"Daniel Lezcano" <daniel.lezcano@kernel.org>,
	"Sylwester Nawrocki" <s.nawrocki@samsung.com>,
	"Chanwoo Choi" <cw00.choi@samsung.com>,
	"Michael Turquette" <mturquette@baylibre.com>,
	"Stephen Boyd" <sboyd@kernel.org>, "Lee Jones" <lee@kernel.org>
Cc: willmcvicker@google.com, jyescas@google.com,
	shin.son@samsung.com, linux-samsung-soc@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org,
	devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-hardening@vger.kernel.org, linux-clk@vger.kernel.org
Subject: Re: [PATCH v4 02/11] firmware: samsung: acpm: Consolidate transfer initialization helper
Date: Wed, 29 Apr 2026 20:02:44 +0300	[thread overview]
Message-ID: <83c64dc4-6dd8-4edb-8acf-3c731048d73d@linaro.org> (raw)
In-Reply-To: <a63d4dc7-b01a-4da2-ac1f-6679c9030db6@kernel.org>



On 4/28/26 12:25 PM, Krzysztof Kozlowski wrote:
> On 23/04/2026 17:22, Tudor Ambarus wrote:
>>  	acpm_dvfs_init_get_rate_cmd(cmd, clk_id);
>> -	acpm_dvfs_set_xfer(&xfer, cmd, ARRAY_SIZE(cmd), acpm_chan_id, true);
>> +	acpm_set_xfer(&xfer, cmd, ARRAY_SIZE(cmd), acpm_chan_id, true);
>>  
>>  	ret = acpm_do_xfer(handle, &xfer);
>>  	if (ret)
>> diff --git a/drivers/firmware/samsung/exynos-acpm-pmic.c b/drivers/firmware/samsung/exynos-acpm-pmic.c
>> index 0c50993cc9a8..f032f2c69685 100644
>> --- a/drivers/firmware/samsung/exynos-acpm-pmic.c
>> +++ b/drivers/firmware/samsung/exynos-acpm-pmic.c
>> @@ -58,16 +58,6 @@ static inline u32 acpm_pmic_get_bulk(u32 data, unsigned int i)
>>  	return (data >> (ACPM_PMIC_BULK_SHIFT * i)) & ACPM_PMIC_BULK_MASK;
>>  }
>>  
>> -static void acpm_pmic_set_xfer(struct acpm_xfer *xfer, u32 *cmd, size_t cmdlen,
>> -			       unsigned int acpm_chan_id)
>> -{
>> -	xfer->txd = cmd;
>> -	xfer->rxd = cmd;
>> -	xfer->txcnt = cmdlen;
>> -	xfer->rxcnt = cmdlen;
>> -	xfer->acpm_chan_id = acpm_chan_id;
> 
> The code is not equivalent. RX bits were always cleared. This should be
> explained in the commit msg which would also provide a proof that you
> actually analyzed if it has any impact.
> 
Indeed, my commit message is inaccurate because I claimed the
acpm_pmic/dvfs_set_xfer() were identical.

There's no change in functionality: in the original
`acpm_pmic_set_xfer()`, the RX parameters were unconditionally assigned
(`xfer->rxd = cmd;` and `xfer->rxcnt = cmdlen;`). In this patch, all the
updated PMIC call sites now pass `true` for the `response` argument.
This ensures the unified helper takes the `if (response)` branch, which
performs those exact same assignments, preserving the original PMIC
behavior.

Will update the commit message. And revisit the other patches when
splitting the firmware patches into their own set.

Thanks,
ta

  reply	other threads:[~2026-04-29 17:02 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-23 15:22 [PATCH v4 00/11] thermal: samsung: Add support for Google GS101 TMU Tudor Ambarus
2026-04-23 15:22 ` [PATCH v4 01/11] dt-bindings: thermal: Add " Tudor Ambarus
2026-04-23 15:22 ` [PATCH v4 02/11] firmware: samsung: acpm: Consolidate transfer initialization helper Tudor Ambarus
2026-04-28  9:25   ` Krzysztof Kozlowski
2026-04-29 17:02     ` Tudor Ambarus [this message]
2026-04-23 15:22 ` [PATCH v4 03/11] firmware: samsung: acpm: Annotate rx_data->cmd with __counted_by_ptr Tudor Ambarus
2026-04-23 15:22 ` [PATCH v4 04/11] firmware: samsung: acpm: Drop redundant _ops suffix in acpm_ops members Tudor Ambarus
2026-04-23 15:22 ` [PATCH v4 05/11] firmware: samsung: acpm: Make acpm_ops const and access via pointer Tudor Ambarus
2026-04-23 15:22 ` [PATCH v4 06/11] firmware: samsung: acpm: Add TMU protocol support Tudor Ambarus
2026-04-23 15:22 ` [PATCH v4 07/11] firmware: samsung: acpm: Add devm_acpm_get_by_phandle helper Tudor Ambarus
2026-04-23 15:22 ` [PATCH v4 08/11] thermal: samsung: Add Exynos ACPM TMU driver GS101 Tudor Ambarus
2026-04-30 13:07   ` Alexey Klimov
2026-04-30 13:40     ` Tudor Ambarus
2026-04-23 15:22 ` [PATCH v4 09/11] MAINTAINERS: Add entry for Samsung Exynos ACPM thermal driver Tudor Ambarus
2026-04-23 15:22 ` [PATCH v4 10/11] arm64: dts: exynos: gs101: Add thermal management unit Tudor Ambarus
2026-04-23 15:22 ` [PATCH v4 11/11] arm64: defconfig: enable Exynos ACPM thermal support Tudor Ambarus
2026-04-28  9:24 ` [PATCH v4 00/11] thermal: samsung: Add support for Google GS101 TMU Krzysztof Kozlowski
2026-04-29 15:20   ` Tudor Ambarus
2026-05-01 13:13 ` Alexey Klimov
2026-05-01 14:33   ` Tudor Ambarus
2026-05-01 15:32     ` Alexey Klimov

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=83c64dc4-6dd8-4edb-8acf-3c731048d73d@linaro.org \
    --to=tudor.ambarus@linaro.org \
    --cc=alim.akhtar@samsung.com \
    --cc=andre.draszik@linaro.org \
    --cc=bzolnier@gmail.com \
    --cc=conor+dt@kernel.org \
    --cc=cw00.choi@samsung.com \
    --cc=daniel.lezcano@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=gustavoars@kernel.org \
    --cc=jyescas@google.com \
    --cc=kees@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=krzk@kernel.org \
    --cc=lee@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-hardening@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=lukasz.luba@arm.com \
    --cc=mturquette@baylibre.com \
    --cc=peter.griffin@linaro.org \
    --cc=rafael@kernel.org \
    --cc=robh@kernel.org \
    --cc=rui.zhang@intel.com \
    --cc=s.nawrocki@samsung.com \
    --cc=sboyd@kernel.org \
    --cc=shin.son@samsung.com \
    --cc=willmcvicker@google.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