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: 11671489 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 CC44A618 for ; Sat, 18 Jul 2020 00:06:52 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A599D20691 for ; Sat, 18 Jul 2020 00:06:52 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="bsBKcD8Y"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=google.com header.i=@google.com header.b="f7sz0tga" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A599D20691 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:To:From:Subject:References:Mime-Version:Message-Id: In-Reply-To:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=LI3AArnKELFAHC1QeB3BrkFaCH6obTODfsCb1xCv+Rg=; b=bsBKcD8Y+OMWhrlXB3mvHGdb4 0i0LUhicagSoMh8dQDEex3hMgq+YepfTkbMCLtdoUDXMA7VOTjwK8bNR2R+G6vxfFf1sLCL7YaupC HBNcbds3AcyWgC+8ruxUSpUlwOthIc3vEBaema3rFsDw2uQtAmzRArbz0SePQolhhXFwWO9pXBIcU 66PAdkpTtfbdXhKstWQ9iEs51GZm90EnT1yLnlx03FCuV0KdAptfuDT4WAtqN64nlHFud0N8tF5ia UB40FaCDf6ZYTMgsR7Tx4GAPpNtMFhJgTu5/o/UNDZ2I/RV/VmVDyAQ/JsA2UJLKQTRInR9GPtajy FfiVaTgFg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jwaNN-0001tv-3m; Sat, 18 Jul 2020 00:06:49 +0000 Received: from mail-qk1-x74a.google.com ([2607:f8b0:4864:20::74a]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jwaNK-0001rX-19 for linux-mediatek@lists.infradead.org; Sat, 18 Jul 2020 00:06:46 +0000 Received: by mail-qk1-x74a.google.com with SMTP id z1so7142878qkz.3 for ; Fri, 17 Jul 2020 17:06:44 -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=IozxpR4poegczOG9DtmUYeWKLgTnfPs78q7YmFJNQU0gyNV1myE/aZ+f9eGernphft fYISDB+W0y8sQPdHunXi6Bqj1XhYICVW0CR8VW5DMgp49GF9KAtqmQUznVLscTUEOAnL 44yPgnx569aE4gUNkNuz9EHepV9wrjL9+u+vjwcdyIgLCNjUjNpznFveZeb1i4aPKBRe URoPtFPGHGl7xcOMVW/nM8Vqaz9He/EjWWdnrYeSmyT1osVHY7vENwViSICT9P41F96H +5CuMmz1EulHsxm2+EWB2ZjMnpTLq6omQeivmEGdiMafiBejlnsG652LdTYp9KZp5rqB MZFw== X-Gm-Message-State: AOAM532lZfzzDrDs/g+MtbP3O9NUwPqUEKReqG0+Onpbo2s14jyOP1Ik GYq+2L/qcAsTD2RLUVbBMvsibg1FzCoyl+w= 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200717_200646_126468_65943562 X-CRM114-Status: GOOD ( 16.81 ) X-Spam-Score: -7.7 (-------) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-7.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:74a listed in] [list.dnswl.org] -7.5 USER_IN_DEF_DKIM_WL From: address is in the default DKIM white-list -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.0 DKIMWL_WL_MED DKIMwl.org - Medium sender X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: CC Hwang , Saravana Kannan , linux-arm-msm@vger.kernel.org, Hanks Chen , Loda Chou , linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org, John Stultz , kernel-team@android.com, linux-arm-kernel@lists.infradead.org Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.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: 11671495 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 2DB8F618 for ; Sat, 18 Jul 2020 00:06:59 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 072B520691 for ; Sat, 18 Jul 2020 00:06:59 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="GrJ532L5"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=google.com header.i=@google.com header.b="eaB2T02E" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 072B520691 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:To:From:Subject:References:Mime-Version:Message-Id: In-Reply-To:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=DtKxkCORsPlcehGXe7MrYdjKPoQXGcalWoCUrIPkxTM=; b=GrJ532L5lP04qljvGVL1MLTBm hDspPEAqJ6AADPkBO4yYTi8voOx5lqGB0enPGCQHUU/TM9MNAttCpijGfEv+HvksrCoCs1ieSr/Us ad6hJWd3r/DKwZUi6WNbEgnZskWR2lEyIBVJd+j/vOnLesEuZrk78nApP0HCn5WHc0POwc21DbZzu S3k/7koqyRBpPlitjn1+UKewBQOLE8KvRNCRJqxa2fNSFKLMkoJY6pHGtFV5snI+GiOiKwCkSRkhR LNvoCXuqDNn4s7Ft25B9ogjmB8aEyLFLviCGV9VJkM0tifmz4MumjrcHb4ab2VFaM3PoJ0W860djp 1vmz3VdxA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jwaNU-0001xC-JT; Sat, 18 Jul 2020 00:06:56 +0000 Received: from mail-pl1-x649.google.com ([2607:f8b0:4864:20::649]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jwaNO-0001sQ-Q5 for linux-mediatek@lists.infradead.org; Sat, 18 Jul 2020 00:06:51 +0000 Received: by mail-pl1-x649.google.com with SMTP id p6so7555736plo.8 for ; Fri, 17 Jul 2020 17:06:47 -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=Lo280qK5SQ7lH/9/YEjtRLOK3F+s07tU8O5rw/zZREvSLmGpDFHTZpOCqz0mSvtjDO kDennCVKvoS0I1fJHLv8v/D9mFVs7icabWWtRHYQ81d+7mTumLbkxehkwCd8Eg8r6ChY UUS7WuYNXAdemS2UPnS9Z/ZoS1stGJ1eDF1k4AEClWZb7MmWkU6pgYGlqywo5paDntAQ rsHaAkvfUT9P1+CHApSSWBl9BntLsjh0sHOeyoepS4Day8lKpDkj62m+xcYK2FC0o59d ju07WkbTQID7fn3ASlA/1dTq/dmyMUXRPt01EMUwHpBMb5TARSNkGRQJphzV8NkSHQnu 3lmQ== X-Gm-Message-State: AOAM533DIGgR+cw3omKLn9fylPHmXOuBfQ4PLrMlTE7I7K9ncZmKcRMp bFPm2hPM41mDMhvAdWJYR2FMdN330w7oO2M= 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200717_200651_025225_EF5AF97B X-CRM114-Status: UNSURE ( 8.97 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -7.7 (-------) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-7.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:649 listed in] [list.dnswl.org] -7.5 USER_IN_DEF_DKIM_WL From: address is in the default DKIM white-list -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.0 DKIMWL_WL_MED DKIMwl.org - Medium sender X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: CC Hwang , Saravana Kannan , linux-arm-msm@vger.kernel.org, Hanks Chen , Loda Chou , linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org, John Stultz , kernel-team@android.com, linux-arm-kernel@lists.infradead.org Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.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: 11671497 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 44979618 for ; Sat, 18 Jul 2020 00:07:00 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1DCBB2074B for ; Sat, 18 Jul 2020 00:07:00 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="PYKpVwIP"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=google.com header.i=@google.com header.b="Pc3OXUSR" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1DCBB2074B Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:To:From:Subject:References:Mime-Version:Message-Id: In-Reply-To:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=qaNBvXEA7irBzPxeMx3uqoop76qnjoUTO0O0uGmoaoA=; b=PYKpVwIPTuhkOI3aB8dwKAI6G DEhFBVfin1OVrzga2MGAcUxuGVn8FPCc4Yqn9hmkhZJfLV5HVwg+9qvjXvgD5j2t8WEKK4zRFDlX3 3LrUZlrZrZk6pPcLAkwMOV3L6PZu4BQSFqHoJg+23Xwip/kM9uTkUTW2nfAeyyHNTVKrSc6c/pO+8 kFYwCmmEebEMVBuDEuvwjW/52PJSQrJW255JcbE49SdsO+yfaIj3ou9szcuLv9wiTY5buJuBJ7NUp UTUqJVHwARhnx+ubK9F9lu++ykCh3g+4pgsqhTA+6LEdE/y8IJTCC0pLjeXeUZTN1ov7eoNcybE80 UXEz4Hl8Q==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jwaNW-0001xp-6s; Sat, 18 Jul 2020 00:06:58 +0000 Received: from mail-yb1-xb4a.google.com ([2607:f8b0:4864:20::b4a]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jwaNQ-0001ta-MS for linux-mediatek@lists.infradead.org; Sat, 18 Jul 2020 00:06:54 +0000 Received: by mail-yb1-xb4a.google.com with SMTP id i9so2659826ybg.1 for ; Fri, 17 Jul 2020 17:06:49 -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=a/+AHHyDDa80NXXcR9rtu3OB2rDGS1WPILW7thHirdWPI8f3yR7lt1IiBIZsJyCH1A KdH83jjkZkKE8QHyxBuP3jZmXZht5RdEd/EryEBrgLLUBIajIHMxRVW6FGuCPPMWnbkt sSCTLTPvu+K138S/y0S1FkQTMCOuL53jNJ9/90aGM8F3c6OxJ0d+8o4zPM9GKU9bQutj Ts/FVocwjWS6tMF2U7qkmLWn3rkW31Bqi5CVQBGlua3tGJf1SdywQp9rF8rSHdECVY7I dgqPUSjU4kLLU8xIyYVWWvjSgYgLDUC5Iqa8/FMeltn6i/fw8+HKWpItVcqqdPlDttv4 FTlA== X-Gm-Message-State: AOAM532YThFQq1GwV5VaRO2zWie/cxvVUAt5a8DVf1aSPp9DggIX8OKV Au2Gk5HpLV9+m1EMQEM+8QeOycdXyfGnXpA= 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200717_200652_877471_5CB7B73D X-CRM114-Status: UNSURE ( 7.35 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -7.7 (-------) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-7.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:b4a listed in] [list.dnswl.org] -7.5 USER_IN_DEF_DKIM_WL From: address is in the default DKIM white-list -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.0 DKIMWL_WL_MED DKIMwl.org - Medium sender X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: CC Hwang , Saravana Kannan , linux-arm-msm@vger.kernel.org, Hanks Chen , Loda Chou , linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org, John Stultz , kernel-team@android.com, linux-arm-kernel@lists.infradead.org Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.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: 11671503 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 5D74D6C1 for ; Sat, 18 Jul 2020 00:07:14 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3731920691 for ; Sat, 18 Jul 2020 00:07:14 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="wV9O2yqr"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=google.com header.i=@google.com header.b="oFBiOJFo" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3731920691 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:To:From:Subject:References:Mime-Version:Message-Id: In-Reply-To:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=jLvggMxewywmyBRZAxHJBCJazF/SsfNvzeuLagIbF/o=; b=wV9O2yqr0+Mj0Znco4KmiJhS6 ICkG9OXG022wYKbDzCS1k5jya2KLC0qqWyP1aOk1hvVBjn43+e3wLuTbnGPgldm2ktcGW3DDeeqsp BUJ2UK3maqDJPtWrGaDLXikcKZFEs8tOOszD7WEORp51HaITeisM8f0YCPgXIvn1O99cLHJLKPX4n I97GMNhPkDuw3aZ5NNS/Sx9VBPpH0PX6heaCj1B+0Q6e5IHohFxfyV5D/Ggwcy3SP1xxFPQfo37Zk xRT13+oaY0nvyUSnsNAA4esncpnYpDxF2al3ph/Z+2KzK9ykhOBt+te3/DoX/241Mjt4zCI1oO4X+ bt5Sbp7kA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jwaNk-00022D-Fk; Sat, 18 Jul 2020 00:07:12 +0000 Received: from mail-pl1-x649.google.com ([2607:f8b0:4864:20::649]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jwaNR-0001uB-Gk for linux-mediatek@lists.infradead.org; Sat, 18 Jul 2020 00:06:56 +0000 Received: by mail-pl1-x649.google.com with SMTP id p14so7564691plq.19 for ; Fri, 17 Jul 2020 17:06:51 -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=odKpmaUlC4oGQZ1ivHZ7xWCzHnp/zZOy4XY28bUB0hmu9+aJ6bYz6HxbVOvA6/fx+i YhthCvRM7O+U32J76x2AZ7MX8g02gzfuU2ny0qagMwYIV83qR4OFe4lw7Wq7GlgEcpiu pCwD3Uy86b5zsxzzxKyX4NIYyowsHYD3fGfrGmUsBggBZ2xecO0lD1sKOnF7b02IsU8g InqsW1jFLwfXqun4t7GOWc05boMCmcLMAIK8z2SGvln3lRdk2mKC0N0fSx8TWzPGV7sw 4HF6E9mj1IjcufWrrzti22/3CFrIJjmjnSLVFPYKEreo3uwaum1q0CeUu+qBcpN94CC7 bZqA== X-Gm-Message-State: AOAM530rZ3LcsUkURFcx8wLa9YxCACRK58JESLVsh9WbQrMxx/+k1ijc fHx5WjlT8+X1eyuzJTpwqBT6ejCBotowB7w= 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200717_200653_616013_AF5DC220 X-CRM114-Status: UNSURE ( 7.35 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -7.7 (-------) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-7.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:649 listed in] [list.dnswl.org] -7.5 USER_IN_DEF_DKIM_WL From: address is in the default DKIM white-list -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.0 DKIMWL_WL_MED DKIMwl.org - Medium sender X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: CC Hwang , Saravana Kannan , linux-arm-msm@vger.kernel.org, Hanks Chen , Loda Chou , linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org, John Stultz , kernel-team@android.com, linux-arm-kernel@lists.infradead.org Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.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)