public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/3] mailbox: Allow direct registration to a channel
@ 2023-03-23 19:15 Elliot Berman
  2023-03-23 19:15 ` [PATCH v2 1/3] " Elliot Berman
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Elliot Berman @ 2023-03-23 19:15 UTC (permalink / raw)
  To: Jassi Brar
  Cc: Elliot Berman, Sudeep Holla, linux-kernel, linux-acpi,
	linux-arm-msm

Two mailbox controllers have channel/client binding mechanisms that are
controller-specific and not using the devicetree binding mechanisms. Mailbox
channel/client is conceptually done in two steps: selecting the channel
and binding the selected to channel to a client. Channel selection is sometimes
controller specific (pcc and omap are examples). The channel/client binding
code is all the same.

This small series de-duplicates and refactors the channel/client binding
into a common framework function: "mbox_bind_client" which all of the
channel selection mechanisms can use.

I found this duplicate code while working on the support for Gunyah hypervisor
message queues [1]. I've only been able to compile-test omap-mailbox and pcc,
however it is a straightforward conversion here.

[1]: https://lore.kernel.org/all/20230120224627.4053418-9-quic_eberman@quicinc.com/

Changes since v1:
 - Rebase to https://git.linaro.org/landing-teams/working/fujitsu/integration.git/log/?h=mailbox-for-next
 - Add Tested-By from Sudeep (thanks!)

Elliot Berman (3):
  mailbox: Allow direct registration to a channel
  mailbox: omap: Use mbox_bind_client
  mailbox: pcc: Use mbox_bind_client

 drivers/mailbox/mailbox.c      | 96 ++++++++++++++++++++++++----------
 drivers/mailbox/omap-mailbox.c | 22 ++------
 drivers/mailbox/pcc.c          | 82 ++++++++++++++++-------------
 include/linux/mailbox_client.h |  1 +
 4 files changed, 118 insertions(+), 83 deletions(-)


base-commit: 6ccbe33a39523f6d62b22c5ee99c6695993c935e
-- 
2.39.2


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2023-03-24  4:48 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-23 19:15 [PATCH v2 0/3] mailbox: Allow direct registration to a channel Elliot Berman
2023-03-23 19:15 ` [PATCH v2 1/3] " Elliot Berman
2023-03-23 19:15 ` [PATCH v2 2/3] mailbox: omap: Use mbox_bind_client Elliot Berman
2023-03-23 19:15 ` [PATCH v2 3/3] mailbox: pcc: " Elliot Berman
2023-03-23 21:38   ` kernel test robot
2023-03-24  2:55   ` kernel test robot
2023-03-24  4:47   ` kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox