From patchwork Sat Jul 18 00:06:34 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Saravana Kannan X-Patchwork-Id: 11671501 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 19602618 for ; Sat, 18 Jul 2020 00:07:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 018F320691 for ; Sat, 18 Jul 2020 00:07:01 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="f7sz0tga" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728737AbgGRAHA (ORCPT ); Fri, 17 Jul 2020 20:07:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48556 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728001AbgGRAGn (ORCPT ); Fri, 17 Jul 2020 20:06:43 -0400 Received: from mail-qk1-x749.google.com (mail-qk1-x749.google.com [IPv6:2607:f8b0:4864:20::749]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A0621C0619D2 for ; Fri, 17 Jul 2020 17:06:43 -0700 (PDT) Received: by mail-qk1-x749.google.com with SMTP id 1so2508918qkm.19 for ; Fri, 17 Jul 2020 17:06:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=lZV5LJ2D+3d5c6Q1RBEHt+umrHrDQPYow79ie/sqGoo=; b=f7sz0tgaClL14NdE7pJITVXQTObuFddTT6emyjS08ZgPsh5vLij6r8Zr0bdr8nmJRz HLP+EdNTkpLXbcL5dYajxBaRik3Dw2bErrgNidiApzncVpOsTCt+bfjEJ1gVY0MTCIK3 0Zj3UzcABE83gfPsE1DrmmHS203F++mP+Ysu29KDC3/FnR95F8F0v9dVnsnN06FinAji R+vJDBGn3CsQ/h9XHm9VCIoUqnaEcHwJCaJu1fQd1sLUv6WgSaZZBj2zHrk05K23z0/T ByzcbObDgfus2zOMoNbaOXd15ySmQzPlMHtexdlMoydVKP8BFo62ExGirBtJUN7Nx3Ji FLNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=lZV5LJ2D+3d5c6Q1RBEHt+umrHrDQPYow79ie/sqGoo=; b=Sfag22pf5QzKWZtUkypTwO0mA5c10C7UDEVttS23wDnW9bf+k6/DE5aL52cXVH+Jwv 5pBXh73BxA26bP6rNE5RSTgT56Q5gYd9AakDHgj15yhWCJTNtzAUDs+HaPAGSJn1FLaT +TGwPpcPjGdMnQHlnTgmUA8EYA3Zzwtg9YUq9hBIDhLI7grnKysIVC0IN5fqTtV2DJmZ boHgwYyWB9vsc3SvjT9N04KIorRKFImi5TEDXYbsqmP5e/tEaeTaEvRnLoo/qwXSAdWM E2RO3mpJ/teRkIAYZ9sAkb3J1usTl1SP1QMRh3Fr37LnwWCfN4zbOs9vp+nNTi6iKiE+ 5kgw== X-Gm-Message-State: AOAM533U3/vJIpPAu+++9ZVRS64Rych7lNpo2SjtiQDf9lfpOp+DNJVe DWApZlkvhpLdymTqbIddJRYs33o1q33bDCA= X-Google-Smtp-Source: ABdhPJxJ7FCreyEpq5UXSDryBArlKlpzEz07QUPpT9WWRT3kKQejA5X0pbgSsPqzz1OI15cxmhDDFZUj4PyeZpY= X-Received: by 2002:a05:6214:8f4:: with SMTP id dr20mr10977278qvb.228.1595030802697; Fri, 17 Jul 2020 17:06:42 -0700 (PDT) Date: Fri, 17 Jul 2020 17:06:34 -0700 In-Reply-To: <20200718000637.3632841-1-saravanak@google.com> Message-Id: <20200718000637.3632841-2-saravanak@google.com> Mime-Version: 1.0 References: <20200718000637.3632841-1-saravanak@google.com> X-Mailer: git-send-email 2.28.0.rc0.105.gf9edc3c819-goog Subject: [PATCH v3 1/4] irqchip: Add IRQCHIP_PLATFORM_DRIVER_BEGIN/END and IRQCHIP_MATCH helper macros From: Saravana Kannan To: Thomas Gleixner , Jason Cooper , Marc Zyngier , Matthias Brugger , Andy Gross , Bjorn Andersson Cc: Saravana Kannan , kernel-team@android.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-arm-msm@vger.kernel.org, John Stultz , Hanks Chen , CC Hwang , Loda Chou Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Compiling an irqchip driver as a platform driver needs to bunch of things to be done right: - Making sure the parent domain is initialized first - Making sure the device can't be unbound from sysfs - Disallowing module unload if it's built as a module - Finding the parent node - Etc. Instead of trying to make sure all future irqchip platform drivers get this right, provide boilerplate macros that take care of all of this. An example use would look something like this. Where acme_foo_init and acme_bar_init are similar to what would be passed to IRQCHIP_DECLARE. IRQCHIP_PLATFORM_DRIVER_BEGIN(acme_irq) IRQCHIP_MATCH("acme,foo", acme_foo_init) IRQCHIP_MATCH("acme,bar", acme_bar_init) IRQCHIP_PLATFORM_DRIVER_END(acme_irq) Cc: John Stultz Signed-off-by: Saravana Kannan --- drivers/irqchip/irqchip.c | 29 +++++++++++++++++++++++++++++ include/linux/irqchip.h | 23 +++++++++++++++++++++++ 2 files changed, 52 insertions(+) diff --git a/drivers/irqchip/irqchip.c b/drivers/irqchip/irqchip.c index 2b35e68bea82..1bb0e36c2bf3 100644 --- a/drivers/irqchip/irqchip.c +++ b/drivers/irqchip/irqchip.c @@ -10,8 +10,10 @@ #include #include +#include #include #include +#include /* * This special of_device_id is the sentinel at the end of the @@ -29,3 +31,30 @@ void __init irqchip_init(void) of_irq_init(__irqchip_of_table); acpi_probe_device_table(irqchip); } + +int platform_irqchip_probe(struct platform_device *pdev) +{ + struct device_node *np = pdev->dev.of_node; + struct device_node *par_np = of_irq_find_parent(np); + of_irq_init_cb_t irq_init_cb = of_device_get_match_data(&pdev->dev); + + if (!irq_init_cb) + return -EINVAL; + + if (par_np == np) + par_np = NULL; + + /* + * If there's a parent interrupt controller and none of the parent irq + * domains have been registered, that means the parent interrupt + * controller has not been initialized yet. it's not time for this + * interrupt controller to initialize. So, defer probe of this + * interrupt controller. The actual initialization callback of this + * interrupt controller can check for specific domains as necessary. + */ + if (par_np && !irq_find_matching_host(np, DOMAIN_BUS_ANY)) + return -EPROBE_DEFER; + + return irq_init_cb(np, par_np); +} +EXPORT_SYMBOL_GPL(platform_irqchip_probe); diff --git a/include/linux/irqchip.h b/include/linux/irqchip.h index 447f22880a69..8e754d8b8155 100644 --- a/include/linux/irqchip.h +++ b/include/linux/irqchip.h @@ -13,6 +13,7 @@ #include #include +#include /* * This macro must be used by the different irqchip drivers to declare @@ -26,6 +27,28 @@ */ #define IRQCHIP_DECLARE(name, compat, fn) OF_DECLARE_2(irqchip, name, compat, fn) +extern int platform_irqchip_probe(struct platform_device *pdev); + +#define IRQCHIP_PLATFORM_DRIVER_BEGIN(drv_name) \ +static const struct of_device_id drv_name##_irqchip_match_table[] = { + +#define IRQCHIP_MATCH(compat, fn) { .compatible = compat, .data = fn }, + +#define IRQCHIP_PLATFORM_DRIVER_END(drv_name) \ + {}, \ +}; \ +MODULE_DEVICE_TABLE(of, drv_name##_irqchip_match_table); \ +static struct platform_driver drv_name##_driver = { \ + .probe = platform_irqchip_probe, \ + .driver = { \ + .name = #drv_name, \ + .owner = THIS_MODULE, \ + .of_match_table = drv_name##_irqchip_match_table, \ + .suppress_bind_attrs = true, \ + }, \ +}; \ +builtin_platform_driver(drv_name##_driver) + /* * This macro must be used by the different irqchip drivers to declare * the association between their version and their initialization function. From patchwork Sat Jul 18 00:06:35 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Saravana Kannan X-Patchwork-Id: 11671485 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id EE1466C1 for ; Sat, 18 Jul 2020 00:06:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CF66E207EA for ; Sat, 18 Jul 2020 00:06:49 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="eaB2T02E" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728729AbgGRAGq (ORCPT ); Fri, 17 Jul 2020 20:06:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48564 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728691AbgGRAGp (ORCPT ); Fri, 17 Jul 2020 20:06:45 -0400 Received: from mail-pf1-x44a.google.com (mail-pf1-x44a.google.com [IPv6:2607:f8b0:4864:20::44a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D0A80C0619D3 for ; Fri, 17 Jul 2020 17:06:45 -0700 (PDT) Received: by mail-pf1-x44a.google.com with SMTP id e80so7995172pfh.13 for ; Fri, 17 Jul 2020 17:06:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=DKGRFKWlyGqgvFuZLsoVKcLXRUmmTtOYHyvcndsSP+U=; b=eaB2T02EB8g0y1xZXeHPi2mGLg8poIqpVgJ7BZUCLc/EEq3S9kRsfSNNVOCKuDD0Tp x74rVZSROfJKsOJm9ugF+T1Hp/iX0XD+d22Er6E2Ibg96Ah5e8rAy3JrWpf9H2Z7OG+d YfBGYGnHBr3s3ccaS/U13rr/1gTn2YsvYde1+xHImpDp53KqpLwJSlZ2wApaMUKIJsf3 crIVaak6JWU7DHb9Yi5DC8e+5EFRBpqVcvzTXx4P24HIAMBgrJPX7czTcaMGSWVzUDhV MEo1D+Pw+zcwU39+Qrp+uVsSPuLqyQXoE6/DNJ8WbV/EYVgi81q5pq3cK0C/DF/L+LlF vZRw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=DKGRFKWlyGqgvFuZLsoVKcLXRUmmTtOYHyvcndsSP+U=; b=rrEgCeqmWDCuPppBUNrt/cMOq/YTzY+Uv/ifvJbQyJclzmg/SgB760Ov5d8OAG3Far fwo4gOO8umVLOrlBBguid15VPbHYF45MYBziD6ep7cYvDvrRpg8TD3nDFikI8sCV32GM 2tb4qZ5YQAij0aKiKgMikiEnq92v5uy5/TwuJ6V8enkH0FVh458i+tJ0aOmc0cxGcFhU QSQM76+ITzS/32lGyeIFlfm/2r7tgdB3tumKP0Wl5WMiU9l2IaFZiaaPYYh7vNVH49Q0 G0Vqmo5tRW2xeT6ovnI5YlTbghkaU8o9D9aaAIlRVlQGOJEGPTGC/WM824EEp2BCnYLY B7zQ== X-Gm-Message-State: AOAM533PUaoHQqF5soGIEpcxwju1KCHOCCf7F3WWvA5Vn5jIQVLvwr47 RxyTB7y+6ZpcOIOSnaxWGtaXt580IXUAL00= X-Google-Smtp-Source: ABdhPJw0Oq4D37hE7WRVSZZsPHqDRMN/reFgLscACQLoMocTAkUGaDa91/twwV300uYzLONkac+Q5pfdV9Natf0= X-Received: by 2002:a17:90a:32cb:: with SMTP id l69mr11006149pjb.205.1595030805133; Fri, 17 Jul 2020 17:06:45 -0700 (PDT) Date: Fri, 17 Jul 2020 17:06:35 -0700 In-Reply-To: <20200718000637.3632841-1-saravanak@google.com> Message-Id: <20200718000637.3632841-3-saravanak@google.com> Mime-Version: 1.0 References: <20200718000637.3632841-1-saravanak@google.com> X-Mailer: git-send-email 2.28.0.rc0.105.gf9edc3c819-goog Subject: [PATCH v3 2/4] irqchip/qcom-pdc: Switch to using IRQCHIP_PLATFORM_DRIVER helper macros From: Saravana Kannan To: Thomas Gleixner , Jason Cooper , Marc Zyngier , Matthias Brugger , Andy Gross , Bjorn Andersson Cc: Saravana Kannan , kernel-team@android.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-arm-msm@vger.kernel.org, John Stultz , Hanks Chen , CC Hwang , Loda Chou Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Switch the driver to use the helper macros. In addition to reducing the number of lines, this also adds module unload protection (if the driver is compiled as a module) by switching from module_platform_driver to builtin_platform_driver. Signed-off-by: Saravana Kannan --- drivers/irqchip/qcom-pdc.c | 26 +++----------------------- 1 file changed, 3 insertions(+), 23 deletions(-) diff --git a/drivers/irqchip/qcom-pdc.c b/drivers/irqchip/qcom-pdc.c index 5b624e3295e4..c1c5dfad57cc 100644 --- a/drivers/irqchip/qcom-pdc.c +++ b/drivers/irqchip/qcom-pdc.c @@ -432,28 +432,8 @@ static int qcom_pdc_init(struct device_node *node, struct device_node *parent) return ret; } -static int qcom_pdc_probe(struct platform_device *pdev) -{ - struct device_node *np = pdev->dev.of_node; - struct device_node *parent = of_irq_find_parent(np); - - return qcom_pdc_init(np, parent); -} - -static const struct of_device_id qcom_pdc_match_table[] = { - { .compatible = "qcom,pdc" }, - {} -}; -MODULE_DEVICE_TABLE(of, qcom_pdc_match_table); - -static struct platform_driver qcom_pdc_driver = { - .probe = qcom_pdc_probe, - .driver = { - .name = "qcom-pdc", - .of_match_table = qcom_pdc_match_table, - .suppress_bind_attrs = true, - }, -}; -module_platform_driver(qcom_pdc_driver); +IRQCHIP_PLATFORM_DRIVER_BEGIN(qcom_pdc) +IRQCHIP_MATCH("qcom,pdc", qcom_pdc_init) +IRQCHIP_PLATFORM_DRIVER_END(qcom_pdc) MODULE_DESCRIPTION("Qualcomm Technologies, Inc. Power Domain Controller"); MODULE_LICENSE("GPL v2"); From patchwork Sat Jul 18 00:06:36 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Saravana Kannan X-Patchwork-Id: 11671493 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id CFB546C1 for ; Sat, 18 Jul 2020 00:06:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B8B4420882 for ; Sat, 18 Jul 2020 00:06:57 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="Pc3OXUSR" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728787AbgGRAGu (ORCPT ); Fri, 17 Jul 2020 20:06:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48578 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728768AbgGRAGs (ORCPT ); Fri, 17 Jul 2020 20:06:48 -0400 Received: from mail-yb1-xb4a.google.com (mail-yb1-xb4a.google.com [IPv6:2607:f8b0:4864:20::b4a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 739D6C0619D3 for ; Fri, 17 Jul 2020 17:06:48 -0700 (PDT) Received: by mail-yb1-xb4a.google.com with SMTP id d202so13332125ybh.12 for ; Fri, 17 Jul 2020 17:06:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=9lliIP397BkHUMIYOIiz1lmKlM09rTtKqti3dJZq5NI=; b=Pc3OXUSRMtC51Xe5/XMfqVgGHTzqEztWThvDswR20yBvK4q20Xw3ZNE+8dkR19OmDD gDksFj5HOd268anWSSimT3Gn9d+v7SfcYJjjCEJY6k3KED8/Qg0cUFL25Q3MLk3u6WzP 6SQOsdECq3m8nfn4B/G+qcw93FKsucGX6KBj42CnWiZKaOz2sMFI1iIBqIg8B/YnRj6U VozP0QbaLKiXIdIxryY+7xaJJEGEd8+z9ZmQZXSjBMWae0vTANsynMnqxGRMmmAY2Nz7 y01D9HdzUEov/4to4JpMNjFHQb5ZWpIPNEGfCjmvUCtCL/gSUXe19cgBOBtkE/HRrupU dKKw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=9lliIP397BkHUMIYOIiz1lmKlM09rTtKqti3dJZq5NI=; b=K2j4z4Y2GK71U+iFPtgVjoV8IFZDzw8bTVbMzBrgB7bTGoECxSZsn6JL7ZAodSHYvk uDcWLAgg8G7HZyuUAynyXTPROgNhcqPq8dNFbPB7t8slTedi3+EDEPtATdc3x4CBc5Kv Tq59QPZVnrbBahYTKNUFFC6hphqIMS6EtLwrwKZG8ZnJSCxir1uDiegOsHYaQFyVoB7r xs7f7GNqJOG4UIyI0qmpSAjT9CZTq6TDL/MAJjl9Dt3M/+6v0LxbWmbEKBVUEX4ZM+I7 X7HtuzGCN6C+Sni8tSdjz85rqVUaGA2ivbsGpely5XsTxaOxImwLTDmQW4HYfrtXVqKo XViA== X-Gm-Message-State: AOAM533A2Ev7Vn4GRqysH0GCbWOS7iCPvrEcy4F4qiW5G4sJ/WWrPp2h 8x4waWWt6J11OZHqKfmIK3UPHucHFV9CL1U= X-Google-Smtp-Source: ABdhPJzaoGGT2QOhK85hcWY30M8zasDny3EJDQN0UI4RBnyRl5EEGtO+6Y9IPCYksqge9OpTXg7V9ykOWjui2KA= X-Received: by 2002:a25:abc5:: with SMTP id v63mr17904281ybi.148.1595030807668; Fri, 17 Jul 2020 17:06:47 -0700 (PDT) Date: Fri, 17 Jul 2020 17:06:36 -0700 In-Reply-To: <20200718000637.3632841-1-saravanak@google.com> Message-Id: <20200718000637.3632841-4-saravanak@google.com> Mime-Version: 1.0 References: <20200718000637.3632841-1-saravanak@google.com> X-Mailer: git-send-email 2.28.0.rc0.105.gf9edc3c819-goog Subject: [PATCH v3 3/4] irqchip/mtk-sysirq: Convert to a platform driver From: Saravana Kannan To: Thomas Gleixner , Jason Cooper , Marc Zyngier , Matthias Brugger , Andy Gross , Bjorn Andersson Cc: Saravana Kannan , kernel-team@android.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-arm-msm@vger.kernel.org, John Stultz , Hanks Chen , CC Hwang , Loda Chou Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org This driver can work as a platform driver. So covert it to a platform driver. Signed-off-by: Saravana Kannan Reviewed-by: Hanks Chen --- drivers/irqchip/irq-mtk-sysirq.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/irqchip/irq-mtk-sysirq.c b/drivers/irqchip/irq-mtk-sysirq.c index 6ff98b87e5c0..7299c5ab4d10 100644 --- a/drivers/irqchip/irq-mtk-sysirq.c +++ b/drivers/irqchip/irq-mtk-sysirq.c @@ -231,4 +231,6 @@ static int __init mtk_sysirq_of_init(struct device_node *node, kfree(chip_data); return ret; } -IRQCHIP_DECLARE(mtk_sysirq, "mediatek,mt6577-sysirq", mtk_sysirq_of_init); +IRQCHIP_PLATFORM_DRIVER_BEGIN(mtk_sysirq) +IRQCHIP_MATCH("mediatek,mt6577-sysirq", mtk_sysirq_of_init) +IRQCHIP_PLATFORM_DRIVER_END(mtk_sysirq) From patchwork Sat Jul 18 00:06:37 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Saravana Kannan X-Patchwork-Id: 11671491 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 53A1D618 for ; Sat, 18 Jul 2020 00:06:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3BA602074B for ; Sat, 18 Jul 2020 00:06:55 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="oFBiOJFo" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728817AbgGRAGx (ORCPT ); Fri, 17 Jul 2020 20:06:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48586 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728805AbgGRAGu (ORCPT ); Fri, 17 Jul 2020 20:06:50 -0400 Received: from mail-pf1-x449.google.com (mail-pf1-x449.google.com [IPv6:2607:f8b0:4864:20::449]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C1A8EC0619D3 for ; Fri, 17 Jul 2020 17:06:50 -0700 (PDT) Received: by mail-pf1-x449.google.com with SMTP id a8so7999403pff.3 for ; Fri, 17 Jul 2020 17:06:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=cSGrpEWuKSVf97iW7EL4KZRFYPfb7+inZKxBuLQuvAE=; b=oFBiOJFotgQsYiohUpKbkZXbMk0anIOETUAPGMRKbKBtkpfPEd8xLg6XTAXbyZcfoi BwNvvIaw6/t2CBTYGbvsBkLGxWK6++vWST3Aj1KHKgiLKceg0RQ/9jN9Ao2iWcVkzj7h 2Q0AYvvuyzQfl95ZIplngHYn1lLuX9YOT4GvpS3gMS4mvYXyjnqEy+kxckIutRo4ELHv PD8Cy2kj4InW3oDPlbSPrZZ65B1YVO/rND51vigqVYZQjN2CHT4NeULpOgwFAekw8cce JpLLDWTXvh8nLo3nGfEzbkbAHILC+wrXQ/qljDHEhrL2d39+3a69ylcOh6DBU7A+ud7z 0n3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=cSGrpEWuKSVf97iW7EL4KZRFYPfb7+inZKxBuLQuvAE=; b=dqGedn0FHOPS+0VCMSNNFAjYPSkhpgXrLEZPII8De45mOe32obNa6P7Ql08o7vCsjn vPiUrrfjTOyTq7aSIdXvxjKbYu8XGsOFHWCJ/AFM/UUbcmc2il5OFqmyLyQWWeK+YzPe k+Ao8AgbEFK0P3hrFmrHlNHZbgfitHf8ASJLPOKe23av3jm674GekqhRHNPn/cWybhYL C87hRiys+YLgjqrzDm/htCPgnAmZRf+qfNDjVgOkpssZVgGHbX/3lI83sri6F/gLH7Kc 5jl9eC4cmHPM95YYM1pHDc+B1z0tCB/xHWOabA2Kc7gys38J32pyqyVo2elZTMnG1U/g e25g== X-Gm-Message-State: AOAM533XdJX0Q1e7ZNp5clDzf5ILVbE6rNBHr8Qh0E4juBGoBTcXMZO3 /v4tF6qSaU9j2uuWBXmHG9nHHCJHGvuvT5I= X-Google-Smtp-Source: ABdhPJzKJZr8KDd4Yo0Wm5lo4eKhPkLN/TRhN4fCypWCbhR0OyB2ssX8VqDuXN35b/Dzh+f6roB+vXsTyHzgnyQ= X-Received: by 2002:a63:7d16:: with SMTP id y22mr10135672pgc.136.1595030810200; Fri, 17 Jul 2020 17:06:50 -0700 (PDT) Date: Fri, 17 Jul 2020 17:06:37 -0700 In-Reply-To: <20200718000637.3632841-1-saravanak@google.com> Message-Id: <20200718000637.3632841-5-saravanak@google.com> Mime-Version: 1.0 References: <20200718000637.3632841-1-saravanak@google.com> X-Mailer: git-send-email 2.28.0.rc0.105.gf9edc3c819-goog Subject: [PATCH v3 4/4] irqchip/mtk-cirq: Convert to a platform driver From: Saravana Kannan To: Thomas Gleixner , Jason Cooper , Marc Zyngier , Matthias Brugger , Andy Gross , Bjorn Andersson Cc: Saravana Kannan , kernel-team@android.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-arm-msm@vger.kernel.org, John Stultz , Hanks Chen , CC Hwang , Loda Chou Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org This driver can work as a platform driver. So covert it to a platform driver. Signed-off-by: Saravana Kannan Reviewed-by: Hanks Chen --- drivers/irqchip/irq-mtk-cirq.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/irqchip/irq-mtk-cirq.c b/drivers/irqchip/irq-mtk-cirq.c index 69ba8ce3c178..62a61275aaa3 100644 --- a/drivers/irqchip/irq-mtk-cirq.c +++ b/drivers/irqchip/irq-mtk-cirq.c @@ -295,4 +295,6 @@ static int __init mtk_cirq_of_init(struct device_node *node, return ret; } -IRQCHIP_DECLARE(mtk_cirq, "mediatek,mtk-cirq", mtk_cirq_of_init); +IRQCHIP_PLATFORM_DRIVER_BEGIN(mtk_cirq) +IRQCHIP_MATCH("mediatek,mtk-cirq", mtk_cirq_of_init) +IRQCHIP_PLATFORM_DRIVER_END(mtk_cirq)