linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mailbox: qcom-ipcc: Enable loading QCOM_IPCC as a module
@ 2021-07-16  7:49 Amit Pundir
  2021-07-16  9:23 ` Manivannan Sadhasivam
  0 siblings, 1 reply; 2+ messages in thread
From: Amit Pundir @ 2021-07-16  7:49 UTC (permalink / raw)
  To: Jassi Brar, Andy Gross, Bjorn Andersson, Manivannan Sadhasivam,
	Dmitry Baryshkov
  Cc: linux-arm-msm, lkml

This patch enables the qcom_ipcc driver to be loaded as a
module. IPCC is fairly core to system, so as such it should
never be unloaded. It registers as a mailbox + irq controller
and the irq controller drivers in kernel are not supposed to
be unloaded as they don't have the visibility over the clients
consuming the irqs. Hence adding supress_bind_attrs to disable
bind/unbind via sysfs.

Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
---
 drivers/mailbox/Kconfig     | 2 +-
 drivers/mailbox/qcom-ipcc.c | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/mailbox/Kconfig b/drivers/mailbox/Kconfig
index b4b780ea2ac8..c9fc06c7e685 100644
--- a/drivers/mailbox/Kconfig
+++ b/drivers/mailbox/Kconfig
@@ -264,7 +264,7 @@ config SPRD_MBOX
 	  you want to build the Spreatrum mailbox controller driver.
 
 config QCOM_IPCC
-	bool "Qualcomm Technologies, Inc. IPCC driver"
+	tristate "Qualcomm Technologies, Inc. IPCC driver"
 	depends on ARCH_QCOM || COMPILE_TEST
 	help
 	  Qualcomm Technologies, Inc. Inter-Processor Communication Controller
diff --git a/drivers/mailbox/qcom-ipcc.c b/drivers/mailbox/qcom-ipcc.c
index 584700cd1585..f1d4f4679b17 100644
--- a/drivers/mailbox/qcom-ipcc.c
+++ b/drivers/mailbox/qcom-ipcc.c
@@ -277,6 +277,7 @@ static struct platform_driver qcom_ipcc_driver = {
 	.driver = {
 		.name = "qcom-ipcc",
 		.of_match_table = qcom_ipcc_of_match,
+		.suppress_bind_attrs = true,
 	},
 };
 
-- 
2.25.1


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

* Re: [PATCH] mailbox: qcom-ipcc: Enable loading QCOM_IPCC as a module
  2021-07-16  7:49 [PATCH] mailbox: qcom-ipcc: Enable loading QCOM_IPCC as a module Amit Pundir
@ 2021-07-16  9:23 ` Manivannan Sadhasivam
  0 siblings, 0 replies; 2+ messages in thread
From: Manivannan Sadhasivam @ 2021-07-16  9:23 UTC (permalink / raw)
  To: Amit Pundir
  Cc: Jassi Brar, Andy Gross, Bjorn Andersson, Dmitry Baryshkov,
	linux-arm-msm, lkml

On Fri, Jul 16, 2021 at 01:19:46PM +0530, Amit Pundir wrote:
> This patch enables the qcom_ipcc driver to be loaded as a
> module. IPCC is fairly core to system, so as such it should
> never be unloaded. It registers as a mailbox + irq controller
> and the irq controller drivers in kernel are not supposed to
> be unloaded as they don't have the visibility over the clients
> consuming the irqs. Hence adding supress_bind_attrs to disable
> bind/unbind via sysfs.
> 
> Signed-off-by: Amit Pundir <amit.pundir@linaro.org>

Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>

Thanks,
Mani

> ---
>  drivers/mailbox/Kconfig     | 2 +-
>  drivers/mailbox/qcom-ipcc.c | 1 +
>  2 files changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/mailbox/Kconfig b/drivers/mailbox/Kconfig
> index b4b780ea2ac8..c9fc06c7e685 100644
> --- a/drivers/mailbox/Kconfig
> +++ b/drivers/mailbox/Kconfig
> @@ -264,7 +264,7 @@ config SPRD_MBOX
>  	  you want to build the Spreatrum mailbox controller driver.
>  
>  config QCOM_IPCC
> -	bool "Qualcomm Technologies, Inc. IPCC driver"
> +	tristate "Qualcomm Technologies, Inc. IPCC driver"
>  	depends on ARCH_QCOM || COMPILE_TEST
>  	help
>  	  Qualcomm Technologies, Inc. Inter-Processor Communication Controller
> diff --git a/drivers/mailbox/qcom-ipcc.c b/drivers/mailbox/qcom-ipcc.c
> index 584700cd1585..f1d4f4679b17 100644
> --- a/drivers/mailbox/qcom-ipcc.c
> +++ b/drivers/mailbox/qcom-ipcc.c
> @@ -277,6 +277,7 @@ static struct platform_driver qcom_ipcc_driver = {
>  	.driver = {
>  		.name = "qcom-ipcc",
>  		.of_match_table = qcom_ipcc_of_match,
> +		.suppress_bind_attrs = true,
>  	},
>  };
>  
> -- 
> 2.25.1
> 

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

end of thread, other threads:[~2021-07-16  9:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-16  7:49 [PATCH] mailbox: qcom-ipcc: Enable loading QCOM_IPCC as a module Amit Pundir
2021-07-16  9:23 ` Manivannan Sadhasivam

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).