[PATCH v3 13/15] soc: qcom: smsm: Use mbox_ring_doorbell() instead of NULL message

Douglas Anderson posted 15 patches 2 weeks, 2 days ago
[PATCH v3 13/15] soc: qcom: smsm: Use mbox_ring_doorbell() instead of NULL message
Posted by Douglas Anderson 2 weeks, 2 days ago
As per the patch ("mailbox: Deprecate NULL mbox messages; Introduce
mbox_ring_doorbell()"), we want to switch all users of NULL mailbox
messages to use mbox_ring_doorbell().

This client only ever sent NULL messages, so the transition is
straightforward. We can remove the call to mbox_client_txdone(). The
call didn't do anything for NULL messages and it's now officially
documented not to be called for doorbells.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
---

(no changes since v1)

 drivers/soc/qcom/smsm.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/soc/qcom/smsm.c b/drivers/soc/qcom/smsm.c
index 021e9d1f61dc..1e127678fd9c 100644
--- a/drivers/soc/qcom/smsm.c
+++ b/drivers/soc/qcom/smsm.c
@@ -182,14 +182,12 @@ static int smsm_update_bits(void *data, u32 mask, u32 value)
 		if (!(val & changes))
 			continue;
 
-		if (hostp->mbox_chan) {
-			mbox_send_message(hostp->mbox_chan, NULL);
-			mbox_client_txdone(hostp->mbox_chan, 0);
-		} else if (hostp->ipc_regmap) {
+		if (hostp->mbox_chan)
+			mbox_ring_doorbell(hostp->mbox_chan);
+		else if (hostp->ipc_regmap)
 			regmap_write(hostp->ipc_regmap,
 				     hostp->ipc_offset,
 				     BIT(hostp->ipc_bit));
-		}
 	}
 
 done:
-- 
2.53.0.273.g2a3d683680-goog
Re: [PATCH v3 13/15] soc: qcom: smsm: Use mbox_ring_doorbell() instead of NULL message
Posted by Bjorn Andersson 1 week, 2 days ago
On Mon, Feb 16, 2026 at 10:09:50AM -0800, Douglas Anderson wrote:
> As per the patch ("mailbox: Deprecate NULL mbox messages; Introduce
> mbox_ring_doorbell()"), we want to switch all users of NULL mailbox
> messages to use mbox_ring_doorbell().
> 
> This client only ever sent NULL messages, so the transition is
> straightforward. We can remove the call to mbox_client_txdone(). The
> call didn't do anything for NULL messages and it's now officially
> documented not to be called for doorbells.
> 

Acked-by: Bjorn Andersson <andersson@kernel.org>

Regards,
Bjorn

> Signed-off-by: Douglas Anderson <dianders@chromium.org>
> ---
> 
> (no changes since v1)
> 
>  drivers/soc/qcom/smsm.c | 8 +++-----
>  1 file changed, 3 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/soc/qcom/smsm.c b/drivers/soc/qcom/smsm.c
> index 021e9d1f61dc..1e127678fd9c 100644
> --- a/drivers/soc/qcom/smsm.c
> +++ b/drivers/soc/qcom/smsm.c
> @@ -182,14 +182,12 @@ static int smsm_update_bits(void *data, u32 mask, u32 value)
>  		if (!(val & changes))
>  			continue;
>  
> -		if (hostp->mbox_chan) {
> -			mbox_send_message(hostp->mbox_chan, NULL);
> -			mbox_client_txdone(hostp->mbox_chan, 0);
> -		} else if (hostp->ipc_regmap) {
> +		if (hostp->mbox_chan)
> +			mbox_ring_doorbell(hostp->mbox_chan);
> +		else if (hostp->ipc_regmap)
>  			regmap_write(hostp->ipc_regmap,
>  				     hostp->ipc_offset,
>  				     BIT(hostp->ipc_bit));
> -		}
>  	}
>  
>  done:
> -- 
> 2.53.0.273.g2a3d683680-goog
>