Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp2566728ybt; Tue, 16 Jun 2020 09:10:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwqm6SFWfmSd8HLqb1K7IoJJ9ma/OsuxIXod3u2Y7AYhn+CNA3ccG5t4tRrBCqTt1GCIOEp X-Received: by 2002:a17:906:51c9:: with SMTP id v9mr3340764ejk.337.1592323855897; Tue, 16 Jun 2020 09:10:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592323855; cv=none; d=google.com; s=arc-20160816; b=TOU7ei0ex1tNo82zZfdl6/Eqc4cv4wr/24fALVJ9wjMw6z7gNcVdVxiudQdKgvEwLL VP054MFYDFic53phef3ejLfUwzVfDeQN9xjdID2VyZKj1uxnsST46NuISlxJX+WaAgDY rWguhJGTWF/09oh0DZvvCLoeXYVgPMSUPCL6FG5BOnS4bOrfLw4YfayQntIW0KK48cnh WdNsuwGeXQywYMYsy41c7Q8YxJTAs+upT2m3Q9QojJzCTCNw9tCDTaAPiej9saNFE0NM xd46WKNI4NpiKD6W8ohG+6+bVvLTUDjfMt6lQlfy5zh3DC+haCTtKeAK2RwJDoCivUCQ MwSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dmarc-filter:dkim-signature; bh=MD92WfPRgR/jkFLJAG2o5YhCjEHFWsLDGTiEaMXk+O4=; b=oCudyQ3PYaHKWiD6KqNtuCO3isODi8bCj/l8faXO/Mokkz4ngLc9rjI2nD/d46jmHR AY15q7Lz/F7xXte78E4RaHgtMK4OUianZT//KpG5QFnANvD5ogVU2AMxWEK8sSjVuXq9 uFkWE0nAlbIi0tQR2WCXWJWM483Nvtdm2UM6gf5iLXQAyH/rGYdmqFd1mdMPcF0HZcG2 Q3q3YZJEOc0+wYVfudIDSlPqqbNGxWeiqhjT/+aTA2I9K0/fyZF19eF8vqzAhDwkqqed k1foNlmIH97nuJ2BlgI81CZFwhtx0A4m0HekEhOkhDXd6P3aBku4EgvQsLXDOqhtSdYQ Uhrg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@mg.codeaurora.org header.s=smtp header.b=m7xJtfd6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ch2si10644395edb.511.2020.06.16.09.10.32; Tue, 16 Jun 2020 09:10:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@mg.codeaurora.org header.s=smtp header.b=m7xJtfd6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732631AbgFPQIo (ORCPT + 99 others); Tue, 16 Jun 2020 12:08:44 -0400 Received: from m43-7.mailgun.net ([69.72.43.7]:54363 "EHLO m43-7.mailgun.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732166AbgFPQIk (ORCPT ); Tue, 16 Jun 2020 12:08:40 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1592323719; h=In-Reply-To: Content-Type: MIME-Version: References: Message-ID: Subject: Cc: To: From: Date: Sender; bh=MD92WfPRgR/jkFLJAG2o5YhCjEHFWsLDGTiEaMXk+O4=; b=m7xJtfd6CQazK7aMdgGAyfgDAeg/zKIYR4v4vPKc/QANRL8xvMCSW7qETLU4O2latcdIUlcC 2zIjl4H6sm4IFpCkS1SeEmndSpnlJ2LyXgSvjIsz5ooRe3Urz7TWW4G/yYrYLTacpzc9/rAb phNejYiJyzdf0QOP6GOioUkZH04= X-Mailgun-Sending-Ip: 69.72.43.7 X-Mailgun-Sid: WyI0MWYwYSIsICJsaW51eC1rZXJuZWxAdmdlci5rZXJuZWwub3JnIiwgImJlOWU0YSJd Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n11.prod.us-east-1.postgun.com with SMTP id 5ee8ee75bfb34e631cae2c64 (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Tue, 16 Jun 2020 16:08:21 GMT Received: by smtp.codeaurora.org (Postfix, from userid 1001) id D9B68C433AD; Tue, 16 Jun 2020 16:08:20 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-caf-mail-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=2.0 tests=ALL_TRUSTED,SPF_NONE, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from localhost (i-global254.qualcomm.com [199.106.103.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: ilina) by smtp.codeaurora.org (Postfix) with ESMTPSA id 2594BC433CA; Tue, 16 Jun 2020 16:08:19 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 2594BC433CA Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=none smtp.mailfrom=ilina@codeaurora.org Date: Tue, 16 Jun 2020 10:08:18 -0600 From: Lina Iyer To: Maulik Shah Cc: John Stultz , lkml , Andy Gross , Bjorn Andersson , Joerg Roedel , Thomas Gleixner , Jason Cooper , Marc Zyngier , Linus Walleij , Saravana Kannan , Todd Kjos , Greg Kroah-Hartman , linux-arm-msm@vger.kernel.org, iommu@lists.linux-foundation.org, linux-gpio@vger.kernel.org Subject: Re: [RFC][PATCH 3/5] irqchip: Allow QCOM_PDC to be loadable as a perment module Message-ID: <20200616160818.GD12942@codeaurora.org> References: <20200616061338.109499-1-john.stultz@linaro.org> <20200616061338.109499-4-john.stultz@linaro.org> <55e5982a-1e73-7013-e02d-5d1d30815fba@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <55e5982a-1e73-7013-e02d-5d1d30815fba@codeaurora.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 16 2020 at 05:30 -0600, Maulik Shah wrote: >Hi, > >On 6/16/2020 11:43 AM, John Stultz wrote: >>Allows qcom-pdc driver to be loaded as a permenent module > >typo: permanent > >>Also, due to the fact that IRQCHIP_DECLARE becomes a no-op when >>building as a module, we have to add the platform driver hooks >>explicitly. >> >>Thanks to Saravana for his help on pointing out the >>IRQCHIP_DECLARE issue and guidance on a solution. >> >>Cc: Andy Gross >>Cc: Bjorn Andersson >>Cc: Joerg Roedel >>Cc: Thomas Gleixner >>Cc: Jason Cooper >>Cc: Marc Zyngier >>Cc: Linus Walleij >>Cc: Lina Iyer >>Cc: Saravana Kannan >>Cc: Todd Kjos >>Cc: Greg Kroah-Hartman >>Cc: linux-arm-msm@vger.kernel.org >>Cc: iommu@lists.linux-foundation.org >>Cc: linux-gpio@vger.kernel.org >>Signed-off-by: John Stultz >>--- >> drivers/irqchip/Kconfig | 2 +- >> drivers/irqchip/qcom-pdc.c | 30 ++++++++++++++++++++++++++++++ >> 2 files changed, 31 insertions(+), 1 deletion(-) >> >>diff --git a/drivers/irqchip/Kconfig b/drivers/irqchip/Kconfig >>index 29fead208cad..12765bed08f9 100644 >>--- a/drivers/irqchip/Kconfig >>+++ b/drivers/irqchip/Kconfig >>@@ -425,7 +425,7 @@ config GOLDFISH_PIC >> for Goldfish based virtual platforms. >> config QCOM_PDC >>- bool "QCOM PDC" >>+ tristate "QCOM PDC" >> depends on ARCH_QCOM >> select IRQ_DOMAIN_HIERARCHY >> help >>diff --git a/drivers/irqchip/qcom-pdc.c b/drivers/irqchip/qcom-pdc.c >>index 6ae9e1f0819d..98d74160afcd 100644 >>--- a/drivers/irqchip/qcom-pdc.c >>+++ b/drivers/irqchip/qcom-pdc.c >>@@ -11,7 +11,9 @@ >> #include >> #include >> #include >>+#include >> #include >>+#include >please move this include in order after of_device.h >> #include >> #include >> #include >>@@ -430,4 +432,32 @@ static int qcom_pdc_init(struct device_node *node, struct device_node *parent) >> return ret; >> } >>+#ifdef MODULE >>+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, > >can you please set .suppress_bind_attrs = true, > >This is to prevent bind/unbind using sysfs. Once irqchip driver module >is loaded, it shouldn't get unbind at runtime. > That is a good point. We probably should do that to RPMH RSC driver as well. >Thanks, >Maulik >>+ }, >>+}; >>+module_platform_driver(qcom_pdc_driver); >>+#else >> IRQCHIP_DECLARE(qcom_pdc, "qcom,pdc", qcom_pdc_init); >>+#endif >>+ >>+MODULE_DESCRIPTION("Qualcomm Technologies, Inc. Power Domain Controller"); >>+MODULE_LICENSE("GPL v2"); > >-- >QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation >